diff --git a/.github/actions/create-package-validation-issue/.gitignore b/.github/actions/create-package-validation-issue/.gitignore new file mode 100644 index 0000000000000..19c7c07fb5ed9 --- /dev/null +++ b/.github/actions/create-package-validation-issue/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +*.log +.DS_Store \ No newline at end of file diff --git a/.github/actions/create-package-validation-issue/README.md b/.github/actions/create-package-validation-issue/README.md new file mode 100644 index 0000000000000..bd7adb51a767f --- /dev/null +++ b/.github/actions/create-package-validation-issue/README.md @@ -0,0 +1,152 @@ +# Create Package Validation Issue Action + +This GitHub Action creates or updates issues when package validation failures are detected in the Pipedream repository. + +## Features + +- โœ… **Smart Issue Management**: Creates new issues or updates existing ones for the same day +- ๐Ÿ“Š **Rich Reporting**: Includes detailed summaries, failure categories, and quick action commands +- ๐Ÿ”„ **Fallback Support**: Works with both JSON and text validation reports +- ๐Ÿท๏ธ **Auto-labeling**: Automatically applies appropriate labels for organization +- ๐Ÿ“ˆ **Failure Analysis**: Groups failures by category for easier debugging + +## Inputs + +| Input | Description | Required | Default | +|-------|-------------|----------|---------| +| `github-token` | GitHub token for API access | โœ… | - | +| `validation-report-json` | Path to JSON validation report | โœ… | `validation-report.json` | +| `validation-report-txt` | Path to text validation report | โŒ | `validation-report.txt` | +| `workflow-run-number` | GitHub workflow run number | โœ… | - | +| `workflow-run-id` | GitHub workflow run ID | โœ… | - | +| `server-url` | GitHub server URL | โœ… | - | +| `repository` | Repository name (owner/repo) | โœ… | - | + +## Outputs + +| Output | Description | Example | +|--------|-------------|---------| +| `issue-created` | Whether a new issue was created | `true`/`false` | +| `issue-updated` | Whether an existing issue was updated | `true`/`false` | +| `issue-url` | URL of the created/updated issue | `https://github.com/...` | +| `failed-count` | Number of failed packages | `42` | + +**Note**: All outputs are properly set for both regular and composite actions, supporting `core.setOutput()` and `$GITHUB_OUTPUT` file methods. + +## Usage + +```yaml +- name: Create Issue on Failures + if: steps.check_failures.outputs.failed_count != '0' + uses: ./.github/actions/create-package-validation-issue + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + validation-report-json: 'validation-report.json' + validation-report-txt: 'validation-report.txt' # optional + workflow-run-number: ${{ github.run_number }} + workflow-run-id: ${{ github.run_id }} + server-url: ${{ github.server_url }} + repository: ${{ github.repository }} +``` + +## Issue Format + +The action creates issues with: + +### ๐Ÿ“ฆ Title Format +``` +๐Ÿ“ฆ Package Validation Report - [Date] - [X] failures +``` + +### ๐Ÿ“‹ Content Sections +1. **Summary**: Overview statistics of validation results +2. **Links**: Direct links to workflow run and artifacts +3. **Failed Packages**: List of top failing packages with error types +4. **Failure Categories**: Grouped failures by validation type +5. **Next Steps**: Action items for developers +6. **Quick Commands**: Copy-paste commands for local testing + +### ๐Ÿท๏ธ Auto-applied Labels +- `package-validation`: Identifies validation-related issues +- `automated`: Marks as automatically created +- `bug`: Indicates packages needing fixes + +## Behavior + +### New Issues +- Creates a new issue if no open validation issue exists for the current date +- Applies appropriate labels automatically + +### Existing Issues +- Updates existing issues with new validation results as comments +- Avoids creating duplicate issues for the same day +- Maintains issue history through comments + +### No Failures +- Skips issue creation when no validation failures are detected +- Sets output flags appropriately for workflow logic + +## Error Handling + +- **JSON Parse Errors**: Falls back to text report parsing +- **Missing Files**: Gracefully handles missing report files +- **API Failures**: Provides detailed error messages for debugging +- **Network Issues**: Fails gracefully with actionable error messages + +## Development + +### Local Testing +```bash +# Install dependencies +cd .github/actions/create-package-validation-issue +npm install + +# Test with sample data +node test/test-action.js +``` + +### Dependencies +- `@actions/core`: GitHub Actions toolkit for inputs/outputs +- `@actions/github`: GitHub API client and context + +### Technical Notes +- **Composite Action**: Uses `composite` action type to handle dependency installation automatically +- **Auto-Install**: Dependencies are installed during action execution for reliability +- **Path Resolution**: File paths are resolved relative to the GitHub workspace +- **Fallback Support**: Gracefully handles missing files and parse errors + +## Integration + +This action is designed to work with: +- `scripts/generate-package-report.js`: Validation report generator +- `.github/workflows/scheduled-package-validation.yaml`: Scheduled validation workflow +- Pipedream component validation pipeline + +## Example Issue Output + +```markdown +# ๐Ÿ“ฆ Scheduled Package Validation Report - Mon Jan 15 2024 + +๐Ÿ“Š **Summary:** +- Total Components: 2932 +- โœ… Validated: 2847 +- โŒ Failed: 85 +- โญ๏ธ Skipped: 1250 +- ๐Ÿ“ˆ Publishable: 2932 +- ๐Ÿ“‰ Failure Rate: 2.90% + +## ๐Ÿ”— Links +- **Workflow Run**: [#123](https://github.com/org/repo/actions/runs/456) +- **Download Reports**: Check the workflow artifacts for detailed reports + +## โŒ Failed Packages +- **@pipedream/netlify** (netlify): import, dependencies +- **@pipedream/google-slides** (google_slides): mainFile +- ... and 83 more packages + +## Next Steps +1. Review the failed packages listed above +2. Check the full validation report artifact +3. Fix import/dependency issues in failing packages +... +``` \ No newline at end of file diff --git a/.github/actions/create-package-validation-issue/action.yml b/.github/actions/create-package-validation-issue/action.yml new file mode 100644 index 0000000000000..c94f71b63688c --- /dev/null +++ b/.github/actions/create-package-validation-issue/action.yml @@ -0,0 +1,69 @@ +name: 'Create Package Validation Issue' +description: 'Creates or updates GitHub issues when package validation failures are detected' +inputs: + github-token: + description: 'GitHub token for creating issues' + required: true + validation-report-json: + description: 'Path to the JSON validation report file' + required: true + default: 'validation-report.json' + validation-report-txt: + description: 'Path to the text validation report file' + required: false + default: 'validation-report.txt' + workflow-run-number: + description: 'GitHub workflow run number' + required: true + workflow-run-id: + description: 'GitHub workflow run ID' + required: true + server-url: + description: 'GitHub server URL' + required: true + repository: + description: 'Repository name in owner/repo format' + required: true + +outputs: + issue-created: + description: 'Whether a new issue was created' + value: ${{ steps.run_issue_creation.outputs.issue-created }} + issue-updated: + description: 'Whether an existing issue was updated' + value: ${{ steps.run_issue_creation.outputs.issue-updated }} + issue-url: + description: 'URL of the created/updated issue' + value: ${{ steps.run_issue_creation.outputs.issue-url }} + failed-count: + description: 'Number of failed packages' + value: ${{ steps.run_issue_creation.outputs.failed-count }} + +runs: + using: 'composite' + steps: + - name: Setup Node.js for action + uses: actions/setup-node@v4.0.3 + with: + node-version: '20' + + - name: Install action dependencies + shell: bash + run: | + cd ${{ github.action_path }} + npm install + + - name: Run issue creation + id: run_issue_creation + shell: bash + run: | + cd ${{ github.action_path }} + node src/index.js + env: + INPUT_GITHUB_TOKEN: ${{ inputs.github-token }} + INPUT_VALIDATION_REPORT_JSON: ${{ inputs.validation-report-json }} + INPUT_VALIDATION_REPORT_TXT: ${{ inputs.validation-report-txt }} + INPUT_WORKFLOW_RUN_NUMBER: ${{ inputs.workflow-run-number }} + INPUT_WORKFLOW_RUN_ID: ${{ inputs.workflow-run-id }} + INPUT_SERVER_URL: ${{ inputs.server-url }} + INPUT_REPOSITORY: ${{ inputs.repository }} \ No newline at end of file diff --git a/.github/actions/create-package-validation-issue/package.json b/.github/actions/create-package-validation-issue/package.json new file mode 100644 index 0000000000000..5dc4aa1b81386 --- /dev/null +++ b/.github/actions/create-package-validation-issue/package.json @@ -0,0 +1,21 @@ +{ + "name": "create-package-validation-issue", + "version": "1.0.0", + "description": "GitHub Action to create or update issues for package validation failures", + "main": "src/index.js", + "scripts": { + "test": "echo \"No tests yet\" && exit 0" + }, + "dependencies": { + "@actions/core": "^1.10.1", + "@actions/github": "^6.0.0" + }, + "keywords": [ + "github-action", + "pipedream", + "package-validation", + "issues" + ], + "author": "Pipedream", + "license": "MIT" +} \ No newline at end of file diff --git a/.github/actions/create-package-validation-issue/src/index.js b/.github/actions/create-package-validation-issue/src/index.js new file mode 100644 index 0000000000000..bae74bdd2fb34 --- /dev/null +++ b/.github/actions/create-package-validation-issue/src/index.js @@ -0,0 +1,281 @@ +const core = require('@actions/core'); +const github = require('@actions/github'); +const fs = require('fs'); + +async function run() { + try { + // Get inputs - handle both core.getInput and environment variables for composite actions + const githubToken = core.getInput('github-token') || process.env.INPUT_GITHUB_TOKEN; + const validationReportJson = core.getInput('validation-report-json') || process.env.INPUT_VALIDATION_REPORT_JSON; + const validationReportTxt = core.getInput('validation-report-txt') || process.env.INPUT_VALIDATION_REPORT_TXT; + const workflowRunNumber = core.getInput('workflow-run-number') || process.env.INPUT_WORKFLOW_RUN_NUMBER; + const workflowRunId = core.getInput('workflow-run-id') || process.env.INPUT_WORKFLOW_RUN_ID; + const serverUrl = core.getInput('server-url') || process.env.INPUT_SERVER_URL; + const repository = core.getInput('repository') || process.env.INPUT_REPOSITORY; + + // Validate required inputs + if (!githubToken) { + throw new Error('github-token is required'); + } + if (!validationReportJson) { + throw new Error('validation-report-json is required'); + } + if (!workflowRunNumber || !workflowRunId || !serverUrl || !repository) { + throw new Error('workflow metadata (run-number, run-id, server-url, repository) is required'); + } + + // Initialize GitHub client + const octokit = github.getOctokit(githubToken); + const context = github.context; + + // Set up repository context for composite actions + const [owner, repo] = repository.split('/'); + const repoContext = { + owner: owner || context.repo?.owner, + repo: repo || context.repo?.repo + }; + + // Read and parse validation reports + let reportData = null; + let failedCount = 0; + let summaryText = ''; + + // Resolve file paths relative to the workspace, not the action directory + const workspacePath = process.env.GITHUB_WORKSPACE || process.cwd(); + const jsonReportPath = validationReportJson.startsWith('/') + ? validationReportJson + : `${workspacePath}/${validationReportJson}`; + const txtReportPath = validationReportTxt && !validationReportTxt.startsWith('/') + ? `${workspacePath}/${validationReportTxt}` + : validationReportTxt; + + core.info(`Reading validation report from: ${jsonReportPath}`); + + try { + if (fs.existsSync(jsonReportPath)) { + const jsonReport = fs.readFileSync(jsonReportPath, 'utf8'); + reportData = JSON.parse(jsonReport); + failedCount = reportData.summary.failed; + + summaryText = ` +๐Ÿ“Š **Summary:** +- Total Components: ${reportData.summary.total} +- โœ… Validated: ${reportData.summary.validated} +- โŒ Failed: ${reportData.summary.failed} +- โญ๏ธ Skipped: ${reportData.summary.skipped} +- ๐Ÿ“ˆ Publishable: ${reportData.summary.publishable} +- ๐Ÿ“‰ Failure Rate: ${reportData.summary.failureRate}% + `; + + core.info(`Parsed JSON report: ${failedCount} failures found`); + } else { + core.warning(`JSON report file not found: ${jsonReportPath}`); + failedCount = 0; + } + } catch (error) { + core.warning(`Failed to parse JSON report: ${error.message}`); + + // Fallback to text report + try { + if (txtReportPath && fs.existsSync(txtReportPath)) { + const report = fs.readFileSync(txtReportPath, 'utf8'); + const failedPackages = report.match(/โŒ.*FAILED:/g) || []; + failedCount = failedPackages.length; + summaryText = `Failed to parse JSON report. Found ${failedCount} failures in text report.`; + core.info(`Fallback to text report: ${failedCount} failures found`); + } + } catch (txtError) { + core.error(`Failed to read text report: ${txtError.message}`); + failedCount = 0; + } + } + + // Exit early if no failures + if (failedCount === 0) { + core.info('No failures detected, skipping issue creation'); + core.setOutput('issue-created', 'false'); + core.setOutput('issue-url', ''); + return; + } + + core.info(`Processing ${failedCount} failures`); + + // Generate failed packages list + let failedPackagesList = ''; + if (reportData && reportData.failed) { + const topFailures = reportData.failed.slice(0, 10); + failedPackagesList = topFailures.map(pkg => { + const failureTypes = pkg.failures.map(f => f.check).join(', '); + return `- **${pkg.packageName}** (${pkg.app}): ${failureTypes}`; + }).join('\n'); + + if (reportData.failed.length > 10) { + failedPackagesList += `\n- ... and ${reportData.failed.length - 10} more packages`; + } + } else { + failedPackagesList = 'See full report for details.'; + } + + // Create issue body + const today = new Date().toDateString(); + const issueBody = ` +# ๐Ÿ“ฆ Scheduled Package Validation Report - ${today} + +${summaryText} + +## ๐Ÿ”— Links +- **Workflow Run**: [#${workflowRunNumber}](${serverUrl}/${repository}/actions/runs/${workflowRunId}) +- **Download Reports**: Check the workflow artifacts for detailed JSON and text reports + +## โŒ Failed Packages +${failedPackagesList} + +## ๐Ÿ“‹ Failure Categories +${reportData ? generateFailureCategoriesText(reportData) : 'Categories unavailable - check full report'} + +## Full Report +The complete validation report is available as an artifact in the workflow run. + +## Next Steps +1. Review the failed packages listed above +2. Check the full validation report artifact for detailed error messages +3. Fix import/dependency issues in failing packages +4. Consider updating package.json configurations +5. Ensure all main files have proper exports + +## ๐Ÿ”ง Quick Commands +To test a specific package locally: +\`\`\`bash +npm run validate:package -- +\`\`\` + +To run validation on all packages: +\`\`\`bash +npm run validate:packages:verbose +\`\`\` + +--- +*This issue was automatically created by the scheduled package validation workflow.* + `; + + // Check for existing open issues + core.info('Checking for existing open issues...'); + const { data: issues } = await octokit.rest.issues.listForRepo({ + owner: repoContext.owner, + repo: repoContext.repo, + labels: ['package-validation', 'automated'], + state: 'open' + }); + + const existingIssue = issues.find(issue => + issue.title.includes(today) && + issue.title.includes('Scheduled Package Validation Report') + ); + + let issueUrl = ''; + let issueCreated = false; + let issueUpdated = false; + + if (existingIssue) { + // Update existing issue with a comment + core.info(`Updating existing issue #${existingIssue.number}`); + + const comment = await octokit.rest.issues.createComment({ + owner: repoContext.owner, + repo: repoContext.repo, + issue_number: existingIssue.number, + body: `## ๐Ÿ”„ Updated Report - Run #${workflowRunNumber} + +${issueBody} + +--- +*Issue updated at ${new Date().toISOString()}*` + }); + + issueUrl = existingIssue.html_url; + issueCreated = false; + issueUpdated = true; + core.info(`Updated issue: ${issueUrl}`); + } else { + // Create new issue + core.info('Creating new issue...'); + + const newIssue = await octokit.rest.issues.create({ + owner: repoContext.owner, + repo: repoContext.repo, + title: `๐Ÿ“ฆ Scheduled Package Validation Report - ${today} - ${failedCount} failures`, + body: issueBody, + labels: ['package-validation', 'automated', 'bug'] + }); + + issueUrl = newIssue.data.html_url; + issueCreated = true; + issueUpdated = false; + core.info(`Created new issue: ${issueUrl}`); + } + + // Set outputs for both regular and composite actions + core.setOutput('issue-created', issueCreated.toString()); + core.setOutput('issue-updated', issueUpdated.toString()); + core.setOutput('issue-url', issueUrl); + core.setOutput('failed-count', failedCount.toString()); + + // For composite actions, also write to GITHUB_OUTPUT file + if (process.env.GITHUB_OUTPUT) { + const outputData = [ + `issue-url=${issueUrl}`, + `failed-count=${failedCount.toString()}`, + `issue-created=${issueCreated.toString()}`, + `issue-updated=${issueUpdated.toString()}` + ].join('\n') + '\n'; + + fs.appendFileSync(process.env.GITHUB_OUTPUT, outputData); + } + + } catch (error) { + core.setFailed(`Action failed: ${error.message}`); + console.error('Full error:', error); + } +} + +function generateFailureCategoriesText(reportData) { + if (!reportData.failed || reportData.failed.length === 0) { + return 'No failure categories to display.'; + } + + const failuresByCategory = {}; + + reportData.failed.forEach(({ packageName, failures }) => { + failures.forEach(failure => { + if (!failuresByCategory[failure.check]) { + failuresByCategory[failure.check] = []; + } + failuresByCategory[failure.check].push({ + packageName, + error: failure.error + }); + }); + }); + + let categoriesText = ''; + Object.entries(failuresByCategory).forEach(([category, failures]) => { + categoriesText += `\n### ๐Ÿ” ${category.toUpperCase()} Failures (${failures.length})\n`; + + failures.slice(0, 3).forEach(({ packageName, error }) => { + categoriesText += `- **${packageName}**: ${error}\n`; + }); + + if (failures.length > 3) { + categoriesText += `- ... and ${failures.length - 3} more\n`; + } + }); + + return categoriesText; +} + +// Run the action +if (require.main === module) { + run(); +} + +module.exports = { run }; \ No newline at end of file diff --git a/.github/actions/create-package-validation-issue/test/test-action.js b/.github/actions/create-package-validation-issue/test/test-action.js new file mode 100644 index 0000000000000..d85f801e5721b --- /dev/null +++ b/.github/actions/create-package-validation-issue/test/test-action.js @@ -0,0 +1,176 @@ +#!/usr/bin/env node + +/** + * Test script for the create-package-validation-issue action + * This helps test the action logic locally without GitHub Actions + */ + +const fs = require('fs'); +const path = require('path'); + +// Mock the GitHub Actions environment +process.env.GITHUB_REPOSITORY = 'pipedream/pipedream'; +process.env.GITHUB_SERVER_URL = 'https://github.com'; + +// Mock @actions/core +const mockCore = { + info: (message) => console.log(`[INFO] ${message}`), + warning: (message) => console.log(`[WARN] ${message}`), + error: (message) => console.log(`[ERROR] ${message}`), + setFailed: (message) => console.log(`[FAILED] ${message}`), + setOutput: (name, value) => console.log(`[OUTPUT] ${name}=${value}`), + getInput: (name) => { + const inputs = { + 'github-token': 'fake-token-for-testing', + 'validation-report-json': path.join(__dirname, 'sample-report.json'), + 'validation-report-txt': path.join(__dirname, 'sample-report.txt'), + 'workflow-run-number': '123', + 'workflow-run-id': '456', + 'server-url': 'https://github.com', + 'repository': 'pipedream/pipedream' + }; + return inputs[name] || ''; + } +}; + +// Mock @actions/github +const mockGithub = { + context: { + repo: { + owner: 'pipedream', + repo: 'pipedream' + } + }, + getOctokit: (token) => ({ + rest: { + issues: { + listForRepo: async () => ({ + data: [] // No existing issues for testing + }), + create: async (params) => { + console.log('[MOCK] Would create issue:', params.title); + return { + data: { + html_url: 'https://github.com/pipedream/pipedream/issues/123' + } + }; + }, + createComment: async (params) => { + console.log('[MOCK] Would create comment on issue:', params.issue_number); + return { data: {} }; + } + } + } + }) +}; + +// Create sample test data +const sampleReport = { + generatedAt: new Date().toISOString(), + summary: { + total: 100, + validated: 85, + failed: 15, + skipped: 50, + publishable: 100, + failureRate: '15.00' + }, + validated: [ + { app: 'netlify', packageName: '@pipedream/netlify' }, + { app: 'slack', packageName: '@pipedream/slack' } + ], + failed: [ + { + app: 'google_slides', + packageName: '@pipedream/google_slides', + failures: [ + { check: 'import', error: 'Cannot find module' }, + { check: 'dependencies', error: 'Missing @pipedream/platform' } + ] + }, + { + app: 'broken_app', + packageName: '@pipedream/broken_app', + failures: [ + { check: 'mainFile', error: 'Main file not found' } + ] + } + ], + skipped: [ + { app: 'private_app', packageName: 'private_app', reason: 'Not a @pipedream package' } + ] +}; + +const sampleTextReport = ` +๐Ÿ“Š PIPEDREAM PACKAGE VALIDATION REPORT +Generated: ${new Date().toISOString()} +Total Components: 100 +============================================================= + +โŒ google_slides (@pipedream/google_slides) - FAILED: Import test failed +โŒ broken_app (@pipedream/broken_app) - FAILED: Main file not found +โœ… netlify (@pipedream/netlify) - VALID +โœ… slack (@pipedream/slack) - VALID + +๐Ÿ“Š DETAILED VALIDATION SUMMARY +============================================================= +๐Ÿ“ฆ Total Components: 100 +โœ… Validated Successfully: 85 +โŒ Failed Validation: 15 +โญ๏ธ Skipped: 50 +๐Ÿ“ˆ Publishable Packages: 100 +๐Ÿ“‰ Failure Rate: 15.00% +`; + +// Write test files +const testDir = __dirname; +if (!fs.existsSync(testDir)) { + fs.mkdirSync(testDir, { recursive: true }); +} + +fs.writeFileSync( + path.join(testDir, 'sample-report.json'), + JSON.stringify(sampleReport, null, 2) +); + +fs.writeFileSync( + path.join(testDir, 'sample-report.txt'), + sampleTextReport +); + +// Mock the modules and run the action +const Module = require('module'); +const originalRequire = Module.prototype.require; + +Module.prototype.require = function(id) { + if (id === '@actions/core') { + return mockCore; + } + if (id === '@actions/github') { + return mockGithub; + } + return originalRequire.apply(this, arguments); +}; + +// Import and run the action +const { run } = require('../src/index.js'); + +console.log('๐Ÿงช Testing create-package-validation-issue action...\n'); + +run() + .then(() => { + console.log('\nโœ… Test completed successfully!'); + }) + .catch((error) => { + console.error('\nโŒ Test failed:', error); + process.exit(1); + }) + .finally(() => { + // Cleanup + try { + fs.unlinkSync(path.join(testDir, 'sample-report.json')); + fs.unlinkSync(path.join(testDir, 'sample-report.txt')); + } catch (e) { + // Ignore cleanup errors + } + }); \ No newline at end of file diff --git a/.github/workflows/docs-pr.yaml b/.github/workflows/docs-pr.yaml deleted file mode 100644 index 45cd4c2f065e6..0000000000000 --- a/.github/workflows/docs-pr.yaml +++ /dev/null @@ -1,57 +0,0 @@ -name: Validate MDX Links - -on: - pull_request: - paths: - - 'docs-v2/pages/**/*.mdx' - push: - branches: - - main - paths: - - 'docs-v2/pages/**/*.mdx' - -jobs: - validate-links: - runs-on: ubuntu-latest - defaults: - run: - working-directory: docs-v2 - - steps: - - name: Checkout Code - uses: actions/checkout@v4.1.7 - with: - # Fetch full history for checking diffs - fetch-depth: 0 - - - uses: pnpm/action-setup@v4.0.0 - with: - version: 9.14.2 - - - name: Get pnpm store directory - id: pnpm-cache - run: | - echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Setup Node Env - uses: actions/setup-node@v4.1.0 - with: - node-version: 18 - registry-url: https://registry.npmjs.org/ - cache: 'pnpm' - - - name: Install dependencies - run: pnpm install -r - - - name: Run link validator - run: node validate-mdx-links.mjs - env: - DEBUG: ${{ vars.DEBUG }} \ No newline at end of file diff --git a/.github/workflows/scheduled-package-validation.yaml b/.github/workflows/scheduled-package-validation.yaml new file mode 100644 index 0000000000000..e56d2cc624b78 --- /dev/null +++ b/.github/workflows/scheduled-package-validation.yaml @@ -0,0 +1,93 @@ +name: Scheduled Package Validation Report + +on: + schedule: + # Run weekly on Mondays at 2:00 PM UTC + - cron: '0 14 * * 1' + workflow_dispatch: # Allow manual triggering for testing + +jobs: + validate-packages: + name: Generate Package Validation Report + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4.1.7 + + - name: Setup pnpm + uses: pnpm/action-setup@v4.0.0 + with: + version: 9.14.2 + + - name: Setup Node.js + uses: actions/setup-node@v4.0.3 + with: + node-version: 18 + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install -r --no-frozen-lockfile + + - name: Compile TypeScript + run: pnpm run build + + - name: Run Package Validation Report + id: validation + run: | + node scripts/generate-package-report.js --verbose --report-only --output=validation-report.json > validation-report.txt 2>&1 + echo "validation_exit_code=$?" >> $GITHUB_OUTPUT + continue-on-error: true + + - name: Upload Validation Report + uses: actions/upload-artifact@v4 + with: + name: package-validation-report-${{ github.run_number }} + path: | + validation-report.txt + validation-report.json + retention-days: 30 + + - name: Check for failures + id: check_failures + run: | + if [ -f "validation-report.json" ]; then + FAILED_COUNT=$(node -e " + const fs = require('fs'); + try { + const report = JSON.parse(fs.readFileSync('validation-report.json', 'utf8')); + console.log(report.summary.failed || 0); + } catch { + console.log(0); + } + ") + echo "failed_count=$FAILED_COUNT" >> $GITHUB_OUTPUT + else + echo "failed_count=0" >> $GITHUB_OUTPUT + fi + + - name: Create Issue on Failures + if: steps.check_failures.outputs.failed_count != '0' + id: create_issue + uses: ./.github/actions/create-package-validation-issue + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + validation-report-json: 'validation-report.json' + validation-report-txt: 'validation-report.txt' + workflow-run-number: ${{ github.run_number }} + workflow-run-id: ${{ github.run_id }} + server-url: ${{ github.server_url }} + repository: ${{ github.repository }} + + - name: Post Issue Summary + if: steps.create_issue.conclusion == 'success' && steps.create_issue.outputs.issue-url != '' + run: | + echo "๐Ÿ“‹ Issue created/updated: ${{ steps.create_issue.outputs.issue-url }}" + echo "โŒ Failed packages: ${{ steps.create_issue.outputs.failed-count }}" + echo "๐Ÿ”„ Issue was ${{ steps.create_issue.outputs.issue-created == 'true' && 'created' || 'updated' }}" + + - name: Post Success Summary + if: steps.check_failures.outputs.failed_count == '0' + run: | + echo "๐ŸŽ‰ All packages validated successfully!" + echo "Scheduled validation completed with no issues." \ No newline at end of file diff --git a/components/abuselpdb/.gitignore b/components/abuselpdb/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/abuselpdb/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/abuselpdb/abuselpdb.app.mjs b/components/abuselpdb/abuselpdb.app.mjs new file mode 100644 index 0000000000000..24c10841746e1 --- /dev/null +++ b/components/abuselpdb/abuselpdb.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "abuselpdb", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/abuselpdb/app/abuselpdb.app.ts b/components/abuselpdb/app/abuselpdb.app.ts deleted file mode 100644 index 1fa7fdb3af72d..0000000000000 --- a/components/abuselpdb/app/abuselpdb.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "abuselpdb", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/abuselpdb/package.json b/components/abuselpdb/package.json index 9e4833e1007c5..62611a74f21dd 100644 --- a/components/abuselpdb/package.json +++ b/components/abuselpdb/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/abuselpdb", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream AbuselPDB Components", - "main": "dist/app/abuselpdb.app.mjs", + "main": "abuselpdb.app.mjs", "keywords": [ "pipedream", "abuselpdb" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/abuselpdb", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/acelle_mail/package.json b/components/acelle_mail/package.json index 70e98f16359c4..f8311203aa40f 100644 --- a/components/acelle_mail/package.json +++ b/components/acelle_mail/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/acelle_mail", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Acelle Mail Components", "main": "acelle_mail.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/action_builder/.gitignore b/components/action_builder/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/action_builder/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/action_builder/action_builder.app.mjs b/components/action_builder/action_builder.app.mjs new file mode 100644 index 0000000000000..06880ed1b7abb --- /dev/null +++ b/components/action_builder/action_builder.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "action_builder", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/action_builder/app/action_builder.app.ts b/components/action_builder/app/action_builder.app.ts deleted file mode 100644 index 5918b23a169b6..0000000000000 --- a/components/action_builder/app/action_builder.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "action_builder", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/action_builder/package.json b/components/action_builder/package.json index 475fcbdacd988..7d54f449e3fe7 100644 --- a/components/action_builder/package.json +++ b/components/action_builder/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/action_builder", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Action Builder Components", - "main": "dist/app/action_builder.app.mjs", + "main": "action_builder.app.mjs", "keywords": [ "pipedream", "action_builder" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/action_builder", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/action_network/.gitignore b/components/action_network/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/action_network/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/action_network/action_network.app.mjs b/components/action_network/action_network.app.mjs new file mode 100644 index 0000000000000..6fe2bd837ad04 --- /dev/null +++ b/components/action_network/action_network.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "action_network", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/action_network/app/action_network.app.ts b/components/action_network/app/action_network.app.ts deleted file mode 100644 index 3b5ff22a9d10b..0000000000000 --- a/components/action_network/app/action_network.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "action_network", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/action_network/package.json b/components/action_network/package.json index 08245321c0ca5..213d5f1d5c109 100644 --- a/components/action_network/package.json +++ b/components/action_network/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/action_network", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Action Network Components", - "main": "dist/app/action_network.app.mjs", + "main": "action_network.app.mjs", "keywords": [ "pipedream", "action_network" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/action_network", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/acuity_scheduling/package.json b/components/acuity_scheduling/package.json index 7907223248151..8b3985073f1b9 100644 --- a/components/acuity_scheduling/package.json +++ b/components/acuity_scheduling/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/acuity_scheduling", - "version": "0.2.0", + "version": "0.3.0", "description": "Pipedream Acuity Scheduling Components", "main": "acuity_scheduling.app.mjs", "keywords": [ diff --git a/components/acuity_scheduling/sources/appointment-canceled-instant/appointment-canceled-instant.mjs b/components/acuity_scheduling/sources/appointment-canceled-instant/appointment-canceled-instant.mjs index 3779c85f579b9..31be066d8fc4a 100644 --- a/components/acuity_scheduling/sources/appointment-canceled-instant/appointment-canceled-instant.mjs +++ b/components/acuity_scheduling/sources/appointment-canceled-instant/appointment-canceled-instant.mjs @@ -6,10 +6,11 @@ export default { key: "acuity_scheduling-appointment-canceled-instant", name: "New Appointment Canceled (Instant)", description: "Emit new event when an appointment is canceled.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", methods: { + ...common.methods, getEvent() { return "appointment.canceled"; }, diff --git a/components/acuity_scheduling/sources/appointment-rescheduled-instant/appointment-rescheduled-instant.mjs b/components/acuity_scheduling/sources/appointment-rescheduled-instant/appointment-rescheduled-instant.mjs new file mode 100644 index 0000000000000..015e00f554dad --- /dev/null +++ b/components/acuity_scheduling/sources/appointment-rescheduled-instant/appointment-rescheduled-instant.mjs @@ -0,0 +1,30 @@ +import common from "../common/base.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "acuity_scheduling-appointment-rescheduled-instant", + name: "New Appointment Rescheduled (Instant)", + description: "Emit new event when an appointment is rescheduled.", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getEvent() { + return "appointment.rescheduled"; + }, + getSummary(details) { + return `Appointment rescheduled with ID: ${details.id}`; + }, + generateMeta(details) { + const ts = Date.parse(details.datetime) || Date.now(); + return { + id: `${details.id}-${ts}`, + summary: this.getSummary(details), + ts, + }; + }, + }, + sampleEmit, +}; diff --git a/components/acuity_scheduling/sources/appointment-rescheduled-instant/test-event.mjs b/components/acuity_scheduling/sources/appointment-rescheduled-instant/test-event.mjs new file mode 100644 index 0000000000000..573224e58b615 --- /dev/null +++ b/components/acuity_scheduling/sources/appointment-rescheduled-instant/test-event.mjs @@ -0,0 +1,57 @@ +export default { + "id": 54321, + "firstName": "Bob", + "lastName": "McTest", + "phone": "", + "email": "bob.mctest@example.com", + "date": "June 17, 2013", + "time": "10:15am", + "endTime": "11:15am", + "dateCreated": "July 2, 2013", + "datetime": "2013-06-17T10:15:00-0700", + "price": "10.00", + "paid": "no", + "amountPaid": "0.00", + "type": "Regular Visit", + "appointmentTypeID": 1, + "classID": null, + "duration": "60", + "calendar": "My Calendar", + "calendarID": 27238, + "canClientCancel": false, + "canClientReschedule": false, + "location": "", + "certificate": null, + "confirmationPage": "https://acuityscheduling.com/schedule.php?owner=11145481&id[]=1220aa9f41091c50c0cc659385cfa1d0&action=appt", + "formsText": "...", + "notes": "Notes", + "timezone": "America/New_York", + "scheduledBy": null, + "forms": [ + { + "id": 1, + "name": "Example Intake Form", + "values": [ + { + "value": "yes", + "name": "Is this your first visit?", + "fieldID": 1, + "id": 21502993, + }, + { + "value": "Ninja", + "name": "What is your goal for this appointment?", + "fieldID": 2, + "id": 21502994, + }, + ], + }, + ], + "labels": [ + { + "id": 3, + "name": "Completed", + "color": "pink", + }, + ], +}; diff --git a/components/acuity_scheduling/sources/common/base.mjs b/components/acuity_scheduling/sources/common/base.mjs index 566daa2318b7f..f255af750249a 100644 --- a/components/acuity_scheduling/sources/common/base.mjs +++ b/components/acuity_scheduling/sources/common/base.mjs @@ -24,6 +24,15 @@ export default { await this.acuityScheduling.deleteHook(webhookId); }, }, + methods: { + generateMeta(details) { + return { + id: details.id, + summary: this.getSummary(details), + ts: Date.parse(details.datetime) || Date.now(), + }; + }, + }, async run(event) { const { body } = event; @@ -36,12 +45,6 @@ export default { body: "Success", }); - const ts = Date.parse(details.datetime) || Date.now(); - - this.$emit(details, { - id: details.id, - summary: this.getSummary(details), - ts: ts, - }); + this.$emit(details, this.generateMeta(details)); }, }; diff --git a/components/acuity_scheduling/sources/new-appointment-instant/new-appointment-instant.mjs b/components/acuity_scheduling/sources/new-appointment-instant/new-appointment-instant.mjs index e485968c28cbd..994231b475eac 100644 --- a/components/acuity_scheduling/sources/new-appointment-instant/new-appointment-instant.mjs +++ b/components/acuity_scheduling/sources/new-appointment-instant/new-appointment-instant.mjs @@ -6,10 +6,11 @@ export default { key: "acuity_scheduling-new-appointment-instant", name: "New Appointment (Instant)", description: "Emit new event when an appointment is scheduled.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", methods: { + ...common.methods, getEvent() { return "appointment.scheduled"; }, diff --git a/components/acumbamail/.gitignore b/components/acumbamail/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/acumbamail/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/acumbamail/acumbamail.app.mjs b/components/acumbamail/acumbamail.app.mjs new file mode 100644 index 0000000000000..eebc30b71cac8 --- /dev/null +++ b/components/acumbamail/acumbamail.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "acumbamail", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/acumbamail/app/acumbamail.app.ts b/components/acumbamail/app/acumbamail.app.ts deleted file mode 100644 index 71e32d9406edd..0000000000000 --- a/components/acumbamail/app/acumbamail.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "acumbamail", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/acumbamail/package.json b/components/acumbamail/package.json index 5b8e624a748a9..57f33015cd276 100644 --- a/components/acumbamail/package.json +++ b/components/acumbamail/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/acumbamail", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Acumbamail Components", - "main": "dist/app/acumbamail.app.mjs", + "main": "acumbamail.app.mjs", "keywords": [ "pipedream", "acumbamail" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/acumbamail", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/adafruit_io/.gitignore b/components/adafruit_io/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/adafruit_io/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/adafruit_io/adafruit_io.app.mjs b/components/adafruit_io/adafruit_io.app.mjs new file mode 100644 index 0000000000000..c5d951b15eb96 --- /dev/null +++ b/components/adafruit_io/adafruit_io.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "adafruit_io", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/adafruit_io/app/adafruit_io.app.ts b/components/adafruit_io/app/adafruit_io.app.ts deleted file mode 100644 index b9b0c9e268602..0000000000000 --- a/components/adafruit_io/app/adafruit_io.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "adafruit_io", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/adafruit_io/package.json b/components/adafruit_io/package.json index f4ce1f5899d73..88f96d00c0cab 100644 --- a/components/adafruit_io/package.json +++ b/components/adafruit_io/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/adafruit_io", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Adafruit IO Components", - "main": "dist/app/adafruit_io.app.mjs", + "main": "adafruit_io.app.mjs", "keywords": [ "pipedream", "adafruit_io" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/adafruit_io", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/adp/.gitignore b/components/adp/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/adp/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/adp/app/adp.app.ts b/components/adp/app/adp.app.ts deleted file mode 100644 index 18ba10bcfe20c..0000000000000 --- a/components/adp/app/adp.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "adp", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/adp/package.json b/components/adp/package.json index a58f412711b93..553bd6c08ddf4 100644 --- a/components/adp/package.json +++ b/components/adp/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/adp", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream ADP Components", - "main": "dist/app/adp.app.mjs", + "main": "adp.app.mjs", "keywords": [ "pipedream", "adp" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/adp", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/affinda/package.json b/components/affinda/package.json index 75eed63054a6e..2dddbd57dbf14 100644 --- a/components/affinda/package.json +++ b/components/affinda/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/affinda", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Affinda Components", "main": "affinda.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/afosto/afosto.app.mjs b/components/afosto/afosto.app.mjs new file mode 100644 index 0000000000000..caddad113b4f7 --- /dev/null +++ b/components/afosto/afosto.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "afosto", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/afosto/package.json b/components/afosto/package.json new file mode 100644 index 0000000000000..b7ade1930d03e --- /dev/null +++ b/components/afosto/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/afosto", + "version": "0.0.1", + "description": "Pipedream Afosto Components", + "main": "afosto.app.mjs", + "keywords": [ + "pipedream", + "afosto" + ], + "homepage": "https://pipedream.com/apps/afosto", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/agendor/package.json b/components/agendor/package.json index 5803ba5dd487e..0b6e43e773107 100644 --- a/components/agendor/package.json +++ b/components/agendor/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/agendor", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Agendor Components", - "main": "dist/app/agendor.app.mjs", + "main": "agendor.app.mjs", "keywords": [ "pipedream", "agendor" diff --git a/components/agentql/agentql.app.mjs b/components/agentql/agentql.app.mjs index 7c6e3264d4665..8c86501dfb242 100644 --- a/components/agentql/agentql.app.mjs +++ b/components/agentql/agentql.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/aimtell/.gitignore b/components/aimtell/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/aimtell/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/aimtell/aimtell.app.mjs b/components/aimtell/aimtell.app.mjs new file mode 100644 index 0000000000000..0053e21b38b12 --- /dev/null +++ b/components/aimtell/aimtell.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "aimtell", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/aimtell/app/aimtell.app.ts b/components/aimtell/app/aimtell.app.ts deleted file mode 100644 index dfc7c62c4be2f..0000000000000 --- a/components/aimtell/app/aimtell.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "aimtell", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/aimtell/package.json b/components/aimtell/package.json index 3fa58bd07dac9..eeb9faf7dbbf2 100644 --- a/components/aimtell/package.json +++ b/components/aimtell/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/aimtell", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Aimtell Components", - "main": "dist/app/aimtell.app.mjs", + "main": "aimtell.app.mjs", "keywords": [ "pipedream", "aimtell" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/aimtell", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/aircall/package.json b/components/aircall/package.json index dc5dea6831df6..1bae113df6631 100644 --- a/components/aircall/package.json +++ b/components/aircall/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/aircall", - "version": "0.2.0", + "version": "0.2.1", "description": "Pipedream Aircall Components", "main": "aircall.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/airnow/.gitignore b/components/airnow/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/airnow/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/airnow/airnow.app.mjs b/components/airnow/airnow.app.mjs new file mode 100644 index 0000000000000..8e16ee35a6e46 --- /dev/null +++ b/components/airnow/airnow.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "airnow", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/airnow/app/airnow.app.ts b/components/airnow/app/airnow.app.ts deleted file mode 100644 index 6f63392fdd9b6..0000000000000 --- a/components/airnow/app/airnow.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "airnow", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/airnow/package.json b/components/airnow/package.json index d65e0614c63db..01353abf093f3 100644 --- a/components/airnow/package.json +++ b/components/airnow/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/airnow", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream AirNow Components", - "main": "dist/app/airnow.app.mjs", + "main": "airnow.app.mjs", "keywords": [ "pipedream", "airnow" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/airnow", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/airpinpoint/airpinpoint.app.mjs b/components/airpinpoint/airpinpoint.app.mjs index a203530f3f807..5a3c21fad2ac4 100644 --- a/components/airpinpoint/airpinpoint.app.mjs +++ b/components/airpinpoint/airpinpoint.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/airtable_oauth/actions/create-comment/create-comment.mjs b/components/airtable_oauth/actions/create-comment/create-comment.mjs index fbfdd1e44ce7c..9c141e33d614f 100644 --- a/components/airtable_oauth/actions/create-comment/create-comment.mjs +++ b/components/airtable_oauth/actions/create-comment/create-comment.mjs @@ -4,7 +4,7 @@ export default { key: "airtable_oauth-create-comment", name: "Create Comment", description: "Create a comment on a selected record. [See the documentation](https://airtable.com/developers/web/api/create-comment)", - version: "0.0.11", + version: "0.0.12", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/create-field/create-field.mjs b/components/airtable_oauth/actions/create-field/create-field.mjs index a1364fab69b7a..84660a7381da7 100644 --- a/components/airtable_oauth/actions/create-field/create-field.mjs +++ b/components/airtable_oauth/actions/create-field/create-field.mjs @@ -5,7 +5,7 @@ export default { key: "airtable_oauth-create-field", name: "Create Field", description: "Create a new field in a table. [See the documentation](https://airtable.com/developers/web/api/create-field)", - version: "0.1.3", + version: "0.1.4", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/create-multiple-records/create-multiple-records.mjs b/components/airtable_oauth/actions/create-multiple-records/create-multiple-records.mjs index 3c3b2fbdc6b64..4154e7c031a17 100644 --- a/components/airtable_oauth/actions/create-multiple-records/create-multiple-records.mjs +++ b/components/airtable_oauth/actions/create-multiple-records/create-multiple-records.mjs @@ -9,7 +9,7 @@ export default { key: "airtable_oauth-create-multiple-records", name: "Create Multiple Records", description: "Create one or more records in a table in a single operation with an array. [See the documentation](https://airtable.com/developers/web/api/create-records)", - version: "0.0.11", + version: "0.0.12", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/create-or-update-record/create-or-update-record.mjs b/components/airtable_oauth/actions/create-or-update-record/create-or-update-record.mjs index 720c563168f5d..1f4578952d1eb 100644 --- a/components/airtable_oauth/actions/create-or-update-record/create-or-update-record.mjs +++ b/components/airtable_oauth/actions/create-or-update-record/create-or-update-record.mjs @@ -6,7 +6,7 @@ export default { key: "airtable_oauth-create-or-update-record", name: "Create or Update Record", description: "Create a new record or update an existing one. [See the documentation](https://airtable.com/developers/web/api/create-records)", - version: "0.1.3", + version: "0.1.4", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/create-single-record/create-single-record.mjs b/components/airtable_oauth/actions/create-single-record/create-single-record.mjs index fb82608de6685..334532f1d8777 100644 --- a/components/airtable_oauth/actions/create-single-record/create-single-record.mjs +++ b/components/airtable_oauth/actions/create-single-record/create-single-record.mjs @@ -6,7 +6,7 @@ export default { key: "airtable_oauth-create-single-record", name: "Create Single Record", description: "Adds a record to a table.", - version: "0.0.12", + version: "0.0.13", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/create-table/create-table.mjs b/components/airtable_oauth/actions/create-table/create-table.mjs index 05eb7d64e0112..cc2cc85d6d526 100644 --- a/components/airtable_oauth/actions/create-table/create-table.mjs +++ b/components/airtable_oauth/actions/create-table/create-table.mjs @@ -4,7 +4,7 @@ export default { key: "airtable_oauth-create-table", name: "Create Table", description: "Create a new table. [See the documentation](https://airtable.com/developers/web/api/create-table)", - version: "0.0.11", + version: "0.0.12", type: "action", props: { airtable, diff --git a/components/airtable_oauth/actions/delete-record/delete-record.mjs b/components/airtable_oauth/actions/delete-record/delete-record.mjs index 15f6dcc5b03a2..0e8f5e5012ccf 100644 --- a/components/airtable_oauth/actions/delete-record/delete-record.mjs +++ b/components/airtable_oauth/actions/delete-record/delete-record.mjs @@ -5,7 +5,7 @@ export default { key: "airtable_oauth-delete-record", name: "Delete Record", description: "Delete a selected record from a table. [See the documentation](https://airtable.com/developers/web/api/delete-record)", - version: "0.0.11", + version: "0.0.12", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/get-record-or-create/get-record-or-create.mjs b/components/airtable_oauth/actions/get-record-or-create/get-record-or-create.mjs index 0f9b92b186293..426606806cd0e 100644 --- a/components/airtable_oauth/actions/get-record-or-create/get-record-or-create.mjs +++ b/components/airtable_oauth/actions/get-record-or-create/get-record-or-create.mjs @@ -6,7 +6,7 @@ export default { key: "airtable_oauth-get-record-or-create", name: "Get Record Or Create", description: "Get a specific record, or create one if it doesn't exist. [See the documentation](https://airtable.com/developers/web/api/create-records)", - version: "0.0.13", + version: "0.0.14", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/get-record/get-record.mjs b/components/airtable_oauth/actions/get-record/get-record.mjs index b7175ee4810c8..162a9488cd214 100644 --- a/components/airtable_oauth/actions/get-record/get-record.mjs +++ b/components/airtable_oauth/actions/get-record/get-record.mjs @@ -6,7 +6,7 @@ export default { key: "airtable_oauth-get-record", name: "Get Record", description: "Get data of a selected record from a table. [See the documentation](https://airtable.com/developers/web/api/get-record)", - version: "0.0.12", + version: "0.0.13", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/list-bases/list-bases.mjs b/components/airtable_oauth/actions/list-bases/list-bases.mjs index d3512389ca7aa..7b1e1f3f9edeb 100644 --- a/components/airtable_oauth/actions/list-bases/list-bases.mjs +++ b/components/airtable_oauth/actions/list-bases/list-bases.mjs @@ -6,7 +6,7 @@ export default { description: "Get the list of bases that can be accessed. [See the documentation](https://airtable.com/developers/web/api/list-bases)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { airtable, }, diff --git a/components/airtable_oauth/actions/list-records-in-view/list-records-in-view.mjs b/components/airtable_oauth/actions/list-records-in-view/list-records-in-view.mjs index f4d24dfc8a616..486a9661f3a71 100644 --- a/components/airtable_oauth/actions/list-records-in-view/list-records-in-view.mjs +++ b/components/airtable_oauth/actions/list-records-in-view/list-records-in-view.mjs @@ -6,7 +6,7 @@ export default { name: "List Records in View", description: "Retrieve records from a view, optionally sorting and filtering results. [See the documentation](https://airtable.com/developers/web/api/list-views)", type: "action", - version: "0.0.11", + version: "0.0.12", ...commonList, props: { accountTierAlert: { diff --git a/components/airtable_oauth/actions/list-records/list-records.mjs b/components/airtable_oauth/actions/list-records/list-records.mjs index 216e49f3943cf..10a44dc438ab5 100644 --- a/components/airtable_oauth/actions/list-records/list-records.mjs +++ b/components/airtable_oauth/actions/list-records/list-records.mjs @@ -6,7 +6,7 @@ export default { name: "List Records", description: "Retrieve records from a table, optionally sorting and filtering results. [See the documentation](https://airtable.com/developers/web/api/list-records)", type: "action", - version: "0.0.11", + version: "0.0.12", ...commonList, props: { ...common.props, diff --git a/components/airtable_oauth/actions/list-tables/list-tables.mjs b/components/airtable_oauth/actions/list-tables/list-tables.mjs index 91732d1f64d9b..41d9c28f5eba0 100644 --- a/components/airtable_oauth/actions/list-tables/list-tables.mjs +++ b/components/airtable_oauth/actions/list-tables/list-tables.mjs @@ -6,7 +6,7 @@ export default { description: "Get a list of tables in the selected base. [See the documentation](https://airtable.com/developers/web/api/get-base-schema)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { airtable, baseId: { diff --git a/components/airtable_oauth/actions/search-records/search-records.mjs b/components/airtable_oauth/actions/search-records/search-records.mjs index ac6fad35d09ed..bb12dbda114c4 100644 --- a/components/airtable_oauth/actions/search-records/search-records.mjs +++ b/components/airtable_oauth/actions/search-records/search-records.mjs @@ -5,7 +5,7 @@ export default { key: "airtable_oauth-search-records", name: "Search Records", description: "Search for a record by formula or by field value. [See the documentation](https://airtable.com/developers/web/api/list-records)", - version: "0.0.13", + version: "0.0.14", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/update-comment/update-comment.mjs b/components/airtable_oauth/actions/update-comment/update-comment.mjs index d0f68946e55be..f118ace0beabe 100644 --- a/components/airtable_oauth/actions/update-comment/update-comment.mjs +++ b/components/airtable_oauth/actions/update-comment/update-comment.mjs @@ -4,7 +4,7 @@ export default { key: "airtable_oauth-update-comment", name: "Update Comment", description: "Update an existing comment on a selected record. [See the documentation](https://airtable.com/developers/web/api/update-comment)", - version: "0.0.11", + version: "0.0.12", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/update-field/update-field.mjs b/components/airtable_oauth/actions/update-field/update-field.mjs index eb1df1eda9998..5d3c2c1f40e5c 100644 --- a/components/airtable_oauth/actions/update-field/update-field.mjs +++ b/components/airtable_oauth/actions/update-field/update-field.mjs @@ -5,7 +5,7 @@ export default { key: "airtable_oauth-update-field", name: "Update Field", description: "Update an existing field in a table. [See the documentation](https://airtable.com/developers/web/api/update-field)", - version: "0.0.11", + version: "0.0.12", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/update-record/update-record.mjs b/components/airtable_oauth/actions/update-record/update-record.mjs index d8719ddcae566..e75a15305690f 100644 --- a/components/airtable_oauth/actions/update-record/update-record.mjs +++ b/components/airtable_oauth/actions/update-record/update-record.mjs @@ -6,7 +6,7 @@ export default { key: "airtable_oauth-update-record", name: "Update Record", description: "Update a single record in a table by Record ID. [See the documentation](https://airtable.com/developers/web/api/update-record)", - version: "0.0.12", + version: "0.0.13", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/actions/update-table/update-table.mjs b/components/airtable_oauth/actions/update-table/update-table.mjs index 2e1dfd6677fcc..745cd97747fd1 100644 --- a/components/airtable_oauth/actions/update-table/update-table.mjs +++ b/components/airtable_oauth/actions/update-table/update-table.mjs @@ -4,7 +4,7 @@ export default { key: "airtable_oauth-update-table", name: "Update Table", description: "Update an existing table. [See the documentation](https://airtable.com/developers/web/api/update-table)", - version: "0.0.11", + version: "0.0.12", type: "action", props: { ...common.props, diff --git a/components/airtable_oauth/common/utils.mjs b/components/airtable_oauth/common/utils.mjs index f3dda1de77e5e..bff7ae4842980 100644 --- a/components/airtable_oauth/common/utils.mjs +++ b/components/airtable_oauth/common/utils.mjs @@ -163,9 +163,29 @@ function buildSingleCollaboratorField(value) { }; } +function sleep(ms) { + return new Promise((r) => setTimeout(r, ms)); +} + +async function withRetry(fn, { + retries = 2, baseDelay = 500, +} = {}) { + let attempt = 0; + while (attempt <= retries) { + try { + return await fn(); + } catch (err) { + if (attempt === retries) throw err; + await sleep(baseDelay * (2 ** attempt)); + attempt += 1; + } + } +} + export { fieldTypeToPropType, fieldToProp, makeFieldProps, makeRecord, + withRetry, }; diff --git a/components/airtable_oauth/package.json b/components/airtable_oauth/package.json index f03f7a931b12d..332f6bd29c03d 100644 --- a/components/airtable_oauth/package.json +++ b/components/airtable_oauth/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/airtable_oauth", - "version": "0.5.1", + "version": "0.5.2", "description": "Pipedream Airtable (OAuth) Components", "main": "airtable_oauth.app.mjs", "keywords": [ diff --git a/components/airtable_oauth/sources/common/common-webhook-field.mjs b/components/airtable_oauth/sources/common/common-webhook-field.mjs index 90b206ab963eb..39f23218f41b0 100644 --- a/components/airtable_oauth/sources/common/common-webhook-field.mjs +++ b/components/airtable_oauth/sources/common/common-webhook-field.mjs @@ -25,10 +25,19 @@ export default { } }, async emitEvent(payload) { + const changed = payload?.changedTablesById; + const tableEntry = changed && Object.entries(changed)[0]; + if (!tableEntry) { + // Unknown / empty shape โ€” emit normalized raw so consumers still get a consistent shape + this.$emit({ + originalPayload: payload, + }, this.generateMeta(payload)); + return; + } const [ tableId, tableData, - ] = Object.entries(payload.changedTablesById)[0]; + ] = tableEntry; const [ operation, fieldObj, diff --git a/components/airtable_oauth/sources/common/common-webhook-record.mjs b/components/airtable_oauth/sources/common/common-webhook-record.mjs index a610d402e830a..bbeb88e5ef982 100644 --- a/components/airtable_oauth/sources/common/common-webhook-record.mjs +++ b/components/airtable_oauth/sources/common/common-webhook-record.mjs @@ -1,4 +1,5 @@ import common from "./common-webhook.mjs"; +import { withRetry } from "../../common/utils.mjs"; export default { ...common, @@ -10,10 +11,19 @@ export default { ]; }, async emitEvent(payload) { + const changed = payload?.changedTablesById; + const tableEntry = changed && Object.entries(changed)[0]; + if (!tableEntry) { + // Unknown / empty shape โ€” emit normalized raw so consumers still get a consistent shape + this.$emit({ + originalPayload: payload, + }, this.generateMeta(payload)); + return; + } const [ tableId, tableData, - ] = Object.entries(payload.changedTablesById)[0]; + ] = tableEntry; let [ operation, recordObj, @@ -52,11 +62,24 @@ export default { ? "created" : "updated"; - const { fields } = await this.airtable.getRecord({ - baseId: this.baseId, - tableId, - recordId, - }); + let fields = {}; + try { + const res = await withRetry( + () => this.airtable.getRecord({ + baseId: this.baseId, + tableId, + recordId, + }), + ); + + fields = res?.fields ?? {}; + } catch (err) { + console.log("Airtable getRecord failed; emitting empty fields", { + statusCode: err?.statusCode ?? err?.response?.status, + message: err?.message, + }); + fields = {}; + } const summary = `Record ${updateType}: ${fields?.name ?? recordId}`; diff --git a/components/airtable_oauth/sources/common/common-webhook.mjs b/components/airtable_oauth/sources/common/common-webhook.mjs index 8375fcc85fa22..2d8d58816504c 100644 --- a/components/airtable_oauth/sources/common/common-webhook.mjs +++ b/components/airtable_oauth/sources/common/common-webhook.mjs @@ -134,8 +134,12 @@ export default { return this.changeTypes; }, emitDefaultEvent(payload) { + // Normalize the fallback so consumers always get a consistent structure + // matching our other emitters (which include originalPayload). const meta = this.generateMeta(payload); - this.$emit(payload, meta); + this.$emit({ + originalPayload: payload, + }, meta); }, async emitEvent(payload) { // sources may call this to customize event emission, but it is diff --git a/components/airtable_oauth/sources/new-field/new-field.mjs b/components/airtable_oauth/sources/new-field/new-field.mjs index eddcfc85faec4..6d24b4354f993 100644 --- a/components/airtable_oauth/sources/new-field/new-field.mjs +++ b/components/airtable_oauth/sources/new-field/new-field.mjs @@ -5,7 +5,7 @@ export default { name: "New Field Created (Instant)", description: "Emit new event when a field is created in the selected table. [See the documentation](https://airtable.com/developers/web/api/get-base-schema)", key: "airtable_oauth-new-field", - version: "1.0.3", + version: "1.0.4", type: "source", dedupe: "unique", methods: { diff --git a/components/airtable_oauth/sources/new-modified-or-deleted-records-instant/new-modified-or-deleted-records-instant.mjs b/components/airtable_oauth/sources/new-modified-or-deleted-records-instant/new-modified-or-deleted-records-instant.mjs index a6c59ad99454e..deb29e5548f73 100644 --- a/components/airtable_oauth/sources/new-modified-or-deleted-records-instant/new-modified-or-deleted-records-instant.mjs +++ b/components/airtable_oauth/sources/new-modified-or-deleted-records-instant/new-modified-or-deleted-records-instant.mjs @@ -8,7 +8,7 @@ export default { name: "New Record Created, Updated or Deleted (Instant)", description: "Emit new event when a record is added, updated, or deleted in a table or selected view.", key: "airtable_oauth-new-modified-or-deleted-records-instant", - version: "0.1.3", + version: "0.1.4", type: "source", dedupe: "unique", props: { diff --git a/components/airtable_oauth/sources/new-modified-or-deleted-records/new-modified-or-deleted-records.mjs b/components/airtable_oauth/sources/new-modified-or-deleted-records/new-modified-or-deleted-records.mjs index 247993857414d..99e2955126f33 100644 --- a/components/airtable_oauth/sources/new-modified-or-deleted-records/new-modified-or-deleted-records.mjs +++ b/components/airtable_oauth/sources/new-modified-or-deleted-records/new-modified-or-deleted-records.mjs @@ -6,7 +6,7 @@ export default { name: "New, Modified or Deleted Records", description: "Emit new event each time a record is added, updated, or deleted in an Airtable table. Supports tables up to 10,000 records", key: "airtable_oauth-new-modified-or-deleted-records", - version: "0.0.12", + version: "0.0.13", type: "source", dedupe: "unique", props: { diff --git a/components/airtable_oauth/sources/new-or-modified-field/new-or-modified-field.mjs b/components/airtable_oauth/sources/new-or-modified-field/new-or-modified-field.mjs index 47c067f500fa1..39cea4ae9404f 100644 --- a/components/airtable_oauth/sources/new-or-modified-field/new-or-modified-field.mjs +++ b/components/airtable_oauth/sources/new-or-modified-field/new-or-modified-field.mjs @@ -6,7 +6,7 @@ export default { name: "New or Modified Field (Instant)", description: "Emit new event when a field is created or updated in the selected table", key: "airtable_oauth-new-or-modified-field", - version: "1.0.3", + version: "1.0.4", type: "source", dedupe: "unique", methods: { diff --git a/components/airtable_oauth/sources/new-or-modified-records-in-view/new-or-modified-records-in-view.mjs b/components/airtable_oauth/sources/new-or-modified-records-in-view/new-or-modified-records-in-view.mjs index c432337448c48..eed1bb8e63514 100644 --- a/components/airtable_oauth/sources/new-or-modified-records-in-view/new-or-modified-records-in-view.mjs +++ b/components/airtable_oauth/sources/new-or-modified-records-in-view/new-or-modified-records-in-view.mjs @@ -6,7 +6,7 @@ export default { name: "New or Modified Records in View", description: "Emit new event for each new or modified record in a view", key: "airtable_oauth-new-or-modified-records-in-view", - version: "0.0.13", + version: "0.0.14", type: "source", props: { ...base.props, diff --git a/components/airtable_oauth/sources/new-or-modified-records/new-or-modified-records.mjs b/components/airtable_oauth/sources/new-or-modified-records/new-or-modified-records.mjs index 1c466d83cd1fc..110dd1a6f5ab4 100644 --- a/components/airtable_oauth/sources/new-or-modified-records/new-or-modified-records.mjs +++ b/components/airtable_oauth/sources/new-or-modified-records/new-or-modified-records.mjs @@ -6,7 +6,7 @@ export default { name: "New or Modified Records (Instant)", key: "airtable_oauth-new-or-modified-records", description: "Emit new event for each new or modified record in a table or view", - version: "1.0.3", + version: "1.0.4", type: "source", dedupe: "unique", methods: { diff --git a/components/airtable_oauth/sources/new-records-in-view/new-records-in-view.mjs b/components/airtable_oauth/sources/new-records-in-view/new-records-in-view.mjs index 85b835af702a5..fe19ece5a4869 100644 --- a/components/airtable_oauth/sources/new-records-in-view/new-records-in-view.mjs +++ b/components/airtable_oauth/sources/new-records-in-view/new-records-in-view.mjs @@ -6,7 +6,7 @@ export default { name: "New Records in View", description: "Emit new event for each new record in a view", key: "airtable_oauth-new-records-in-view", - version: "0.0.12", + version: "0.0.13", type: "source", dedupe: "unique", props: { diff --git a/components/airtable_oauth/sources/new-records/new-records.mjs b/components/airtable_oauth/sources/new-records/new-records.mjs index 117927ef51bbb..21779b96e7273 100644 --- a/components/airtable_oauth/sources/new-records/new-records.mjs +++ b/components/airtable_oauth/sources/new-records/new-records.mjs @@ -5,7 +5,7 @@ export default { name: "New Record(s) Created (Instant)", description: "Emit new event for each new record in a table", key: "airtable_oauth-new-records", - version: "1.0.3", + version: "1.0.4", type: "source", dedupe: "unique", methods: { diff --git a/components/akeneo/actions/create-a-new-product-media-file/create-a-new-product-media-file.mjs b/components/akeneo/actions/create-a-new-product-media-file/create-a-new-product-media-file.mjs index c41d4d248988c..fd0eb82d08737 100644 --- a/components/akeneo/actions/create-a-new-product-media-file/create-a-new-product-media-file.mjs +++ b/components/akeneo/actions/create-a-new-product-media-file/create-a-new-product-media-file.mjs @@ -7,7 +7,7 @@ import FormData from "form-data"; export default { type: "action", key: "akeneo-create-a-new-product-media-file", - version: "0.1.2", + version: "0.1.3", name: "Create A New Product Media File", description: "Allows you to create a new media file and associate it to an attribute value of a given product or product model. [See the docs](https://api.akeneo.com/api-reference.html#post_media_files)", props: { @@ -17,6 +17,7 @@ export default { app, "productId", ], + optional: true, }, productModelCode: { propDefinition: [ diff --git a/components/akeneo/actions/delete-product/delete-product.mjs b/components/akeneo/actions/delete-product/delete-product.mjs new file mode 100644 index 0000000000000..f0cdb3416ea10 --- /dev/null +++ b/components/akeneo/actions/delete-product/delete-product.mjs @@ -0,0 +1,27 @@ +import akeneo from "../../akeneo.app.mjs"; + +export default { + key: "akeneo-delete-product", + name: "Delete Product", + description: "Delete a product from Akeneo. [See the documentation](https://api.akeneo.com/api-reference.html#delete_products__code_)", + version: "0.0.1", + type: "action", + props: { + akeneo, + productId: { + propDefinition: [ + akeneo, + "productId", + ], + description: "Identifier of the product to delete", + }, + }, + async run({ $ }) { + const response = await this.akeneo.deleteProduct({ + $, + productId: this.productId, + }); + $.export("$summary", `Successfully deleted product ${this.productId}`); + return response; + }, +}; diff --git a/components/akeneo/actions/get-draft/get-draft.mjs b/components/akeneo/actions/get-draft/get-draft.mjs new file mode 100644 index 0000000000000..4bcf23cd51b6f --- /dev/null +++ b/components/akeneo/actions/get-draft/get-draft.mjs @@ -0,0 +1,27 @@ +import akeneo from "../../akeneo.app.mjs"; + +export default { + key: "akeneo-get-draft", + name: "Get Draft", + description: "Get a product draft from Akeneo. [See the documentation](https://api.akeneo.com/api-reference.html#get_draft__code_)", + version: "0.0.1", + type: "action", + props: { + akeneo, + productId: { + propDefinition: [ + akeneo, + "productId", + ], + description: "Identifier of the product to get the draft for", + }, + }, + async run({ $ }) { + const response = await this.akeneo.getProductDraft({ + $, + productId: this.productId, + }); + $.export("$summary", `Found draft for product ${this.productId}`); + return response; + }, +}; diff --git a/components/akeneo/actions/get-product/get-product.mjs b/components/akeneo/actions/get-product/get-product.mjs new file mode 100644 index 0000000000000..492da5a939fec --- /dev/null +++ b/components/akeneo/actions/get-product/get-product.mjs @@ -0,0 +1,58 @@ +import akeneo from "../../akeneo.app.mjs"; + +export default { + key: "akeneo-get-product", + name: "Get Product", + description: "Get a product from Akeneo. [See the documentation](https://api.akeneo.com/api-reference.html#get_products__code_)", + version: "0.0.1", + type: "action", + props: { + akeneo, + productId: { + propDefinition: [ + akeneo, + "productId", + ], + description: "Identifier of the product to get", + }, + withAttributeOptions: { + propDefinition: [ + akeneo, + "withAttributeOptions", + ], + }, + withAssetShareLinks: { + propDefinition: [ + akeneo, + "withAssetShareLinks", + ], + }, + withQualityScores: { + propDefinition: [ + akeneo, + "withQualityScores", + ], + }, + withCompletenesses: { + propDefinition: [ + akeneo, + "withCompletenesses", + ], + }, + }, + async run({ $ }) { + const response = await this.akeneo.getProduct({ + $, + productId: this.productId, + params: { + with_attribute_options: this.withAttributeOptions, + with_asset_share_links: this.withAssetShareLinks, + with_quality_scores: this.withQualityScores, + with_completenesses: this.withCompletenesses, + }, + }); + + $.export("$summary", `Found product ${response.identifier}`); + return response; + }, +}; diff --git a/components/akeneo/actions/search-products/search-products.mjs b/components/akeneo/actions/search-products/search-products.mjs new file mode 100644 index 0000000000000..f61914e7eb03f --- /dev/null +++ b/components/akeneo/actions/search-products/search-products.mjs @@ -0,0 +1,119 @@ +import akeneo from "../../akeneo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "akeneo-search-products", + name: "Search Products", + description: "Search products from Akeneo. [See the documentation](https://api.akeneo.com/api-reference.html#get_products)", + version: "0.0.1", + type: "action", + props: { + akeneo, + search: { + type: "string", + label: "Search", + description: "Filter products, for more details see the [Filters](https://api.akeneo.com/documentation/filter.html) section", + optional: true, + }, + scope: { + propDefinition: [ + akeneo, + "channelCode", + ], + label: "Scope", + description: "Filter product values to return scopable attributes for the given channel as well as the non localizable/non scopable attributes, for more details see the [Filter product values via channel](https://api.akeneo.com/documentation/filter.html#via-channel) section", + optional: true, + }, + locales: { + propDefinition: [ + akeneo, + "locale", + ], + description: "Filter product values to return localizable attributes for the given locales as well as the non localizable/non scopable attributes, for more details see the [Filter product values via locale](https://api.akeneo.com/documentation/filter.html#via-locale) section", + optional: true, + }, + attributes: { + propDefinition: [ + akeneo, + "attribute", + ], + label: "Attributes", + description: "Filter product values to only return those concerning the given attributes, for more details see the [Filter on product values](https://api.akeneo.com/documentation/filter.html#filter-product-values) section", + optional: true, + }, + convertMeasurements: { + type: "boolean", + label: "Convert Measurements", + description: "Convert values of measurement attributes to the unit configured in the channel provided by the parameter \"scope\". Therefore, this parameter requires the \"scope\" parameter to be provided.", + optional: true, + }, + withCount: { + type: "boolean", + label: "With Count", + description: "Return the count of items in the response. Be careful: on large catalogs, enabling counts can significantly impact performance.", + optional: true, + }, + withAttributeOptions: { + propDefinition: [ + akeneo, + "withAttributeOptions", + ], + }, + withAssetShareLinks: { + propDefinition: [ + akeneo, + "withAssetShareLinks", + ], + }, + withQualityScores: { + propDefinition: [ + akeneo, + "withQualityScores", + ], + }, + withCompletenesses: { + propDefinition: [ + akeneo, + "withCompletenesses", + ], + }, + page: { + type: "integer", + label: "Page", + description: "The page number to return", + optional: true, + }, + limit: { + type: "integer", + label: "Limit", + description: "The number of items to return per page", + optional: true, + }, + }, + async run({ $ }) { + if (this.convertMeasurements && !this.scope) { + throw new ConfigurationError("The `convertMeasurements` parameter requires the `scope` parameter to be provided"); + } + + const response = await this.akeneo.getProducts({ + $, + params: { + search: this.search, + scope: this.scope, + locales: this.locales, + attributes: this.attributes, + convert_measurements: this.convertMeasurements, + with_count: this.withCount, + with_attribute_options: this.withAttributeOptions, + with_asset_share_links: this.withAssetShareLinks, + with_quality_scores: this.withQualityScores, + with_completenesses: this.withCompletenesses, + page: this.page, + limit: this.limit, + }, + }); + + $.export("$summary", `Found ${response._embedded.items.length} products`); + return response; + }, +}; diff --git a/components/akeneo/actions/submit-product-for-approval/submit-product-for-approval.mjs b/components/akeneo/actions/submit-product-for-approval/submit-product-for-approval.mjs new file mode 100644 index 0000000000000..cc874286a1756 --- /dev/null +++ b/components/akeneo/actions/submit-product-for-approval/submit-product-for-approval.mjs @@ -0,0 +1,27 @@ +import akeneo from "../../akeneo.app.mjs"; + +export default { + key: "akeneo-submit-product-for-approval", + name: "Submit Product For Approval", + description: "Submit a product for approval. [See the documentation](https://api.akeneo.com/api-reference.html#post_proposal)", + version: "0.0.1", + type: "action", + props: { + akeneo, + productId: { + propDefinition: [ + akeneo, + "productId", + ], + description: "Identifier of the product to submit for approval", + }, + }, + async run({ $ }) { + const response = await this.akeneo.submitDraft({ + $, + productId: this.productId, + }); + $.export("$summary", `Successfully submitted product ${this.productId} for approval`); + return response; + }, +}; diff --git a/components/akeneo/akeneo.app.mjs b/components/akeneo/akeneo.app.mjs index d2c1500e93dfd..81d96ddec603d 100644 --- a/components/akeneo/akeneo.app.mjs +++ b/components/akeneo/akeneo.app.mjs @@ -10,7 +10,6 @@ export default { type: "string", label: "Product Identifier", description: "An ID identifying the product - either this prop or `Product Model Code` should be set.", - optional: true, async options({ page }) { page++; const resp = await this.getProducts({ @@ -92,6 +91,64 @@ export default { return resp?.locale || []; }, }, + locale: { + type: "string", + label: "Locale", + description: "A code identifying the locale", + async options() { + const { _embedded: { items } } = await this.getLocales({ + params: { + search: JSON.stringify({ + enabled: [ + { + operator: "=", + value: true, + }, + ], + }), + }, + }); + return items.map((locale) => locale.code); + }, + }, + attribute: { + type: "string", + label: "Attribute", + description: "A code identifying the attribute", + async options({ page }) { + const { _embedded: { items } } = await this.getAttributes({ + params: { + limit: PAGE_SIZE, + page: page + 1, + }, + }); + return items.map((attribute) => attribute.code); + }, + }, + withAttributeOptions: { + type: "boolean", + label: "With Attribute Options", + description: "Return labels of attribute options in the response. See [the`linked_data` format](https://api.akeneo.com/concepts/products.html#the-linked_data-format) section for more details.", + optional: true, + }, + withAssetShareLinks: { + type: "boolean", + label: "With Asset Share Links", + description: "Return asset collection share link urls in the response. See [the `linked_data` format](https://api.akeneo.com/concepts/products.html#the-linked_data-format) section for more details.", + optional: true, + }, + withQualityScores: { + type: "boolean", + label: "With Quality Scores", + description: "Return product quality scores in the response", + optional: true, + }, + withCompletenesses: { + type: "boolean", + label: "With Completeness", + description: "Return product completenesses in the response", + optional: true, + }, }, methods: { _getUrl(path) { @@ -116,6 +173,28 @@ export default { }; return axios($, config); }, + async getProduct({ + productId, ...args + }) { + return this._makeRequest({ + path: `/products/${productId}`, + ...args, + }); + }, + async getLocales(args = {}) { + return this._makeRequest({ + path: "/locales", + ...args, + }); + }, + getProductDraft({ + productId, ...opts + }) { + return this._makeRequest({ + path: `/products/${productId}/draft`, + ...opts, + }); + }, async getProducts(args = {}) { return this._makeRequest({ path: "/products", @@ -164,5 +243,23 @@ export default { ...args, }); }, + async deleteProduct({ + productId, ...args + }) { + return this._makeRequest({ + method: "DELETE", + path: `/products/${productId}`, + ...args, + }); + }, + async submitDraft({ + productId, ...args + }) { + return this._makeRequest({ + method: "POST", + path: `/products/${productId}/proposal`, + ...args, + }); + }, }, }; diff --git a/components/akeneo/package.json b/components/akeneo/package.json index 0785bc5d05f98..ff8d08163ea67 100644 --- a/components/akeneo/package.json +++ b/components/akeneo/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/akeneo", - "version": "0.1.2", + "version": "0.2.0", "description": "Pipedream Akeneo Components", "main": "akeneo.app.mjs", "keywords": [ diff --git a/components/alttextlab/README.md b/components/alttextlab/README.md new file mode 100644 index 0000000000000..727b4536dd012 --- /dev/null +++ b/components/alttextlab/README.md @@ -0,0 +1,16 @@ +# Overview + +AltTextLab's API provides powerful AI-generated alternative text for images - enhancing SEO, accessibility, and automation workflows. With Pipedream, you can create workflows that generate alt text for images automatically, connect it with your CMS or e-commerce platform. Pipedreamโ€™s serverless architecture lets you trigger these workflows on events, schedules, or incoming webhooks without maintaining your own infrastructure. +# Example Use Cases + +- **Automated SEO Optimization for E-commerce**: Automatically generate alt text for new product images uploaded to a Shopify or WooCommerce store and save the metadata to your CMS or database. + +- **Content Publishing Pipelines**: When a new blog post with images is published in your CMS (e.g., Ghost, WordPress, Webflow), send the image URLs to AltTextLab, generate alt text, and attach it back to the post or send it via email for editorial review. + +- **Bulk Image Processing for Media Libraries**: Periodically scan a folder in Dropbox, S3, or Google Drive for new images and generate alt text descriptions for accessibility compliance and tagging. + +# Getting Started + +To get started, first log in to or create your [Pipedream account](https://pipedream.com) and start a new workflow. + +Go to [AltTextLab](https://www.alttextlab.com/) and create an account (or log in if you already have one). Then, in the Dashboard, navigate to the API Keys section, generate a new API key, and copy it โ€” youโ€™ll use this key to authenticate your requests. diff --git a/components/alttextlab/actions/generate-alt-text/generate-alt-text.mjs b/components/alttextlab/actions/generate-alt-text/generate-alt-text.mjs new file mode 100644 index 0000000000000..2955ec84e2683 --- /dev/null +++ b/components/alttextlab/actions/generate-alt-text/generate-alt-text.mjs @@ -0,0 +1,87 @@ +import altTextLab from "../../alttextlab.app.mjs"; +import { AI_WRITING_STYLE } from "../../common/constants.mjs"; + +export default { + key: "alttextlab-generate-alt-text", + name: "Generate Alt Text", + description: "Generates alt text for images using AI. [See the documentation](https://www.alttextlab.com/docs/api)", + version: "0.0.1", + type: "action", + props: { + altTextLab, + alert: { + type: "alert", + alertType: "info", + content: "Supported formats: PNG, JPG, WebP, AVIF, SVG", + }, + imageUrl: { + type: "string", + label: "Image URL", + description: "Provide the direct URL to the image you want to generate alt text for. Make sure the link is publicly accessible (not behind a login or firewall).", + }, + lang: { + type: "string", + label: "Language", + description: "Enter the language code for the alt text generation (e.g., \"en\" for English, \"fr\" for French). See the [full list of supported languages](https://www.alttextlab.com/docs/api#language)", + default: "en", + }, + style: { + type: "string", + label: "AI writing styles", + options: AI_WRITING_STYLE, + description: "Alt-text writing styles define the tone, structure, and level of detail used to describe an image. [Learn more](https://www.alttextlab.com/docs/writing-style)", + default: "neutral", + }, + keywords: { + type: "string[]", + label: "Keywords", + description: "Enter one or more keywords to alt text generation. Separate multiple keywords with commas. Example: cat, window, sunset.", + optional: true, + }, + ecommerceProduct: { + type: "string", + label: "Ecommerce Product Name", + description: "The name of the product.", + optional: true, + }, + ecommerceBrand: { + type: "string", + label: "Ecommerce Product Brand", + description: "The brand of the product.", + optional: true, + }, + ecommerceColor: { + type: "string", + label: "Ecommerce Product Color", + description: "The color of the product.", + optional: true, + }, + ecommerceMaterial: { + type: "string", + label: "Ecommerce Product Material", + description: "The material of the product.", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.altTextLab.altTextGeneration({ + $, + data: { + source: "pipedream", + imageUrl: this.imageUrl, + lang: this.lang, + style: this.style, + keywords: this.keywords, + ecommerce: { + product: this.ecommerceProduct, + brand: this.ecommerceBrand, + color: this.ecommerceColor, + material: this.ecommerceMaterial, + }, + }, + }); + + $.export("$summary", "Alt text has been generated"); + return response; + }, +}; diff --git a/components/alttextlab/alttextlab.app.mjs b/components/alttextlab/alttextlab.app.mjs new file mode 100644 index 0000000000000..a6392da103d89 --- /dev/null +++ b/components/alttextlab/alttextlab.app.mjs @@ -0,0 +1,34 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "alttextlab", + propDefinitions: {}, + methods: { + _baseUrl() { + return "https://app.alttextlab.com/api/v1"; + }, + _headers(headers) { + return { + ...headers, + "x-api-key": `${this.$auth.api_key}`, + }; + }, + async _makeRequest({ + $ = this, path, headers, ...otherOptions + }) { + return axios($, { + url: this._baseUrl() + path, + headers: this._headers(headers), + ...otherOptions, + }); + }, + async altTextGeneration(args) { + return this._makeRequest({ + path: "/alt-text/generate", + method: "POST", + ...args, + }); + }, + }, +}; diff --git a/components/alttextlab/common/constants.mjs b/components/alttextlab/common/constants.mjs new file mode 100644 index 0000000000000..d055f079472d2 --- /dev/null +++ b/components/alttextlab/common/constants.mjs @@ -0,0 +1,18 @@ +export const AI_WRITING_STYLE = [ + { + label: "Descriptive", + value: "descriptive", + }, + { + label: "Neutral", + value: "neutral", + }, + { + label: "Matter of fact", + value: "matter-of-fact", + }, + { + label: "Minimal", + value: "minimal", + }, +]; diff --git a/components/alttextlab/package.json b/components/alttextlab/package.json new file mode 100644 index 0000000000000..bfe4365c189c1 --- /dev/null +++ b/components/alttextlab/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/alttextify", + "version": "0.1.0", + "description": "Pipedream AltTextLab Components", + "main": "alttextlab.app.mjs", + "keywords": [ + "pipedream", + "alttextlab" + ], + "homepage": "https://pipedream.com/apps/alttextlab", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" + } +} diff --git a/components/amazing_marvin/.gitignore b/components/amazing_marvin/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/amazing_marvin/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/amazing_marvin/amazing_marvin.app.mjs b/components/amazing_marvin/amazing_marvin.app.mjs new file mode 100644 index 0000000000000..ce89243f1a9a6 --- /dev/null +++ b/components/amazing_marvin/amazing_marvin.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "amazing_marvin", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/amazing_marvin/app/amazing_marvin.app.ts b/components/amazing_marvin/app/amazing_marvin.app.ts deleted file mode 100644 index 2de86f0fad301..0000000000000 --- a/components/amazing_marvin/app/amazing_marvin.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "amazing_marvin", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/amazing_marvin/package.json b/components/amazing_marvin/package.json index 245dbf3e33aa7..688fb7e943dc6 100644 --- a/components/amazing_marvin/package.json +++ b/components/amazing_marvin/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/amazing_marvin", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Amazing Marvin Components", - "main": "dist/app/amazing_marvin.app.mjs", + "main": "amazing_marvin.app.mjs", "keywords": [ "pipedream", "amazing_marvin" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/amazing_marvin", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/amazon_ses/actions/create-email-template/create-email-template.mjs b/components/amazon_ses/actions/create-email-template/create-email-template.mjs index 8793daef611bd..f2b9d401c4de0 100644 --- a/components/amazon_ses/actions/create-email-template/create-email-template.mjs +++ b/components/amazon_ses/actions/create-email-template/create-email-template.mjs @@ -5,7 +5,7 @@ export default { key: "amazon_ses-create-email-template", name: "Create Email Template", description: "Create a HTML or a plain text email template. [See the docs](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sesv2/classes/createemailtemplatecommand.html)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { ...base.props, diff --git a/components/amazon_ses/actions/get-email-template/get-email-template.mjs b/components/amazon_ses/actions/get-email-template/get-email-template.mjs index 9f0758fd102b8..a03ffec50a5d3 100644 --- a/components/amazon_ses/actions/get-email-template/get-email-template.mjs +++ b/components/amazon_ses/actions/get-email-template/get-email-template.mjs @@ -4,7 +4,7 @@ export default { key: "amazon_ses-get-email-template", name: "Get Email Template", description: "Get an email template. [See the docs](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sesv2/classes/getemailtemplatecommand.html)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { ...base.props, diff --git a/components/amazon_ses/actions/send-email/send-email.mjs b/components/amazon_ses/actions/send-email/send-email.mjs index 70c4717bf7474..d9e57a1fefe7c 100644 --- a/components/amazon_ses/actions/send-email/send-email.mjs +++ b/components/amazon_ses/actions/send-email/send-email.mjs @@ -5,7 +5,7 @@ export default { key: "amazon_ses-send-email", name: "Send Email", description: "Send an email using Amazon SES. Supports simple email messaging. [See the docs](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sesv2/classes/sendemailcommand.html)", - version: "0.9.0", + version: "0.9.1", type: "action", props: { ...base.props, diff --git a/components/amazon_ses/actions/send-templated-email/send-templated-email.mjs b/components/amazon_ses/actions/send-templated-email/send-templated-email.mjs index 3f3b8befc5bcf..3edd09826c222 100644 --- a/components/amazon_ses/actions/send-templated-email/send-templated-email.mjs +++ b/components/amazon_ses/actions/send-templated-email/send-templated-email.mjs @@ -4,7 +4,7 @@ export default { key: "amazon_ses-send-templated-email", name: "Send Templated Email", description: "Send an email replacing the template tags with values using Amazon SES. [See the docs](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ses/classes/sendtemplatedemailcommand.html)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { ...base.props, diff --git a/components/amazon_ses/actions/update-email-template/update-email-template.mjs b/components/amazon_ses/actions/update-email-template/update-email-template.mjs index e3ce31cec699f..5c8e7d1d379ac 100644 --- a/components/amazon_ses/actions/update-email-template/update-email-template.mjs +++ b/components/amazon_ses/actions/update-email-template/update-email-template.mjs @@ -4,7 +4,7 @@ export default { key: "amazon_ses-update-email-template", name: "Update Email Template", description: "Update an email template. [See the docs](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sesv2/classes/updateemailtemplatecommand.html)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { ...base.props, diff --git a/components/amazon_ses/amazon_ses.app.mjs b/components/amazon_ses/amazon_ses.app.mjs index 69cafe6df9e32..098073a9d0d06 100644 --- a/components/amazon_ses/amazon_ses.app.mjs +++ b/components/amazon_ses/amazon_ses.app.mjs @@ -1,4 +1,4 @@ -import aws from "../aws/aws.app.mjs"; +import aws from "@pipedream/aws"; import { SESClient, SendTemplatedEmailCommand, diff --git a/components/amazon_ses/package.json b/components/amazon_ses/package.json index a8a01f007ea62..9c9479a33ec99 100644 --- a/components/amazon_ses/package.json +++ b/components/amazon_ses/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/amazon_ses", - "version": "0.3.7", + "version": "0.3.8", "description": "Pipedream Amazon SES Components", "main": "amazon_ses.app.mjs", "keywords": [ @@ -13,7 +13,8 @@ "@aws-sdk/client-ec2": "^3.89.0", "@aws-sdk/client-ses": "^3.95.0", "@aws-sdk/client-sesv2": "^3.87.0", - "@pipedream/platform": "^0.10.0" + "@pipedream/platform": "^0.10.0", + "@pipedream/aws": "^1.1.0" }, "gitHead": "e12480b94cc03bed4808ebc6b13e7fdb3a1ba535", "publishConfig": { diff --git a/components/ambient_weather/.gitignore b/components/ambient_weather/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/ambient_weather/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/ambient_weather/ambient_weather.app.mjs b/components/ambient_weather/ambient_weather.app.mjs new file mode 100644 index 0000000000000..75d39580acaa0 --- /dev/null +++ b/components/ambient_weather/ambient_weather.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "ambient_weather", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/ambient_weather/app/ambient_weather.app.ts b/components/ambient_weather/app/ambient_weather.app.ts deleted file mode 100644 index 758b182f54949..0000000000000 --- a/components/ambient_weather/app/ambient_weather.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "ambient_weather", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/ambient_weather/package.json b/components/ambient_weather/package.json index 2b65f1601bc55..ad0ab492533d0 100644 --- a/components/ambient_weather/package.json +++ b/components/ambient_weather/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/ambient_weather", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Ambient Weather Components", - "main": "dist/app/ambient_weather.app.mjs", + "main": "ambient_weather.app.mjs", "keywords": [ "pipedream", "ambient_weather" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/ambient_weather", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/amcards/.gitignore b/components/amcards/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/amcards/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/amcards/amcards.app.mjs b/components/amcards/amcards.app.mjs new file mode 100644 index 0000000000000..b808571b09a74 --- /dev/null +++ b/components/amcards/amcards.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "amcards", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/amcards/app/amcards.app.ts b/components/amcards/app/amcards.app.ts deleted file mode 100644 index 70bd90103f2ba..0000000000000 --- a/components/amcards/app/amcards.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "amcards", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/amcards/package.json b/components/amcards/package.json index 38798298f548a..668821c6f2477 100644 --- a/components/amcards/package.json +++ b/components/amcards/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/amcards", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream AMcards Components", - "main": "dist/app/amcards.app.mjs", + "main": "amcards.app.mjs", "keywords": [ "pipedream", "amcards" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/amcards", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/amentum_aerospace/.gitignore b/components/amentum_aerospace/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/amentum_aerospace/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/amentum_aerospace/amentum_aerospace.app.mjs b/components/amentum_aerospace/amentum_aerospace.app.mjs new file mode 100644 index 0000000000000..394f9a752836b --- /dev/null +++ b/components/amentum_aerospace/amentum_aerospace.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "amentum_aerospace", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/amentum_aerospace/app/amentum_aerospace.app.ts b/components/amentum_aerospace/app/amentum_aerospace.app.ts deleted file mode 100644 index b78131b448668..0000000000000 --- a/components/amentum_aerospace/app/amentum_aerospace.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "amentum_aerospace", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/amentum_aerospace/package.json b/components/amentum_aerospace/package.json index 8407ac4a24fd1..937e036a6274c 100644 --- a/components/amentum_aerospace/package.json +++ b/components/amentum_aerospace/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/amentum_aerospace", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Amentum Aerospace Components", - "main": "dist/app/amentum_aerospace.app.mjs", + "main": "amentum_aerospace.app.mjs", "keywords": [ "pipedream", "amentum_aerospace" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/amentum_aerospace", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/amplenote/package.json b/components/amplenote/package.json index cc0111d0dbe1b..c790fa47e0921 100644 --- a/components/amplenote/package.json +++ b/components/amplenote/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/amplenote", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Amplenote Components", "main": "dist/app/amplenote.app.mjs", "keywords": [ @@ -16,6 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.1" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/amplenote/tsconfig.json b/components/amplenote/tsconfig.json index a61206464b8c0..3a9389484d040 100644 --- a/components/amplenote/tsconfig.json +++ b/components/amplenote/tsconfig.json @@ -1,23 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/amplifier/.gitignore b/components/amplifier/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/amplifier/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/amplifier/amplifier.app.mjs b/components/amplifier/amplifier.app.mjs new file mode 100644 index 0000000000000..3a743b8d35b92 --- /dev/null +++ b/components/amplifier/amplifier.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "amplifier", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/amplifier/app/amplifier.app.ts b/components/amplifier/app/amplifier.app.ts deleted file mode 100644 index c09080665fa01..0000000000000 --- a/components/amplifier/app/amplifier.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "amplifier", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/amplifier/package.json b/components/amplifier/package.json index d22420c0b7e0a..af46847c16555 100644 --- a/components/amplifier/package.json +++ b/components/amplifier/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/amplifier", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Amplifier Components", - "main": "dist/app/amplifier.app.mjs", + "main": "amplifier.app.mjs", "keywords": [ "pipedream", "amplifier" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/amplifier", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/announcekit/.gitignore b/components/announcekit/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/announcekit/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/announcekit/announcekit.app.mjs b/components/announcekit/announcekit.app.mjs new file mode 100644 index 0000000000000..70aee12846e61 --- /dev/null +++ b/components/announcekit/announcekit.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "announcekit", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/announcekit/app/announcekit.app.ts b/components/announcekit/app/announcekit.app.ts deleted file mode 100644 index 25c9d65081116..0000000000000 --- a/components/announcekit/app/announcekit.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "announcekit", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/announcekit/package.json b/components/announcekit/package.json index eb02ae86b7b42..318cd790ad484 100644 --- a/components/announcekit/package.json +++ b/components/announcekit/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/announcekit", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream AnnounceKit Components", - "main": "dist/app/announcekit.app.mjs", + "main": "announcekit.app.mjs", "keywords": [ "pipedream", "announcekit" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/announcekit", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/anthropic/actions/chat/chat.mjs b/components/anthropic/actions/chat/chat.mjs index 8f1cd3137579a..5a3d1dacf9e3a 100644 --- a/components/anthropic/actions/chat/chat.mjs +++ b/components/anthropic/actions/chat/chat.mjs @@ -3,7 +3,7 @@ import constants from "../common/constants.mjs"; export default { name: "Chat", - version: "0.1.0", + version: "0.2.0", key: "anthropic-chat", description: "The Chat API. [See the documentation](https://docs.anthropic.com/claude/reference/messages_post)", type: "action", diff --git a/components/anthropic/actions/common/constants.mjs b/components/anthropic/actions/common/constants.mjs index 4587351a8f03a..954b8824a4c53 100644 --- a/components/anthropic/actions/common/constants.mjs +++ b/components/anthropic/actions/common/constants.mjs @@ -1,5 +1,9 @@ export default { MESSAGE_MODELS: [ + { + label: "Claude Opus 4.1", + value: "claude-opus-4-1-20250805", + }, { label: "Claude Opus 4", value: "claude-opus-4-20250514", diff --git a/components/anthropic/package.json b/components/anthropic/package.json index bb18034795d63..9f139df2a1452 100644 --- a/components/anthropic/package.json +++ b/components/anthropic/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/anthropic", - "version": "0.1.0", + "version": "0.2.0", "description": "Pipedream Anthropic (Claude) Components", "main": "anthropic.app.mjs", "keywords": [ diff --git a/components/apex_27/.gitignore b/components/apex_27/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/apex_27/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/apex_27/apex_27.app.mjs b/components/apex_27/apex_27.app.mjs new file mode 100644 index 0000000000000..e30b3ecb2b69c --- /dev/null +++ b/components/apex_27/apex_27.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "apex_27", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/apex_27/app/apex_27.app.ts b/components/apex_27/app/apex_27.app.ts deleted file mode 100644 index 989866fb30ec0..0000000000000 --- a/components/apex_27/app/apex_27.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "apex_27", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/apex_27/package.json b/components/apex_27/package.json index e85783e1c7c85..c762717c690ee 100644 --- a/components/apex_27/package.json +++ b/components/apex_27/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/apex_27", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Apex 27 Components", - "main": "dist/app/apex_27.app.mjs", + "main": "apex_27.app.mjs", "keywords": [ "pipedream", "apex_27" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/apex_27", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/api2pdf/.gitignore b/components/api2pdf/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/api2pdf/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/api2pdf/api2pdf.app.mjs b/components/api2pdf/api2pdf.app.mjs new file mode 100644 index 0000000000000..452b8bed24208 --- /dev/null +++ b/components/api2pdf/api2pdf.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "api2pdf", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/api2pdf/app/api2pdf.app.ts b/components/api2pdf/app/api2pdf.app.ts deleted file mode 100644 index 4be068d286cf9..0000000000000 --- a/components/api2pdf/app/api2pdf.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "api2pdf", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/api2pdf/package.json b/components/api2pdf/package.json index cace5d53b1890..a85c62af7b393 100644 --- a/components/api2pdf/package.json +++ b/components/api2pdf/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/api2pdf", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Api2pdf Components", - "main": "dist/app/api2pdf.app.mjs", + "main": "api2pdf.app.mjs", "keywords": [ "pipedream", "api2pdf" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/api2pdf", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/api_labz/api_labz.app.mjs b/components/api_labz/api_labz.app.mjs index 7c8322c02ec45..57b64c29c97d9 100644 --- a/components/api_labz/api_labz.app.mjs +++ b/components/api_labz/api_labz.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/api_sports/.gitignore b/components/api_sports/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/api_sports/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/api_sports/api_sports.app.mjs b/components/api_sports/api_sports.app.mjs new file mode 100644 index 0000000000000..04617d5ba6394 --- /dev/null +++ b/components/api_sports/api_sports.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "api_sports", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/api_sports/app/api_sports.app.ts b/components/api_sports/app/api_sports.app.ts deleted file mode 100644 index 6fdfd516c7ca4..0000000000000 --- a/components/api_sports/app/api_sports.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "api_sports", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/api_sports/package.json b/components/api_sports/package.json index 0f37286411dc8..5c99a5fbb866f 100644 --- a/components/api_sports/package.json +++ b/components/api_sports/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/api_sports", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream API Sports Components", - "main": "dist/app/api_sports.app.mjs", + "main": "api_sports.app.mjs", "keywords": [ "pipedream", "api_sports" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/api_sports", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/api_void/.gitignore b/components/api_void/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/api_void/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/api_void/api_void.app.mjs b/components/api_void/api_void.app.mjs new file mode 100644 index 0000000000000..ca4f48b461dc7 --- /dev/null +++ b/components/api_void/api_void.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "api_void", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/api_void/app/api_void.app.ts b/components/api_void/app/api_void.app.ts deleted file mode 100644 index d46016e5338c5..0000000000000 --- a/components/api_void/app/api_void.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "api_void", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/api_void/package.json b/components/api_void/package.json index aa946c03f7e89..a1720a99cd717 100644 --- a/components/api_void/package.json +++ b/components/api_void/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/api_void", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Api Void Components", - "main": "dist/app/api_void.app.mjs", + "main": "api_void.app.mjs", "keywords": [ "pipedream", "api_void" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/api_void", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/apify/actions/scrape-single-url/scrape-single-url.mjs b/components/apify/actions/scrape-single-url/scrape-single-url.mjs index 3d7fb0e5127fa..0ad862ee80163 100644 --- a/components/apify/actions/scrape-single-url/scrape-single-url.mjs +++ b/components/apify/actions/scrape-single-url/scrape-single-url.mjs @@ -5,8 +5,8 @@ import { ACTOR_JOB_STATUSES } from "@apify/consts"; export default { key: "apify-scrape-single-url", name: "Scrape Single URL", - description: "Executes a scraper on a specific website and returns its content as text. This action is perfect for extracting content from a single page.", - version: "0.0.4", + description: "Executes a scraper on a specific website and returns its content as HTML. This action is perfect for extracting content from a single page. [See the documentation](https://docs.apify.com/sdk/js/docs/examples/crawl-single-url)", + version: "0.1.0", type: "action", props: { apify, diff --git a/components/apify/package.json b/components/apify/package.json index dd65a3d28a1b9..9c9664cc20aa4 100644 --- a/components/apify/package.json +++ b/components/apify/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/apify", - "version": "0.2.3", + "version": "0.3.0", "description": "Pipedream Apify Components", "main": "apify.app.mjs", "keywords": [ diff --git a/components/apify_oauth/actions/get-dataset-items/get-dataset-items.mjs b/components/apify_oauth/actions/get-dataset-items/get-dataset-items.mjs new file mode 100644 index 0000000000000..512f3cf946627 --- /dev/null +++ b/components/apify_oauth/actions/get-dataset-items/get-dataset-items.mjs @@ -0,0 +1,22 @@ +import app from "../../apify_oauth.app.mjs"; +import common from "@pipedream/apify/actions/get-dataset-items/get-dataset-items.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "apify_oauth-get-dataset-items", + version: "0.0.1", + name, + description, + type, + props: { + apify: app, + ...props, + }, +}; diff --git a/components/apify_oauth/actions/run-actor/run-actor.mjs b/components/apify_oauth/actions/run-actor/run-actor.mjs new file mode 100644 index 0000000000000..d2185b8dd415e --- /dev/null +++ b/components/apify_oauth/actions/run-actor/run-actor.mjs @@ -0,0 +1,22 @@ +import app from "../../apify_oauth.app.mjs"; +import common from "@pipedream/apify/actions/run-actor/run-actor.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "apify_oauth-run-actor", + version: "0.0.1", + name, + description, + type, + props: { + apify: app, + ...props, + }, +}; diff --git a/components/apify_oauth/actions/run-task-synchronously/run-task-synchronously.mjs b/components/apify_oauth/actions/run-task-synchronously/run-task-synchronously.mjs new file mode 100644 index 0000000000000..bc1148e71b47f --- /dev/null +++ b/components/apify_oauth/actions/run-task-synchronously/run-task-synchronously.mjs @@ -0,0 +1,22 @@ +import app from "../../apify_oauth.app.mjs"; +import common from "@pipedream/apify/actions/run-task-synchronously/run-task-synchronously.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "apify_oauth-run-task-synchronously", + version: "0.0.1", + name, + description, + type, + props: { + apify: app, + ...props, + }, +}; diff --git a/components/apify_oauth/actions/scrape-single-url/scrape-single-url.mjs b/components/apify_oauth/actions/scrape-single-url/scrape-single-url.mjs new file mode 100644 index 0000000000000..8f9fe7fb05813 --- /dev/null +++ b/components/apify_oauth/actions/scrape-single-url/scrape-single-url.mjs @@ -0,0 +1,22 @@ +import app from "../../apify_oauth.app.mjs"; +import common from "@pipedream/apify/actions/scrape-single-url/scrape-single-url.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "apify_oauth-scrape-single-url", + version: "0.0.1", + name, + description, + type, + props: { + apify: app, + ...props, + }, +}; diff --git a/components/apify_oauth/actions/set-key-value-store-record/set-key-value-store-record.mjs b/components/apify_oauth/actions/set-key-value-store-record/set-key-value-store-record.mjs new file mode 100644 index 0000000000000..61b12378caeb1 --- /dev/null +++ b/components/apify_oauth/actions/set-key-value-store-record/set-key-value-store-record.mjs @@ -0,0 +1,22 @@ +import app from "../../apify_oauth.app.mjs"; +import common from "@pipedream/apify/actions/set-key-value-store-record/set-key-value-store-record.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "apify_oauth-set-key-value-store-record", + version: "0.0.1", + name, + description, + type, + props: { + apify: app, + ...props, + }, +}; diff --git a/components/apify_oauth/apify_oauth.app.mjs b/components/apify_oauth/apify_oauth.app.mjs new file mode 100644 index 0000000000000..9764aaafbf77a --- /dev/null +++ b/components/apify_oauth/apify_oauth.app.mjs @@ -0,0 +1,19 @@ +import common from "@pipedream/apify"; + +export default { + type: "app", + app: "apify_oauth", + propDefinitions: { + ...common.propDefinitions, + }, + methods: { + ...common.methods, + _headers() { + return { + "Content-Type": "application/json", + "Authorization": `Bearer ${this.$auth.oauth_access_token}`, + "x-apify-integration-platform": "pipedream", + }; + }, + }, +}; diff --git a/components/apify_oauth/common/utils.mjs b/components/apify_oauth/common/utils.mjs new file mode 100644 index 0000000000000..d42df055ddeb0 --- /dev/null +++ b/components/apify_oauth/common/utils.mjs @@ -0,0 +1,40 @@ +export function adjustPropDefinitions(props, app) { + return Object.fromEntries( + Object.entries(props).map(([ + key, + prop, + ]) => { + if (typeof prop === "string") return [ + key, + prop, + ]; + const { + propDefinition, ...otherValues + } = prop; + if (propDefinition) { + const [ + , ...otherDefs + ] = propDefinition; + return [ + key, + { + propDefinition: [ + app, + ...otherDefs, + ], + ...otherValues, + }, + ]; + } + return [ + key, + otherValues.type === "app" + ? null + : otherValues, + ]; + }) + .filter(([ + , value, + ]) => value), + ); +} diff --git a/components/apify_oauth/package.json b/components/apify_oauth/package.json new file mode 100644 index 0000000000000..6184248d3fc36 --- /dev/null +++ b/components/apify_oauth/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/apify_oauth", + "version": "0.1.0", + "description": "Pipedream Apify (OAuth) Components", + "main": "apify_oauth.app.mjs", + "keywords": [ + "pipedream", + "apify_oauth" + ], + "homepage": "https://pipedream.com/apps/apify_oauth", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/apify": "^0.3.0" + } +} diff --git a/components/apify_oauth/sources/new-finished-actor-run-instant/new-finished-actor-run-instant.mjs b/components/apify_oauth/sources/new-finished-actor-run-instant/new-finished-actor-run-instant.mjs new file mode 100644 index 0000000000000..48a61114c1ea6 --- /dev/null +++ b/components/apify_oauth/sources/new-finished-actor-run-instant/new-finished-actor-run-instant.mjs @@ -0,0 +1,22 @@ +import app from "../../apify_oauth.app.mjs"; +import common from "@pipedream/apify/sources/new-finished-actor-run-instant/new-finished-actor-run-instant.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "apify_oauth-new-finished-actor-run-instant", + version: "0.0.1", + name, + description, + type, + props: { + apify: app, + ...props, + }, +}; diff --git a/components/apify_oauth/sources/new-finished-task-run-instant/new-finished-task-run-instant.mjs b/components/apify_oauth/sources/new-finished-task-run-instant/new-finished-task-run-instant.mjs new file mode 100644 index 0000000000000..e4e604bc3c294 --- /dev/null +++ b/components/apify_oauth/sources/new-finished-task-run-instant/new-finished-task-run-instant.mjs @@ -0,0 +1,22 @@ +import app from "../../apify_oauth.app.mjs"; +import common from "@pipedream/apify/sources/new-finished-task-run-instant/new-finished-task-run-instant.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "apify_oauth-new-finished-task-run-instant", + version: "0.0.1", + name, + description, + type, + props: { + apify: app, + ...props, + }, +}; diff --git a/components/apilio/.gitignore b/components/apilio/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/apilio/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/apilio/apilio.app.mjs b/components/apilio/apilio.app.mjs new file mode 100644 index 0000000000000..0ce0bc70913a5 --- /dev/null +++ b/components/apilio/apilio.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "apilio", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/apilio/app/apilio.app.ts b/components/apilio/app/apilio.app.ts deleted file mode 100644 index d1eda781a4019..0000000000000 --- a/components/apilio/app/apilio.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "apilio", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/apilio/package.json b/components/apilio/package.json index 431c40216ae32..cbb5e1b4d6fd1 100644 --- a/components/apilio/package.json +++ b/components/apilio/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/apilio", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Apilio Components", - "main": "dist/app/apilio.app.mjs", + "main": "apilio.app.mjs", "keywords": [ "pipedream", "apilio" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/apilio", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/apimage/apimage.app.mjs b/components/apimage/apimage.app.mjs new file mode 100644 index 0000000000000..ec4341d473047 --- /dev/null +++ b/components/apimage/apimage.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "apimage", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/apimage/package.json b/components/apimage/package.json new file mode 100644 index 0000000000000..d74e1ad29cef8 --- /dev/null +++ b/components/apimage/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/apimage", + "version": "0.0.1", + "description": "Pipedream APImage Components", + "main": "apimage.app.mjs", + "keywords": [ + "pipedream", + "apimage" + ], + "homepage": "https://pipedream.com/apps/apimage", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/apitemplate_io/package.json b/components/apitemplate_io/package.json index b77eef3edab16..0c03353ce1c23 100644 --- a/components/apitemplate_io/package.json +++ b/components/apitemplate_io/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/apitemplate_io", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream APITemplate.io Components", "main": "dist/app/apitemplate_io.app.mjs", "keywords": [ @@ -16,6 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.1" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/apitemplate_io/tsconfig.json b/components/apitemplate_io/tsconfig.json index a68a0d8b02a26..3a9389484d040 100644 --- a/components/apitemplate_io/tsconfig.json +++ b/components/apitemplate_io/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common", - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/appcues/.gitignore b/components/appcues/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/appcues/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/appcues/app/appcues.app.ts b/components/appcues/app/appcues.app.ts deleted file mode 100644 index 8396993679c66..0000000000000 --- a/components/appcues/app/appcues.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "appcues", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/appcues/appcues.app.mjs b/components/appcues/appcues.app.mjs new file mode 100644 index 0000000000000..3145bc91bf21d --- /dev/null +++ b/components/appcues/appcues.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "appcues", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/appcues/package.json b/components/appcues/package.json index 98692cc499977..688fc0fc1bc1b 100644 --- a/components/appcues/package.json +++ b/components/appcues/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/appcues", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Appcues Components", - "main": "dist/app/appcues.app.mjs", + "main": "appcues.app.mjs", "keywords": [ "pipedream", "appcues" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/appcues", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/arlo/arlo.app.mjs b/components/arlo/arlo.app.mjs index b3ce0a9599ab0..fa0745716a6e1 100644 --- a/components/arlo/arlo.app.mjs +++ b/components/arlo/arlo.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/asana/actions/list-task-stories/list-task-stories.mjs b/components/asana/actions/list-task-stories/list-task-stories.mjs new file mode 100644 index 0000000000000..2072a1bd83c3c --- /dev/null +++ b/components/asana/actions/list-task-stories/list-task-stories.mjs @@ -0,0 +1,96 @@ +import common from "../common/common.mjs"; + +export default { + key: "asana-list-task-stories", + name: "List Task Stories", + description: "List stories (including comments) for a task. [See the documentation](https://developers.asana.com/reference/getstoriesfortask)", + version: "0.0.1", + type: "action", + props: { + ...common.props, + taskId: { + label: "Task GID", + description: "The ID of the task to retrieve stories for", + type: "string", + propDefinition: [ + common.props.asana, + "tasks", + (c) => ({ + project: c.project, + }), + ], + }, + commentsOnly: { + type: "boolean", + label: "Comments Only", + description: "Only return comments", + optional: true, + }, + optFields: { + type: "string[]", + label: "Opt Fields", + description: "This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. See the [documentation](https://developers.asana.com/reference/stories) for available fields.", + optional: true, + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of results to return", + default: 100, + optional: true, + }, + }, + methods: { + async getStoriesForTask({ + taskId, ...opts + }) { + return this.asana._makeRequest({ + path: `tasks/${taskId}/stories`, + ...opts, + }); + }, + }, + async run({ $ }) { + let hasMore, count = 0; + + const params = { + limit: this.maxResults, + opt_fields: this.optFields + ? this.optFields?.join(",") + : undefined, + }; + + const results = []; + + do { + const { + data, next_page: next, + } = await this.getStoriesForTask({ + $, + taskId: this.taskId, + params, + }); + + hasMore = next; + params.offset = next?.offset; + + if (data.length === 0) { + break; + } + + for (const story of data) { + if (this.commentsOnly && story.type !== "comment") { + continue; + } + results.push(story); + if (++count >= this.maxResults) { + hasMore = false; + break; + } + } + } while (hasMore); + + $.export("$summary", `Found ${results.length} stories`); + return results; + }, +}; diff --git a/components/asana/package.json b/components/asana/package.json index c82b90be18893..1e3611db44b54 100644 --- a/components/asana/package.json +++ b/components/asana/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/asana", - "version": "0.7.4", + "version": "0.8.0", "description": "Pipedream Asana Components", "main": "asana.app.mjs", "keywords": [ diff --git a/components/assemblyai/actions/create-captions/create-captions.mjs b/components/assemblyai/actions/create-captions/create-captions.mjs index cc6017d13a6cc..4a80f50f5104e 100644 --- a/components/assemblyai/actions/create-captions/create-captions.mjs +++ b/components/assemblyai/actions/create-captions/create-captions.mjs @@ -2,9 +2,9 @@ import assemblyai from "../../assemblyai.app.mjs"; export default { name: "Create Captions", - description: "Export your completed transcripts in SRT (srt) or VTT (vtt) format, which can be used for subtitles and closed captions in videos. [See the documentation](https://www.assemblyai.com/docs/API%20reference/transcript)", + description: "Export your completed transcripts in SRT (srt) or VTT (vtt) format, which can be used for subtitles and closed captions in videos. [See the documentation](https://www.assemblyai.com/docs/api-reference/transcripts/get-subtitles)", key: "assemblyai-create-captions", - version: "0.0.1", + version: "0.0.3", type: "action", props: { assemblyai, diff --git a/components/assemblyai/actions/get-transcription/get-transcription.mjs b/components/assemblyai/actions/get-transcription/get-transcription.mjs index c334dbfc0fe3b..8c7ebfbf435fa 100644 --- a/components/assemblyai/actions/get-transcription/get-transcription.mjs +++ b/components/assemblyai/actions/get-transcription/get-transcription.mjs @@ -2,95 +2,26 @@ import assemblyai from "../../assemblyai.app.mjs"; export default { name: "Get Transcription", - description: "Fetches a specific transcribed result from the AssemblyAI API. [See the documentation](https://www.assemblyai.com/docs/API%20reference/transcript)", + description: "Fetches a specific transcribed result from the AssemblyAI API. [See the documentation](https://www.assemblyai.com/docs/api-reference/transcripts/get)", key: "assemblyai-get-transcription", - version: "0.0.3", + version: "0.1.0", type: "action", props: { assemblyai, - url: { - type: "string", - label: "URL", - description: "The URL of your media file to transcribe.", - }, - languageCode: { + transcriptId: { propDefinition: [ assemblyai, - "languageCode", + "transcriptId", ], }, - punctuate: { - type: "boolean", - label: "Punctuate", - description: "Enable Automatic Punctuation", - optional: true, - }, - speakerLabels: { - type: "boolean", - label: "Speaker Labels", - description: "Enable Speaker diarization", - optional: true, - }, - contentSafety: { - type: "boolean", - label: "Content Safety", - description: "Enable Content Moderation", - optional: true, - }, - sentimentAnalysis: { - type: "boolean", - label: "Sentiment Analysis", - description: "Enable Sentiment Analysis", - optional: true, - }, - webhookUrl: { - type: "string", - label: "Webhook URL", - description: "The URL we should send webhooks to when your transcript is complete", - optional: true, - }, - callbackWithRerun: { - type: "boolean", - label: "Callback With Rerun", - description: "Use the `$.flow.rerun` Node.js helper to rerun the step when the transcription is completed. Overrides the `webhookUrl` prop. This will increase execution time and credit usage as a result. [See the documentation(https://pipedream.com/docs/code/nodejs/rerun/#flow-rerun). Not available in Pipedream Connect.", - optional: true, - }, }, async run({ $ }) { - let response; - const context = $.context; - const run = context - ? context.run - : { - runs: 1, - }; - if (run.runs === 1) { - let webhookUrl = this.webhookUrl; - if (context && this.callbackWithRerun) { - ({ resume_url: webhookUrl } = $.flow.rerun(600000, null, 1)); - } - response = await this.assemblyai.createTranscript({ - data: { - audio_url: this.url, - language_code: this.languageCode, - punctuate: this.punctuate, - speaker_labels: this.speakerLabels, - content_safety: this.contentSafety, - sentiment_analysis: this.sentimentAnalysis, - webhook_url: webhookUrl, - }, - $, - }); - } - if (run.callback_request) { - response = await this.assemblyai.getTranscript({ - transcriptId: run.callback_request.body.transcript_id, - }); - } + const response = await this.assemblyai.getTranscript({ + transcriptId: this.transcriptId, + $, + }); - if (response?.id) { - $.export("$summary", `Successfully created transcription with ID ${response.id}.`); - } + $.export("$summary", `Successfully retrieved transcription for transcript with ID ${this.transcriptId}.`); return response; }, diff --git a/components/assemblyai/actions/transcribe-audio/transcribe-audio.mjs b/components/assemblyai/actions/transcribe-audio/transcribe-audio.mjs new file mode 100644 index 0000000000000..1dd5c065aafa9 --- /dev/null +++ b/components/assemblyai/actions/transcribe-audio/transcribe-audio.mjs @@ -0,0 +1,97 @@ +import assemblyai from "../../assemblyai.app.mjs"; + +export default { + name: "Transcribe Audio", + description: "Create a transcript from a media file that is accessible via a URL. [See the documentation](https://www.assemblyai.com/docs/api-reference/transcripts/submit)", + key: "assemblyai-transcribe-audio", + version: "0.1.0", + type: "action", + props: { + assemblyai, + url: { + type: "string", + label: "URL", + description: "The URL of your media file to transcribe.", + }, + languageCode: { + propDefinition: [ + assemblyai, + "languageCode", + ], + }, + punctuate: { + type: "boolean", + label: "Punctuate", + description: "Enable Automatic Punctuation", + optional: true, + }, + speakerLabels: { + type: "boolean", + label: "Speaker Labels", + description: "Enable Speaker diarization", + optional: true, + }, + contentSafety: { + type: "boolean", + label: "Content Safety", + description: "Enable Content Moderation", + optional: true, + }, + sentimentAnalysis: { + type: "boolean", + label: "Sentiment Analysis", + description: "Enable Sentiment Analysis", + optional: true, + }, + webhookUrl: { + type: "string", + label: "Webhook URL", + description: "The URL we should send webhooks to when your transcript is complete", + optional: true, + }, + callbackWithRerun: { + type: "boolean", + label: "Callback With Rerun", + description: "Use the `$.flow.rerun` Node.js helper to rerun the step when the transcription is completed. Overrides the `webhookUrl` prop. This will increase execution time and credit usage as a result. [See the documentation](https://pipedream.com/docs/code/nodejs/rerun/#flow-rerun). Not available in Pipedream Connect.", + optional: true, + }, + }, + async run({ $ }) { + let response; + const context = $.context; + const run = context + ? context.run + : { + runs: 1, + }; + if (run.runs === 1) { + let webhookUrl = this.webhookUrl; + if (context && this.callbackWithRerun) { + ({ resume_url: webhookUrl } = $.flow.rerun(600000, null, 1)); + } + response = await this.assemblyai.createTranscript({ + data: { + audio_url: this.url, + language_code: this.languageCode, + punctuate: this.punctuate, + speaker_labels: this.speakerLabels, + content_safety: this.contentSafety, + sentiment_analysis: this.sentimentAnalysis, + webhook_url: webhookUrl, + }, + $, + }); + } + if (run.callback_request) { + response = await this.assemblyai.getTranscript({ + transcriptId: run.callback_request.body.transcript_id, + }); + } + + if (response?.id) { + $.export("$summary", `Successfully created transcription with ID ${response.id}.`); + } + + return response; + }, +}; diff --git a/components/assemblyai/assemblyai.app.mjs b/components/assemblyai/assemblyai.app.mjs index 90cbbea2714a3..4e1f512c62c11 100644 --- a/components/assemblyai/assemblyai.app.mjs +++ b/components/assemblyai/assemblyai.app.mjs @@ -99,12 +99,19 @@ export default { }; let prevUrl; const results = []; + const afterId = args.params?.after_id; do { const { transcripts, page_details: pageDetails, } = await this.listTranscripts(config); - results.push(...transcripts); + for (const transcript of transcripts) { + if (transcript.id === afterId) { + return results; + } + results.push(transcript); + } + config.params.after_id = undefined; prevUrl = pageDetails.prev_url; config.url = prevUrl; } while (prevUrl); diff --git a/components/assemblyai/package.json b/components/assemblyai/package.json index f864b10394e7d..3a56d27799cf4 100644 --- a/components/assemblyai/package.json +++ b/components/assemblyai/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/assemblyai", - "version": "0.2.1", + "version": "0.3.0", "description": "Pipedream AssemblyAI Components", "main": "assemblyai.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.5.1" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/assemblyai/sources/new-transcription-completed/new-transcription-completed.mjs b/components/assemblyai/sources/new-transcription-completed/new-transcription-completed.mjs index 31d0d4c218e71..e3baa5c299765 100644 --- a/components/assemblyai/sources/new-transcription-completed/new-transcription-completed.mjs +++ b/components/assemblyai/sources/new-transcription-completed/new-transcription-completed.mjs @@ -3,9 +3,9 @@ import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; export default { name: "New Transcription Completed", - description: "Emit new event when a transcribed audio file from AssemblyAI is ready. [See the documentation](https://www.assemblyai.com/docs/API%20reference/transcript)", + description: "Emit new event when a transcribed audio file from AssemblyAI is ready. [See the documentation](https://www.assemblyai.com/docs/api-reference/transcripts/list)", key: "assemblyai-new-transcription-completed", - version: "0.0.1", + version: "0.1.0", type: "source", dedupe: "unique", props: { @@ -30,7 +30,7 @@ export default { return; } this._setLastId(transcripts[0].id); - transcripts.reverse().forEach((transcript) => this.emitEvent(transcript)); + await this.emitTranscripts(transcripts); }, }, methods: { @@ -44,6 +44,14 @@ export default { const meta = this.generateMeta(transcript); this.$emit(transcript, meta); }, + async emitTranscripts(transcripts) { + for (const transcript of transcripts.reverse()) { + const data = await this.assemblyai.getTranscript({ + transcriptId: transcript.id, + }); + this.emitEvent(data); + } + }, generateMeta(transcript) { return { id: transcript.id, @@ -63,7 +71,9 @@ export default { if (!transcripts.length) { return; } - transcripts.forEach((transcript) => this.emitEvent(transcript)); + this._setLastId(transcripts[0].id); + + await this.emitTranscripts(transcripts); }, }; diff --git a/components/astrology_api/.gitignore b/components/astrology_api/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/astrology_api/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/astrology_api/app/astrology_api.app.ts b/components/astrology_api/app/astrology_api.app.ts deleted file mode 100644 index 6867d990a8fcf..0000000000000 --- a/components/astrology_api/app/astrology_api.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "astrology_api", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/astrology_api/astrology_api.app.mjs b/components/astrology_api/astrology_api.app.mjs new file mode 100644 index 0000000000000..a68748d2bf342 --- /dev/null +++ b/components/astrology_api/astrology_api.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "astrology_api", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/astrology_api/package.json b/components/astrology_api/package.json index 926273929adb5..5dd6edbcf3dfe 100644 --- a/components/astrology_api/package.json +++ b/components/astrology_api/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/astrology_api", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Astrology API Components", - "main": "dist/app/astrology_api.app.mjs", + "main": "astrology_api.app.mjs", "keywords": [ "pipedream", "astrology_api" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/astrology_api", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/attentive/attentive.app.mjs b/components/attentive/attentive.app.mjs new file mode 100644 index 0000000000000..a79dd838b0110 --- /dev/null +++ b/components/attentive/attentive.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "attentive", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/attentive/package.json b/components/attentive/package.json new file mode 100644 index 0000000000000..9ef273618690e --- /dev/null +++ b/components/attentive/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/attentive", + "version": "0.0.1", + "description": "Pipedream Attentive Components", + "main": "attentive.app.mjs", + "keywords": [ + "pipedream", + "attentive" + ], + "homepage": "https://pipedream.com/apps/attentive", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/attio/actions/create-note/create-note.mjs b/components/attio/actions/create-note/create-note.mjs index 3c4134a8b5766..fd4730211d076 100644 --- a/components/attio/actions/create-note/create-note.mjs +++ b/components/attio/actions/create-note/create-note.mjs @@ -4,7 +4,7 @@ export default { key: "attio-create-note", name: "Create Note", description: "Creates a new note for a given record. The note will be linked to the specified record. [See the documentation](https://developers.attio.com/reference/post_v2-notes)", - version: "0.0.3", + version: "0.0.5", type: "action", props: { attio, diff --git a/components/attio/actions/create-person/create-person.mjs b/components/attio/actions/create-person/create-person.mjs index 587820c637f86..7595ffee4673f 100644 --- a/components/attio/actions/create-person/create-person.mjs +++ b/components/attio/actions/create-person/create-person.mjs @@ -5,7 +5,7 @@ export default { key: "attio-create-person", name: "Create Person", description: "Creates a new person. [See the documentation](https://developers.attio.com/reference/post_v2-objects-people-records).", - version: "0.0.1", + version: "0.0.3", type: "action", props: { attio, diff --git a/components/attio/actions/create-task/create-task.mjs b/components/attio/actions/create-task/create-task.mjs index 7dab9b23f8357..faa8061d42ee6 100644 --- a/components/attio/actions/create-task/create-task.mjs +++ b/components/attio/actions/create-task/create-task.mjs @@ -6,7 +6,7 @@ export default { key: "attio-create-task", name: "Create Task", description: "Creates a new task. [See the documentation](https://docs.attio.com/rest-api/endpoint-reference/tasks/create-a-task)", - version: "0.0.1", + version: "0.0.3", type: "action", props: { attio, diff --git a/components/attio/actions/create-update-record/create-update-record.mjs b/components/attio/actions/create-update-record/create-update-record.mjs index 5bc915548c902..0afef8a7492e6 100644 --- a/components/attio/actions/create-update-record/create-update-record.mjs +++ b/components/attio/actions/create-update-record/create-update-record.mjs @@ -6,7 +6,7 @@ export default { key: "attio-create-update-record", name: "Create or Update Record", description: "Creates or updates a specific record such as a person or a deal. If the record already exists, it's updated. Otherwise, a new record is created. [See the documentation](https://developers.attio.com/reference/put_v2-objects-object-records)", - version: "0.0.3", + version: "0.0.5", type: "action", props: { attio, diff --git a/components/attio/actions/delete-list-entry/delete-list-entry.mjs b/components/attio/actions/delete-list-entry/delete-list-entry.mjs index 9b675fd990876..e2e59f5b563a2 100644 --- a/components/attio/actions/delete-list-entry/delete-list-entry.mjs +++ b/components/attio/actions/delete-list-entry/delete-list-entry.mjs @@ -4,7 +4,7 @@ export default { key: "attio-delete-list-entry", name: "Delete List Entry", description: "Deletes an existing entry from a specific list. [See the documentation](https://developers.attio.com/reference/delete_v2-lists-list-entries-entry-id)", - version: "0.0.3", + version: "0.0.5", type: "action", props: { attio, diff --git a/components/attio/actions/get-record/get-record.mjs b/components/attio/actions/get-record/get-record.mjs new file mode 100644 index 0000000000000..053e50e780f61 --- /dev/null +++ b/components/attio/actions/get-record/get-record.mjs @@ -0,0 +1,37 @@ +import attio from "../../attio.app.mjs"; + +export default { + key: "attio-get-record", + name: "Get Record", + description: "Retrieves the record with the specified ID. [See the documentation](https://docs.attio.com/rest-api/endpoint-reference/records/get-a-record)", + version: "0.0.2", + type: "action", + props: { + attio, + objectId: { + propDefinition: [ + attio, + "objectId", + ], + }, + recordId: { + description: "The identifier of the record to retrieve.", + propDefinition: [ + attio, + "recordId", + (c) => ({ + targetObject: c.objectId, + }), + ], + }, + }, + async run({ $ }) { + const response = await this.attio.getRecord({ + $, + objectId: this.objectId, + recordId: this.recordId, + }); + $.export("$summary", "Successfully retrieved the record with ID: " + this.recordId); + return response; + }, +}; diff --git a/components/attio/actions/update-person/update-person.mjs b/components/attio/actions/update-person/update-person.mjs index bf0e40bc311bc..6a8fd6397a03e 100644 --- a/components/attio/actions/update-person/update-person.mjs +++ b/components/attio/actions/update-person/update-person.mjs @@ -5,7 +5,7 @@ export default { key: "attio-update-person", name: "Update Person", description: "Update an existing person. [See the documentation](https://developers.attio.com/reference/patch_v2-objects-people-records-record-id).", - version: "0.0.1", + version: "0.0.3", type: "action", props: { attio, diff --git a/components/attio/attio.app.mjs b/components/attio/attio.app.mjs index 686f78700e902..e872dff455027 100644 --- a/components/attio/attio.app.mjs +++ b/components/attio/attio.app.mjs @@ -9,11 +9,13 @@ export default { type: "string", label: "First Name", description: "The person's first name.", + optional: true, }, lastName: { type: "string", label: "Last Name", description: "The person's last name.", + optional: true, }, emailAddress: { type: "string", @@ -302,5 +304,13 @@ export default { ...args, }); }, + getRecord({ + objectId, recordId, ...args + }) { + return this._makeRequest({ + path: `/objects/${objectId}/records/${recordId}`, + ...args, + }); + }, }, }; diff --git a/components/attio/package.json b/components/attio/package.json index b2bd785c60b4b..1cc1f0810eaab 100644 --- a/components/attio/package.json +++ b/components/attio/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/attio", - "version": "0.3.0", + "version": "0.4.1", "description": "Pipedream Attio Components", "main": "attio.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.0.3" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/attio/sources/list-entry-deleted-instant/list-entry-deleted-instant.mjs b/components/attio/sources/list-entry-deleted-instant/list-entry-deleted-instant.mjs index 0bf0ead7dd03b..e03cef213542b 100644 --- a/components/attio/sources/list-entry-deleted-instant/list-entry-deleted-instant.mjs +++ b/components/attio/sources/list-entry-deleted-instant/list-entry-deleted-instant.mjs @@ -4,9 +4,9 @@ import sampleEmit from "./test-event.mjs"; export default { ...common, key: "attio-list-entry-deleted-instant", - name: "List Entry Deleted (Instant)", + name: "New List Entry Deleted (Instant)", description: "Emit new event when a list entry is deleted (i.e. when a record is removed from a list).", - version: "0.0.2", + version: "0.0.4", type: "source", dedupe: "unique", props: { diff --git a/components/attio/sources/list-entry-updated-instant/list-entry-updated-instant.mjs b/components/attio/sources/list-entry-updated-instant/list-entry-updated-instant.mjs index 5c595593b9d06..bf168838c9f4d 100644 --- a/components/attio/sources/list-entry-updated-instant/list-entry-updated-instant.mjs +++ b/components/attio/sources/list-entry-updated-instant/list-entry-updated-instant.mjs @@ -4,9 +4,9 @@ import sampleEmit from "./test-event.mjs"; export default { ...common, key: "attio-list-entry-updated-instant", - name: "List Entry Updated (Instant)", + name: "New List Entry Updated (Instant)", description: "Emit new event when an existing list entry is updated (i.e. when a list attribute is changed for a specific list entry, e.g. when setting \"Owner\")", - version: "0.0.2", + version: "0.0.4", type: "source", dedupe: "unique", props: { diff --git a/components/attio/sources/new-activity-created-instant/new-activity-created-instant.mjs b/components/attio/sources/new-activity-created-instant/new-activity-created-instant.mjs index 8dd13d4d8fcac..bf6b539c2172a 100644 --- a/components/attio/sources/new-activity-created-instant/new-activity-created-instant.mjs +++ b/components/attio/sources/new-activity-created-instant/new-activity-created-instant.mjs @@ -6,7 +6,7 @@ export default { key: "attio-new-activity-created-instant", name: "New Activity Created (Instant)", description: "Emit new event when a note, task, or comment is created, useful for tracking engagement in real time.", - version: "0.0.1", + version: "0.0.3", type: "source", dedupe: "unique", methods: { diff --git a/components/attio/sources/new-list-entry-instant/new-list-entry-instant.mjs b/components/attio/sources/new-list-entry-instant/new-list-entry-instant.mjs index 6e30d45363b2a..b9c7bb20b9a74 100644 --- a/components/attio/sources/new-list-entry-instant/new-list-entry-instant.mjs +++ b/components/attio/sources/new-list-entry-instant/new-list-entry-instant.mjs @@ -6,7 +6,7 @@ export default { key: "attio-new-list-entry-instant", name: "New List Entry (Instant)", description: "Emit new event when a record, such as person, company, or deal, is added to a list", - version: "0.0.3", + version: "0.0.5", type: "source", dedupe: "unique", props: { diff --git a/components/attio/sources/new-note-instant/new-note-instant.mjs b/components/attio/sources/new-note-instant/new-note-instant.mjs index 77065f6b97541..064663b0abcc9 100644 --- a/components/attio/sources/new-note-instant/new-note-instant.mjs +++ b/components/attio/sources/new-note-instant/new-note-instant.mjs @@ -6,7 +6,7 @@ export default { key: "attio-new-note-instant", name: "New Note (Instant)", description: "Emit new event when a new note is created.", - version: "0.0.2", + version: "0.0.4", type: "source", dedupe: "unique", methods: { diff --git a/components/attio/sources/new-object-attribute-instant/new-object-attribute-instant.mjs b/components/attio/sources/new-object-attribute-instant/new-object-attribute-instant.mjs index 379d8d24b6342..5a1a5388a267a 100644 --- a/components/attio/sources/new-object-attribute-instant/new-object-attribute-instant.mjs +++ b/components/attio/sources/new-object-attribute-instant/new-object-attribute-instant.mjs @@ -6,7 +6,7 @@ export default { key: "attio-new-object-attribute-instant", name: "New Object Attribute (Instant)", description: "Emit new event when an object attribute is created (e.g. when defining a new attribute \"Rating\" on the company object)", - version: "0.0.2", + version: "0.0.4", type: "source", dedupe: "unique", methods: { diff --git a/components/attio/sources/new-record-created-instant/new-record-created-instant.mjs b/components/attio/sources/new-record-created-instant/new-record-created-instant.mjs index a367373500a35..b0d1e35c80a34 100644 --- a/components/attio/sources/new-record-created-instant/new-record-created-instant.mjs +++ b/components/attio/sources/new-record-created-instant/new-record-created-instant.mjs @@ -6,7 +6,7 @@ export default { key: "attio-new-record-created-instant", name: "New Record Created (Instant)", description: "Emit new event when new record, such as person, company or deal gets created", - version: "0.0.3", + version: "0.0.5", type: "source", dedupe: "unique", props: { diff --git a/components/attio/sources/note-updated-instant/note-updated-instant.mjs b/components/attio/sources/note-updated-instant/note-updated-instant.mjs index 74fb89f21ebe9..e73bb1e3c0fa5 100644 --- a/components/attio/sources/note-updated-instant/note-updated-instant.mjs +++ b/components/attio/sources/note-updated-instant/note-updated-instant.mjs @@ -4,9 +4,9 @@ import sampleEmit from "./test-event.mjs"; export default { ...common, key: "attio-note-updated-instant", - name: "Note Updated (Instant)", + name: "New Note Updated (Instant)", description: "Emit new event when the title of a note is modified. Body updates do not currently trigger webhooks.", - version: "0.0.2", + version: "0.0.4", type: "source", dedupe: "unique", methods: { diff --git a/components/attio/sources/object-attribute-updated-instant/object-attribute-updated-instant.mjs b/components/attio/sources/object-attribute-updated-instant/object-attribute-updated-instant.mjs index 6e339f4998d30..68652d179dab2 100644 --- a/components/attio/sources/object-attribute-updated-instant/object-attribute-updated-instant.mjs +++ b/components/attio/sources/object-attribute-updated-instant/object-attribute-updated-instant.mjs @@ -4,9 +4,9 @@ import sampleEmit from "./test-event.mjs"; export default { ...common, key: "attio-object-attribute-updated-instant", - name: "Object Attribute Updated (Instant)", + name: "New Object Attribute Updated (Instant)", description: "Emit new event when an object attribute is updated (e.g. when renaming the \"Rating\" attribute to \"Score\" on the company object)", - version: "0.0.2", + version: "0.0.4", type: "source", dedupe: "unique", methods: { diff --git a/components/attio/sources/record-updated-instant/record-updated-instant.mjs b/components/attio/sources/record-updated-instant/record-updated-instant.mjs index 340f79d3f5fad..b2b6ddd21a85f 100644 --- a/components/attio/sources/record-updated-instant/record-updated-instant.mjs +++ b/components/attio/sources/record-updated-instant/record-updated-instant.mjs @@ -4,9 +4,9 @@ import sampleEmit from "./test-event.mjs"; export default { ...common, key: "attio-record-updated-instant", - name: "Record Updated (Instant)", + name: "New Record Updated (Instant)", description: "Emit new event when values on a record, such as person, company or deal, are updated", - version: "0.0.3", + version: "0.0.5", type: "source", dedupe: "unique", props: { diff --git a/components/autoklose/.gitignore b/components/autoklose/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/autoklose/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/autoklose/app/autoklose.app.ts b/components/autoklose/app/autoklose.app.ts deleted file mode 100644 index 12b7df000f160..0000000000000 --- a/components/autoklose/app/autoklose.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "autoklose", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/autoklose/autoklose.app.mjs b/components/autoklose/autoklose.app.mjs new file mode 100644 index 0000000000000..1beb0cf879417 --- /dev/null +++ b/components/autoklose/autoklose.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "autoklose", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/autoklose/package.json b/components/autoklose/package.json index 1888db854f73a..13e2d877998a4 100644 --- a/components/autoklose/package.json +++ b/components/autoklose/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/autoklose", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Autoklose Components", - "main": "dist/app/autoklose.app.mjs", + "main": "autoklose.app.mjs", "keywords": [ "pipedream", "autoklose" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/autoklose", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/autotask_psa/autotask_psa.app.mjs b/components/autotask_psa/autotask_psa.app.mjs index a872d4fb84ce7..26c640e1f5e03 100644 --- a/components/autotask_psa/autotask_psa.app.mjs +++ b/components/autotask_psa/autotask_psa.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/avochato/.gitignore b/components/avochato/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/avochato/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/avochato/app/avochato.app.ts b/components/avochato/app/avochato.app.ts deleted file mode 100644 index 6b97cb158ce36..0000000000000 --- a/components/avochato/app/avochato.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "avochato", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/avochato/avochato.app.mjs b/components/avochato/avochato.app.mjs new file mode 100644 index 0000000000000..498884c0bcc7d --- /dev/null +++ b/components/avochato/avochato.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "avochato", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/avochato/package.json b/components/avochato/package.json index f14dcfbc3bda8..d0c3d6e17b1c3 100644 --- a/components/avochato/package.json +++ b/components/avochato/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/avochato", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Avochato Components", - "main": "dist/app/avochato.app.mjs", + "main": "avochato.app.mjs", "keywords": [ "pipedream", "avochato" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/avochato", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/axis_lms/.gitignore b/components/axis_lms/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/axis_lms/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/axis_lms/app/axis_lms.app.ts b/components/axis_lms/app/axis_lms.app.ts deleted file mode 100644 index 9da3ec320a3e7..0000000000000 --- a/components/axis_lms/app/axis_lms.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "axis_lms", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/axis_lms/axis_lms.app.mjs b/components/axis_lms/axis_lms.app.mjs new file mode 100644 index 0000000000000..8d96d66bb4537 --- /dev/null +++ b/components/axis_lms/axis_lms.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "axis_lms", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/axis_lms/package.json b/components/axis_lms/package.json index 6bc2897c1a546..f3321014c6c2a 100644 --- a/components/axis_lms/package.json +++ b/components/axis_lms/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/axis_lms", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Axis LMS Components", - "main": "dist/app/axis_lms.app.mjs", + "main": "axis_lms.app.mjs", "keywords": [ "pipedream", "axis_lms" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/axis_lms", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/azure_devops/azure_devops.app.mjs b/components/azure_devops/azure_devops.app.mjs index f985359983e52..69c475db2beec 100644 --- a/components/azure_devops/azure_devops.app.mjs +++ b/components/azure_devops/azure_devops.app.mjs @@ -1,4 +1,6 @@ -import { axios } from "@pipedream/platform"; +import { + axios, ConfigurationError, +} from "@pipedream/platform"; const API_VERSION = "5.0"; export default { @@ -28,8 +30,14 @@ export default { _baseUrl() { return "https://dev.azure.com"; }, - _headers() { - const basicAuth = Buffer.from(`${this._oauthUid()}:${this._oauthAccessToken()}`).toString("base64"); + _headers(useOAuth) { + const token = useOAuth + ? this._oauthAccessToken() + : this._personalAccessToken(); + if (!token && !useOAuth) { + throw new ConfigurationError("Azure DevOps Personal Access Token is required for this operation. Add it to your Azure DevOps connection."); + } + const basicAuth = Buffer.from(`${this._oauthUid()}:${token}`).toString("base64"); return { Authorization: `Basic ${basicAuth}`, }; @@ -40,16 +48,20 @@ export default { _oauthUid() { return this.$auth.oauth_uid; }, + _personalAccessToken() { + return this.$auth.personal_access_token; + }, _makeRequest(args = {}) { const { $ = this, url, path, + useOAuth = false, ...otherArgs } = args; const config = { url: url || `${this._baseUrl()}${path}`, - headers: this._headers(), + headers: this._headers(useOAuth), ...otherArgs, }; config.url += config.url.includes("?") @@ -61,6 +73,7 @@ export default { async listAccounts(args = {}) { const { value } = await this._makeRequest({ url: `https://app.vssps.visualstudio.com/_apis/accounts?memberId=${this._oauthUid()}`, + useOAuth: true, ...args, }); return value; diff --git a/components/azure_devops/package.json b/components/azure_devops/package.json index 499bb348c4530..20c8438baac53 100644 --- a/components/azure_devops/package.json +++ b/components/azure_devops/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/azure_devops", - "version": "0.0.4", + "version": "0.1.0", "description": "Pipedream Azure DevOps Components", "main": "azure_devops.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.1" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/azure_devops/sources/new-event/new-event.mjs b/components/azure_devops/sources/new-event/new-event.mjs index 0cea4c6143aad..adf24e764181b 100644 --- a/components/azure_devops/sources/new-event/new-event.mjs +++ b/components/azure_devops/sources/new-event/new-event.mjs @@ -2,7 +2,7 @@ import azureDevops from "../../azure_devops.app.mjs"; export default { name: "New Event (Instant)", - version: "0.0.2", + version: "0.0.3", key: "azure_devops-new-event", description: "Emit new event for the specified event type.", type: "source", @@ -40,9 +40,12 @@ export default { }, eventType: this.eventType, }; - const { id } = await this.azureDevops.createSubscription(this.organization, { - data, - }); + const { id } = await this.azureDevops.createSubscription( + this.organization, + { + data, + }, + ); this._setHookId(id); }, async deactivate() { diff --git a/components/azure_devops_microsoft_entra_id_oauth/azure_devops_microsoft_entra_id_oauth.app.mjs b/components/azure_devops_microsoft_entra_id_oauth/azure_devops_microsoft_entra_id_oauth.app.mjs new file mode 100644 index 0000000000000..14cc2fa4c87b0 --- /dev/null +++ b/components/azure_devops_microsoft_entra_id_oauth/azure_devops_microsoft_entra_id_oauth.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "azure_devops_microsoft_entra_id_oauth", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/azure_devops_microsoft_entra_id_oauth/package.json b/components/azure_devops_microsoft_entra_id_oauth/package.json new file mode 100644 index 0000000000000..a5499c812b8da --- /dev/null +++ b/components/azure_devops_microsoft_entra_id_oauth/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/azure_devops_microsoft_entra_id_oauth", + "version": "0.0.1", + "description": "Pipedream Azure DevOps (Microsoft Entra ID OAuth) Components", + "main": "azure_devops_microsoft_entra_id_oauth.app.mjs", + "keywords": [ + "pipedream", + "azure_devops_microsoft_entra_id_oauth" + ], + "homepage": "https://pipedream.com/apps/azure_devops_microsoft_entra_id_oauth", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/azure_storage/package.json b/components/azure_storage/package.json index f9b54f053e6fb..e8b1334f94f27 100644 --- a/components/azure_storage/package.json +++ b/components/azure_storage/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/azure_storage", - "version": "0.2.1", + "version": "0.2.2", "description": "Pipedream Azure Storage Components", "main": "azure_storage.app.mjs", "keywords": [ @@ -14,6 +14,7 @@ }, "dependencies": { "@pipedream/platform": "^3.1.0", - "mime-types": "^2.1.35" + "mime-types": "^2.1.35", + "fast-xml-parser": "^4.2.5" } } diff --git a/components/bamboohr/actions/add-application-comment/add-application-comment.mjs b/components/bamboohr/actions/add-application-comment/add-application-comment.mjs new file mode 100644 index 0000000000000..1bd413d2cd1ba --- /dev/null +++ b/components/bamboohr/actions/add-application-comment/add-application-comment.mjs @@ -0,0 +1,35 @@ +import bamboohr from "../../bamboohr.app.mjs"; + +export default { + key: "bamboohr-add-application-comment", + name: "Add Application Comment", + description: "Add a comment to an application. [See the documentation](https://documentation.bamboohr.com/reference/post-application-comment-1)", + version: "0.0.1", + type: "action", + props: { + bamboohr, + applicationId: { + propDefinition: [ + bamboohr, + "applicationId", + ], + }, + comment: { + type: "string", + label: "Comment", + description: "The comment to add to the application", + }, + }, + async run({ $ }) { + const response = await this.bamboohr.addApplicationComment({ + $, + applicationId: this.applicationId, + data: { + comment: this.comment, + type: "comment", + }, + }); + $.export("$summary", `Added comment to application ${this.applicationId}`); + return response; + }, +}; diff --git a/components/bamboohr/actions/download-resume/download-resume.mjs b/components/bamboohr/actions/download-resume/download-resume.mjs new file mode 100644 index 0000000000000..a722e09ac7d5a --- /dev/null +++ b/components/bamboohr/actions/download-resume/download-resume.mjs @@ -0,0 +1,57 @@ +import bamboohr from "../../bamboohr.app.mjs"; +import fs from "fs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "bamboohr-download-resume", + name: "Download Resume", + description: "Download a resume from an application. [See the documentation](https://documentation.bamboohr.com/reference/get-company-file)", + version: "0.0.1", + type: "action", + props: { + bamboohr, + applicationId: { + propDefinition: [ + bamboohr, + "applicationId", + ], + }, + filename: { + type: "string", + label: "Filename", + description: "The filename to save the downloaded file as in the `/tmp` directory", + }, + syncDir: { + type: "dir", + accessMode: "write", + sync: true, + }, + }, + async run({ $ }) { + const { resumeFileId } = await this.bamboohr.getApplication({ + $, + applicationId: this.applicationId, + }); + + if (!resumeFileId) { + throw new ConfigurationError("No resume file ID found for application"); + } + + const response = await this.bamboohr.downloadFile({ + $, + fileId: resumeFileId, + }); + + const rawcontent = response.toString("base64"); + const buffer = Buffer.from(rawcontent, "base64"); + const downloadedFilepath = `/tmp/${this.filename}`; + fs.writeFileSync(downloadedFilepath, buffer); + + $.export("$summary", `Downloaded resume for application ${this.applicationId}`); + + return { + filename: this.filename, + downloadedFilepath, + }; + }, +}; diff --git a/components/bamboohr/actions/get-application/get-application.mjs b/components/bamboohr/actions/get-application/get-application.mjs new file mode 100644 index 0000000000000..85ec41103cd0c --- /dev/null +++ b/components/bamboohr/actions/get-application/get-application.mjs @@ -0,0 +1,26 @@ +import bamboohr from "../../bamboohr.app.mjs"; + +export default { + key: "bamboohr-get-application", + name: "Get Application", + description: "Get the details of an application. [See the documentation](https://documentation.bamboohr.com/reference/get-application-details-1)", + version: "0.0.1", + type: "action", + props: { + bamboohr, + applicationId: { + propDefinition: [ + bamboohr, + "applicationId", + ], + }, + }, + async run({ $ }) { + const response = await this.bamboohr.getApplication({ + $, + applicationId: this.applicationId, + }); + $.export("$summary", `Found application ${this.applicationId}`); + return response; + }, +}; diff --git a/components/bamboohr/actions/list-applications/list-applications.mjs b/components/bamboohr/actions/list-applications/list-applications.mjs new file mode 100644 index 0000000000000..0f6c2dd33db07 --- /dev/null +++ b/components/bamboohr/actions/list-applications/list-applications.mjs @@ -0,0 +1,93 @@ +import bamboohr from "../../bamboohr.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "bamboohr-list-applications", + name: "List Applications", + description: "List all applications. [See the documentation](https://documentation.bamboohr.com/reference/get-applications)", + version: "0.0.1", + type: "action", + props: { + bamboohr, + jobId: { + propDefinition: [ + bamboohr, + "jobId", + ], + }, + statusId: { + propDefinition: [ + bamboohr, + "statusId", + ], + optional: true, + }, + statusGroup: { + type: "string", + label: "Status Group", + description: "The group of statuses to filter by", + options: constants.APPLICATION_STATUS_GROUPS, + optional: true, + }, + jobStatusGroup: { + type: "string", + label: "Job Status Group", + description: "The group of job statuses to filter by", + options: constants.JOB_STATUS_GROUPS, + optional: true, + }, + searchString: { + type: "string", + label: "Search String", + description: "A general search criteria by which to find applications", + optional: true, + }, + sortBy: { + type: "string", + label: "Sort By", + description: "The field to sort by", + options: constants.APPLICATION_SORT_FIELDS, + optional: true, + }, + sortOrder: { + type: "string", + label: "Sort Order", + description: "The order in which to sort the results", + options: [ + "ASC", + "DESC", + ], + optional: true, + }, + newSince: { + type: "string", + label: "New Since", + description: "Only get applications newer than a given UTC timestamp, for example `2024-01-01 13:00:00`", + optional: true, + }, + page: { + type: "integer", + label: "Page", + description: "The page number to return", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.bamboohr.listApplications({ + $, + params: { + jobId: this.jobId, + applicationStatusId: this.statusId, + applicationStatus: this.statusGroup, + jobStatusGroups: this.jobStatusGroup, + searchString: this.searchString, + sortBy: this.sortBy, + sortOrder: this.sortOrder, + newSince: this.newSince, + page: this.page, + }, + }); + $.export("$summary", `Found ${response.applications.length} applications`); + return response; + }, +}; diff --git a/components/bamboohr/actions/update-application-status/update-application-status.mjs b/components/bamboohr/actions/update-application-status/update-application-status.mjs new file mode 100644 index 0000000000000..c3a37f2a72c3c --- /dev/null +++ b/components/bamboohr/actions/update-application-status/update-application-status.mjs @@ -0,0 +1,35 @@ +import bamboohr from "../../bamboohr.app.mjs"; + +export default { + key: "bamboohr-update-application-status", + name: "Update Application Status", + description: "Update the status of an application. [See the documentation](https://documentation.bamboohr.com/reference/post-applicant-status-1)", + version: "0.0.1", + type: "action", + props: { + bamboohr, + applicationId: { + propDefinition: [ + bamboohr, + "applicationId", + ], + }, + statusId: { + propDefinition: [ + bamboohr, + "statusId", + ], + }, + }, + async run({ $ }) { + const response = await this.bamboohr.updateApplicationStatus({ + $, + applicationId: this.applicationId, + data: { + status: this.statusId, + }, + }); + $.export("$summary", "Updated status of application."); + return response; + }, +}; diff --git a/components/bamboohr/bamboohr.app.mjs b/components/bamboohr/bamboohr.app.mjs index 923dd7fd5655f..2a4b083bdb43f 100644 --- a/components/bamboohr/bamboohr.app.mjs +++ b/components/bamboohr/bamboohr.app.mjs @@ -1,11 +1,119 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "bamboohr", - propDefinitions: {}, + propDefinitions: { + applicationId: { + type: "string", + label: "Application ID", + description: "The ID of an application", + async options({ page }) { + const { applications } = await this.listApplications({ + params: { + page: page + 1, + }, + }); + return applications?.map((application) => ({ + label: `${application.applicant.firstName} ${application.applicant.lastName}`, + value: application.id, + })) || []; + }, + }, + jobId: { + type: "string", + label: "Job ID", + description: "The ID of a job", + optional: true, + async options() { + const jobs = await this.listJobs(); + return jobs?.map((job) => ({ + label: job.title.label, + value: job.id, + })) || []; + }, + }, + statusId: { + type: "string", + label: "Status ID", + description: "The ID of a job status", + async options() { + const statuses = await this.listStatuses(); + return statuses?.map((status) => ({ + label: status.name, + value: status.id, + })) || []; + }, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return `https://api.bamboohr.com/api/gateway.php/${this.$auth.company_domain}/v1`; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + auth: { + username: `${this.$auth.api_key}`, + password: "x", + }, + ...opts, + }); + }, + getApplication({ + applicationId, ...opts + }) { + return this._makeRequest({ + path: `/applicant_tracking/applications/${applicationId}`, + ...opts, + }); + }, + listApplications(opts = {}) { + return this._makeRequest({ + path: "/applicant_tracking/applications", + ...opts, + }); + }, + listJobs(opts = {}) { + return this._makeRequest({ + path: "/applicant_tracking/jobs", + ...opts, + }); + }, + listStatuses(opts = {}) { + return this._makeRequest({ + path: "/applicant_tracking/statuses", + ...opts, + }); + }, + addApplicationComment({ + applicationId, ...opts + }) { + return this._makeRequest({ + path: `/applicant_tracking/applications/${applicationId}/comments`, + method: "POST", + ...opts, + }); + }, + updateApplicationStatus({ + applicationId, ...opts + }) { + return this._makeRequest({ + path: `/applicant_tracking/applications/${applicationId}/status`, + method: "POST", + ...opts, + }); + }, + downloadFile({ + fileId, ...opts + }) { + return this._makeRequest({ + path: `/files/${fileId}`, + responseType: "arraybuffer", + ...opts, + }); }, }, }; diff --git a/components/bamboohr/common/constants.mjs b/components/bamboohr/common/constants.mjs new file mode 100644 index 0000000000000..816bbc6b65517 --- /dev/null +++ b/components/bamboohr/common/constants.mjs @@ -0,0 +1,35 @@ +const APPLICATION_STATUS_GROUPS = [ + "ALL", + "ALL_ACTIVE", + "NEW", + "ACTIVE", + "INACTIVE", + "HIRED", +]; + +const JOB_STATUS_GROUPS = [ + "ALL", + "DRAFT_AND_OPEN", + "Open", + "Filled", + "Draft", + "Deleted", + "On Hold", + "Canceled", +]; + +const APPLICATION_SORT_FIELDS = [ + "first_name", + "job_title", + "rating", + "phone", + "status", + "last_updated", + "created_date", +]; + +export default { + APPLICATION_STATUS_GROUPS, + JOB_STATUS_GROUPS, + APPLICATION_SORT_FIELDS, +}; diff --git a/components/bamboohr/package.json b/components/bamboohr/package.json index a59711aa7bfd2..8e7ada15ae2c5 100644 --- a/components/bamboohr/package.json +++ b/components/bamboohr/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/bamboohr", - "version": "0.6.0", + "version": "0.7.0", "description": "Pipedream bamboohr Components", "main": "bamboohr.app.mjs", "keywords": [ diff --git a/components/bart/.gitignore b/components/bart/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/bart/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/bart/app/bart.app.ts b/components/bart/app/bart.app.ts deleted file mode 100644 index 08815eb718aef..0000000000000 --- a/components/bart/app/bart.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "bart", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/bart/bart.app.mjs b/components/bart/bart.app.mjs new file mode 100644 index 0000000000000..febb2059b77cf --- /dev/null +++ b/components/bart/bart.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "bart", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/bart/package.json b/components/bart/package.json index 1af540706d52a..041e6ec84b207 100644 --- a/components/bart/package.json +++ b/components/bart/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/bart", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream BART Components", - "main": "dist/app/bart.app.mjs", + "main": "bart.app.mjs", "keywords": [ "pipedream", "bart" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/bart", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/baserow/package.json b/components/baserow/package.json index 9d6ac906e2226..effb98a1147df 100644 --- a/components/baserow/package.json +++ b/components/baserow/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/baserow", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Baserow Components", "main": "dist/app/baserow.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/baserow/tsconfig.json b/components/baserow/tsconfig.json index 910b87fc8266a..3a9389484d040 100644 --- a/components/baserow/tsconfig.json +++ b/components/baserow/tsconfig.json @@ -1,24 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/bc_gov_news/.gitignore b/components/bc_gov_news/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/bc_gov_news/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/bc_gov_news/app/bc_gov_news.app.ts b/components/bc_gov_news/app/bc_gov_news.app.ts deleted file mode 100644 index 2a193d3373d6f..0000000000000 --- a/components/bc_gov_news/app/bc_gov_news.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "bc_gov_news", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/bc_gov_news/bc_gov_news.app.mjs b/components/bc_gov_news/bc_gov_news.app.mjs new file mode 100644 index 0000000000000..9bae26dc27600 --- /dev/null +++ b/components/bc_gov_news/bc_gov_news.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "bc_gov_news", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/bc_gov_news/package.json b/components/bc_gov_news/package.json index e1011981ff494..6def154dbdb37 100644 --- a/components/bc_gov_news/package.json +++ b/components/bc_gov_news/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/bc_gov_news", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream BC Gov News Components", - "main": "dist/app/bc_gov_news.app.mjs", + "main": "bc_gov_news.app.mjs", "keywords": [ "pipedream", "bc_gov_news" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/bc_gov_news", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/beaconstac/.gitignore b/components/beaconstac/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/beaconstac/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/beaconstac/app/beaconstac.app.ts b/components/beaconstac/app/beaconstac.app.ts deleted file mode 100644 index 5546e0e19c1de..0000000000000 --- a/components/beaconstac/app/beaconstac.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "beaconstac", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/beaconstac/beaconstac.app.mjs b/components/beaconstac/beaconstac.app.mjs new file mode 100644 index 0000000000000..b6a534831876b --- /dev/null +++ b/components/beaconstac/beaconstac.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "beaconstac", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/beaconstac/package.json b/components/beaconstac/package.json index d1a94a1cbb43f..6881a1853495b 100644 --- a/components/beaconstac/package.json +++ b/components/beaconstac/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/beaconstac", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Beaconstac Components", - "main": "dist/app/beaconstac.app.mjs", + "main": "beaconstac.app.mjs", "keywords": [ "pipedream", "beaconstac" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/beaconstac", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/beanstalkapp/package.json b/components/beanstalkapp/package.json index 7750349635c3e..80f92ac32bfce 100644 --- a/components/beanstalkapp/package.json +++ b/components/beanstalkapp/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/beanstalkapp", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Beanstalk Components", "main": "beanstalkapp.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/beehiiv/package.json b/components/beehiiv/package.json index 310e2b32a1417..2e7d9df6ed91b 100644 --- a/components/beehiiv/package.json +++ b/components/beehiiv/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/beehiiv", - "version": "0.0.5", + "version": "0.0.6", "description": "Pipedream Beehiiv Components", "main": "dist/app/beehiiv.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/beehiiv/tsconfig.json b/components/beehiiv/tsconfig.json index 335fa6f1cf6ec..3a9389484d040 100644 --- a/components/beehiiv/tsconfig.json +++ b/components/beehiiv/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/better_uptime/.gitignore b/components/better_uptime/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/better_uptime/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/better_uptime/app/better_uptime.app.ts b/components/better_uptime/app/better_uptime.app.ts deleted file mode 100644 index 1ec8caf65ee2a..0000000000000 --- a/components/better_uptime/app/better_uptime.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "better_uptime", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/better_uptime/better_uptime.app.mjs b/components/better_uptime/better_uptime.app.mjs new file mode 100644 index 0000000000000..829ed20720f95 --- /dev/null +++ b/components/better_uptime/better_uptime.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "better_uptime", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/better_uptime/package.json b/components/better_uptime/package.json index f3a009173deb7..3b8f017c8d631 100644 --- a/components/better_uptime/package.json +++ b/components/better_uptime/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/better_uptime", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Better Uptime Components", - "main": "dist/app/better_uptime.app.mjs", + "main": "better_uptime.app.mjs", "keywords": [ "pipedream", "better_uptime" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/better_uptime", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/bill/.gitignore b/components/bill/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/bill/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/bill/app/bill.app.ts b/components/bill/app/bill.app.ts deleted file mode 100644 index eb82129cda4ba..0000000000000 --- a/components/bill/app/bill.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "bill", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/bill/bill.app.mjs b/components/bill/bill.app.mjs new file mode 100644 index 0000000000000..a8420eda8dfb7 --- /dev/null +++ b/components/bill/bill.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "bill", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/bill/package.json b/components/bill/package.json index 03d072156e350..a4938e3138417 100644 --- a/components/bill/package.json +++ b/components/bill/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/bill", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream BILL Components", - "main": "dist/app/bill.app.mjs", + "main": "bill.app.mjs", "keywords": [ "pipedream", "bill" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/bill", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/billbee/billbee.app.mjs b/components/billbee/billbee.app.mjs new file mode 100644 index 0000000000000..cd6f4a992bf02 --- /dev/null +++ b/components/billbee/billbee.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "billbee", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/billbee/package.json b/components/billbee/package.json new file mode 100644 index 0000000000000..87dc2ecd9c97d --- /dev/null +++ b/components/billbee/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/billbee", + "version": "0.0.1", + "description": "Pipedream Billbee Components", + "main": "billbee.app.mjs", + "keywords": [ + "pipedream", + "billbee" + ], + "homepage": "https://pipedream.com/apps/billbee", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/billsby/.gitignore b/components/billsby/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/billsby/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/billsby/app/billsby.app.ts b/components/billsby/app/billsby.app.ts deleted file mode 100644 index a5f1ee04f3632..0000000000000 --- a/components/billsby/app/billsby.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "billsby", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/billsby/billsby.app.mjs b/components/billsby/billsby.app.mjs new file mode 100644 index 0000000000000..c01e2b8a5c02a --- /dev/null +++ b/components/billsby/billsby.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "billsby", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/billsby/package.json b/components/billsby/package.json index d9ec8bbb6f96d..a9d94cf72fba2 100644 --- a/components/billsby/package.json +++ b/components/billsby/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/billsby", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Billsby Components", - "main": "dist/app/billsby.app.mjs", + "main": "billsby.app.mjs", "keywords": [ "pipedream", "billsby" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/billsby", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/bitrix24/.gitignore b/components/bitrix24/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/bitrix24/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/bitrix24/app/bitrix24.app.ts b/components/bitrix24/app/bitrix24.app.ts deleted file mode 100644 index 5dc09244bd870..0000000000000 --- a/components/bitrix24/app/bitrix24.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "bitrix24", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/bitrix24/bitrix24.app.mjs b/components/bitrix24/bitrix24.app.mjs new file mode 100644 index 0000000000000..6e4e98c3a0f50 --- /dev/null +++ b/components/bitrix24/bitrix24.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "bitrix24", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/bitrix24/package.json b/components/bitrix24/package.json index bb811bd0ea45f..97777e334c563 100644 --- a/components/bitrix24/package.json +++ b/components/bitrix24/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/bitrix24", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Bitrix24 Components", - "main": "dist/app/bitrix24.app.mjs", + "main": "bitrix24.app.mjs", "keywords": [ "pipedream", "bitrix24" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/bitrix24", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/blockchain_exchange/.gitignore b/components/blockchain_exchange/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/blockchain_exchange/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/blockchain_exchange/app/blockchain_exchange.app.ts b/components/blockchain_exchange/app/blockchain_exchange.app.ts deleted file mode 100644 index 58198454edbad..0000000000000 --- a/components/blockchain_exchange/app/blockchain_exchange.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "blockchain_exchange", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/blockchain_exchange/blockchain_exchange.app.mjs b/components/blockchain_exchange/blockchain_exchange.app.mjs new file mode 100644 index 0000000000000..64dc96e225d1c --- /dev/null +++ b/components/blockchain_exchange/blockchain_exchange.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "blockchain_exchange", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/blockchain_exchange/package.json b/components/blockchain_exchange/package.json index af617044762eb..7c70e98747453 100644 --- a/components/blockchain_exchange/package.json +++ b/components/blockchain_exchange/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/blockchain_exchange", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Blockchain Exchange Components", - "main": "dist/app/blockchain_exchange.app.mjs", + "main": "blockchain_exchange.app.mjs", "keywords": [ "pipedream", "blockchain_exchange" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/blockchain_exchange", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/blue/.gitignore b/components/blue/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/blue/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/blue/app/blue.app.ts b/components/blue/app/blue.app.ts deleted file mode 100644 index dfaffb95bb374..0000000000000 --- a/components/blue/app/blue.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "blue", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/blue/blue.app.mjs b/components/blue/blue.app.mjs new file mode 100644 index 0000000000000..39a276512342d --- /dev/null +++ b/components/blue/blue.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "blue", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/blue/package.json b/components/blue/package.json index 7b7357e6a65cd..38f98e9fa2dd7 100644 --- a/components/blue/package.json +++ b/components/blue/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/blue", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Blue Components", - "main": "dist/app/blue.app.mjs", + "main": "blue.app.mjs", "keywords": [ "pipedream", "blue" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/blue", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs b/components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs new file mode 100644 index 0000000000000..7cb35cb62447f --- /dev/null +++ b/components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs @@ -0,0 +1,96 @@ +import bookingExperts from "../../booking_experts.app.mjs"; + +export default { + key: "booking_experts-add-guest-to-reservation", + name: "Add Guest to Reservation", + description: "Add a guest to a reservation.. [See the documentation](https://developers.bookingexperts.com/reference/administration-reservation-guests-create)", + version: "0.0.1", + type: "action", + props: { + bookingExperts, + administrationId: { + propDefinition: [ + bookingExperts, + "administrationId", + ], + }, + reservationId: { + propDefinition: [ + bookingExperts, + "reservationId", + (c) => ({ + administrationId: c.administrationId, + }), + ], + }, + firstName: { + type: "string", + label: "First Name", + description: "The first name of the guest", + }, + lastName: { + type: "string", + label: "Last Name", + description: "The last name of the guest", + }, + email: { + type: "string", + label: "Email", + description: "The email of the guest", + optional: true, + }, + phone: { + type: "string", + label: "Phone", + description: "The phone number of the guest", + optional: true, + }, + address: { + type: "string", + label: "Address", + description: "The street address of the guest", + optional: true, + }, + city: { + type: "string", + label: "City", + description: "The city of the guest", + optional: true, + }, + postalCode: { + type: "string", + label: "Postal Code", + description: "The postal code of the guest", + optional: true, + }, + countryCode: { + type: "string", + label: "Country Code", + description: "The country code of the guest", + optional: true, + }, + }, + async run({ $ }) { + const { data } = await this.bookingExperts.addGuestToReservation({ + administrationId: this.administrationId, + reservationId: this.reservationId, + data: { + data: { + type: "guest", + attributes: { + first_name: this.firstName, + last_name: this.lastName, + email: this.email, + phone: this.phone, + address: this.address, + city: this.city, + postal_code: this.postalCode, + country_code: this.countryCode, + }, + }, + }, + }); + $.export("$summary", "Guest added to reservation"); + return data; + }, +}; diff --git a/components/booking_experts/actions/create-agenda-period/create-agenda-period.mjs b/components/booking_experts/actions/create-agenda-period/create-agenda-period.mjs new file mode 100644 index 0000000000000..59e52caf59dfc --- /dev/null +++ b/components/booking_experts/actions/create-agenda-period/create-agenda-period.mjs @@ -0,0 +1,96 @@ +import bookingExperts from "../../booking_experts.app.mjs"; + +export default { + key: "booking_experts-create-agenda-period", + name: "Create Agenda Period", + description: "Creates a new agenda period. [See the documentation](https://developers.bookingexperts.com/reference/administration-maintenance-agenda-periods-create)", + version: "0.0.1", + type: "action", + props: { + bookingExperts, + administrationId: { + propDefinition: [ + bookingExperts, + "administrationId", + ], + }, + type: { + type: "string", + label: "Type", + description: "The type of agenda period to create", + options: [ + "maintenance_agenda_periods", + "external_blocked_agenda_periods", + ], + }, + label: { + type: "string", + label: "Label", + description: "The label of the agenda period", + }, + startDate: { + type: "string", + label: "Start Date", + description: "The start date of the agenda period. Example: `2025-08-28`", + }, + endDate: { + type: "string", + label: "End Date", + description: "The end date of the agenda period", + }, + inventoryObjectId: { + propDefinition: [ + bookingExperts, + "inventoryObjectId", + (c) => ({ + administrationId: c.administrationId, + }), + ], + }, + rentableId: { + propDefinition: [ + bookingExperts, + "rentableId", + (c) => ({ + administrationId: c.administrationId, + inventoryObjectId: c.inventoryObjectId, + }), + ], + }, + }, + async run({ $ }) { + const { data } = await this.bookingExperts.createAgendaPeriod({ + $, + administrationId: this.administrationId, + type: this.type, + data: { + data: { + type: "agenda_period", + attributes: { + label: this.label, + start_date: this.startDate, + end_date: this.endDate, + }, + relationships: { + inventory_object: this.inventoryObjectId + ? { + data: { + type: "inventory_object", + id: this.inventoryObjectId, + }, + } + : undefined, + rentable: { + data: { + type: "rentable", + id: this.rentableId, + }, + }, + }, + }, + }, + }); + $.export("$summary", "Agenda period created"); + return data; + }, +}; diff --git a/components/booking_experts/actions/get-complex-prices/get-complex-prices.mjs b/components/booking_experts/actions/get-complex-prices/get-complex-prices.mjs new file mode 100644 index 0000000000000..be82e7797c0c9 --- /dev/null +++ b/components/booking_experts/actions/get-complex-prices/get-complex-prices.mjs @@ -0,0 +1,52 @@ +import bookingExperts from "../../booking_experts.app.mjs"; + +export default { + key: "booking_experts-get-complex-prices", + name: "Get Complex Prices", + description: "Returns all complex prices of a master price list. [See the documentation](https://developers.bookingexperts.com/reference/administration-masterpricelist-complexprices-index)", + version: "0.0.1", + type: "action", + props: { + bookingExperts, + administrationId: { + propDefinition: [ + bookingExperts, + "administrationId", + ], + }, + masterPriceListId: { + propDefinition: [ + bookingExperts, + "masterPriceListId", + (c) => ({ + administrationId: c.administrationId, + }), + ], + }, + page: { + propDefinition: [ + bookingExperts, + "page", + ], + }, + perPage: { + propDefinition: [ + bookingExperts, + "perPage", + ], + }, + }, + async run({ $ }) { + const { data } = await this.bookingExperts.getComplexPrices({ + $, + administrationId: this.administrationId, + masterPriceListId: this.masterPriceListId, + params: { + "page[number]": this.page, + "page[size]": this.perPage, + }, + }); + $.export("$summary", `Found ${data.length} complex prices`); + return data; + }, +}; diff --git a/components/booking_experts/actions/list-bookings/list-bookings.mjs b/components/booking_experts/actions/list-bookings/list-bookings.mjs new file mode 100644 index 0000000000000..6a980532da596 --- /dev/null +++ b/components/booking_experts/actions/list-bookings/list-bookings.mjs @@ -0,0 +1,78 @@ +import bookingExperts from "../../booking_experts.app.mjs"; + +export default { + key: "booking_experts-list-bookings", + name: "List Bookings", + description: "Returns a list of bookings for an administration. [See the documentation](https://developers.bookingexperts.com/reference/administration-bookings-index)", + version: "0.0.1", + type: "action", + props: { + bookingExperts, + administrationId: { + propDefinition: [ + bookingExperts, + "administrationId", + ], + }, + ownerId: { + propDefinition: [ + bookingExperts, + "ownerId", + (c) => ({ + administrationId: c.administrationId, + }), + ], + description: "Filter by owner", + }, + channelId: { + propDefinition: [ + bookingExperts, + "channelId", + (c) => ({ + administrationId: c.administrationId, + }), + ], + description: "Filter by channel", + }, + reservationId: { + propDefinition: [ + bookingExperts, + "reservationId", + (c) => ({ + administrationId: c.administrationId, + }), + ], + description: "Filter by reservation", + optional: true, + }, + page: { + propDefinition: [ + bookingExperts, + "page", + ], + }, + perPage: { + propDefinition: [ + bookingExperts, + "perPage", + ], + }, + }, + async run({ $ }) { + const { data } = await this.bookingExperts.listBookings({ + $, + administrationId: this.administrationId, + params: { + "filter[owner]": this.ownerId, + "filter[channel]": this.channelId, + "filter[reservations]": this.reservationId, + "filter[created_at]": this.createdAt, + "filter[updated_at]": this.updatedAt, + "page[number]": this.page, + "page[size]": this.perPage, + }, + }); + $.export("$summary", `Found ${data.length} bookings`); + return data; + }, +}; diff --git a/components/booking_experts/actions/list-inventory-objects/list-inventory-objects.mjs b/components/booking_experts/actions/list-inventory-objects/list-inventory-objects.mjs new file mode 100644 index 0000000000000..3236f5878b687 --- /dev/null +++ b/components/booking_experts/actions/list-inventory-objects/list-inventory-objects.mjs @@ -0,0 +1,57 @@ +import bookingExperts from "../../booking_experts.app.mjs"; + +export default { + key: "booking_experts-list-inventory-objects", + name: "List Inventory Objects", + description: "Returns inventory objects of the administration. [See the documentation](https://developers.bookingexperts.com/reference/administration-inventoryobjects-index)", + version: "0.0.1", + type: "action", + props: { + bookingExperts, + administrationId: { + propDefinition: [ + bookingExperts, + "administrationId", + ], + }, + name: { + type: "string", + label: "Name", + description: "Filter by name", + optional: true, + }, + labels: { + type: "string[]", + label: "Labels", + description: "Filter by labels", + optional: true, + }, + page: { + propDefinition: [ + bookingExperts, + "page", + ], + }, + perPage: { + propDefinition: [ + bookingExperts, + "perPage", + ], + }, + }, + async run({ $ }) { + const { data } = await this.bookingExperts.listInventoryObjects({ + administrationId: this.administrationId, + params: { + "filter[name]": this.name, + "filter[labels]": this.labels + ? this.labels.join(",") + : undefined, + "page[number]": this.page, + "page[size]": this.perPage, + }, + }); + $.export("$summary", `Found ${data.length} inventory objects`); + return data; + }, +}; diff --git a/components/booking_experts/actions/search-contacts/search-contacts.mjs b/components/booking_experts/actions/search-contacts/search-contacts.mjs new file mode 100644 index 0000000000000..c5e9402d2b3dc --- /dev/null +++ b/components/booking_experts/actions/search-contacts/search-contacts.mjs @@ -0,0 +1,49 @@ +import bookingExperts from "../../booking_experts.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "booking_experts-search-contacts", + name: "Search Contacts", + description: "Search for contacts by email or phone. [See the documentation](https://developers.bookingexperts.com/reference/contact-search-first)", + version: "0.0.1", + type: "action", + props: { + bookingExperts, + email: { + type: "string", + label: "Email", + description: "The email of the contact to search for", + optional: true, + }, + phone: { + type: "string", + label: "Phone", + description: "The phone number of the contact to search for", + optional: true, + }, + }, + async run({ $ }) { + if (!this.email && !this.phone) { + throw new ConfigurationError("Either email or phone must be provided"); + } + + try { + const { data } = await this.bookingExperts.searchContacts({ + params: { + email: this.email, + phone: this.phone, + }, + }); + if (data?.id) { + $.export("$summary", "Found contact matching criteria"); + } + return data; + } catch (error) { + if (error.response?.status === 404) { + $.export("$summary", "No contact found matching criteria"); + return; + } + throw error; + } + }, +}; diff --git a/components/booking_experts/booking_experts.app.mjs b/components/booking_experts/booking_experts.app.mjs new file mode 100644 index 0000000000000..8ac750fa35e20 --- /dev/null +++ b/components/booking_experts/booking_experts.app.mjs @@ -0,0 +1,280 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "booking_experts", + propDefinitions: { + administrationId: { + type: "string", + label: "Administration ID", + description: "The ID of the administration", + async options({ page }) { + const { data } = await this.listAdministrations({ + params: { + "page[number]": page + 1, + }, + }); + return data?.map(({ + id, attributes, + }) => ({ + label: attributes.name, + value: id, + })) || []; + }, + }, + ownerId: { + type: "string", + label: "Owner ID", + description: "The ID of an owner", + optional: true, + async options({ + page, administrationId, + }) { + const { data } = await this.listOwners({ + administrationId, + params: { + "page[number]": page + 1, + }, + }); + return data?.map(({ + id, attributes, + }) => ({ + label: attributes.first_name + " " + attributes.last_name, + value: id, + })) || []; + }, + }, + channelId: { + type: "string", + label: "Channel ID", + description: "The ID of a channel", + optional: true, + async options({ + page, administrationId, + }) { + const { data } = await this.listChannels({ + administrationId, + params: { + "page[number]": page + 1, + }, + }); + return data?.map(({ + id, attributes, + }) => ({ + label: attributes.name, + value: id, + })) || []; + }, + }, + reservationId: { + type: "string", + label: "Reservation ID", + description: "The ID of a reservation", + async options({ + page, administrationId, + }) { + const { data } = await this.listReservations({ + administrationId, + params: { + "page[number]": page + 1, + }, + }); + return data?.map(({ + id, attributes, + }) => ({ + label: `${attributes.start_date} - ${attributes.end_date}`, + value: id, + })) || []; + }, + }, + masterPriceListId: { + type: "string", + label: "Master Price List ID", + description: "The ID of a master price list", + async options({ + page, administrationId, + }) { + const { data } = await this.listMasterPriceLists({ + administrationId, + params: { + "page[number]": page + 1, + }, + }); + return data?.map(({ + id, attributes, + }) => ({ + label: attributes.name, + value: id, + })) || []; + }, + }, + inventoryObjectId: { + type: "string", + label: "Inventory Object ID", + description: "The ID of an inventory object", + optional: true, + async options({ + page, administrationId, + }) { + const { data } = await this.listInventoryObjects({ + administrationId, + params: { + "page[number]": page + 1, + }, + }); + return data?.map(({ + id, attributes, + }) => ({ + label: attributes.name_with_type, + value: id, + })) || []; + }, + }, + rentableId: { + type: "string", + label: "Rentable ID", + description: "The ID of a rentable", + async options({ + page, administrationId, inventoryObjectId, + }) { + const { data } = await this.listRentables({ + administrationId, + params: { + "page[number]": page + 1, + "filter[inventory_object]": inventoryObjectId, + }, + }); + return data?.map(({ + id, attributes, + }) => ({ + label: attributes.name, + value: id, + })) || []; + }, + }, + page: { + type: "integer", + label: "Page", + description: "Page number", + optional: true, + }, + perPage: { + type: "integer", + label: "Per Page", + description: "Number of items per page", + max: 100, + optional: true, + }, + }, + methods: { + _baseUrl() { + return "https://api.bookingexperts.com/v3"; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: { + "x-api-key": `${this.$auth.api_key}`, + "accept": "application/vnd.api+json", + }, + ...opts, + }); + }, + getComplexPrices({ + administrationId, masterPriceListId, ...opts + }) { + return this._makeRequest({ + path: `/administrations/${administrationId}/master_price_lists/${masterPriceListId}/complex_prices`, + ...opts, + }); + }, + listAdministrations(opts = {}) { + return this._makeRequest({ + path: "/administrations", + ...opts, + }); + }, + listBookings({ + administrationId, ...opts + }) { + return this._makeRequest({ + path: `/administrations/${administrationId}/bookings`, + ...opts, + }); + }, + listOwners({ + administrationId, ...opts + }) { + return this._makeRequest({ + path: `/administrations/${administrationId}/owners`, + ...opts, + }); + }, + listChannels({ + administrationId, ...opts + }) { + return this._makeRequest({ + path: `/administrations/${administrationId}/channels`, + ...opts, + }); + }, + listReservations({ + administrationId, ...opts + }) { + return this._makeRequest({ + path: `/administrations/${administrationId}/reservations`, + ...opts, + }); + }, + listMasterPriceLists({ + administrationId, ...opts + }) { + return this._makeRequest({ + path: `/administrations/${administrationId}/master_price_lists`, + ...opts, + }); + }, + listInventoryObjects({ + administrationId, ...opts + }) { + return this._makeRequest({ + path: `/administrations/${administrationId}/inventory_objects`, + ...opts, + }); + }, + listRentables({ + administrationId, ...opts + }) { + return this._makeRequest({ + path: `/administrations/${administrationId}/rentables`, + ...opts, + }); + }, + searchContacts(opts = {}) { + return this._makeRequest({ + path: "/contacts/search/first", + ...opts, + }); + }, + createAgendaPeriod({ + administrationId, type, ...opts + }) { + return this._makeRequest({ + path: `/administrations/${administrationId}/${type}`, + method: "POST", + ...opts, + }); + }, + addGuestToReservation({ + administrationId, reservationId, ...opts + }) { + return this._makeRequest({ + path: `/administrations/${administrationId}/reservations/${reservationId}/guests`, + method: "POST", + ...opts, + }); + }, + }, +}; diff --git a/components/booking_experts/package.json b/components/booking_experts/package.json new file mode 100644 index 0000000000000..b71162e0e3a8c --- /dev/null +++ b/components/booking_experts/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/booking_experts", + "version": "0.1.0", + "description": "Pipedream Booking Experts Components", + "main": "booking_experts.app.mjs", + "keywords": [ + "pipedream", + "booking_experts" + ], + "homepage": "https://pipedream.com/apps/booking_experts", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + } +} diff --git a/components/booking_experts/sources/booking-updated/booking-updated.mjs b/components/booking_experts/sources/booking-updated/booking-updated.mjs new file mode 100644 index 0000000000000..0fe880729c969 --- /dev/null +++ b/components/booking_experts/sources/booking-updated/booking-updated.mjs @@ -0,0 +1,44 @@ +import common from "../common/base-polling.mjs"; + +export default { + ...common, + key: "booking_experts-booking-updated", + name: "Booking Updated", + description: "Emit new event for each booking updated. [See the documentation](https://developers.bookingexperts.com/reference/administration-bookings-index)", + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + ...common.props, + administrationId: { + propDefinition: [ + common.props.bookingExperts, + "administrationId", + ], + }, + }, + methods: { + ...common.methods, + getResourceFn() { + return this.bookingExperts.listBookings; + }, + getArgs() { + return { + administrationId: this.administrationId, + params: { + sort: "-updated_at", + }, + }; + }, + getTsField() { + return "updated_at"; + }, + generateMeta(booking) { + return { + id: booking.id, + summary: `Booking updated: ${booking.id}`, + ts: Date.parse(booking.attributes.updated_at), + }; + }, + }, +}; diff --git a/components/booking_experts/sources/common/base-polling.mjs b/components/booking_experts/sources/common/base-polling.mjs new file mode 100644 index 0000000000000..fcd7732e81547 --- /dev/null +++ b/components/booking_experts/sources/common/base-polling.mjs @@ -0,0 +1,94 @@ +import bookingExperts from "../../booking_experts.app.mjs"; +import { + DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, ConfigurationError, +} from "@pipedream/platform"; + +export default { + props: { + bookingExperts, + db: "$.service.db", + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + methods: { + _getLastTs() { + return this.db.get("lastTs") || 0; + }, + _setLastTs(ts) { + this.db.set("lastTs", ts); + }, + getArgs() { + return {}; + }, + getTsField() { + return "created_at"; + }, + async processEvent(limit) { + const lastTs = this._getLastTs(); + const resourceFn = this.getResourceFn(); + let args = this.getArgs(); + const tsField = this.getTsField(); + + const items = []; + let total, hasMore, count = 0; + args = { + ...args, + params: { + ...args?.params, + "page[number]": 1, + "page[size]": 100, + }, + }; + do { + const { data } = await resourceFn(args); + total = data?.length; + if (!total) { + break; + } + for (const item of data) { + const ts = Date.parse(item.attributes[tsField]); + if (ts > lastTs) { + items.push(item); + if (limit && ++count >= limit) { + hasMore = false; + break; + } + } else { + hasMore = false; + break; + } + } + args.params["page[number]"]++; + } while (hasMore && total === args.params["page[size]"]); + + if (!items.length) { + return; + } + + this._setLastTs(Date.parse(items[0].attributes[tsField])); + + items.forEach((item) => { + const meta = this.generateMeta(item); + this.$emit(item, meta); + }); + }, + getResourceFn() { + throw new ConfigurationError("getResourceFn is not implemented"); + }, + generateMeta() { + throw new ConfigurationError("generateMeta is not implemented"); + }, + }, + hooks: { + async deploy() { + await this.processEvent(25); + }, + }, + async run() { + await this.processEvent(); + }, +}; diff --git a/components/booking_experts/sources/inventory-object-updated/inventory-object-updated.mjs b/components/booking_experts/sources/inventory-object-updated/inventory-object-updated.mjs new file mode 100644 index 0000000000000..27f12221f6a62 --- /dev/null +++ b/components/booking_experts/sources/inventory-object-updated/inventory-object-updated.mjs @@ -0,0 +1,44 @@ +import common from "../common/base-polling.mjs"; + +export default { + ...common, + key: "booking_experts-inventory-object-updated", + name: "Inventory Object Updated", + description: "Emit new event when an inventory object is updated. [See the documentation](https://developers.bookingexperts.com/reference/administration-inventoryobjects-index)", + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + ...common.props, + administrationId: { + propDefinition: [ + common.props.bookingExperts, + "administrationId", + ], + }, + }, + methods: { + ...common.methods, + getResourceFn() { + return this.bookingExperts.listInventoryObjects; + }, + getArgs() { + return { + administrationId: this.administrationId, + params: { + sort: "-updated_at", + }, + }; + }, + getTsField() { + return "updated_at"; + }, + generateMeta(inventoryObject) { + return { + id: inventoryObject.id, + summary: `Inventory object updated: ${inventoryObject.id}`, + ts: Date.parse(inventoryObject.attributes.updated_at), + }; + }, + }, +}; diff --git a/components/booking_experts/sources/new-booking-created/new-booking-created.mjs b/components/booking_experts/sources/new-booking-created/new-booking-created.mjs new file mode 100644 index 0000000000000..41b124bfbf2a7 --- /dev/null +++ b/components/booking_experts/sources/new-booking-created/new-booking-created.mjs @@ -0,0 +1,41 @@ +import common from "../common/base-polling.mjs"; + +export default { + ...common, + key: "booking_experts-new-booking-created", + name: "New Booking Created", + description: "Emit new event for each new booking created. [See the documentation](https://developers.bookingexperts.com/reference/administration-bookings-index)", + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + ...common.props, + administrationId: { + propDefinition: [ + common.props.bookingExperts, + "administrationId", + ], + }, + }, + methods: { + ...common.methods, + getResourceFn() { + return this.bookingExperts.listBookings; + }, + getArgs() { + return { + administrationId: this.administrationId, + params: { + sort: "-created_at", + }, + }; + }, + generateMeta(booking) { + return { + id: booking.id, + summary: `New booking created: ${booking.id}`, + ts: Date.parse(booking.attributes.created_at), + }; + }, + }, +}; diff --git a/components/booking_experts/sources/new-inventory-object-created/new-inventory-object-created.mjs b/components/booking_experts/sources/new-inventory-object-created/new-inventory-object-created.mjs new file mode 100644 index 0000000000000..32f2690021052 --- /dev/null +++ b/components/booking_experts/sources/new-inventory-object-created/new-inventory-object-created.mjs @@ -0,0 +1,41 @@ +import common from "../common/base-polling.mjs"; + +export default { + ...common, + key: "booking_experts-new-inventory-object-created", + name: "New Inventory Object Created", + description: "Emit new event when a new inventory object is created. [See the documentation](https://developers.bookingexperts.com/reference/administration-inventoryobjects-index)", + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + ...common.props, + administrationId: { + propDefinition: [ + common.props.bookingExperts, + "administrationId", + ], + }, + }, + methods: { + ...common.methods, + getResourceFn() { + return this.bookingExperts.listInventoryObjects; + }, + getArgs() { + return { + administrationId: this.administrationId, + params: { + sort: "-created_at", + }, + }; + }, + generateMeta(inventoryObject) { + return { + id: inventoryObject.id, + summary: `New inventory object created: ${inventoryObject.id}`, + ts: Date.parse(inventoryObject.attributes.created_at), + }; + }, + }, +}; diff --git a/components/botbaba/.gitignore b/components/botbaba/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/botbaba/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/botbaba/app/botbaba.app.ts b/components/botbaba/app/botbaba.app.ts deleted file mode 100644 index 31b510f8b03aa..0000000000000 --- a/components/botbaba/app/botbaba.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "botbaba", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/botbaba/botbaba.app.mjs b/components/botbaba/botbaba.app.mjs new file mode 100644 index 0000000000000..ff58e6dc78d8c --- /dev/null +++ b/components/botbaba/botbaba.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "botbaba", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/botbaba/package.json b/components/botbaba/package.json index 21eea7a9c8d84..01c2226384efc 100644 --- a/components/botbaba/package.json +++ b/components/botbaba/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/botbaba", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Botbaba Components", - "main": "dist/app/botbaba.app.mjs", + "main": "botbaba.app.mjs", "keywords": [ "pipedream", "botbaba" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/botbaba", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/botx/botx.app.mjs b/components/botx/botx.app.mjs index f6150a3a07623..7e155e23ffe12 100644 --- a/components/botx/botx.app.mjs +++ b/components/botx/botx.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/box/actions/create-sign-request/create-sign-request.mjs b/components/box/actions/create-sign-request/create-sign-request.mjs new file mode 100644 index 0000000000000..ae14671a3832e --- /dev/null +++ b/components/box/actions/create-sign-request/create-sign-request.mjs @@ -0,0 +1,113 @@ +import { ConfigurationError } from "@pipedream/platform"; +import app from "../../box.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + name: "Create Box Sign Request", + description: "Creates a signature request. This involves preparing a document for signing and sending the signature request to signers. [See the documentation](https://developer.box.com/reference/post-sign-requests/).", + key: "box-create-sign-request", + version: "0.0.1", + type: "action", + props: { + app, + signers: { + type: "string[]", + label: "Signers", + description: "Array of signers for the signature request. Each signer should be a JSON object with at least an email property. [See the documentation](https://developer.box.com/reference/post-sign-requests/#param-signers) for more information. Example: `{\"email\": \"signer@example.com\", \"role\": \"signer\"}`", + }, + name: { + type: "string", + label: "Request Name", + description: "Name of the signature request", + optional: true, + }, + parentFolder: { + propDefinition: [ + app, + "parentId", + ], + label: "Parent Folder", + description: "The destination folder to place final, signed document and signing log. Uses root folder (0) if not specified", + optional: true, + }, + emailSubject: { + type: "string", + label: "Email Subject", + description: "Subject of sign request email. If not provided, a default subject will be used", + optional: true, + }, + emailMessage: { + type: "string", + label: "Email Message", + description: "Message to include in sign request email. If not provided, a default message will be used", + optional: true, + }, + redirectUrl: { + type: "string", + label: "Redirect URL", + description: "The URI that a signer will be redirected to after signing a document", + optional: true, + }, + declinedRedirectUrl: { + type: "string", + label: "Declined Redirect URL", + description: "The URI that a signer will be redirected to after declining to sign a document", + optional: true, + }, + additionalOptions: { + type: "object", + label: "Additional Options", + description: "Additional parameters to send in the request. See the [documentation](https://developer.box.com/reference/post-sign-requests/) for all available parameters. Values will be parsed as JSON where applicable", + optional: true, + }, + }, + async run({ $ }) { + const { + signers, + name, + parentFolder, + emailSubject, + emailMessage, + redirectUrl, + declinedRedirectUrl, + additionalOptions, + } = this; + + const parsedSigners = signers.map((signer) => { + try { + return typeof signer === "string" + ? JSON.parse(signer) + : signer; + } catch (error) { + throw new ConfigurationError(`Error parsing signer as JSON: ${error}`); + } + }); + + const data = { + signers: parsedSigners, + name, + email_subject: emailSubject, + email_message: emailMessage, + redirect_url: redirectUrl, + declined_redirect_url: declinedRedirectUrl, + ...(additionalOptions + ? utils.parseObjectEntries(additionalOptions) + : {}), + }; + + if (parentFolder) { + data.parent_folder = { + id: parentFolder, + type: "folder", + }; + } + + const response = await this.app.createSignRequest({ + $, + data, + }); + + $.export("$summary", `Successfully created Box sign request (ID: ${response.id})`); + return response; + }, +}; diff --git a/components/box/actions/download-file/download-file.mjs b/components/box/actions/download-file/download-file.mjs index fbdbf1a57df0c..e9d2a9fa1d79f 100644 --- a/components/box/actions/download-file/download-file.mjs +++ b/components/box/actions/download-file/download-file.mjs @@ -7,7 +7,7 @@ export default { name: "Download File", description: "Downloads a file from Box to your workflow's `/tmp` directory. [See the documentation](https://developer.box.com/reference/get-files-id-content/)", key: "box-download-file", - version: "0.0.4", + version: "0.0.5", type: "action", props: { app, diff --git a/components/box/actions/get-comments/get-comments.mjs b/components/box/actions/get-comments/get-comments.mjs index fa1264013fae0..2bde6da30b425 100644 --- a/components/box/actions/get-comments/get-comments.mjs +++ b/components/box/actions/get-comments/get-comments.mjs @@ -5,7 +5,7 @@ export default { name: "Get Comments", description: "Fetches comments for a file. [See the documentation](https://developer.box.com/reference/get-files-id-comments/).", key: "box-get-comments", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/box/actions/search-content/search-content.mjs b/components/box/actions/search-content/search-content.mjs index 78ade1dc6d1a4..01ba3c589e4ed 100644 --- a/components/box/actions/search-content/search-content.mjs +++ b/components/box/actions/search-content/search-content.mjs @@ -6,7 +6,7 @@ export default { name: "Search Content", description: "Searches for files, folders, web links, and shared files across the users content or across the entire enterprise. [See the documentation](https://developer.box.com/reference/get-search/).", key: "box-search-content", - version: "0.0.4", + version: "0.0.5", type: "action", props: { app, diff --git a/components/box/actions/upload-file-version/upload-file-version.mjs b/components/box/actions/upload-file-version/upload-file-version.mjs index dce65588e1f0c..308164c90a109 100644 --- a/components/box/actions/upload-file-version/upload-file-version.mjs +++ b/components/box/actions/upload-file-version/upload-file-version.mjs @@ -5,7 +5,7 @@ export default { name: "Upload File Version", description: "Update a file's content. [See the documentation](https://developer.box.com/reference/post-files-id-content/).", key: "box-upload-file-version", - version: "0.1.1", + version: "0.1.2", type: "action", props: { app, diff --git a/components/box/actions/upload-file/upload-file.mjs b/components/box/actions/upload-file/upload-file.mjs index 27b5909d5a09e..1f0bc0dd08650 100644 --- a/components/box/actions/upload-file/upload-file.mjs +++ b/components/box/actions/upload-file/upload-file.mjs @@ -5,7 +5,7 @@ export default { name: "Upload a File", description: "Uploads a small file to Box. [See the documentation](https://developer.box.com/reference/post-files-content/).", key: "box-upload-file", - version: "0.1.1", + version: "0.1.2", type: "action", props: { app, diff --git a/components/box/box.app.mjs b/components/box/box.app.mjs index 84302cb68efa6..a7527d7a1d2f0 100644 --- a/components/box/box.app.mjs +++ b/components/box/box.app.mjs @@ -319,5 +319,12 @@ export default { ...args, }); }, + async createSignRequest(args = {}) { + return this._makeRequest({ + method: "POST", + path: "/sign_requests", + ...args, + }); + }, }, }; diff --git a/components/box/common/utils.mjs b/components/box/common/utils.mjs index aaec30611aab9..d7eeac6d8a43c 100644 --- a/components/box/common/utils.mjs +++ b/components/box/common/utils.mjs @@ -1,7 +1,29 @@ import constants from "./constants.mjs"; import { getFileStreamAndMetadata } from "@pipedream/platform"; +function optionalParseAsJSON(value) { + try { + return JSON.parse(value); + } catch (e) { + return value; + } +} + export default { + parseObjectEntries(value = {}) { + const obj = typeof value === "string" + ? JSON.parse(value) + : value; + return Object.fromEntries( + Object.entries(obj).map(([ + key, + value, + ]) => [ + key, + optionalParseAsJSON(value), + ]), + ); + }, async getFileData(filePath) { const { stream, metadata, diff --git a/components/box/package.json b/components/box/package.json index 1e3b5383862ff..678a26319947a 100644 --- a/components/box/package.json +++ b/components/box/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/box", - "version": "0.4.1", + "version": "0.5.0", "description": "Pipedream Box Components", "main": "box.app.mjs", "keywords": [ diff --git a/components/box/sources/new-event/new-event.mjs b/components/box/sources/new-event/new-event.mjs index 58f449c354429..16599921ca68e 100644 --- a/components/box/sources/new-event/new-event.mjs +++ b/components/box/sources/new-event/new-event.mjs @@ -5,7 +5,7 @@ export default { key: "box-new-event", name: "New Event", description: "Emit new event when an event with subscribed event source triggered on a target. [See the documentation](https://developer.box.com/reference/post-webhooks)", - version: "0.0.4", + version: "0.0.5", type: "source", dedupe: "unique", ...common, diff --git a/components/box/sources/new-file/new-file.mjs b/components/box/sources/new-file/new-file.mjs index 99e6778201c3c..264a9088a923c 100644 --- a/components/box/sources/new-file/new-file.mjs +++ b/components/box/sources/new-file/new-file.mjs @@ -4,7 +4,7 @@ export default { key: "box-new-file", name: "New File Event", description: "Emit new event when a new file uploaded on a target. [See the documentation](https://developer.box.com/reference/post-webhooks)", - version: "0.0.4", + version: "0.0.5", type: "source", dedupe: "unique", ...common, diff --git a/components/box/sources/new-folder/new-folder.mjs b/components/box/sources/new-folder/new-folder.mjs index f66753c6047b2..7d7a416d85b46 100644 --- a/components/box/sources/new-folder/new-folder.mjs +++ b/components/box/sources/new-folder/new-folder.mjs @@ -4,7 +4,7 @@ export default { key: "box-new-folder", name: "New Folder Event", description: "Emit new event when a new folder created on a target. [See the documentation](https://developer.box.com/reference/post-webhooks)", - version: "0.0.4", + version: "0.0.5", type: "source", dedupe: "unique", ...common, diff --git a/components/braintree/.gitignore b/components/braintree/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/braintree/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/braintree/app/braintree.app.ts b/components/braintree/app/braintree.app.ts deleted file mode 100644 index 0e33bb2407071..0000000000000 --- a/components/braintree/app/braintree.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "braintree", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/braintree/braintree.app.mjs b/components/braintree/braintree.app.mjs new file mode 100644 index 0000000000000..cbf7bb2ef0d60 --- /dev/null +++ b/components/braintree/braintree.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "braintree", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/braintree/package.json b/components/braintree/package.json index f6f2d5ded19d9..dffbfe28a9c34 100644 --- a/components/braintree/package.json +++ b/components/braintree/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/braintree", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Braintree Components", - "main": "dist/app/braintree.app.mjs", + "main": "braintree.app.mjs", "keywords": [ "pipedream", "braintree" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/braintree", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/brandmentions/.gitignore b/components/brandmentions/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/brandmentions/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/brandmentions/app/brandmentions.app.ts b/components/brandmentions/app/brandmentions.app.ts deleted file mode 100644 index 073f64c481887..0000000000000 --- a/components/brandmentions/app/brandmentions.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "brandmentions", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/brandmentions/brandmentions.app.mjs b/components/brandmentions/brandmentions.app.mjs new file mode 100644 index 0000000000000..625ede63b1321 --- /dev/null +++ b/components/brandmentions/brandmentions.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "brandmentions", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/brandmentions/package.json b/components/brandmentions/package.json index e88c91bdc772f..5f76667cc9d5f 100644 --- a/components/brandmentions/package.json +++ b/components/brandmentions/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/brandmentions", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream BrandMentions Components", - "main": "dist/app/brandmentions.app.mjs", + "main": "brandmentions.app.mjs", "keywords": [ "pipedream", "brandmentions" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/brandmentions", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/brave_search_api/actions/web-search/web-search.mjs b/components/brave_search_api/actions/web-search/web-search.mjs new file mode 100644 index 0000000000000..fc9d39f102eb4 --- /dev/null +++ b/components/brave_search_api/actions/web-search/web-search.mjs @@ -0,0 +1,72 @@ +import app from "../../brave_search_api.app.mjs"; + +export default { + key: "brave_search_api-web-search", + name: "Web Search", + description: "Query Brave Search and get back search results from the web. [See the documentation](https://api-dashboard.search.brave.com/app/documentation/web-search/get-started)", + version: "0.0.1", + type: "action", + props: { + app, + q: { + propDefinition: [ + app, + "q", + ], + }, + country: { + propDefinition: [ + app, + "country", + ], + }, + searchLang: { + propDefinition: [ + app, + "searchLang", + ], + }, + uiLang: { + propDefinition: [ + app, + "uiLang", + ], + }, + safesearch: { + propDefinition: [ + app, + "safesearch", + ], + }, + }, + async run({ $ }) { + const allResults = []; + const count = 20; + for (let offset = 0; offset < 5; offset++) { + const response = await this.app.webSearch({ + $, + params: { + q: this.q, + country: this.country, + search_lang: this.searchLang, + ui_lang: this.uiLang, + safesearch: this.safesearch, + count, + offset, + }, + }); + + const results = response.web?.results; + allResults.push(...results); + + if (results.length < count) { + break; + } + } + + $.export("$summary", `Retrieved ${allResults.length} results`); + return { + allResults, + }; + }, +}; diff --git a/components/brave_search_api/brave_search_api.app.mjs b/components/brave_search_api/brave_search_api.app.mjs index fad13cd5853e9..c0888d9705d08 100644 --- a/components/brave_search_api/brave_search_api.app.mjs +++ b/components/brave_search_api/brave_search_api.app.mjs @@ -1,11 +1,72 @@ +import { axios } from "@pipedream/platform"; +import constants from "./common/constants.mjs"; + export default { type: "app", app: "brave_search_api", - propDefinitions: {}, + propDefinitions: { + q: { + type: "string", + label: "Query", + description: "Search query string", + }, + country: { + type: "string", + label: "Country", + description: "Country code to localize search results", + optional: true, + options: constants.COUNTRY_CODES, + }, + searchLang: { + type: "string", + label: "Search Language", + description: "Language to use for search results", + optional: true, + options: constants.LANGUAGE_CODES, + }, + uiLang: { + type: "string", + label: "UI Language", + description: "Language for the user interface", + optional: true, + options: constants.UI_CODES, + }, + safesearch: { + type: "string", + label: "SafeSearch", + description: "SafeSearch filter level", + optional: true, + options: constants.SEARCH_OPTIONS, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://api.search.brave.com/res/v1"; + }, + async _makeRequest(opts = {}) { + const { + $ = this, + path, + headers, + ...otherOpts + } = opts; + return axios($, { + ...otherOpts, + url: this._baseUrl() + path, + headers: { + "x-subscription-token": `${this.$auth.api_key}`, + "accept": "application/json", + "accept-encoding": "gzip", + ...headers, + }, + }); + }, + + async webSearch(args = {}) { + return this._makeRequest({ + path: "/web/search", + ...args, + }); }, }, }; diff --git a/components/brave_search_api/common/constants.mjs b/components/brave_search_api/common/constants.mjs new file mode 100644 index 0000000000000..13955f1e4b90d --- /dev/null +++ b/components/brave_search_api/common/constants.mjs @@ -0,0 +1,513 @@ +export default { + COUNTRY_CODES: [ + { + label: "All Regions", + value: "ALL", + }, + { + label: "Argentina", + value: "AR", + }, + { + label: "Australia", + value: "AU", + }, + { + label: "Austria", + value: "AT", + }, + { + label: "Belgium", + value: "BE", + }, + { + label: "Brazil", + value: "BR", + }, + { + label: "Canada", + value: "CA", + }, + { + label: "Chile", + value: "CL", + }, + { + label: "Denmark", + value: "DK", + }, + { + label: "Finland", + value: "FI", + }, + { + label: "France", + value: "FR", + }, + { + label: "Germany", + value: "DE", + }, + { + label: "Hong Kong", + value: "HK", + }, + { + label: "India", + value: "IN", + }, + { + label: "Indonesia", + value: "ID", + }, + { + label: "Italy", + value: "IT", + }, + { + label: "Japan", + value: "JP", + }, + { + label: "Korea", + value: "KR", + }, + { + label: "Malaysia", + value: "MY", + }, + { + label: "Mexico", + value: "MX", + }, + { + label: "Netherlands", + value: "NL", + }, + { + label: "New Zealand", + value: "NZ", + }, + { + label: "Norway", + value: "NO", + }, + { + label: "People's Republic of China", + value: "CN", + }, + { + label: "Poland", + value: "PL", + }, + { + label: "Portugal", + value: "PT", + }, + { + label: "Philippines", + value: "PH", + }, + { + label: "Russia", + value: "RU", + }, + { + label: "Saudi Arabia", + value: "SA", + }, + { + label: "South Africa", + value: "ZA", + }, + { + label: "Spain", + value: "ES", + }, + { + label: "Sweden", + value: "SV", + }, + { + label: "Switzerland", + value: "CH", + }, + { + label: "Taiwan", + value: "TW", + }, + { + label: "Turkey", + value: "TR", + }, + { + label: "United Kingdom", + value: "GB", + }, + { + label: "United States", + value: "US", + }, + ], + LANGUAGE_CODES: [ + { + label: "Arabic", + value: "ar", + }, + { + label: "Basque", + value: "eu", + }, + { + label: "Bengali", + value: "bn", + }, + { + label: "Bulgarian", + value: "bg", + }, + { + label: "Catalan", + value: "ca", + }, + { + label: "Chinese (Simplified)", + value: "zh-hans", + }, + { + label: "Chinese (Traditional)", + value: "zh-hant", + }, + { + label: "Croatian", + value: "hr", + }, + { + label: "Czech", + value: "cs", + }, + { + label: "Danish", + value: "da", + }, + { + label: "Dutch", + value: "nl", + }, + { + label: "English", + value: "en", + }, + { + label: "English (United Kingdom)", + value: "en-gb", + }, + { + label: "Estonian", + value: "et", + }, + { + label: "Finnish", + value: "fi", + }, + { + label: "French", + value: "fr", + }, + { + label: "Galician", + value: "gl", + }, + { + label: "German", + value: "de", + }, + { + label: "Gujarati", + value: "gu", + }, + { + label: "Hebrew", + value: "he", + }, + { + label: "Hindi", + value: "hi", + }, + { + label: "Hungarian", + value: "hu", + }, + { + label: "Icelandic", + value: "is", + }, + { + label: "Italian", + value: "it", + }, + { + label: "Japanese", + value: "jp", + }, + { + label: "Kannada", + value: "kn", + }, + { + label: "Korean", + value: "ko", + }, + { + label: "Latvian", + value: "lv", + }, + { + label: "Lithuanian", + value: "lt", + }, + { + label: "Malay", + value: "ms", + }, + { + label: "Malayalam", + value: "ml", + }, + { + label: "Marathi", + value: "mr", + }, + { + label: "Norwegian Bokmรฅl", + value: "nb", + }, + { + label: "Polish", + value: "pl", + }, + { + label: "Portuguese (Brazil)", + value: "pt-br", + }, + { + label: "Portuguese (Portugal)", + value: "pt-pt", + }, + { + label: "Punjabi", + value: "pa", + }, + { + label: "Romanian", + value: "ro", + }, + { + label: "Russian", + value: "ru", + }, + { + label: "Serbian (Cyrillic)", + value: "sr", + }, + { + label: "Slovak", + value: "sk", + }, + { + label: "Slovenian", + value: "sl", + }, + { + label: "Spanish", + value: "es", + }, + { + label: "Swedish", + value: "sv", + }, + { + label: "Tamil", + value: "ta", + }, + { + label: "Telugu", + value: "te", + }, + { + label: "Thai", + value: "th", + }, + { + label: "Turkish", + value: "tr", + }, + { + label: "Ukrainian", + value: "uk", + }, + { + label: "Vietnamese", + value: "vi", + }, + ], + UI_CODES: [ + { + label: "Argentina (Spanish)", + value: "es-AR", + }, + { + label: "Australia (English)", + value: "en-AU", + }, + { + label: "Austria (German)", + value: "de-AT", + }, + { + label: "Belgium (Dutch)", + value: "nl-BE", + }, + { + label: "Belgium (French)", + value: "fr-BE", + }, + { + label: "Brazil (Portuguese)", + value: "pt-BR", + }, + { + label: "Canada (English)", + value: "en-CA", + }, + { + label: "Canada (French)", + value: "fr-CA", + }, + { + label: "Chile (Spanish)", + value: "es-CL", + }, + { + label: "Denmark (Danish)", + value: "da-DK", + }, + { + label: "Finland (Finnish)", + value: "fi-FI", + }, + { + label: "France (French)", + value: "fr-FR", + }, + { + label: "Germany (German)", + value: "de-DE", + }, + { + label: "Hong Kong SAR (Traditional Chinese)", + value: "zh-HK", + }, + { + label: "India (English)", + value: "en-IN", + }, + { + label: "Indonesia (English)", + value: "en-ID", + }, + { + label: "Italy (Italian)", + value: "it-IT", + }, + { + label: "Japan (Japanese)", + value: "ja-JP", + }, + { + label: "Korea (Korean)", + value: "ko-KR", + }, + { + label: "Malaysia (English)", + value: "en-MY", + }, + { + label: "Mexico (Spanish)", + value: "es-MX", + }, + { + label: "Netherlands (Dutch)", + value: "nl-NL", + }, + { + label: "New Zealand (English)", + value: "en-NZ", + }, + { + label: "Norway (Norwegian)", + value: "no-NO", + }, + { + label: "People's Republic of China (Chinese)", + value: "zh-CN", + }, + { + label: "Poland (Polish)", + value: "pl-PL", + }, + { + label: "Philippines (English)", + value: "en-PH", + }, + { + label: "Russia (Russian)", + value: "ru-RU", + }, + { + label: "South Africa (English)", + value: "en-ZA", + }, + { + label: "Spain (Spanish)", + value: "es-ES", + }, + { + label: "Sweden (Swedish)", + value: "sv-SE", + }, + { + label: "Switzerland (French)", + value: "fr-CH", + }, + { + label: "Switzerland (German)", + value: "de-CH", + }, + { + label: "Taiwan (Traditional Chinese)", + value: "zh-TW", + }, + { + label: "Turkey (Turkish)", + value: "tr-TR", + }, + { + label: "United Kingdom (English)", + value: "en-GB", + }, + { + label: "United States (English)", + value: "en-US", + }, + { + label: "United States (Spanish)", + value: "es-US", + }, + ], + SEARCH_OPTIONS: [ + "off", + "moderate", + "strict", + ], +}; diff --git a/components/brave_search_api/package.json b/components/brave_search_api/package.json index 0bfae660095db..da56ff5e61786 100644 --- a/components/brave_search_api/package.json +++ b/components/brave_search_api/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/brave_search_api", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream Brave Search API Components", "main": "brave_search_api.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } -} \ No newline at end of file +} diff --git a/components/braze/.gitignore b/components/braze/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/braze/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/braze/app/braze.app.ts b/components/braze/app/braze.app.ts deleted file mode 100644 index adbd60fa6a2af..0000000000000 --- a/components/braze/app/braze.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "braze", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/braze/braze.app.mjs b/components/braze/braze.app.mjs new file mode 100644 index 0000000000000..c31e64dba787e --- /dev/null +++ b/components/braze/braze.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "braze", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/braze/package.json b/components/braze/package.json index be02f13127f46..d4b0fe5b9d2c3 100644 --- a/components/braze/package.json +++ b/components/braze/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/braze", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Braze Components", - "main": "dist/app/braze.app.mjs", + "main": "braze.app.mjs", "keywords": [ "pipedream", "braze" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/braze", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/bridge_interactive_platform/actions/get-listings/get-listings.mjs b/components/bridge_interactive_platform/actions/get-listings/get-listings.mjs new file mode 100644 index 0000000000000..33b8f60603ba3 --- /dev/null +++ b/components/bridge_interactive_platform/actions/get-listings/get-listings.mjs @@ -0,0 +1,125 @@ +import bridgeInteractivePlatform from "../../bridge_interactive_platform.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "bridge_interactive_platform-get-listings", + name: "Get Listings", + description: "Get MLS listings from a dataset. [See the documentation](https://bridgedataoutput.com/docs/explorer/mls-data)", + version: "0.0.1", + type: "action", + props: { + bridgeInteractivePlatform, + dataset: { + propDefinition: [ + bridgeInteractivePlatform, + "dataset", + ], + }, + near: { + propDefinition: [ + bridgeInteractivePlatform, + "near", + ], + }, + radius: { + propDefinition: [ + bridgeInteractivePlatform, + "radius", + ], + }, + box: { + propDefinition: [ + bridgeInteractivePlatform, + "box", + ], + }, + poly: { + propDefinition: [ + bridgeInteractivePlatform, + "poly", + ], + }, + geohash: { + propDefinition: [ + bridgeInteractivePlatform, + "geohash", + ], + }, + sortBy: { + propDefinition: [ + bridgeInteractivePlatform, + "field", + (c) => ({ + dataset: c.dataset, + }), + ], + label: "Sort By", + }, + order: { + type: "string", + label: "Order", + description: "Order of responses", + optional: true, + options: [ + "asc", + "desc", + ], + }, + fields: { + propDefinition: [ + bridgeInteractivePlatform, + "field", + (c) => ({ + dataset: c.dataset, + }), + ], + type: "string[]", + label: "Fields", + description: "Filters Response fields", + }, + limit: { + type: "integer", + label: "Limit", + description: "Maximum number of responses", + optional: true, + }, + offset: { + type: "integer", + label: "Offset", + description: "Number of responses to skip", + optional: true, + }, + }, + async run({ $ }) { + const coords = { + near: this.near, + poly: this.poly, + box: this.box, + geohash: this.geohash, + }; + + if (Object.values(coords).filter(Boolean).length > 1) { + throw new ConfigurationError("Only one of near, poly, box, or geohash can be used"); + } + + const response = await this.bridgeInteractivePlatform.getListings({ + dataset: this.dataset, + params: { + near: this.near, + radius: this.radius, + box: this.box, + poly: this.poly, + geohash: this.geohash, + sortBy: this.sortBy, + order: this.order, + fields: this.fields + ? this.fields.join(",") + : undefined, + limit: this.limit, + offset: this.offset, + }, + }); + $.export("$summary", `Found ${response.bundle.length} listings`); + return response; + }, +}; diff --git a/components/bridge_interactive_platform/bridge_interactive_platform.app.mjs b/components/bridge_interactive_platform/bridge_interactive_platform.app.mjs new file mode 100644 index 0000000000000..ddc298d9e93c8 --- /dev/null +++ b/components/bridge_interactive_platform/bridge_interactive_platform.app.mjs @@ -0,0 +1,84 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "bridge_interactive_platform", + propDefinitions: { + dataset: { + type: "string", + label: "Dataset", + description: "The dataset to use for the query", + }, + field: { + type: "string", + label: "Field", + description: "Response field to sort query by", + optional: true, + async options({ dataset }) { + const response = await this.getListings({ + dataset, + params: { + limit: 1, + }, + }); + const listing = response.bundle[0]; + return Object.keys(listing); + }, + }, + near: { + type: "string", + label: "Near", + description: "Coord or location eg. near=-73.98,40.73 or near=San Diego", + optional: true, + }, + radius: { + type: "string", + label: "Radius", + description: "Search Radius in miles, km, or degrees (no units)s", + optional: true, + }, + box: { + type: "string", + label: "Box", + description: "Coordinates representing a box eg. box=-112.5,33.75,-123,39", + optional: true, + }, + poly: { + type: "string", + label: "Poly", + description: "Minimum 3 pairs of coordinates representing a polygon eg. poly=-112.5,33.75,-123,39,-120,38", + optional: true, + }, + geohash: { + type: "string", + label: "Geohash", + description: "Alphanumeric geohash eg. geohash=ezs42", + optional: true, + }, + }, + methods: { + _baseUrl() { + return "https://api.bridgedataoutput.com/api/v2"; + }, + _makeRequest({ + $ = this, path, params, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + params: { + ...params, + access_token: `${this.$auth.access_token}`, + }, + ...opts, + }); + }, + getListings({ + dataset, ...opts + }) { + return this._makeRequest({ + path: `/${dataset}/listings`, + ...opts, + }); + }, + }, +}; diff --git a/components/bridge_interactive_platform/package.json b/components/bridge_interactive_platform/package.json new file mode 100644 index 0000000000000..3d42a318eb4cf --- /dev/null +++ b/components/bridge_interactive_platform/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/bridge_interactive_platform", + "version": "0.1.0", + "description": "Pipedream Bridge Interactive Platform Components", + "main": "bridge_interactive_platform.app.mjs", + "keywords": [ + "pipedream", + "bridge_interactive_platform" + ], + "homepage": "https://pipedream.com/apps/bridge_interactive_platform", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + } +} diff --git a/components/bridge_interactive_platform/sources/new-listing-created/new-listing-created.mjs b/components/bridge_interactive_platform/sources/new-listing-created/new-listing-created.mjs new file mode 100644 index 0000000000000..66f264526ca33 --- /dev/null +++ b/components/bridge_interactive_platform/sources/new-listing-created/new-listing-created.mjs @@ -0,0 +1,123 @@ +import bridgeInteractivePlatform from "../../bridge_interactive_platform.app.mjs"; +import { + DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, ConfigurationError, +} from "@pipedream/platform"; +import sampleEmit from "./test-event.mjs"; + +export default { + key: "bridge_interactive_platform-new-listing-created", + name: "New Listing Created", + description: "Emit new event when a new listing is created. [See the documentation](https://bridgedataoutput.com/docs/explorer/mls-data)", + version: "0.0.1", + type: "source", + props: { + bridgeInteractivePlatform, + db: "$.service.db", + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + dataset: { + propDefinition: [ + bridgeInteractivePlatform, + "dataset", + ], + }, + near: { + propDefinition: [ + bridgeInteractivePlatform, + "near", + ], + }, + radius: { + propDefinition: [ + bridgeInteractivePlatform, + "radius", + ], + }, + box: { + propDefinition: [ + bridgeInteractivePlatform, + "box", + ], + }, + poly: { + propDefinition: [ + bridgeInteractivePlatform, + "poly", + ], + }, + geohash: { + propDefinition: [ + bridgeInteractivePlatform, + "geohash", + ], + }, + }, + methods: { + _getLastTs() { + return this.db.get("lastTs") || 0; + }, + _setLastTs(ts) { + this.db.set("lastTs", ts); + }, + async processEvent(limit = 100) { + const coords = { + near: this.near, + poly: this.poly, + box: this.box, + geohash: this.geohash, + }; + + if (Object.values(coords).filter(Boolean).length > 1) { + throw new ConfigurationError("Only one of near, poly, box, or geohash can be used"); + } + + const lastTs = this._getLastTs(); + const response = await this.bridgeInteractivePlatform.getListings({ + dataset: this.dataset, + params: { + near: this.near, + radius: this.radius, + box: this.box, + poly: this.poly, + geohash: this.geohash, + sortBy: "OriginalEntryTimestamp", + order: "desc", + limit, + }, + }); + + if (!response?.bundle?.length) { + return; + }; + + this._setLastTs(Date.parse(response.bundle[0].OriginalEntryTimestamp)); + + const newListings = response.bundle + .filter((listing) => Date.parse(listing.OriginalEntryTimestamp) > lastTs); + newListings.forEach((listing) => { + const meta = this.generateMeta(listing); + this.$emit(listing, meta); + }); + }, + generateMeta(listing) { + return { + id: listing.ListingId, + summary: `New Listing Created: ${listing.ListingId}`, + ts: Date.parse(listing.OriginalEntryTimestamp), + }; + }, + }, + hooks: { + async deploy() { + await this.processEvent(25); + }, + }, + async run() { + await this.processEvent(); + }, + sampleEmit, +}; diff --git a/components/bridge_interactive_platform/sources/new-listing-created/test-event.mjs b/components/bridge_interactive_platform/sources/new-listing-created/test-event.mjs new file mode 100644 index 0000000000000..3e62394cea713 --- /dev/null +++ b/components/bridge_interactive_platform/sources/new-listing-created/test-event.mjs @@ -0,0 +1,857 @@ +export default { + "StreetDirPrefix": null, + "DistanceToStreetComments": null, + "PublicSurveyRange": null, + "LeaseAssignableYN": null, + "GreenWaterConservation": [], + "NumberOfUnitsMoMo": null, + "LivingAreaUnits": "SquareFeet", + "CoListAgentCellPhone": null, + "SeatingCapacity": null, + "TaxLegalDescription": "Totam ut aut magni consequatur voluptas. Dolorem ipsam voluptatem totam praesentium et molestias hic. Et ex animi ab assumenda aliquam aliquam.\n \r\tAdipisci repellendus esse nesciunt autem ea consequuntur. Fuga ut possimus dolores nesciunt ullam velit. Dolores aliquam ut delectus enim harum modi alias porro. Id quas in ipsum et eum est saepe eos. Ad autem sint aliquid dolores earum nulla architecto soluta.", + "LockBoxLocation": "Illum veniam ut expedita mollitia perspiciatis expedita et porro. Id consequatur natus repellat harum ea voluptatem sequi nemo. Corrupti quis optio unde quis. Architecto autem consequatur totam eum omnis magni. Aliquam iste perferendis et.", + "BuyerAgentDesignation": [], + "YearEstablished": null, + "BuyerTeamKey": null, + "ListPriceLow": null, + "ContingentDate": "2019-09-30", + "LaundryFeatures": [ + "In Kitchen", + "Gas Dryer Hookup" + ], + "Flooring": [ + "Hardwood", + "Laminate", + "Vinyl", + "Tiles", + "Cork" + ], + "PhotosCount": 7, + "FireplacesTotal": 4, + "ListTeamKey": null, + "AdditionalParcelsYN": true, + "CoBuyerAgentDirectPhone": null, + "WaterfrontFeatures": [], + "PastureArea": null, + "SubAgencyCompensation": null, + "ViewYN": false, + "SeniorCommunityYN": true, + "Cooling": [ + "Evaporative Cooler", + "Ceiling Fan" + ], + "ExteriorFeatures": [], + "CountryRegion": null, + "OtherParking": null, + "IrrigationWaterRightsAcres": null, + "SourceSystemID": null, + "StatusChangeTimestamp": "2019-10-30T23:42:50.358Z", + "SecurityFeatures": [], + "BuyerAgentFullName": null, + "RVParkingDimensions": null, + "CoBuyerAgentDesignation": [], + "CoBuyerAgentNamePrefix": null, + "CoBuyerAgentLastName": null, + "PrivateOfficeRemarks": "Eum eius in sint. Libero ratione voluptas facere vel. In fugiat itaque sint ullam harum inventore perspiciatis.\n \r\tAb quia aliquid nulla suscipit ab itaque dolorum soluta. Corporis iusto est voluptatem qui. Cumque aut laborum sed maiores.\n \r\tSint aperiam et dolore sequi praesentium. Quae animi deserunt ut illum et voluptas. Et accusamus molestiae praesentium dolore dolor.\n \r\tId aut non nihil. Ab minus unde et laborum. Tempora unde placeat iusto quasi. Corrupti omnis facilis id.", + "DocumentsCount": 3, + "CancelationDate": null, + "AssociationName": "optio", + "DistanceToBusComments": null, + "TaxExemptions": [], + "CoListAgentURL": null, + "BuildingName": "Angelita Langosh Plc", + "YearsCurrentOwner": null, + "DistanceToSchoolsComments": null, + "ListAgentPreferredPhoneExt": null, + "AssociationFeeFrequency": "Bi-Weekly", + "CrossStreet": null, + "OccupantPhone": "608.509.6631 x5911", + "HeatingYN": true, + "CoBuyerAgentStateLicense": null, + "WaterBodyName": null, + "ManagerExpense": null, + "DistanceToSewerNumeric": null, + "DistanceToGasComments": null, + "CoBuyerAgentMiddleName": null, + "AboveGradeFinishedArea": 7149, + "BuyerAgentFax": null, + "MajorChangeType": "back on market", + "ListingKeyNumeric": null, + "Appliances": [ + "Dishwasher", + "Disposal", + "Oven" + ], + "MLSAreaMajor": null, + "TaxAnnualAmount": 852020, + "LandLeaseAmount": 84533860305, + "CoBuyerAgentPreferredPhoneExt": null, + "CoListAgentPreferredPhone": null, + "CurrentUse": [], + "OriginatingSystemKey": "test", + "CountyOrParish": "County", + "PropertyType": "Business", + "BathroomsTotalDecimal": 4, + "NumberOfPads": null, + "TaxParcelLetter": null, + "OriginatingSystemName": null, + "AssociationYN": true, + "MlsStatus": "Active", + "CarrierRoute": null, + "BuyerOfficeURL": null, + "StreetNumber": null, + "GrossScheduledIncome": null, + "LeaseTerm": null, + "ListingKey": "P_5dba1ffa4aa4055b9f2a5936", + "CoBuyerAgentNameSuffix": null, + "CoListAgentNamePrefix": null, + "AssociationPhone2": null, + "CommonWalls": [ + "No One Below", + "No One Above", + "No Common Walls" + ], + "ListAgentVoiceMail": null, + "CommonInterest": null, + "ListAgentKeyNumeric": null, + "CoListAgentLastName": null, + "ShowingContactType": [ + "Seller" + ], + "CoBuyerAgentMobilePhone": null, + "Vegetation": [], + "IrrigationWaterRightsYN": null, + "BuyerAgentMiddleName": null, + "ElementarySchool": "Bartoletti-Homenick", + "DistanceToFreewayComments": null, + "StreetDirSuffix": null, + "DistanceToSchoolsNumeric": null, + "CoBuyerOfficePhone": null, + "CoListOfficePhoneExt": null, + "ListAgentFirstName": "Dario", + "DistanceToShoppingNumeric": null, + "TaxMapNumber": null, + "Directions": "Quibusdam aut accusamus et iure labore. Ut voluptate non sunt sit accusantium qui rerum aut. Voluptatem illo quia nulla et qui itaque quaerat.\n \r\tHarum voluptas in voluptatem non. Ea nesciunt aut reiciendis. Rerum aut qui voluptas quis nihil quod nesciunt.", + "Concessions": null, + "AttachedGarageYN": false, + "OnMarketTimestamp": null, + "DistanceToBusNumeric": null, + "StandardStatus": "Active", + "CultivatedArea": null, + "Roof": [ + "Metal" + ], + "BuyerAgentNamePrefix": null, + "ParkingTotal": 2, + "ContinentRegion": null, + "ListAgentOfficePhone": null, + "ListAgentHomePhone": null, + "BuyerTeamName": null, + "CoListOfficeKeyNumeric": null, + "DistanceToElectricUnits": null, + "PoolPrivateYN": false, + "PropertyUniversalID": null, + "AdditionalParcelsDescription": null, + "Township": null, + "ListingTerms": [ + "Cash" + ], + "NumberOfUnitsLeased": null, + "FurnitureReplacementExpense": null, + "DistanceToStreetUnits": null, + "BuyerAgentNameSuffix": null, + "GardenerExpense": null, + "DistanceToSchoolBusUnits": null, + "BuilderName": "Klein-Walsh", + "BuyerAgentStateLicense": null, + "ListOfficeEmail": null, + "PropertySubType": "Condominium", + "CoListAgentFirstName": null, + "BuyerAgentDirectPhone": null, + "CoBuyerAgentPreferredPhone": null, + "OtherExpense": null, + "Possession": [ + "Close of Escrow", + "Close Plus 1 Day", + "Close Plus 2 Days", + "Close Plus 3 Days", + "Close Plus 3 to 5 Days", + "Close Plus 30 Days" + ], + "CoListAgentOfficePhone": null, + "WaterfrontYN": true, + "BathroomsFull": 4, + "LotSizeAcres": 9, + "SubdivisionName": "expedita", + "SpecialLicenses": [], + "BuyerOfficeAOR": null, + "InternetAddressDisplayYN": false, + "Fencing": [ + "Wire", + "Wrought Iron", + "Wood" + ], + "LotSizeSource": "Estimate", + "WithdrawnDate": null, + "DistanceToWaterNumeric": null, + "VideosCount": null, + "Contingency": "Doloremque maiores reiciendis rerum. Quis quaerat ut debitis placeat ut aut nihil aliquam. Ut sunt magnam autem. Fugit molestiae sed sit.", + "FarmCreditServiceInclYN": null, + "ListingService": "Entry Only", + "Elevation": 59867, + "WaterSource": [ + "Municipal", + "Irrigation District", + "Private Utility" + ], + "Topography": null, + "SubAgencyCompensationType": null, + "ProfessionalManagementExpense": null, + "DistanceToFreewayUnits": null, + "DoorFeatures": [ + "Truck Doors", + "Overhead Doors", + "Sliding Doors" + ], + "StoriesTotal": 3, + "YearBuilt": 1955, + "ElectricOnPropertyYN": true, + "MapCoordinateSource": null, + "StateRegion": null, + "IrrigationSource": [], + "BathroomsPartial": 6, + "CoListOfficeFax": null, + "Disclaimer": "Quaerat accusantium explicabo repudiandae et. Consequuntur nisi illo nam officia. Et ut saepe modi dolore dolorem eum. Veniam animi dolorem magnam amet quod qui ea.\n \r\tPlaceat minus et provident qui doloribus. Nostrum quos omnis quo. Illo quos non unde alias. Est sunt magnam necessitatibus at. Cumque et fugit reprehenderit enim adipisci aut qui rerum.", + "ZoningDescription": "Agricultural", + "PreviousListPrice": 269900, + "LandLeaseYN": true, + "VacancyAllowanceRate": null, + "NumberOfSeparateWaterMeters": null, + "DaysOnMarket": 358, + "PetsAllowed": [ + "Yes", + "No", + "Call", + "Cats OK", + "Dogs OK", + "Number Limit" + ], + "CoBuyerAgentVoiceMailExt": null, + "BuyerAgencyCompensationType": null, + "ListAgentFax": null, + "NetOperatingIncome": null, + "SerialXX": null, + "OccupantType": "Vacant", + "OtherStructures": [ + "quia", + "laudantium" + ], + "AssociationAmenities": [ + "Pool", + "Clubhouse", + "Gym" + ], + "BodyType": [], + "ClosePrice": null, + "VirtualTourURLZillow": null, + "ListAgentDesignation": [], + "BuyerAgentPreferredPhone": null, + "DistanceToPhoneServiceComments": null, + "PoolExpense": null, + "PendingTimestamp": "2018-11-12T11:11:06.614Z", + "CoBuyerAgentURL": null, + "StreetNumberNumeric": null, + "ListAgentCellPhone": null, + "CoListAgentOfficePhoneExt": null, + "IncomeIncludes": [], + "CoBuyerAgentVoiceMail": null, + "LivingArea": 1750, + "TaxAssessedValue": 444566, + "BuyerTeamKeyNumeric": null, + "CoListAgentKeyNumeric": null, + "CumulativeDaysOnMarket": null, + "CoListAgentStateLicense": null, + "ParkingFeatures": [], + "PostalCodePlus4": null, + "ListAgentPreferredPhone": "1-703-302-8520 x6415", + "CoBuyerAgentHomePhone": null, + "BuyerOfficePhoneExt": null, + "PoolFeatures": [], + "BuyerAgentOfficePhoneExt": null, + "NumberOfUnitsInCommunity": null, + "Heating": [ + "Heat Pump", + "Wood", + "Forced Air" + ], + "StructureType": [], + "BuildingAreaSource": "Agent", + "BathroomsOneQuarter": 1, + "BuilderModel": "Awesome Wooden Computer", + "CoBuyerAgentTollFreePhone": null, + "TotalActualRent": null, + "TrashExpense": null, + "CoListAgentMlsId": null, + "DistanceToStreetNumeric": null, + "PublicSurveyTownship": null, + "ListAgentMiddleName": "Tyrell", + "OwnerPays": [], + "BedroomsPossible": 8, + "BuyerAgentVoiceMailExt": null, + "BuyerOfficePhone": null, + "RoadResponsibility": [], + "ListingAgreement": null, + "PublicSurveySection": null, + "CoListOfficeEmail": null, + "AssociationName2": "Spinka LLC", + "ListingId": "5dba1ffa4aa4055b9f2a5937", + "DocumentsChangeTimestamp": null, + "CommunityFeatures": [], + "ShowingStartTime": null, + "BathroomsTotalInteger": 7, + "ParkManagerName": null, + "MapCoordinate": null, + "RoomsTotal": 24, + "DistanceToPlaceofWorshipComments": null, + "ListAgentOfficePhoneExt": null, + "BuildingAreaUnits": "Square Meteres", + "City": "Pourosmouth", + "OwnerPhone": null, + "InternetEntireListingDisplayYN": false, + "CropsIncludedYN": null, + "BuyerAgentOfficePhone": null, + "GrazingPermitsBlmYN": null, + "BuyerAgencyCompensation": null, + "CoBuyerOfficeKeyNumeric": null, + "LeaseExpiration": null, + "ListAgentNameSuffix": null, + "ShowingAdvanceNotice": null, + "SerialX": null, + "InternetAutomatedValuationDisplayYN": false, + "BuyerAgentTollFreePhone": null, + "SerialU": null, + "TaxYear": 2018, + "Telephone": [ + "Installed" + ], + "DirectionFaces": "East", + "SourceSystemName": null, + "PossibleUse": [], + "Furnished": null, + "DistanceToSchoolBusComments": null, + "ConstructionMaterials": [ + "Brick" + ], + "SuppliesExpense": null, + "ListOfficeURL": null, + "RangeArea": null, + "ListingInputOriginalMedia": null, + "OccupantName": "Asha Donald Pollich", + "BuyerOfficeKey": null, + "ShowingEndTime": null, + "TaxOtherAnnualAssessmentAmount": null, + "PrivateRemarks": "Inventore quae modi saepe. Accusantium beatae laboriosam distinctio laudantium. Quod a corrupti in.\n \r\tNihil vitae qui animi numquam. Dolorem aut doloribus explicabo officia aut eveniet enim at. Iusto nam enim voluptate at atque voluptates ipsum voluptate.\n \r\tAssumenda quas exercitationem in voluptatem eos. Quo est similique perspiciatis ut natus et dolores. Debitis ut aut facilis dignissimos cum debitis.\n \r\tVoluptas iusto soluta vitae debitis. Eaque qui consequatur quia eius. Dicta aliquam hic minima sunt aut magni et.", + "InternetConsumerCommentYN": false, + "BuildingAreaTotal": 1614323, + "YearBuiltSource": "Estimate", + "OtherEquipment": [ + "Central Vacuum Nozzle", + "Intercom" + ], + "HabitableResidenceYN": null, + "PestControlExpense": null, + "LaborInformation": [], + "LandLeaseAmountFrequency": "Quarterly", + "BedroomsTotal": 4, + "ShowingInstructions": "Hic doloribus in labore dicta culpa. Est illum voluptatum ratione labore voluptas totam qui repudiandae. Id dolorem optio autem asperiores alias quia non sit. Molestiae ut qui ut quod dolor distinctio est. Sit reiciendis consequuntur repudiandae excepturi voluptates earum labore.\n \r\tDucimus fugit nihil ut consequuntur aut aut quisquam amet. Nihil nobis sit et delectus dolores. Asperiores voluptatem nisi omnis eaque hic doloremque ut amet.\n \r\tQui odio sunt doloremque veritatis. Et mollitia nostrum dicta omnis exercitationem quo aut aspernatur. Ut nemo praesentium quod id accusantium. Rerum in molestias dolorem impedit provident ducimus.\n \r\tEos in molestiae laudantium vitae nemo. Laborum est odio ut rem ut. Nulla dolores nihil aliquid at assumenda dolore.", + "CoBuyerOfficeEmail": null, + "CoListAgentDesignation": [], + "CoListAgentDirectPhone": null, + "CoolingYN": true, + "GreenSustainability": [], + "InsuranceExpense": null, + "ListAgentKey": "M_5dba1fa5a2a50c5b81f087b1", + "OnMarketDate": "2018-11-06", + "CarportSpaces": 2, + "LotSizeUnits": null, + "ListAgentEmail": null, + "ContractStatusChangeDate": "2019-04-04", + "BuyerAgentHomePhone": null, + "LeaseAmountFrequency": null, + "MajorChangeTimestamp": null, + "ElevationUnits": "Feet", + "CoBuyerAgentEmail": null, + "WalkScore": null, + "GarageYN": true, + "HoursDaysOfOperation": [], + "BuyerAgentPreferredPhoneExt": null, + "DistanceToWaterUnits": null, + "Make": null, + "Longitude": -118.240256, + "AvailabilityDate": "2020-01-07", + "TaxTract": "Lot 51 of Block 81 of Tract 2096 of Hermanmouth", + "Skirt": [], + "BuyerAgentURL": null, + "BuyerOfficeFax": null, + "CarportYN": true, + "PublicRemarks": "Cupiditate distinctio dolorem ratione animi aut. Dolorum blanditiis laboriosam et consectetur rem rerum. Natus dolores dolorum labore rerum quibusdam doloremque. Aliquam nemo consequatur iste et. Error laborum vitae numquam molestias id eligendi ea.\n \r\tImpedit magnam delectus et minus esse. Et itaque deserunt temporibus. Sunt natus placeat perferendis pariatur provident. Aut voluptas blanditiis tempora id animi alias dolores sequi. Beatae ut quia veniam sequi.\n \r\tSequi qui deserunt facilis omnis non. Deleniti vitae quis enim sunt eaque eos. Distinctio et exercitationem sint dolorem et.\n \r\tLaudantium omnis magnam voluptatibus qui occaecati laborum autem. Voluptates hic explicabo dolorem quaerat veritatis. Rerum explicabo vitae dignissimos id.", + "FinancialDataSource": [ + "Listing Broker", + "Not Available" + ], + "CoBuyerAgentKey": null, + "PostalCity": null, + "CurrentFinancing": [], + "CableTvExpense": null, + "NumberOfSeparateElectricMeters": null, + "ElementarySchoolDistrict": "Arkansas", + "NumberOfFullTimeEmployees": null, + "OffMarketTimestamp": null, + "CoBuyerOfficeFax": null, + "CoBuyerAgentFirstName": null, + "CoBuyerAgentPager": null, + "CoListOfficeName": null, + "PurchaseContractDate": null, + "ListAgentVoiceMailExt": null, + "RoadSurfaceType": [ + "Rock" + ], + "ListAgentPager": null, + "PriceChangeTimestamp": "2019-07-03T15:14:33.485Z", + "MapURL": null, + "CoListAgentPager": null, + "LeasableArea": null, + "ListingContractDate": "2019-10-30", + "CoListOfficeKey": null, + "MLSAreaMinor": null, + "FarmLandAreaUnits": null, + "Zoning": "CPO", + "ListAgentAOR": null, + "CoBuyerAgentKeyNumeric": null, + "GreenIndoorAirQuality": [], + "LivingAreaSource": "Assessor", + "MaintenanceExpense": null, + "BuyerAgentVoiceMail": null, + "DistanceToElectricNumeric": null, + "ListAOR": null, + "BelowGradeFinishedArea": 2073, + "CoBuyerOfficeName": null, + "ListOfficeName": "Kovacek LLC Realty", + "TaxBlock": "Lot 12 of Block 59 of Tract 1805 of New Vernville", + "CoListAgentTollFreePhone": null, + "BuyerFinancing": [ + "Assumed", + "Cash", + "Contract", + "Conventional", + "FHA", + "FHA 203(b)", + "FHA 203(k)" + ], + "GreenLocation": [], + "MobileWidth": null, + "GrazingPermitsPrivateYN": null, + "Basement": [ + "voluptas", + "culpa", + "incidunt", + "quo", + "reprehenderit" + ], + "BusinessType": [ + "Advertising" + ], + "DualVariableCompensationYN": false, + "Latitude": 34.06503, + "NumberOfSeparateGasMeters": null, + "PhotosChangeTimestamp": null, + "ListPrice": 763189, + "RoadFrontageType": [], + "BuyerAgentKeyNumeric": null, + "ListAgentTollFreePhone": null, + "DistanceToGasUnits": null, + "DistanceToPlaceofWorshipNumeric": null, + "ListOfficePhone": null, + "CoListAgentFax": null, + "GreenEnergyGeneration": [], + "DOH1": null, + "DOH2": null, + "FoundationArea": 7855929, + "DOH3": null, + "BelowGradeFinishedAreaSource": "Agent", + "CoBuyerOfficeKey": null, + "CoListAgentHomePhone": null, + "ElectricExpense": null, + "CoListOfficeMlsId": null, + "DistanceToElectricComments": null, + "CoBuyerOfficePhoneExt": null, + "AssociationFee2Frequency": "Bi-Weekly", + "CoListAgentVoiceMailExt": null, + "StateOrProvince": "New Mexico", + "AboveGradeFinishedAreaUnits": "Square Feet", + "DistanceToSewerComments": null, + "ListOfficeAOR": null, + "StreetAdditionalInfo": null, + "GreenBuildingVerificationType": null, + "CoveredSpaces": 2, + "MiddleOrJuniorSchool": "Hahn Group", + "AssociationFeeIncludes": [ + "Water", + "Trash", + "Maintenance Grounds", + "Cable TV", + "Security", + "Maintenance Exterior" + ], + "CoListAgentMobilePhone": null, + "ConcessionsComments": null, + "SyndicateTo": [ + "Zillow" + ], + "VirtualTourURLUnbranded": null, + "Gas": [ + "Private LP Tank" + ], + "CoListAgentEmail": null, + "LandLeaseExpirationDate": null, + "FrontageLength": "170", + "WorkmansCompensationExpense": null, + "ListOfficeKeyNumeric": null, + "CoListOfficeAOR": null, + "Disclosures": [], + "ListOfficeKey": "O_5dba1f95cf17cd5b43eb02a3", + "DistanceToGasNumeric": null, + "FireplaceYN": false, + "BathroomsThreeQuarter": 1, + "CoBuyerAgentCellPhone": null, + "BridgeModificationTimestamp": "2019-10-25T18:37:53.520Z", + "YearBuiltEffective": null, + "EntryLevel": null, + "ListAgentFullName": "Dario Tyrell Kling", + "TaxBookNumber": null, + "DistanceToSchoolBusNumeric": null, + "ListAgentMobilePhone": null, + "ShowingContactPhoneExt": null, + "MainLevelBathrooms": 1, + "PropertyCondition": [], + "FrontageType": [ + "Golf Course", + "Lakefront" + ], + "Stories": 1, + "DevelopmentStatus": [], + "GrossIncome": null, + "ParcelNumber": "1519", + "ShowingDays": null, + "CoBuyerAgentAOR": null, + "ShowingRequirements": null, + "UnitsFurnished": null, + "FuelExpense": null, + "CoListAgentVoiceMail": null, + "FoundationDetails": [ + "Slurry" + ], + "View": [], + "SignOnPropertyYN": true, + "OperatingExpense": null, + "LeaseRenewalOptionYN": null, + "LeaseRenewalCompensation": [], + "YearBuiltDetails": "Aut quia placeat aut eveniet non. Odio maxime accusantium molestiae. Tenetur omnis at iusto. Velit excepturi rerum ipsam id rerum pariatur sit.", + "BuyerAgentPager": null, + "HighSchool": "Schamberger-Walsh", + "LeaseConsideredYN": true, + "HomeWarrantyYN": true, + "Levels": [ + "One Level", + "Two Level", + "Split Level", + "Three or More Level" + ], + "OperatingExpenseIncludes": [], + "StreetSuffixModifier": null, + "IDXParticipationYN": true, + "DistanceToFreewayNumeric": null, + "ListAgentLastName": "Kling", + "ListAgentURL": null, + "InteriorFeatures": [ + "Nesciunt minima consequatur facere. Ut eaque soluta nostrum magnam. Deleniti omnis eaque natus similique. Non voluptatem minus eligendi non cupiditate occaecati. Expedita ab vero esse ut temporibus." + ], + "LockBoxType": [ + "Laborum rerum totam corporis quas at quis. Rem nostrum tempore exercitationem soluta rerum sit eum dolor. Nisi quisquam dolorem non suscipit sed delectus. Nemo harum saepe soluta." + ], + "OffMarketDate": null, + "CoBuyerAgentMlsId": null, + "PowerProductionType": null, + "DistanceToPhoneServiceNumeric": null, + "DistanceToWaterComments": null, + "CloseDate": "2019-04-20", + "ApprovalStatus": null, + "StreetSuffix": null, + "DistanceToPhoneServiceUnits": null, + "HorseAmenities": [], + "ListAgentMlsId": "5dba1fa5a2a50c5b81f087b2", + "CoListAgentNameSuffix": null, + "ListOfficePhoneExt": null, + "WaterSewerExpense": null, + "GrazingPermitsForestServiceYN": null, + "LotSizeDimensions": "436 x 616 x 250 x 358", + "ModificationTimestamp": "2019-07-06T08:30:25.226Z", + "PropertyAttachedYN": false, + "BuyerAgentKey": null, + "TaxLot": "Lot 6 of Block 68 of Tract 3220 of Jarvisfurt", + "BusinessName": "Terry-Russel", + "BuyerAgentEmail": null, + "Coordinates": [ + -118.240256, + 34.06503 + ], + "AccessCode": "6h9e", + "CoBuyerOfficeMlsId": null, + "ListAgentNamePrefix": null, + "OriginatingSystemID": "test", + "HorseYN": false, + "LotDimensionsSource": "Assessor", + "Country": "US", + "UnitNumber": null, + "CoListAgentPreferredPhoneExt": null, + "OpenParkingYN": false, + "TransactionBrokerCompensation": null, + "LeasableAreaUnits": null, + "MobileLength": null, + "CoBuyerOfficeAOR": null, + "NumberOfUnitsVacant": null, + "ListOfficeMlsId": "5dba1f95cf17cd5b43eb02a4", + "Inclusions": "Ipsum adipisci eveniet blanditiis. Et eum quia est. Quisquam eum modi soluta rerum maxime perferendis suscipit.", + "ListTeamKeyNumeric": null, + "ListAgentDirectPhone": null, + "CoBuyerAgentOfficePhone": null, + "VacancyAllowance": null, + "AssociationPhone": "776-887-5296", + "ConcessionsAmount": null, + "VirtualTourURLBranded": null, + "RoomType": null, + "CoListAgentFullName": null, + "CoListAgentKey": null, + "BelowGradeFinishedAreaUnits": "Square Meteres", + "CoListAgentMiddleName": null, + "CoListOfficeURL": null, + "RentControlYN": null, + "EntryLocation": "Elevator", + "BuyerAgentMobilePhone": null, + "SpaYN": false, + "SpaFeatures": [], + "ShowingContactPhone": "1-419-214-6506 x5022", + "BuyerAgentFirstName": null, + "DistanceToPlaceofWorshipUnits": null, + "ExistingLeaseType": [], + "BathroomsHalf": 4, + "GardnerExpense": null, + "LotSizeArea": null, + "Sewer": [ + "Septic" + ], + "ExpirationDate": null, + "SyndicationRemarks": null, + "Model": null, + "BuyerAgentLastName": null, + "MaloneId": null, + "ListAgentStateLicense": null, + "StreetName": null, + "ShowingAttendedYN": null, + "AboveGradeFinishedAreaSource": "Agent", + "ListOfficeFax": null, + "AnchorsCoTenants": "Murray, Volkman and Wunsch,Hilll-Ledner,Rodriguez LLC,Ortiz, Strosin and Friesen,Beahan, Steuber and Crist", + "PatioAndPorchFeatures": [ + "consectetur", + "facere", + "dignissimos", + "ducimus", + "beatae", + "et", + "inventore" + ], + "BuyerAgentCellPhone": null, + "NumberOfLots": null, + "ParkManagerPhone": null, + "ListTeamName": null, + "MainLevelBedrooms": null, + "CityRegion": "Adityahaven", + "NumberOfPartTimeEmployees": null, + "LockBoxSerialNumber": "5s8tpgiu8lf3mrphn720ti5xy", + "DistanceToBusUnits": null, + "Utilities": [], + "FireplaceFeatures": [ + "One", + "Living Room Fireplace", + "Wood", + "Gas" + ], + "WindowFeatures": [], + "SpecialListingConditions": [ + "Standard", + "REO" + ], + "NewConstructionYN": false, + "BuyerAgentAOR": null, + "ParkName": null, + "NumberOfBuildings": null, + "GarageSpaces": 4, + "OriginalListPrice": 795027, + "AssociationFee2": 80, + "HoursDaysOfOperationDescription": null, + "GreenEnergyEfficient": [ + "Energy efficient doors", + "Energy efficient windows" + ], + "Media": [ + { + "Order": 1, + "MediaURL": "https://s3.amazonaws.com/retsly-importd-production/test_data/listings/34.jpg", + "ResourceRecordKey": "ME_KEY_5dba1ffa4aa4055b9f2a592f", + "ResourceName": "Property", + "ClassName": "Business", + "MediaCategory": "Photo", + "MimeType": "image/jpeg", + "MediaObjectID": "ME_5dba1ffa4aa4055b9f2a592f", + "ShortDescription": "Inflammatio sequi vester alias vociferor." + }, + { + "Order": 2, + "MediaURL": "https://s3.amazonaws.com/retsly-importd-production/test_data/listings/20.jpg", + "ResourceRecordKey": "ME_KEY_5dba1ffa4aa4055b9f2a5930", + "ResourceName": "Property", + "ClassName": "Business", + "MediaCategory": "Photo", + "MimeType": "image/jpeg", + "MediaObjectID": "ME_5dba1ffa4aa4055b9f2a5930", + "ShortDescription": "Consequatur rerum abstergo adfectus stillicidium." + }, + { + "Order": 3, + "MediaURL": "https://s3.amazonaws.com/retsly-importd-production/test_data/listings/23.jpg", + "ResourceRecordKey": "ME_KEY_5dba1ffa4aa4055b9f2a5931", + "ResourceName": "Property", + "ClassName": "Business", + "MediaCategory": "Photo", + "MimeType": "image/jpeg", + "MediaObjectID": "ME_5dba1ffa4aa4055b9f2a5931", + "ShortDescription": "Omnis armo suadeo corrupti varius." + }, + { + "Order": 4, + "MediaURL": "https://s3.amazonaws.com/retsly-importd-production/test_data/listings/31.jpg", + "ResourceRecordKey": "ME_KEY_5dba1ffa4aa4055b9f2a5932", + "ResourceName": "Property", + "ClassName": "Business", + "MediaCategory": "Photo", + "MimeType": "image/jpeg", + "MediaObjectID": "ME_5dba1ffa4aa4055b9f2a5932", + "ShortDescription": "Beatus ut sed abscido." + }, + { + "Order": 5, + "MediaURL": "https://s3.amazonaws.com/retsly-importd-production/test_data/listings/14.jpg", + "ResourceRecordKey": "ME_KEY_5dba1ffa4aa4055b9f2a5933", + "ResourceName": "Property", + "ClassName": "Business", + "MediaCategory": "Photo", + "MimeType": "image/jpeg", + "MediaObjectID": "ME_5dba1ffa4aa4055b9f2a5933", + "ShortDescription": "Tersus surculus cinis viduata crux tyrannus." + }, + { + "Order": 6, + "MediaURL": "https://s3.amazonaws.com/retsly-importd-production/test_data/listings/35.jpg", + "ResourceRecordKey": "ME_KEY_5dba1ffa4aa4055b9f2a5934", + "ResourceName": "Property", + "ClassName": "Business", + "MediaCategory": "Photo", + "MimeType": "image/jpeg", + "MediaObjectID": "ME_5dba1ffa4aa4055b9f2a5934", + "ShortDescription": "Crastinus verbum crebro tot." + }, + { + "Order": 7, + "MediaURL": "https://s3.amazonaws.com/retsly-importd-production/test_data/listings/01.jpg", + "ResourceRecordKey": "ME_KEY_5dba1ffa4aa4055b9f2a5935", + "ResourceName": "Property", + "ClassName": "Business", + "MediaCategory": "Photo", + "MimeType": "image/jpeg", + "MediaObjectID": "ME_5dba1ffa4aa4055b9f2a5935", + "ShortDescription": "Audax unde ceno beatae." + } + ], + "CapRate": null, + "RentIncludes": [], + "DistanceToSchoolsUnits": null, + "BuyerOfficeKeyNumeric": null, + "UnitTypeType": null, + "AccessibilityFeatures": [], + "FarmLandAreaSource": null, + "HighSchoolDistrict": "Colorado", + "OriginalEntryTimestamp": "2019-10-29T23:28:48.759Z", + "BuildingFeatures": [ + "Elevator", + "Lounge", + "Cafeteria", + "Concierge Service" + ], + "OwnershipType": null, + "SourceSystemKey": null, + "Ownership": "Partnership", + "BuyerAgentMlsId": null, + "OwnerName": null, + "Exclusions": "In ut vel placeat culpa rerum non perspiciatis sint. Recusandae odio sunt sit qui sint et ipsam. Et et qui blanditiis porro quia. Laudantium illum cumque quidem mollitia harum qui ut ut.", + "CopyrightNotice": "Qui illo odio veniam maxime sit error. Tempora officia voluptatum ab sunt earum ea. Alias quia minus est iure minus recusandae quae aut.\n \r\tProvident praesentium explicabo hic laboriosam qui hic. Minima placeat quis doloribus eaque eaque dolore odit. Esse minima quia minima nihil ut voluptas voluptas.", + "ShowingContactName": "Janiya Napoleon Friesen", + "MobileDimUnits": null, + "LotFeatures": [ + "accusamus", + "atque", + "excepturi", + "suscipit", + "ipsum" + ], + "CoBuyerAgentOfficePhoneExt": null, + "License3": null, + "PostalCode": "19194-6204", + "License1": null, + "License2": null, + "BuyerOfficeMlsId": null, + "DocumentsAvailable": [], + "DistanceToShoppingUnits": null, + "NumberOfUnitsTotal": 16, + "BuyerOfficeName": null, + "AssociationFee": 66, + "LeaseAmount": null, + "LotSizeSquareFeet": 1090, + "DistanceToSewerUnits": null, + "CoBuyerAgentFullName": null, + "TenantPays": [], + "MiddleOrJuniorSchoolDistrict": "Alaska", + "DistanceToShoppingComments": null, + "Electric": [], + "ArchitecturalStyle": [ + "qui", + "laboriosam", + "sapiente", + "mollitia" + ], + "MobileHomeRemainsYN": null, + "NewTaxesExpense": null, + "VideosChangeTimestamp": null, + "CoBuyerOfficeURL": null, + "TaxStatusCurrent": [], + "UnparsedAddress": null, + "OpenParkingSpaces": 2, + "CoListOfficePhone": null, + "TransactionBrokerCompensationType": null, + "WoodedArea": null, + "LicensesExpense": null, + "BuyerOfficeEmail": null, + "CoListAgentAOR": null, + "CoBuyerAgentFax": null, + "FeedTypes": [], + "url": "api.bridgedataoutput.com/api/v2/test/listings/P_5dba1ffa4aa4055b9f2a5936" +} \ No newline at end of file diff --git a/components/bright_data/actions/scrape-serp/scrape-serp.mjs b/components/bright_data/actions/scrape-serp/scrape-serp.mjs new file mode 100644 index 0000000000000..ddfdc9d2ff253 --- /dev/null +++ b/components/bright_data/actions/scrape-serp/scrape-serp.mjs @@ -0,0 +1,73 @@ +import brightData from "../../bright_data.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "bright_data-scrape-serp", + name: "Scrape SERP", + description: "Extract search engine results using Bright Data SERP API. [See the documentation](https://docs.brightdata.com/api-reference/rest-api/serp/scrape-serp)", + version: "0.0.1", + type: "action", + props: { + brightData, + url: { + propDefinition: [ + brightData, + "url", + ], + description: "Complete target URL to scrape. Must include protocol (http/https), be publicly accessible. Example: `https://www.google.com/search?q=pizza`", + }, + zone: { + propDefinition: [ + brightData, + "zone", + () => ({ + type: "serp", + }), + ], + }, + format: { + propDefinition: [ + brightData, + "format", + ], + }, + method: { + propDefinition: [ + brightData, + "method", + ], + }, + country: { + propDefinition: [ + brightData, + "country", + ], + }, + dataFormat: { + propDefinition: [ + brightData, + "dataFormat", + ], + }, + }, + async run({ $ }) { + const data = await this.brightData.requestWebsite({ + $, + data: { + url: this.url, + zone: this.zone, + format: this.format, + method: this.method, + country: this.country, + data_format: this.dataFormat, + }, + }); + + if (data.status_code === 400) { + throw new ConfigurationError(data.body); + } + + $.export("$summary", `Scraped SERP for ${this.url}`); + return data; + }, +}; diff --git a/components/bright_data/actions/scrape-website/scrape-website.mjs b/components/bright_data/actions/scrape-website/scrape-website.mjs new file mode 100644 index 0000000000000..21d4608ee0ce3 --- /dev/null +++ b/components/bright_data/actions/scrape-website/scrape-website.mjs @@ -0,0 +1,49 @@ +import brightData from "../../bright_data.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "bright_data-scrape-website", + name: "Scrape Website", + description: "Scrape a website and return the HTML. [See the documentation](https://docs.brightdata.com/api-reference/web-scraper-api/synchronous-requests)", + version: "0.0.1", + type: "action", + props: { + brightData, + datasetId: { + propDefinition: [ + brightData, + "datasetId", + ], + }, + url: { + propDefinition: [ + brightData, + "url", + ], + description: "The URL of the website to scrape", + }, + }, + async run({ $ }) { + try { + const data = await this.brightData.scrapeWebsite({ + $, + params: { + dataset_id: this.datasetId, + }, + data: { + input: [ + { + url: this.url, + }, + ], + }, + }); + + $.export("$summary", `Scraped website ${this.url}`); + return data; + } catch (error) { + const errors = (JSON.parse(error.message)).errors; + throw new ConfigurationError(errors.map((e) => e.join(" - ")).join(" | ")); + } + }, +}; diff --git a/components/bright_data/actions/unlock-website/unlock-website.mjs b/components/bright_data/actions/unlock-website/unlock-website.mjs new file mode 100644 index 0000000000000..022c30c7d7fd8 --- /dev/null +++ b/components/bright_data/actions/unlock-website/unlock-website.mjs @@ -0,0 +1,67 @@ +import brightData from "../../bright_data.app.mjs"; + +export default { + key: "bright_data-unlock-website", + name: "Unlock Website", + description: "Send an API call to a URL and get the HTML back. Enables you to bypass anti-bot measures, manages proxies, and solves CAPTCHAs automatically for easier web data collection. [See the documentation](https://docs.brightdata.com/api-reference/rest-api/unlocker/unlock-website)", + version: "0.0.1", + type: "action", + props: { + brightData, + url: { + propDefinition: [ + brightData, + "url", + ], + }, + zone: { + propDefinition: [ + brightData, + "zone", + () => ({ + type: "unblocker", + }), + ], + }, + format: { + propDefinition: [ + brightData, + "format", + ], + }, + method: { + propDefinition: [ + brightData, + "method", + ], + }, + country: { + propDefinition: [ + brightData, + "country", + ], + }, + dataFormat: { + propDefinition: [ + brightData, + "dataFormat", + ], + }, + }, + async run({ $ }) { + const data = await this.brightData.requestWebsite({ + $, + data: { + url: this.url, + zone: this.zone, + format: this.format, + method: this.method, + country: this.country, + data_format: this.dataFormat, + }, + }); + + $.export("$summary", `Unlocked website ${this.url}`); + return data; + }, +}; diff --git a/components/bright_data/bright_data.app.mjs b/components/bright_data/bright_data.app.mjs index f0f75c0ae5df8..685d77adc0d8f 100644 --- a/components/bright_data/bright_data.app.mjs +++ b/components/bright_data/bright_data.app.mjs @@ -1,11 +1,111 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "bright_data", - propDefinitions: {}, + propDefinitions: { + datasetId: { + type: "string", + label: "Dataset ID", + description: "The ID of the dataset to use", + async options() { + const datasets = await this.listDatasets(); + return datasets.map((dataset) => ({ + label: dataset.name, + value: dataset.id, + })); + }, + }, + zone: { + type: "string", + label: "Zone", + description: "Zone identifier that defines your Bright Data product configuration. Each zone contains targeting rules, output preferences, and access permissions. Manage zones at: https://brightdata.com/cp/zones", + async options({ type }) { + const zones = await this.listZones(); + return zones?.filter((zone) => zone.type === type)?.map(({ name }) => name) || []; + }, + }, + url: { + type: "string", + label: "URL", + description: "Complete target URL to scrape. Must include protocol (http/https), be publicly accessible.", + }, + format: { + type: "string", + label: "Format", + description: "Output format of the response", + options: [ + "json", + "raw", + ], + }, + method: { + type: "string", + label: "Method", + description: "HTTP method to use for the request", + options: [ + "GET", + "POST", + ], + optional: true, + }, + country: { + type: "string", + label: "Country", + description: "Two-letter ISO 3166-1 country code for proxy location", + optional: true, + }, + dataFormat: { + type: "string", + label: "Data Format", + description: "Additional response format transformation: `markdown` converts HTML content to clean markdown format, `screenshot` captures a PNG image of the rendered page.", + options: [ + "markdown", + "screenshot", + ], + optional: true, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://api.brightdata.com"; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: { + Authorization: `Bearer ${this.$auth.api_key}`, + }, + ...opts, + }); + }, + listDatasets(opts = {}) { + return this._makeRequest({ + path: "/datasets/list", + ...opts, + }); + }, + listZones(opts = {}) { + return this._makeRequest({ + path: "/zone/get_active_zones", + ...opts, + }); + }, + scrapeWebsite(opts = {}) { + return this._makeRequest({ + path: "/datasets/v3/scrape", + method: "POST", + ...opts, + }); + }, + requestWebsite(opts = {}) { + return this._makeRequest({ + path: "/request", + method: "POST", + ...opts, + }); }, }, }; diff --git a/components/bright_data/package.json b/components/bright_data/package.json index 55f14def56bad..38a7e9881c29e 100644 --- a/components/bright_data/package.json +++ b/components/bright_data/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/bright_data", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream Bright Data Components", "main": "bright_data.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } -} \ No newline at end of file +} diff --git a/components/browserless/actions/convert-html-to-pdf/convert-html-to-pdf.mjs b/components/browserless/actions/convert-html-to-pdf/convert-html-to-pdf.mjs index c1dedb586a5b8..0ab254ebeaced 100644 --- a/components/browserless/actions/convert-html-to-pdf/convert-html-to-pdf.mjs +++ b/components/browserless/actions/convert-html-to-pdf/convert-html-to-pdf.mjs @@ -1,44 +1,63 @@ -// legacy_hash_id: a_B0ip1E -import { axios } from "@pipedream/platform"; +import browserless from "../../browserless.app.mjs"; +import fs from "fs"; export default { key: "browserless-convert-html-to-pdf", name: "Generate PDF from HTML String", description: "See https://docs.browserless.io/docs/pdf.html", - version: "0.4.1", + version: "0.4.2", type: "action", props: { - browserless: { - type: "app", - app: "browserless", - }, + browserless, html: { type: "string", label: "HTML String", description: "HTML to render as a PDF", }, + downloadPath: { + type: "string", + label: "Download Path", + description: "Download the screenshot to the `/tmp` directory with the specified filename", + optional: true, + }, + syncDir: { + type: "dir", + accessMode: "write", + sync: true, + }, + }, + methods: { + async downloadToTMP(screenshot) { + const path = this.downloadPath.includes("/tmp") + ? this.downloadPath + : `/tmp/${this.downloadPath}`; + fs.writeFileSync(path, screenshot); + return path; + }, }, async run({ $ }) { const { html } = this; - const data = await axios($, { - method: "POST", - url: `https://chrome.browserless.io/pdf?token=${this.browserless.$auth.api_key}`, - headers: { - "Cache-Control": "no-cache", - "Content-Type": "application/json", - }, - responseType: "arraybuffer", + const data = await this.browserless.convertHtmlToPdf({ + $, data: { html, - options: { - displayHeaderFooter: true, - printBackground: false, - format: "Letter", - }, }, }); - $.export("pdf", Buffer.from(data, "binary").toString("base64")); + const result = { + pdf: Buffer.from(data, "binary").toString("base64"), + }; + + if (data && this.downloadPath) { + const filePath = await this.downloadToTMP(data); + result.filePath = filePath; + } + + if (data) { + $.export("$summary", "Successfully generated PDF from HTML string."); + } + + return result; }, }; diff --git a/components/browserless/actions/scrape-url-list/scrape-url-list.mjs b/components/browserless/actions/scrape-url-list/scrape-url-list.mjs index 1881878120071..da5a6cb295c21 100644 --- a/components/browserless/actions/scrape-url-list/scrape-url-list.mjs +++ b/components/browserless/actions/scrape-url-list/scrape-url-list.mjs @@ -4,7 +4,7 @@ export default { key: "browserless-scrape-url-list", name: "Scrape URL List", description: "Scrape content from a list of pages. [See the documentation](https://www.browserless.io/docs/scrape).", - version: "0.0.2", + version: "0.0.3", type: "action", props: { browserless, @@ -28,10 +28,9 @@ export default { } const result = {}; - const promises = []; for (const url of this.urls) { - promises.push(this.browserless.scrape({ + const response = await this.browserless.scrape({ $, data: { url, @@ -39,12 +38,8 @@ export default { selector, })), }, - })); - } - - const responses = await Promise.all(promises); - for (let i = 0; i < promises.length; i++) { - result[this.urls[i]] = responses[i].data[0].results[0].text; + }); + result[url] = response.data[0].results[0].text; } return result; diff --git a/components/browserless/actions/scrape-url/scrape-url.mjs b/components/browserless/actions/scrape-url/scrape-url.mjs index 820dd41baf337..2ef0c23d07d31 100644 --- a/components/browserless/actions/scrape-url/scrape-url.mjs +++ b/components/browserless/actions/scrape-url/scrape-url.mjs @@ -4,7 +4,7 @@ export default { key: "browserless-scrape-url", name: "Scrape URL", description: "Scrape content from a page. [See the documentation](https://www.browserless.io/docs/scrape).", - version: "0.0.2", + version: "0.0.3", type: "action", props: { browserless, diff --git a/components/browserless/actions/take-screenshot/take-screenshot.mjs b/components/browserless/actions/take-screenshot/take-screenshot.mjs index d8d4b08f5d000..1da3ef8df2ebb 100644 --- a/components/browserless/actions/take-screenshot/take-screenshot.mjs +++ b/components/browserless/actions/take-screenshot/take-screenshot.mjs @@ -5,7 +5,7 @@ export default { key: "browserless-take-screenshot", name: "Take a Screenshot", description: "Take a screenshot of a page. [See the documentation](https://www.browserless.io/docs/screenshot)", - version: "0.5.4", + version: "0.5.5", type: "action", props: { browserless, @@ -20,10 +20,10 @@ export default { description: "Download the screenshot to the `/tmp` directory with the specified filename", optional: true, }, - waitFor: { + waitForSelector: { type: "string", - label: "waitFor", - description: "Allows you to wait for a selector to appear in the DOM, to wait for a timeout to happen, or to execute a custom function before screenshotting. See [more details in the API Doc](https://www.browserless.io/docs/screenshot#custom-behavior-with-waitfor)", + label: "Selector", + description: "Allows you to wait for a selector to appear in the DOM. See [more details in the API Doc](https://www.browserless.io/docs/screenshot#custom-behavior-with-waitfor)", optional: true, }, syncDir: { @@ -45,9 +45,10 @@ export default { const screenshot = await this.browserless.takeScreenshot({ data: { url: this.url, - waitFor: !isNaN(this.waitFor) - ? parseInt(this.waitFor) - : this.waitFor, + bestAttempt: true, + waitForSelector: this.waitForSelector + ? `{ "selector": "${this.waitForSelector}" }` + : undefined, }, $, }); diff --git a/components/browserless/browserless.app.mjs b/components/browserless/browserless.app.mjs index 1dabf9b06a7e0..6f2581ed05e13 100644 --- a/components/browserless/browserless.app.mjs +++ b/components/browserless/browserless.app.mjs @@ -1,4 +1,5 @@ import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; export default { type: "app", @@ -6,7 +7,10 @@ export default { propDefinitions: {}, methods: { _baseUrl() { - return "https://chrome.browserless.io"; + if (!this.$auth.base_url) { + throw new ConfigurationError("Please reconnect your Browserless account because there are recent changes in Browserless API"); + } + return `https://${this.$auth.base_url}`; }, _auth() { return { @@ -50,5 +54,13 @@ export default { ...opts, }); }, + convertHtmlToPdf(opts = {}) { + return this._makeRequest({ + path: "/pdf", + method: "post", + responseType: "arraybuffer", + ...opts, + }); + }, }, }; diff --git a/components/browserless/package.json b/components/browserless/package.json index 9bcbbb4b0ce22..8f21c17bfe564 100644 --- a/components/browserless/package.json +++ b/components/browserless/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/browserless", - "version": "0.1.3", + "version": "0.1.4", "description": "Pipedream Browserless Components", "main": "browserless.app.mjs", "keywords": [ @@ -13,7 +13,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.5.1", + "@pipedream/platform": "^3.1.0", "puppeteer-core": "^19.7.5" } } diff --git a/components/buddee/buddee.app.mjs b/components/buddee/buddee.app.mjs new file mode 100644 index 0000000000000..3004cfd7783b7 --- /dev/null +++ b/components/buddee/buddee.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "buddee", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/buddee/package.json b/components/buddee/package.json new file mode 100644 index 0000000000000..a1b6fdbebdae4 --- /dev/null +++ b/components/buddee/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/buddee", + "version": "0.0.1", + "description": "Pipedream Buddee Components", + "main": "buddee.app.mjs", + "keywords": [ + "pipedream", + "buddee" + ], + "homepage": "https://pipedream.com/apps/buddee", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/budgets_ai/.gitignore b/components/budgets_ai/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/budgets_ai/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/budgets_ai/app/budgets_ai.app.ts b/components/budgets_ai/app/budgets_ai.app.ts deleted file mode 100644 index f7a3252d050c0..0000000000000 --- a/components/budgets_ai/app/budgets_ai.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "budgets_ai", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/budgets_ai/budgets_ai.app.mjs b/components/budgets_ai/budgets_ai.app.mjs new file mode 100644 index 0000000000000..23e9f03aff065 --- /dev/null +++ b/components/budgets_ai/budgets_ai.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "budgets_ai", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/budgets_ai/package.json b/components/budgets_ai/package.json index 13e9d732fa39b..5e4c5b61448a2 100644 --- a/components/budgets_ai/package.json +++ b/components/budgets_ai/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/budgets_ai", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Budgets.ai Components", - "main": "dist/app/budgets_ai.app.mjs", + "main": "budgets_ai.app.mjs", "keywords": [ "pipedream", "budgets_ai" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/budgets_ai", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/builder_io/.gitignore b/components/builder_io/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/builder_io/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/builder_io/app/builder_io.app.ts b/components/builder_io/app/builder_io.app.ts deleted file mode 100644 index f743c05d3c351..0000000000000 --- a/components/builder_io/app/builder_io.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "builder_io", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/builder_io/builder_io.app.mjs b/components/builder_io/builder_io.app.mjs new file mode 100644 index 0000000000000..0864dc1607cda --- /dev/null +++ b/components/builder_io/builder_io.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "builder_io", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/builder_io/package.json b/components/builder_io/package.json index 8591797166d40..e31588ce5e1ce 100644 --- a/components/builder_io/package.json +++ b/components/builder_io/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/builder_io", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Builder.io Components", - "main": "dist/app/builder_io.app.mjs", + "main": "builder_io.app.mjs", "keywords": [ "pipedream", "builder_io" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/builder_io", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/burst_sms/.gitignore b/components/burst_sms/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/burst_sms/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/burst_sms/app/burst_sms.app.ts b/components/burst_sms/app/burst_sms.app.ts deleted file mode 100644 index 2e7c7e4faf7eb..0000000000000 --- a/components/burst_sms/app/burst_sms.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "burst_sms", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/burst_sms/burst_sms.app.mjs b/components/burst_sms/burst_sms.app.mjs new file mode 100644 index 0000000000000..147b17e5a62d8 --- /dev/null +++ b/components/burst_sms/burst_sms.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "burst_sms", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/burst_sms/package.json b/components/burst_sms/package.json index 30150704244ff..1594b92dbe1ca 100644 --- a/components/burst_sms/package.json +++ b/components/burst_sms/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/burst_sms", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Burst SMS Components", - "main": "dist/app/burst_sms.app.mjs", + "main": "burst_sms.app.mjs", "keywords": [ "pipedream", "burst_sms" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/burst_sms", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/buy_me_a_coffee/package.json b/components/buy_me_a_coffee/package.json index e1498a0f68e2c..d6c1633e94de3 100644 --- a/components/buy_me_a_coffee/package.json +++ b/components/buy_me_a_coffee/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/buy_me_a_coffee", - "version": "0.0.5", + "version": "0.0.6", "description": "Pipedream Buy Me a Coffee Components", "main": "dist/app/buy_me_a_coffee.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.0", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/buy_me_a_coffee/tsconfig.json b/components/buy_me_a_coffee/tsconfig.json index e4f6e612b50bf..3a9389484d040 100644 --- a/components/buy_me_a_coffee/tsconfig.json +++ b/components/buy_me_a_coffee/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/cabinpanda/.gitignore b/components/cabinpanda/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/cabinpanda/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/cabinpanda/app/cabinpanda.app.ts b/components/cabinpanda/app/cabinpanda.app.ts deleted file mode 100644 index 6eb123532ca33..0000000000000 --- a/components/cabinpanda/app/cabinpanda.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "cabinpanda", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/cabinpanda/cabinpanda.app.mjs b/components/cabinpanda/cabinpanda.app.mjs new file mode 100644 index 0000000000000..c316ec0826c73 --- /dev/null +++ b/components/cabinpanda/cabinpanda.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cabinpanda", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/cabinpanda/package.json b/components/cabinpanda/package.json index f891c12c66c05..bb498d8859174 100644 --- a/components/cabinpanda/package.json +++ b/components/cabinpanda/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/cabinpanda", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream CabinPanda Components", - "main": "dist/app/cabinpanda.app.mjs", + "main": "cabinpanda.app.mjs", "keywords": [ "pipedream", "cabinpanda" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/cabinpanda", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/calendly_v2/actions/create-scheduling-link/create-scheduling-link.mjs b/components/calendly_v2/actions/create-scheduling-link/create-scheduling-link.mjs index 3583be42f2550..5fb8d36be4281 100644 --- a/components/calendly_v2/actions/create-scheduling-link/create-scheduling-link.mjs +++ b/components/calendly_v2/actions/create-scheduling-link/create-scheduling-link.mjs @@ -1,10 +1,11 @@ import calendly from "../../calendly_v2.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; export default { key: "calendly_v2-create-scheduling-link", name: "Create a Scheduling Link", description: "Creates a single-use scheduling link. [See the documentation](https://calendly.stoplight.io/docs/api-docs/b3A6MzQyNTM0OQ-create-single-use-scheduling-link)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { calendly, @@ -23,6 +24,10 @@ export default { }, }, async run({ $ }) { + if (!this.owner) { + throw new ConfigurationError("Owner prop is required. Please provide the unique identifier of an event type."); + } + const params = {}; params.max_event_count = this.maxEventCount; params.owner = this.owner; diff --git a/components/calendly_v2/package.json b/components/calendly_v2/package.json index 944d182f36798..2e50e9fb91952 100644 --- a/components/calendly_v2/package.json +++ b/components/calendly_v2/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/calendly_v2", - "version": "1.3.1", + "version": "1.3.2", "description": "Pipedream Calendly V2 Components", "main": "calendly_v2.app.mjs", "keywords": [ diff --git a/components/call_fire/.gitignore b/components/call_fire/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/call_fire/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/call_fire/app/call_fire.app.ts b/components/call_fire/app/call_fire.app.ts deleted file mode 100644 index e54364d336e5e..0000000000000 --- a/components/call_fire/app/call_fire.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "call_fire", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/call_fire/call_fire.app.mjs b/components/call_fire/call_fire.app.mjs new file mode 100644 index 0000000000000..b6e57ea5a07e9 --- /dev/null +++ b/components/call_fire/call_fire.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "call_fire", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/call_fire/package.json b/components/call_fire/package.json index 3c7297f54fcca..ad5a55819fc0a 100644 --- a/components/call_fire/package.json +++ b/components/call_fire/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/call_fire", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream CallFire Components", - "main": "dist/app/call_fire.app.mjs", + "main": "call_fire.app.mjs", "keywords": [ "pipedream", "call_fire" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/call_fire", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/callingly/.gitignore b/components/callingly/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/callingly/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/callingly/app/callingly.app.ts b/components/callingly/app/callingly.app.ts deleted file mode 100644 index c017c5fb753e3..0000000000000 --- a/components/callingly/app/callingly.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "callingly", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/callingly/callingly.app.mjs b/components/callingly/callingly.app.mjs new file mode 100644 index 0000000000000..11b66ba132a42 --- /dev/null +++ b/components/callingly/callingly.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "callingly", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/callingly/package.json b/components/callingly/package.json index 11139d04b1d30..0bbc6460ffce0 100644 --- a/components/callingly/package.json +++ b/components/callingly/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/callingly", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Callingly Components", - "main": "dist/app/callingly.app.mjs", + "main": "callingly.app.mjs", "keywords": [ "pipedream", "callingly" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/callingly", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/callrail/.gitignore b/components/callrail/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/callrail/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/callrail/app/callrail.app.ts b/components/callrail/app/callrail.app.ts deleted file mode 100644 index fef51fa3b7640..0000000000000 --- a/components/callrail/app/callrail.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "callrail", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/callrail/callrail.app.mjs b/components/callrail/callrail.app.mjs new file mode 100644 index 0000000000000..038394510069f --- /dev/null +++ b/components/callrail/callrail.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "callrail", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/callrail/package.json b/components/callrail/package.json index d95408c4a4e11..e287c9c564ec2 100644 --- a/components/callrail/package.json +++ b/components/callrail/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/callrail", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream CallRail Components", - "main": "dist/app/callrail.app.mjs", + "main": "callrail.app.mjs", "keywords": [ "pipedream", "callrail" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/callrail", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/campaignhq/package.json b/components/campaignhq/package.json index fa710aa5ed19d..eac5ff600d82a 100644 --- a/components/campaignhq/package.json +++ b/components/campaignhq/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/campaignhq", - "version": "0.1.0", + "version": "0.1.2", "description": "Pipedream CampaignHQ Components", - "main": "dist/app/campaignhq.app.mjs", + "main": "campaignhq.app.mjs", "keywords": [ "pipedream", "campaignhq" @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/captaindata/.gitignore b/components/captaindata/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/captaindata/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/captaindata/app/captaindata.app.ts b/components/captaindata/app/captaindata.app.ts deleted file mode 100644 index 8fa2c316e1dcb..0000000000000 --- a/components/captaindata/app/captaindata.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "captaindata", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/captaindata/captaindata.app.mjs b/components/captaindata/captaindata.app.mjs new file mode 100644 index 0000000000000..da60e744237ed --- /dev/null +++ b/components/captaindata/captaindata.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "captaindata", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/captaindata/package.json b/components/captaindata/package.json index 86f168426876f..f71e7fa124423 100644 --- a/components/captaindata/package.json +++ b/components/captaindata/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/captaindata", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Captain Data Components", - "main": "dist/app/captaindata.app.mjs", + "main": "captaindata.app.mjs", "keywords": [ "pipedream", "captaindata" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/captaindata", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/capturekit/actions/capture-screenshot/capture-screenshot.mjs b/components/capturekit/actions/capture-screenshot/capture-screenshot.mjs new file mode 100644 index 0000000000000..2fc3cd2588c15 --- /dev/null +++ b/components/capturekit/actions/capture-screenshot/capture-screenshot.mjs @@ -0,0 +1,78 @@ +import app from "../../capturekit.app.mjs"; +import fs from "fs"; +import path from "path"; + +export default { + key: "capturekit-capture-screenshot", + name: "Capture Screenshot", + description: "Capture a high-quality image of any webpage. [See the documentation](https://docs.capturekit.dev/api-reference/screenshot-api)", + version: "0.0.1", + type: "action", + props: { + app, + url: { + propDefinition: [ + app, + "url", + ], + }, + format: { + propDefinition: [ + app, + "format", + ], + }, + device: { + propDefinition: [ + app, + "device", + ], + }, + cache: { + propDefinition: [ + app, + "cache", + ], + }, + fullPageScroll: { + propDefinition: [ + app, + "fullPageScroll", + ], + }, + fileName: { + propDefinition: [ + app, + "fileName", + ], + }, + syncDir: { + type: "dir", + accessMode: "write", + sync: true, + }, + }, + async run({ $ }) { + const response = await this.app.captureScreenshot({ + $, + params: { + url: this.url, + format: this.format, + device: this.device, + cache: this.cache, + full_page_scroll: this.fullPageScroll, + }, + responseType: "arraybuffer", + }); + + const fileExtension = this.format || "png"; + const fileName = `${this.fileName}.${fileExtension}`; + const filePath = path.join("/tmp", fileName); + + await fs.promises.writeFile(filePath, response); + + $.export("$summary", `Screenshot successfully saved to: ${filePath}`); + + return filePath; + }, +}; diff --git a/components/capturekit/actions/scrape-content/scrape-content.mjs b/components/capturekit/actions/scrape-content/scrape-content.mjs new file mode 100644 index 0000000000000..421fed01b6e03 --- /dev/null +++ b/components/capturekit/actions/scrape-content/scrape-content.mjs @@ -0,0 +1,63 @@ +import app from "../../capturekit.app.mjs"; + +export default { + key: "capturekit-scrape-content", + name: "Scrape Content", + description: "Extract structured data from any webpage, including metadata, links, and raw HTML. [See the documentation](https://docs.capturekit.dev/api-reference/content-api)", + version: "0.0.1", + type: "action", + props: { + app, + url: { + propDefinition: [ + app, + "url", + ], + }, + includeHtml: { + propDefinition: [ + app, + "includeHtml", + ], + }, + useDefuddle: { + propDefinition: [ + app, + "useDefuddle", + ], + }, + selector: { + propDefinition: [ + app, + "selector", + ], + }, + removeSelectors: { + propDefinition: [ + app, + "removeSelectors", + ], + }, + blockUrls: { + propDefinition: [ + app, + "blockUrls", + ], + }, + }, + async run({ $ }) { + const response = await this.app.scrapeContent({ + $, + params: { + url: this.url, + include_html: this.includeHtml, + use_defuddle: this.useDefuddle, + selector: this.selector, + remove_selectors: (this.removeSelectors || []).join(","), + block_urls: (this.blockUrls || []).join(","), + }, + }); + $.export("$summary", "Successfully sent the Scrape Content request"); + return response; + }, +}; diff --git a/components/capturekit/capturekit.app.mjs b/components/capturekit/capturekit.app.mjs index 7eb6b968ef23d..063d1832b2213 100644 --- a/components/capturekit/capturekit.app.mjs +++ b/components/capturekit/capturekit.app.mjs @@ -1,11 +1,134 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "capturekit", - propDefinitions: {}, + propDefinitions: { + url: { + type: "string", + label: "URL", + description: "Target webpage to capture", + }, + format: { + type: "string", + label: "Format", + description: "The output format of the screenshot", + optional: true, + options: [ + "webp", + "jpeg", + "jpg", + "png", + "pdf", + ], + }, + device: { + type: "string", + label: "Device", + description: "Device type used for emulation (desktop or mobile)", + optional: true, + options: [ + "iphone_14_pro_max", + "iphone_14_pro", + "iphone_13_pro_max", + "iphone_13_mini", + "galaxy_s23_ultra", + "galaxy_s23", + "galaxy_fold4", + "pixel_7_pro", + "pixel_6a", + "redmi_note_12_pro", + "redmi_note_11", + "huawei_p60_pro", + "huawei_mate_50_pro", + "iphone_x", + "iphone_12", + "pixel_5", + "galaxy_s8", + "ipad", + ], + }, + cache: { + type: "boolean", + label: "Cache", + description: "Enable or disable response caching", + optional: true, + }, + fullPageScroll: { + type: "boolean", + label: "Full Page Scroll", + description: "Scroll through the entire page before capturing", + optional: true, + }, + includeHtml: { + type: "boolean", + label: "Include HTML", + description: "Return the raw HTML content in the response", + optional: true, + }, + useDefuddle: { + type: "boolean", + label: "Use Defuddle", + description: "Use Defuddle to clean and extract the main content from web pages", + optional: true, + }, + selector: { + type: "string", + label: "Selector", + description: "Capture a specific element on the page instead of the full viewport", + optional: true, + }, + removeSelectors: { + type: "string[]", + label: "Remove Selectors", + description: "A list of elements to hide before capturing", + optional: true, + }, + blockUrls: { + type: "string[]", + label: "Block URLs", + description: "A ist of URL patterns to block. You can specify URLs, domains, or simple patterns, e.g.: `.example.com/`", + optional: true, + }, + fileName: { + type: "string", + label: "File Name", + description: "Name of the screenshot file that will be saved on /tmp", + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://api.capturekit.dev"; + }, + async _makeRequest(opts = {}) { + const { + $ = this, + path, + headers, + ...otherOpts + } = opts; + return axios($, { + ...otherOpts, + url: this._baseUrl() + path, + headers: { + "x-access-key": `${this.$auth.access_key}`, + ...headers, + }, + }); + }, + + async captureScreenshot(args = {}) { + return this._makeRequest({ + path: "/capture", + ...args, + }); + }, + + async scrapeContent(args = {}) { + return this._makeRequest({ + path: "/content", + ...args, + }); }, }, }; diff --git a/components/capturekit/package.json b/components/capturekit/package.json index e1de69709c8a1..aac0241fe2b47 100644 --- a/components/capturekit/package.json +++ b/components/capturekit/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/capturekit", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream CaptureKit Components", "main": "capturekit.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } -} \ No newline at end of file +} diff --git a/components/cartes/.gitignore b/components/cartes/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/cartes/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/cartes/app/cartes.app.ts b/components/cartes/app/cartes.app.ts deleted file mode 100644 index a7b6b63789a68..0000000000000 --- a/components/cartes/app/cartes.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "cartes", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/cartes/cartes.app.mjs b/components/cartes/cartes.app.mjs new file mode 100644 index 0000000000000..2e4cff63e1738 --- /dev/null +++ b/components/cartes/cartes.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cartes", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/cartes/package.json b/components/cartes/package.json index 07f4243716289..c859eac7e83fb 100644 --- a/components/cartes/package.json +++ b/components/cartes/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/cartes", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Cartes Components", - "main": "dist/app/cartes.app.mjs", + "main": "cartes.app.mjs", "keywords": [ "pipedream", "cartes" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/cartes", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/cascade_strategy/.gitignore b/components/cascade_strategy/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/cascade_strategy/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/cascade_strategy/app/cascade_strategy.app.ts b/components/cascade_strategy/app/cascade_strategy.app.ts deleted file mode 100644 index 37d00fca4daf4..0000000000000 --- a/components/cascade_strategy/app/cascade_strategy.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "cascade_strategy", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/cascade_strategy/cascade_strategy.app.mjs b/components/cascade_strategy/cascade_strategy.app.mjs new file mode 100644 index 0000000000000..ee878ce434732 --- /dev/null +++ b/components/cascade_strategy/cascade_strategy.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cascade_strategy", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/cascade_strategy/package.json b/components/cascade_strategy/package.json index cf9a14d4f7bce..663937ea3ebe3 100644 --- a/components/cascade_strategy/package.json +++ b/components/cascade_strategy/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/cascade_strategy", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Cascade Strategy Components", - "main": "dist/app/cascade_strategy.app.mjs", + "main": "cascade_strategy.app.mjs", "keywords": [ "pipedream", "cascade_strategy" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/cascade_strategy", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/caspio/.gitignore b/components/caspio/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/caspio/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/caspio/app/caspio.app.ts b/components/caspio/app/caspio.app.ts deleted file mode 100644 index 10262814c9ee9..0000000000000 --- a/components/caspio/app/caspio.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "caspio", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/caspio/caspio.app.mjs b/components/caspio/caspio.app.mjs new file mode 100644 index 0000000000000..0ec3c74671419 --- /dev/null +++ b/components/caspio/caspio.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "caspio", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/caspio/package.json b/components/caspio/package.json index 54097ee931087..cd10bd50c76b2 100644 --- a/components/caspio/package.json +++ b/components/caspio/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/caspio", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Caspio Components", - "main": "dist/app/caspio.app.mjs", + "main": "caspio.app.mjs", "keywords": [ "pipedream", "caspio" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/caspio", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/cdc_national_environmental_public_health_tracking/.gitignore b/components/cdc_national_environmental_public_health_tracking/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/cdc_national_environmental_public_health_tracking/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/cdc_national_environmental_public_health_tracking/app/cdc_national_environmental_public_health_tracking.app.ts b/components/cdc_national_environmental_public_health_tracking/app/cdc_national_environmental_public_health_tracking.app.ts deleted file mode 100644 index 501d488ca3cc2..0000000000000 --- a/components/cdc_national_environmental_public_health_tracking/app/cdc_national_environmental_public_health_tracking.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "cdc_national_environmental_public_health_tracking", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/cdc_national_environmental_public_health_tracking/cdc_national_environmental_public_health_tracking.app.mjs b/components/cdc_national_environmental_public_health_tracking/cdc_national_environmental_public_health_tracking.app.mjs new file mode 100644 index 0000000000000..a3b165f4ec4fe --- /dev/null +++ b/components/cdc_national_environmental_public_health_tracking/cdc_national_environmental_public_health_tracking.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cdc_national_environmental_public_health_tracking", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/cdc_national_environmental_public_health_tracking/package.json b/components/cdc_national_environmental_public_health_tracking/package.json index 4c47d724db2f2..5d10b6c8fa03b 100644 --- a/components/cdc_national_environmental_public_health_tracking/package.json +++ b/components/cdc_national_environmental_public_health_tracking/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/cdc_national_environmental_public_health_tracking", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream CDC - National Environmental Public Health Tracking Components", - "main": "dist/app/cdc_national_environmental_public_health_tracking.app.mjs", + "main": "cdc_national_environmental_public_health_tracking.app.mjs", "keywords": [ "pipedream", "cdc_national_environmental_public_health_tracking" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/cdc_national_environmental_public_health_tracking", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/cdr_platform/.gitignore b/components/cdr_platform/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/cdr_platform/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/cdr_platform/app/cdr_platform.app.ts b/components/cdr_platform/app/cdr_platform.app.ts deleted file mode 100644 index 27facf74c676a..0000000000000 --- a/components/cdr_platform/app/cdr_platform.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "cdr_platform", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/cdr_platform/cdr_platform.app.mjs b/components/cdr_platform/cdr_platform.app.mjs new file mode 100644 index 0000000000000..5c6b7a00065e5 --- /dev/null +++ b/components/cdr_platform/cdr_platform.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cdr_platform", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/cdr_platform/package.json b/components/cdr_platform/package.json index 454f5511bdd04..2226b32fc8778 100644 --- a/components/cdr_platform/package.json +++ b/components/cdr_platform/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/cdr_platform", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream CDR Platform Components", - "main": "dist/app/cdr_platform.app.mjs", + "main": "cdr_platform.app.mjs", "keywords": [ "pipedream", "cdr_platform" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/cdr_platform", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/celonis_ems/.gitignore b/components/celonis_ems/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/celonis_ems/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/celonis_ems/app/celonis_ems.app.ts b/components/celonis_ems/app/celonis_ems.app.ts deleted file mode 100644 index 455a61bcef7e8..0000000000000 --- a/components/celonis_ems/app/celonis_ems.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "celonis_ems", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/celonis_ems/celonis_ems.app.mjs b/components/celonis_ems/celonis_ems.app.mjs new file mode 100644 index 0000000000000..1a84c7a162fe1 --- /dev/null +++ b/components/celonis_ems/celonis_ems.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "celonis_ems", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/celonis_ems/package.json b/components/celonis_ems/package.json index 21cbc448ad57c..46efae44dda39 100644 --- a/components/celonis_ems/package.json +++ b/components/celonis_ems/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/celonis_ems", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Celonis EMS Components", - "main": "dist/app/celonis_ems.app.mjs", + "main": "celonis_ems.app.mjs", "keywords": [ "pipedream", "celonis_ems" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/celonis_ems", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/census_bureau/.gitignore b/components/census_bureau/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/census_bureau/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/census_bureau/app/census_bureau.app.ts b/components/census_bureau/app/census_bureau.app.ts deleted file mode 100644 index c312798cadf53..0000000000000 --- a/components/census_bureau/app/census_bureau.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "census_bureau", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/census_bureau/census_bureau.app.mjs b/components/census_bureau/census_bureau.app.mjs new file mode 100644 index 0000000000000..eac1983c58b8e --- /dev/null +++ b/components/census_bureau/census_bureau.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "census_bureau", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/census_bureau/package.json b/components/census_bureau/package.json index 974933d2abbbe..235d752af9786 100644 --- a/components/census_bureau/package.json +++ b/components/census_bureau/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/census_bureau", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Census Bureau Components", - "main": "dist/app/census_bureau.app.mjs", + "main": "census_bureau.app.mjs", "keywords": [ "pipedream", "census_bureau" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/census_bureau", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/cflow/.gitignore b/components/cflow/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/cflow/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/cflow/app/cflow.app.ts b/components/cflow/app/cflow.app.ts deleted file mode 100644 index 5e0afc597c411..0000000000000 --- a/components/cflow/app/cflow.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "cflow", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/cflow/cflow.app.mjs b/components/cflow/cflow.app.mjs new file mode 100644 index 0000000000000..98f2920892b80 --- /dev/null +++ b/components/cflow/cflow.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cflow", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/cflow/package.json b/components/cflow/package.json index 7e7a0b1d57f36..af02bd364b26b 100644 --- a/components/cflow/package.json +++ b/components/cflow/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/cflow", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Cflow Components", - "main": "dist/app/cflow.app.mjs", + "main": "cflow.app.mjs", "keywords": [ "pipedream", "cflow" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/cflow", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/chaport/.gitignore b/components/chaport/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/chaport/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/chaport/app/chaport.app.ts b/components/chaport/app/chaport.app.ts deleted file mode 100644 index 37bc436fabf80..0000000000000 --- a/components/chaport/app/chaport.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "chaport", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/chaport/chaport.app.mjs b/components/chaport/chaport.app.mjs new file mode 100644 index 0000000000000..8c537d4ac5c5c --- /dev/null +++ b/components/chaport/chaport.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "chaport", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/chaport/package.json b/components/chaport/package.json index 5f2af15e5154d..52d36481369c4 100644 --- a/components/chaport/package.json +++ b/components/chaport/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/chaport", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Chaport Components", - "main": "dist/app/chaport.app.mjs", + "main": "chaport.app.mjs", "keywords": [ "pipedream", "chaport" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/chaport", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/chargekeep/chargekeep.app.mjs b/components/chargekeep/chargekeep.app.mjs new file mode 100644 index 0000000000000..b3cac9e73182e --- /dev/null +++ b/components/chargekeep/chargekeep.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "chargekeep", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/chargekeep/package.json b/components/chargekeep/package.json new file mode 100644 index 0000000000000..f7d0f32e1cdcf --- /dev/null +++ b/components/chargekeep/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/chargekeep", + "version": "0.0.1", + "description": "Pipedream ChargeKeep Components", + "main": "chargekeep.app.mjs", + "keywords": [ + "pipedream", + "chargekeep" + ], + "homepage": "https://pipedream.com/apps/chargekeep", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/chatfuel_dashboard_api_/.gitignore b/components/chatfuel_dashboard_api_/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/chatfuel_dashboard_api_/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/chatfuel_dashboard_api_/app/chatfuel_dashboard_api_.app.ts b/components/chatfuel_dashboard_api_/app/chatfuel_dashboard_api_.app.ts deleted file mode 100644 index 79918edd035cb..0000000000000 --- a/components/chatfuel_dashboard_api_/app/chatfuel_dashboard_api_.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "chatfuel_dashboard_api_", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/chatfuel_dashboard_api_/chatfuel_dashboard_api_.app.mjs b/components/chatfuel_dashboard_api_/chatfuel_dashboard_api_.app.mjs new file mode 100644 index 0000000000000..d655ce027840d --- /dev/null +++ b/components/chatfuel_dashboard_api_/chatfuel_dashboard_api_.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "chatfuel_dashboard_api_", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/chatfuel_dashboard_api_/package.json b/components/chatfuel_dashboard_api_/package.json index 84a687dfa5c78..e4dd9fb0b6d6d 100644 --- a/components/chatfuel_dashboard_api_/package.json +++ b/components/chatfuel_dashboard_api_/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/chatfuel_dashboard_api_", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Chatfuel (Dashboard API) Components", - "main": "dist/app/chatfuel_dashboard_api_.app.mjs", + "main": "chatfuel_dashboard_api_.app.mjs", "keywords": [ "pipedream", "chatfuel_dashboard_api_" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/chatfuel_dashboard_api_", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/chatrace/.gitignore b/components/chatrace/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/chatrace/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/chatrace/app/chatrace.app.ts b/components/chatrace/app/chatrace.app.ts deleted file mode 100644 index 273ec990024c7..0000000000000 --- a/components/chatrace/app/chatrace.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "chatrace", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/chatrace/chatrace.app.mjs b/components/chatrace/chatrace.app.mjs new file mode 100644 index 0000000000000..a109fb55ca305 --- /dev/null +++ b/components/chatrace/chatrace.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "chatrace", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/chatrace/package.json b/components/chatrace/package.json index c6db9cf76ae7f..3fd3e7460a844 100644 --- a/components/chatrace/package.json +++ b/components/chatrace/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/chatrace", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Chatrace Components", - "main": "dist/app/chatrace.app.mjs", + "main": "chatrace.app.mjs", "keywords": [ "pipedream", "chatrace" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/chatrace", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/chatsistant/chatsistant.app.mjs b/components/chatsistant/chatsistant.app.mjs new file mode 100644 index 0000000000000..7724732c909ad --- /dev/null +++ b/components/chatsistant/chatsistant.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "chatsistant", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/chatsistant/package.json b/components/chatsistant/package.json new file mode 100644 index 0000000000000..609dc6028424c --- /dev/null +++ b/components/chatsistant/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/chatsistant", + "version": "0.0.1", + "description": "Pipedream Chatsistant Components", + "main": "chatsistant.app.mjs", + "keywords": [ + "pipedream", + "chatsistant" + ], + "homepage": "https://pipedream.com/apps/chatsistant", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/chatsonic/.gitignore b/components/chatsonic/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/chatsonic/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/chatsonic/app/chatsonic.app.ts b/components/chatsonic/app/chatsonic.app.ts deleted file mode 100644 index 99f472daf91fa..0000000000000 --- a/components/chatsonic/app/chatsonic.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "chatsonic", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/chatsonic/chatsonic.app.mjs b/components/chatsonic/chatsonic.app.mjs new file mode 100644 index 0000000000000..cb10faf4590a1 --- /dev/null +++ b/components/chatsonic/chatsonic.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "chatsonic", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/chatsonic/package.json b/components/chatsonic/package.json index 67c454564c848..6e6e799920111 100644 --- a/components/chatsonic/package.json +++ b/components/chatsonic/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/chatsonic", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Chatsonic Components", - "main": "dist/app/chatsonic.app.mjs", + "main": "chatsonic.app.mjs", "keywords": [ "pipedream", "chatsonic" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/chatsonic", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/cheddar/.gitignore b/components/cheddar/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/cheddar/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/cheddar/app/cheddar.app.ts b/components/cheddar/app/cheddar.app.ts deleted file mode 100644 index 8c43f9ad0b9be..0000000000000 --- a/components/cheddar/app/cheddar.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "cheddar", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/cheddar/cheddar.app.mjs b/components/cheddar/cheddar.app.mjs new file mode 100644 index 0000000000000..16e952e1d39f0 --- /dev/null +++ b/components/cheddar/cheddar.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cheddar", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/cheddar/package.json b/components/cheddar/package.json index 95be654d99ade..c34cb491095f7 100644 --- a/components/cheddar/package.json +++ b/components/cheddar/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/cheddar", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Cheddar Components", - "main": "dist/app/cheddar.app.mjs", + "main": "cheddar.app.mjs", "keywords": [ "pipedream", "cheddar" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/cheddar", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/circl_hash_lookup/.gitignore b/components/circl_hash_lookup/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/circl_hash_lookup/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/circl_hash_lookup/app/circl_hash_lookup.app.ts b/components/circl_hash_lookup/app/circl_hash_lookup.app.ts deleted file mode 100644 index c0362d3436f38..0000000000000 --- a/components/circl_hash_lookup/app/circl_hash_lookup.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "circl_hash_lookup", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/circl_hash_lookup/circl_hash_lookup.app.mjs b/components/circl_hash_lookup/circl_hash_lookup.app.mjs new file mode 100644 index 0000000000000..71d77f25d24bd --- /dev/null +++ b/components/circl_hash_lookup/circl_hash_lookup.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "circl_hash_lookup", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/circl_hash_lookup/package.json b/components/circl_hash_lookup/package.json index a385fd9cf65e9..9898d201ccdd4 100644 --- a/components/circl_hash_lookup/package.json +++ b/components/circl_hash_lookup/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/circl_hash_lookup", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream CIRCL Hash Lookup Components", - "main": "dist/app/circl_hash_lookup.app.mjs", + "main": "circl_hash_lookup.app.mjs", "keywords": [ "pipedream", "circl_hash_lookup" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/circl_hash_lookup", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/civicrm/.gitignore b/components/civicrm/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/civicrm/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/civicrm/app/civicrm.app.ts b/components/civicrm/app/civicrm.app.ts deleted file mode 100644 index 5b055e0dc9a4c..0000000000000 --- a/components/civicrm/app/civicrm.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "civicrm", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/civicrm/civicrm.app.mjs b/components/civicrm/civicrm.app.mjs new file mode 100644 index 0000000000000..4a5ea6c39154c --- /dev/null +++ b/components/civicrm/civicrm.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "civicrm", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/civicrm/package.json b/components/civicrm/package.json index 30f6414857305..76d84a902b6ef 100644 --- a/components/civicrm/package.json +++ b/components/civicrm/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/civicrm", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream CiviCRM Components", - "main": "dist/app/civicrm.app.mjs", + "main": "civicrm.app.mjs", "keywords": [ "pipedream", "civicrm" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/civicrm", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/classmarker/classmarker.app.mjs b/components/classmarker/classmarker.app.mjs index f14662a598545..c937bd6d563e1 100644 --- a/components/classmarker/classmarker.app.mjs +++ b/components/classmarker/classmarker.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/clickmeeting/.gitignore b/components/clickmeeting/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/clickmeeting/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/clickmeeting/app/clickmeeting.app.ts b/components/clickmeeting/app/clickmeeting.app.ts deleted file mode 100644 index e43a0e6113661..0000000000000 --- a/components/clickmeeting/app/clickmeeting.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "clickmeeting", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/clickmeeting/clickmeeting.app.mjs b/components/clickmeeting/clickmeeting.app.mjs new file mode 100644 index 0000000000000..abccb77674717 --- /dev/null +++ b/components/clickmeeting/clickmeeting.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "clickmeeting", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/clickmeeting/package.json b/components/clickmeeting/package.json index c7adb57e9b8a7..b2eb9a7a41b81 100644 --- a/components/clickmeeting/package.json +++ b/components/clickmeeting/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/clickmeeting", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream ClickMeeting Components", - "main": "dist/app/clickmeeting.app.mjs", + "main": "clickmeeting.app.mjs", "keywords": [ "pipedream", "clickmeeting" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/clickmeeting", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/clickup/actions/create-chat-view-comment/create-chat-view-comment.mjs b/components/clickup/actions/create-chat-view-comment/create-chat-view-comment.mjs index babeeb48f682b..61ddef9cd965e 100644 --- a/components/clickup/actions/create-chat-view-comment/create-chat-view-comment.mjs +++ b/components/clickup/actions/create-chat-view-comment/create-chat-view-comment.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-create-chat-view-comment", name: "Create Chat View Comment", description: "Creates a chat view comment. [See the documentation](https://clickup.com/api) in **Comments / Create Chat View Comment** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/create-checklist-item/create-checklist-item.mjs b/components/clickup/actions/create-checklist-item/create-checklist-item.mjs index e23a6b7108568..461820406748e 100644 --- a/components/clickup/actions/create-checklist-item/create-checklist-item.mjs +++ b/components/clickup/actions/create-checklist-item/create-checklist-item.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-create-checklist-item", name: "Create Checklist Item", description: "Creates a new item in a checklist. [See the documentation](https://clickup.com/api) in **Checklists / Create Checklist Item** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/create-checklist/create-checklist.mjs b/components/clickup/actions/create-checklist/create-checklist.mjs index bf690e678f5cb..60c72daa7c5c3 100644 --- a/components/clickup/actions/create-checklist/create-checklist.mjs +++ b/components/clickup/actions/create-checklist/create-checklist.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-create-checklist", name: "Create Checklist", description: "Creates a new checklist in a task. [See the documentation](https://clickup.com/api) in **Checklists / Create Checklist** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/create-folder/create-folder.mjs b/components/clickup/actions/create-folder/create-folder.mjs index abbad2bc62a8f..7716c5a860f5e 100644 --- a/components/clickup/actions/create-folder/create-folder.mjs +++ b/components/clickup/actions/create-folder/create-folder.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-create-folder", name: "Create Folder", description: "Creates a new folder. [See the documentation](https://clickup.com/api) in **Folders / Create Folder** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/create-list-comment/create-list-comment.mjs b/components/clickup/actions/create-list-comment/create-list-comment.mjs index d55cefa8d426d..49e554118205e 100644 --- a/components/clickup/actions/create-list-comment/create-list-comment.mjs +++ b/components/clickup/actions/create-list-comment/create-list-comment.mjs @@ -6,7 +6,7 @@ export default { key: "clickup-create-list-comment", name: "Create List Comment", description: "Creates a list comment. [See the documentation](https://clickup.com/api) in **Comments / Create List Comment** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/create-list/create-list.mjs b/components/clickup/actions/create-list/create-list.mjs index b5dd6b8b81caf..ece5ef6f86ff9 100644 --- a/components/clickup/actions/create-list/create-list.mjs +++ b/components/clickup/actions/create-list/create-list.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-create-list", name: "Create List", description: "Creates a new list. [See the documentation](https://clickup.com/api) in **Lists / Create List** section.", - version: "0.0.15", + version: "0.0.16", type: "action", props: { clickup, diff --git a/components/clickup/actions/create-space/create-space.mjs b/components/clickup/actions/create-space/create-space.mjs index 9e14536d62e5a..dc00a2b07c2a0 100644 --- a/components/clickup/actions/create-space/create-space.mjs +++ b/components/clickup/actions/create-space/create-space.mjs @@ -4,7 +4,7 @@ export default { key: "clickup-create-space", name: "Create Space", description: "Creates a new space. [See the documentation](https://clickup.com/api) in **Spaces / Create Space** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/create-task-comment/create-task-comment.mjs b/components/clickup/actions/create-task-comment/create-task-comment.mjs index 021f67e107c5c..ddf9c14e5d313 100644 --- a/components/clickup/actions/create-task-comment/create-task-comment.mjs +++ b/components/clickup/actions/create-task-comment/create-task-comment.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-create-task-comment", name: "Create Task Comment", description: "Creates a task comment. [See the documentation](https://clickup.com/api) in **Comments / Create Task Comment** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/create-task-from-template/create-task-from-template.mjs b/components/clickup/actions/create-task-from-template/create-task-from-template.mjs index e7b82708cfa99..447c518431b13 100644 --- a/components/clickup/actions/create-task-from-template/create-task-from-template.mjs +++ b/components/clickup/actions/create-task-from-template/create-task-from-template.mjs @@ -6,7 +6,7 @@ export default { key: "clickup-create-task-from-template", name: "Create Task From Template", description: "Creates a new task from a template. [See the documentation](https://clickup.com/api) in **Task Templates / Create Task From Template** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/create-task/create-task.mjs b/components/clickup/actions/create-task/create-task.mjs index 147c5c65f31c0..de55c4938b60a 100644 --- a/components/clickup/actions/create-task/create-task.mjs +++ b/components/clickup/actions/create-task/create-task.mjs @@ -7,7 +7,7 @@ export default { key: "clickup-create-task", name: "Create Task", description: "Creates a new task. [See the documentation](https://clickup.com/api) in **Tasks / Create Task** section.", - version: "0.0.15", + version: "0.0.16", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/create-threaded-comment/create-threaded-comment.mjs b/components/clickup/actions/create-threaded-comment/create-threaded-comment.mjs index 05bdb3c012fa9..cb3e910cbb43b 100644 --- a/components/clickup/actions/create-threaded-comment/create-threaded-comment.mjs +++ b/components/clickup/actions/create-threaded-comment/create-threaded-comment.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-create-threaded-comment", name: "Create Threaded Comment", description: "Creates a threaded comment. [See the documentation](https://clickup.com/api) in **Comments / Create Threaded Comment** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/create-time-entry/create-time-entry.mjs b/components/clickup/actions/create-time-entry/create-time-entry.mjs new file mode 100644 index 0000000000000..cc10f564843b1 --- /dev/null +++ b/components/clickup/actions/create-time-entry/create-time-entry.mjs @@ -0,0 +1,100 @@ +import app from "../../clickup.app.mjs"; +import common from "../common/task-props.mjs"; + +export default { + ...common, + key: "clickup-create-time-entry", + name: "Create Time Entry", + description: "Create a new time entry. [See the documentation](https://developer.clickup.com/reference/createatimeentry)", + version: "0.0.1", + type: "action", + props: { + ...common.props, + folderId: { + propDefinition: [ + common.props.clickup, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], + optional: true, + }, + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + description: "To show options please select a **List** first", + optional: true, + }, + tags: { + propDefinition: [ + app, + "tags", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + start: { + type: "string", + label: "Start Time", + description: "The Start Time, can be ISO 8601 Date (.e.g `2025-08-06T01:50:19Z`) or Unix timestamp in milliseconds (.e.g `1595282645000`)", + }, + end: { + type: "string", + label: "End Time", + description: "The End Time, can be ISO 8601 Date (.e.g `2025-08-06T01:50:19Z`) or Unix timestamp in milliseconds (.e.g `1595282645000`)", + }, + description: { + type: "string", + label: "Description", + description: "Description of the time entry", + }, + }, + async run({ $ }) { + const start = new Date(+this.start || this.start).getTime(); + const end = new Date(+this.end || this.end).getTime(); + + const data = { + tid: this.taskId, + description: this.description, + start, + end, + stop: end, + }; + + console.log(data); + + const response = await this.clickup.createTimeEntry({ + $, + teamId: this.workspaceId, + params: { + custom_task_ids: this.useCustomTaskIds, + }, + data, + }); + + $.export("$summary", "Successfully created a new time entry"); + + return response; + }, +}; diff --git a/components/clickup/actions/create-view-comment/create-view-comment.mjs b/components/clickup/actions/create-view-comment/create-view-comment.mjs index 5d6da3311c73c..c72b430299f3c 100644 --- a/components/clickup/actions/create-view-comment/create-view-comment.mjs +++ b/components/clickup/actions/create-view-comment/create-view-comment.mjs @@ -4,7 +4,7 @@ export default { key: "clickup-create-view-comment", name: "Create View Comment", description: "Creates a view comment. [See the documentation](https://clickup.com/api) in **Comments / Create Chat View Comment** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/delete-checklist-item/delete-checklist-item.mjs b/components/clickup/actions/delete-checklist-item/delete-checklist-item.mjs index 001a2fef5cca8..2ed56f22c83d4 100644 --- a/components/clickup/actions/delete-checklist-item/delete-checklist-item.mjs +++ b/components/clickup/actions/delete-checklist-item/delete-checklist-item.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-delete-checklist-item", name: "Delete Checklist Item", description: "Deletes item in a checklist. [See the documentation](https://clickup.com/api) in **Checklists / Delete Checklist Item** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/delete-checklist/delete-checklist.mjs b/components/clickup/actions/delete-checklist/delete-checklist.mjs index c869707936464..8882be99533d1 100644 --- a/components/clickup/actions/delete-checklist/delete-checklist.mjs +++ b/components/clickup/actions/delete-checklist/delete-checklist.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-delete-checklist", name: "Delete Checklist", description: "Deletes a checklist in a task. [See the documentation](https://clickup.com/api) in **Checklists / Delete Checklist** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/delete-comment/delete-comment.mjs b/components/clickup/actions/delete-comment/delete-comment.mjs index 81fbb43092d6d..ca5e9f187d0be 100644 --- a/components/clickup/actions/delete-comment/delete-comment.mjs +++ b/components/clickup/actions/delete-comment/delete-comment.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-delete-comment", name: "Delete Comment", description: "Deletes a comment. [See the documentation](https://clickup.com/api) in **Comments / Deleet Comment** section.", - version: "0.0.10", + version: "0.0.11", type: "action", async run({ $ }) { const { commentId } = this; diff --git a/components/clickup/actions/delete-folder/delete-folder.mjs b/components/clickup/actions/delete-folder/delete-folder.mjs index ba2292385ea4c..e5c542e2b038d 100644 --- a/components/clickup/actions/delete-folder/delete-folder.mjs +++ b/components/clickup/actions/delete-folder/delete-folder.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-delete-folder", name: "Delete Folder", description: "Delete a folder. [See the documentation](https://clickup.com/api) in **Folders / Delete Folder** section.", - version: "0.0.10", + version: "0.0.11", type: "action", async run({ $ }) { const { folderId } = this; diff --git a/components/clickup/actions/delete-list/delete-list.mjs b/components/clickup/actions/delete-list/delete-list.mjs index c54583b0d4bb0..dba8fe72f5a5a 100644 --- a/components/clickup/actions/delete-list/delete-list.mjs +++ b/components/clickup/actions/delete-list/delete-list.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-delete-list", name: "Delete List", description: "Delete a list. [See the documentation](https://clickup.com/api) in **Lists / Delete List** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/delete-space/delete-space.mjs b/components/clickup/actions/delete-space/delete-space.mjs index 30e3d4aa3413e..ede23f63c1573 100644 --- a/components/clickup/actions/delete-space/delete-space.mjs +++ b/components/clickup/actions/delete-space/delete-space.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-delete-space", name: "Delete Space", description: "Delete a space. [See the documentation](https://clickup.com/api) in **Spaces / Delete Space** section.", - version: "0.0.10", + version: "0.0.11", type: "action", async run({ $ }) { const { spaceId } = this; diff --git a/components/clickup/actions/delete-task/delete-task.mjs b/components/clickup/actions/delete-task/delete-task.mjs index b425ded01f966..b42e25002c73f 100644 --- a/components/clickup/actions/delete-task/delete-task.mjs +++ b/components/clickup/actions/delete-task/delete-task.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-delete-task", name: "Delete Task", description: "Delete a task. [See the documentation](https://clickup.com/api) in **Tasks / Delete Task** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-custom-fields/get-custom-fields.mjs b/components/clickup/actions/get-custom-fields/get-custom-fields.mjs index 113476ac271e1..046840dc41c13 100644 --- a/components/clickup/actions/get-custom-fields/get-custom-fields.mjs +++ b/components/clickup/actions/get-custom-fields/get-custom-fields.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-custom-fields", name: "Get Custom Fields", description: "Get a list of custom fields. [See the documentation](https://clickup.com/api) in **Custom Fields / Get Accessible Custom Fields** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-folder-views/get-folder-views.mjs b/components/clickup/actions/get-folder-views/get-folder-views.mjs index 9e4485127d62e..9fef8e5123611 100644 --- a/components/clickup/actions/get-folder-views/get-folder-views.mjs +++ b/components/clickup/actions/get-folder-views/get-folder-views.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-folder-views", name: "Get Folder Views", description: "Get all views of a folder. [See the documentation](https://clickup.com/api) in **Views / Get Folder Views** section.", - version: "0.0.10", + version: "0.0.11", type: "action", async run({ $ }) { const { folderId } = this; diff --git a/components/clickup/actions/get-folder/get-folder.mjs b/components/clickup/actions/get-folder/get-folder.mjs index 242f9a06b16e5..7999bd309c869 100644 --- a/components/clickup/actions/get-folder/get-folder.mjs +++ b/components/clickup/actions/get-folder/get-folder.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-folder", name: "Get Folder", description: "Get a folder in a workplace. [See the documentation](https://clickup.com/api) in **Folders / Get Folder** section.", - version: "0.0.10", + version: "0.0.11", type: "action", async run({ $ }) { const { folderId } = this; diff --git a/components/clickup/actions/get-folders/get-folders.mjs b/components/clickup/actions/get-folders/get-folders.mjs index 20f87ea35c8ca..749c7ebf174e6 100644 --- a/components/clickup/actions/get-folders/get-folders.mjs +++ b/components/clickup/actions/get-folders/get-folders.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-folders", name: "Get Folders", description: "Get a list of folders in a workplace. [See the documentation](https://clickup.com/api) in **Folders / Get Folders** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-list-comments/get-list-comments.mjs b/components/clickup/actions/get-list-comments/get-list-comments.mjs index b8a8df580a2a4..bc45f51104586 100644 --- a/components/clickup/actions/get-list-comments/get-list-comments.mjs +++ b/components/clickup/actions/get-list-comments/get-list-comments.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-list-comments", name: "Get List Comments", description: "Get a list comments. [See the documentation](https://clickup.com/api) in **Comments / Get List Comments** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-list-views/get-list-views.mjs b/components/clickup/actions/get-list-views/get-list-views.mjs index 918f54e07efd7..ff80cc217be80 100644 --- a/components/clickup/actions/get-list-views/get-list-views.mjs +++ b/components/clickup/actions/get-list-views/get-list-views.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-list-views", name: "Get List Views", description: "Get all views of a list. [See the documentation](https://clickup.com/api) in **Views / Get List Views** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-list/get-list.mjs b/components/clickup/actions/get-list/get-list.mjs index d8025d5a0c39b..a94bbc05b10f9 100644 --- a/components/clickup/actions/get-list/get-list.mjs +++ b/components/clickup/actions/get-list/get-list.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-list", name: "Get List", description: "Get a list. [See the documentation](https://clickup.com/api) in **Lists / Get List** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-lists/get-lists.mjs b/components/clickup/actions/get-lists/get-lists.mjs index a9a3af88e5403..b83a945e5a6d8 100644 --- a/components/clickup/actions/get-lists/get-lists.mjs +++ b/components/clickup/actions/get-lists/get-lists.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-lists", name: "Get Lists", description: "Get a list of lists. [See the documentation](https://clickup.com/api) in **Lists / Get Lists** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-space-views/get-space-views.mjs b/components/clickup/actions/get-space-views/get-space-views.mjs index ba6fcf95b31fc..7cb127c07fb6f 100644 --- a/components/clickup/actions/get-space-views/get-space-views.mjs +++ b/components/clickup/actions/get-space-views/get-space-views.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-space-views", name: "Get Space Views", description: "Get all views of a space. [See the documentation](https://clickup.com/api) in **Views / Get Space Views** section.", - version: "0.0.10", + version: "0.0.11", type: "action", async run({ $ }) { const { spaceId } = this; diff --git a/components/clickup/actions/get-space/get-space.mjs b/components/clickup/actions/get-space/get-space.mjs index 2297a2dbc301a..7b79e04ceed0a 100644 --- a/components/clickup/actions/get-space/get-space.mjs +++ b/components/clickup/actions/get-space/get-space.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-space", name: "Get Space", description: "Get a space in a workplace. [See the documentation](https://clickup.com/api) in **Spaces / Get Space** section.", - version: "0.0.10", + version: "0.0.11", type: "action", async run({ $ }) { const { spaceId } = this; diff --git a/components/clickup/actions/get-spaces/get-spaces.mjs b/components/clickup/actions/get-spaces/get-spaces.mjs index dc24a41f5c03a..feb2709ca6157 100644 --- a/components/clickup/actions/get-spaces/get-spaces.mjs +++ b/components/clickup/actions/get-spaces/get-spaces.mjs @@ -4,7 +4,7 @@ export default { key: "clickup-get-spaces", name: "Get Spaces", description: "Get a list of spaces in a workplace. [See the documentation](https://clickup.com/api) in **Spaces / Get Spaces** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-task-comments/get-task-comments.mjs b/components/clickup/actions/get-task-comments/get-task-comments.mjs index 05ffdc0f0e2f1..9d5b9c9128ddc 100644 --- a/components/clickup/actions/get-task-comments/get-task-comments.mjs +++ b/components/clickup/actions/get-task-comments/get-task-comments.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-task-comments", name: "Get Task Comments", description: "Get a task comments. [See the documentation](https://clickup.com/api) in **Comments / Get Task Comments** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-task-templates/get-task-templates.mjs b/components/clickup/actions/get-task-templates/get-task-templates.mjs index f8d50d0d858e8..f1f5343c53305 100644 --- a/components/clickup/actions/get-task-templates/get-task-templates.mjs +++ b/components/clickup/actions/get-task-templates/get-task-templates.mjs @@ -4,7 +4,7 @@ export default { key: "clickup-get-task-templates", name: "Get Task Templates", description: "Get a list of templates. [See the documentation](https://clickup.com/api) in **Task Templates / Get Task Templates** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-task/get-task.mjs b/components/clickup/actions/get-task/get-task.mjs index 1de5fb08e6e59..31390289cc7ce 100644 --- a/components/clickup/actions/get-task/get-task.mjs +++ b/components/clickup/actions/get-task/get-task.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-task", name: "Get Task", description: "Get a task. [See the documentation](https://clickup.com/api) in **Tasks / Get Task** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-tasks/get-tasks.mjs b/components/clickup/actions/get-tasks/get-tasks.mjs index a1121435fbe27..6447075e2f5ae 100644 --- a/components/clickup/actions/get-tasks/get-tasks.mjs +++ b/components/clickup/actions/get-tasks/get-tasks.mjs @@ -6,7 +6,7 @@ export default { key: "clickup-get-tasks", name: "Get Tasks", description: "Get a list of tasks. [See the documentation](https://clickup.com/api) in **Tasks / Get Tasks** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-team-views/get-team-views.mjs b/components/clickup/actions/get-team-views/get-team-views.mjs index 33e8332ddc9bd..fc8a88ea4ac1a 100644 --- a/components/clickup/actions/get-team-views/get-team-views.mjs +++ b/components/clickup/actions/get-team-views/get-team-views.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-team-views", name: "Get Team Views", description: "Get all views of a team. [See the documentation](https://clickup.com/api) in **Views / Get Team Views** section.", - version: "0.0.10", + version: "0.0.11", type: "action", async run({ $ }) { const { workspaceId } = this; diff --git a/components/clickup/actions/get-view-comments/get-view-comments.mjs b/components/clickup/actions/get-view-comments/get-view-comments.mjs index 09a5af022ab8b..57c463eadcc07 100644 --- a/components/clickup/actions/get-view-comments/get-view-comments.mjs +++ b/components/clickup/actions/get-view-comments/get-view-comments.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-view-comments", name: "Get View Comments", description: "Get a view comments. [See the documentation](https://clickup.com/api) in **Comments / Get Chat View Comments** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-view-tasks/get-view-tasks.mjs b/components/clickup/actions/get-view-tasks/get-view-tasks.mjs index 1eb073ca21bd3..e6697a30f57e0 100644 --- a/components/clickup/actions/get-view-tasks/get-view-tasks.mjs +++ b/components/clickup/actions/get-view-tasks/get-view-tasks.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-view-tasks", name: "Get View Tasks", description: "Get all tasks of a view. [See the documentation](https://clickup.com/api) in **Views / Get View Tasks** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-view/get-view.mjs b/components/clickup/actions/get-view/get-view.mjs index 3882d398116a8..a2d367c20baec 100644 --- a/components/clickup/actions/get-view/get-view.mjs +++ b/components/clickup/actions/get-view/get-view.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-get-view", name: "Get View", description: "Get a view. [See the documentation](https://clickup.com/api) in **Views / Get View** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/remove-task-custom-field/remove-task-custom-field.mjs b/components/clickup/actions/remove-task-custom-field/remove-task-custom-field.mjs index 02c79b8185424..5a6d5b599eecc 100644 --- a/components/clickup/actions/remove-task-custom-field/remove-task-custom-field.mjs +++ b/components/clickup/actions/remove-task-custom-field/remove-task-custom-field.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-remove-task-custom-field", name: "Remove Task Custom Field", description: "Remove custom field from a task. [See the documentation](https://clickup.com/api) in **Custom Fields / Remove Custom Field Value** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/start-time-entry/start-time-entry.mjs b/components/clickup/actions/start-time-entry/start-time-entry.mjs index dd2ebd27885af..7b9b092bf2151 100644 --- a/components/clickup/actions/start-time-entry/start-time-entry.mjs +++ b/components/clickup/actions/start-time-entry/start-time-entry.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-start-time-entry", name: "Start Time Entry", description: "Start time entry. [See the documentation](https://clickup.com/api/clickupreference/operation/StartatimeEntry)", - version: "0.0.4", + version: "0.0.5", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/stop-time-entry/stop-time-entry.mjs b/components/clickup/actions/stop-time-entry/stop-time-entry.mjs index 7634ec8801080..a7cfa3de7e218 100644 --- a/components/clickup/actions/stop-time-entry/stop-time-entry.mjs +++ b/components/clickup/actions/stop-time-entry/stop-time-entry.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-stop-time-entry", name: "Stop Time Entry", description: "Stop time entry. [See the documentation](https://clickup.com/api/clickupreference/operation/StopatimeEntry)", - version: "0.0.5", + version: "0.0.6", type: "action", async run({ $ }) { const response = await this.clickup.stopTimeEntry({ diff --git a/components/clickup/actions/update-checklist-item/update-checklist-item.mjs b/components/clickup/actions/update-checklist-item/update-checklist-item.mjs index c0af13274f110..eee26f68dd5e3 100644 --- a/components/clickup/actions/update-checklist-item/update-checklist-item.mjs +++ b/components/clickup/actions/update-checklist-item/update-checklist-item.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-update-checklist-item", name: "Update Checklist Item", description: "Updates item in a checklist. [See the documentation](https://clickup.com/api) in **Checklists / Edit Checklist Item** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/update-checklist/update-checklist.mjs b/components/clickup/actions/update-checklist/update-checklist.mjs index 09dc9083b6760..c5c770ec1c657 100644 --- a/components/clickup/actions/update-checklist/update-checklist.mjs +++ b/components/clickup/actions/update-checklist/update-checklist.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-update-checklist", name: "Update Checklist", description: "Updates a checklist in a task. [See the documentation](https://clickup.com/api) in **Checklists / Edit Checklist** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/update-comment/update-comment.mjs b/components/clickup/actions/update-comment/update-comment.mjs index 597bf1b00a601..df27ed8c42f3d 100644 --- a/components/clickup/actions/update-comment/update-comment.mjs +++ b/components/clickup/actions/update-comment/update-comment.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-update-comment", name: "Update Comment", description: "Updates a comment. [See the documentation](https://clickup.com/api) in **Comments / Update Comment** section.", - version: "0.0.12", + version: "0.0.13", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/update-folder/update-folder.mjs b/components/clickup/actions/update-folder/update-folder.mjs index 5b1e01c7fe512..552835c23ceb4 100644 --- a/components/clickup/actions/update-folder/update-folder.mjs +++ b/components/clickup/actions/update-folder/update-folder.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-update-folder", name: "Update Folder", description: "Update a folder. [See the documentation](https://clickup.com/api) in **Folders / Update Folder** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/update-list/update-list.mjs b/components/clickup/actions/update-list/update-list.mjs index 1b60b1f455c9d..657c65c61116c 100644 --- a/components/clickup/actions/update-list/update-list.mjs +++ b/components/clickup/actions/update-list/update-list.mjs @@ -7,7 +7,7 @@ export default { key: "clickup-update-list", name: "Update List", description: "Update a list. [See the documentation](https://clickup.com/api) in **Lists / Update List** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/update-space/update-space.mjs b/components/clickup/actions/update-space/update-space.mjs index 6fcb93454cf9f..4412ad0efd93c 100644 --- a/components/clickup/actions/update-space/update-space.mjs +++ b/components/clickup/actions/update-space/update-space.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-update-space", name: "Update Space", description: "Update a space. [See the documentation](https://clickup.com/api) in **Spaces / Update Space** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/update-task-custom-field/update-task-custom-field.mjs b/components/clickup/actions/update-task-custom-field/update-task-custom-field.mjs index 431fa562f561d..c2f5d74976a3f 100644 --- a/components/clickup/actions/update-task-custom-field/update-task-custom-field.mjs +++ b/components/clickup/actions/update-task-custom-field/update-task-custom-field.mjs @@ -5,7 +5,7 @@ export default { key: "clickup-update-task-custom-field", name: "Update Task Custom Field", description: "Update custom field value of a task. [See the documentation](https://clickup.com/api) in **Custom Fields / Set Custom Field Value** section.", - version: "0.0.10", + version: "0.0.11", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/update-task/update-task.mjs b/components/clickup/actions/update-task/update-task.mjs index 4a72ccdae050f..7550f25844914 100644 --- a/components/clickup/actions/update-task/update-task.mjs +++ b/components/clickup/actions/update-task/update-task.mjs @@ -7,7 +7,7 @@ export default { key: "clickup-update-task", name: "Update Task", description: "Update a task. [See the documentation](https://clickup.com/api) in **Tasks / Update Task** section.", - version: "0.0.12", + version: "0.0.13", type: "action", props: { ...common.props, diff --git a/components/clickup/clickup.app.mjs b/components/clickup/clickup.app.mjs index 2c4f1d4ba159d..e3e92c8d345c7 100644 --- a/components/clickup/clickup.app.mjs +++ b/components/clickup/clickup.app.mjs @@ -206,7 +206,7 @@ export default { type: "string", label: "Task ID", description: "The ID of a task", - async options ({ + async options({ page, listId, useCustomTaskIds, }) { const tasks = await this.getTasks({ @@ -233,7 +233,7 @@ export default { type: "string", label: "Checklist ID", description: "To show options please select a **Task** first", - async options ({ + async options({ taskId, useCustomTaskIds, authorizedTeamId, }) { if (!taskId) { @@ -270,7 +270,7 @@ export default { type: "string", label: "Comment ID", description: "The ID of a comment", - async options ({ + async options({ taskId, listId, viewId, }) { if (!taskId && !listId && !viewId) { @@ -883,5 +883,14 @@ export default { method: "post", }, $); }, + async createTimeEntry({ + $, teamId, data, params, + }) { + return this._makeRequest(`team/${teamId}/time_entries`, { + method: "post", + params, + data, + }, $); + }, }, }; diff --git a/components/clickup/package.json b/components/clickup/package.json index a9b47e99b45bf..4e8e718327f3e 100644 --- a/components/clickup/package.json +++ b/components/clickup/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/clickup", - "version": "0.3.1", + "version": "0.4.0", "description": "Pipedream Clickup Components", "main": "clickup.app.mjs", "keywords": [ diff --git a/components/clickup/sources/new-folder/new-folder.mjs b/components/clickup/sources/new-folder/new-folder.mjs index a99f60b369613..1d1ff1db4e59a 100644 --- a/components/clickup/sources/new-folder/new-folder.mjs +++ b/components/clickup/sources/new-folder/new-folder.mjs @@ -6,7 +6,7 @@ export default { key: "clickup-new-folder", name: "New Folder (Instant)", description: "Emit new event when a new folder is created", - version: "0.0.9", + version: "0.0.10", dedupe: "unique", type: "source", methods: { diff --git a/components/clickup/sources/new-list/new-list.mjs b/components/clickup/sources/new-list/new-list.mjs index 7e2b0ba2f7876..f7a0b849fda6b 100644 --- a/components/clickup/sources/new-list/new-list.mjs +++ b/components/clickup/sources/new-list/new-list.mjs @@ -6,7 +6,7 @@ export default { key: "clickup-new-list", name: "New List (Instant)", description: "Emit new event when a new list is created", - version: "0.0.9", + version: "0.0.10", dedupe: "unique", type: "source", methods: { diff --git a/components/clickup/sources/new-task-advanced/new-task-advanced.mjs b/components/clickup/sources/new-task-advanced/new-task-advanced.mjs index 8fb206d09a4ce..d28de9c1cf3e6 100644 --- a/components/clickup/sources/new-task-advanced/new-task-advanced.mjs +++ b/components/clickup/sources/new-task-advanced/new-task-advanced.mjs @@ -6,7 +6,7 @@ export default { key: "clickup-new-task-advanced", name: "New Task Advanced (Instant)", description: "Emit new event when a new task is created matching the filter", - version: "0.0.7", + version: "0.0.8", dedupe: "unique", type: "source", props: { diff --git a/components/clickup/sources/new-task-comment-updated/new-task-comment-updated.mjs b/components/clickup/sources/new-task-comment-updated/new-task-comment-updated.mjs index 4874d8de2d1fe..9d33e858a659d 100644 --- a/components/clickup/sources/new-task-comment-updated/new-task-comment-updated.mjs +++ b/components/clickup/sources/new-task-comment-updated/new-task-comment-updated.mjs @@ -6,7 +6,7 @@ export default { key: "clickup-new-task-comment-updated", name: "New Task Comment Updated (Instant)", description: "Emit new event when a new task comment is updated", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", type: "source", props: { diff --git a/components/clickup/sources/new-task-comment/new-task-comment.mjs b/components/clickup/sources/new-task-comment/new-task-comment.mjs index 5e06f4bb39023..628210b8a3cd5 100644 --- a/components/clickup/sources/new-task-comment/new-task-comment.mjs +++ b/components/clickup/sources/new-task-comment/new-task-comment.mjs @@ -6,7 +6,7 @@ export default { key: "clickup-new-task-comment", name: "New Task Comment (Instant)", description: "Emit new event when a new task comment is posted", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", type: "source", props: { diff --git a/components/clickup/sources/new-task/new-task.mjs b/components/clickup/sources/new-task/new-task.mjs index 83b5a04bdd581..699ffc636a9fd 100644 --- a/components/clickup/sources/new-task/new-task.mjs +++ b/components/clickup/sources/new-task/new-task.mjs @@ -6,7 +6,7 @@ export default { key: "clickup-new-task", name: "New Task (Instant)", description: "Emit new event when a new task is created", - version: "0.1.6", + version: "0.1.7", dedupe: "unique", type: "source", props: { diff --git a/components/clickup/sources/updated-task/updated-task.mjs b/components/clickup/sources/updated-task/updated-task.mjs index 777cbb553d838..806864e3c47a5 100644 --- a/components/clickup/sources/updated-task/updated-task.mjs +++ b/components/clickup/sources/updated-task/updated-task.mjs @@ -7,7 +7,7 @@ export default { key: "clickup-updated-task", name: "New Updated Task (Instant)", description: "Emit new event when a new task is updated", - version: "0.0.12", + version: "0.0.13", dedupe: "unique", type: "source", props: { diff --git a/components/clientary/package.json b/components/clientary/package.json index 06090c1b9f89a..79c43206254fd 100644 --- a/components/clientary/package.json +++ b/components/clientary/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/clientary", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Clientary Components", "main": "dist/app/clientary.app.mjs", "keywords": [ @@ -14,7 +14,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/clientary/tsconfig.json b/components/clientary/tsconfig.json index e4f6e612b50bf..3a9389484d040 100644 --- a/components/clientary/tsconfig.json +++ b/components/clientary/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/clientify/package.json b/components/clientify/package.json index 6e7c386a37974..dcb0e346d1a8a 100644 --- a/components/clientify/package.json +++ b/components/clientify/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/clientify", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Clientify Components", "main": "clientify.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/cloudbeds/cloudbeds.app.mjs b/components/cloudbeds/cloudbeds.app.mjs new file mode 100644 index 0000000000000..dc2ebc8ec683d --- /dev/null +++ b/components/cloudbeds/cloudbeds.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cloudbeds", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/cloudbeds/package.json b/components/cloudbeds/package.json new file mode 100644 index 0000000000000..890cbb5e8a6df --- /dev/null +++ b/components/cloudbeds/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/cloudbeds", + "version": "0.0.1", + "description": "Pipedream Cloudbeds Components", + "main": "cloudbeds.app.mjs", + "keywords": [ + "pipedream", + "cloudbeds" + ], + "homepage": "https://pipedream.com/apps/cloudbeds", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/cloudcart/.gitignore b/components/cloudcart/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/cloudcart/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/cloudcart/app/cloudcart.app.ts b/components/cloudcart/app/cloudcart.app.ts deleted file mode 100644 index 5cad329b553f1..0000000000000 --- a/components/cloudcart/app/cloudcart.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "cloudcart", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/cloudcart/cloudcart.app.mjs b/components/cloudcart/cloudcart.app.mjs new file mode 100644 index 0000000000000..1b284fcdb7be0 --- /dev/null +++ b/components/cloudcart/cloudcart.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cloudcart", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/cloudcart/package.json b/components/cloudcart/package.json index d27422d61d15e..e47076ddbbee0 100644 --- a/components/cloudcart/package.json +++ b/components/cloudcart/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/cloudcart", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream CloudCart Components", - "main": "dist/app/cloudcart.app.mjs", + "main": "cloudcart.app.mjs", "keywords": [ "pipedream", "cloudcart" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/cloudcart", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/cloudfill/.gitignore b/components/cloudfill/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/cloudfill/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/cloudfill/app/cloudfill.app.ts b/components/cloudfill/app/cloudfill.app.ts deleted file mode 100644 index 5aa965ec1ddc4..0000000000000 --- a/components/cloudfill/app/cloudfill.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "cloudfill", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/cloudfill/cloudfill.app.mjs b/components/cloudfill/cloudfill.app.mjs new file mode 100644 index 0000000000000..b6e6b29e9608e --- /dev/null +++ b/components/cloudfill/cloudfill.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cloudfill", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/cloudfill/package.json b/components/cloudfill/package.json index 3a26cab2e441b..6268d1b83d42c 100644 --- a/components/cloudfill/package.json +++ b/components/cloudfill/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/cloudfill", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream CloudFill Components", - "main": "dist/app/cloudfill.app.mjs", + "main": "cloudfill.app.mjs", "keywords": [ "pipedream", "cloudfill" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/cloudfill", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/cloudlayer/.gitignore b/components/cloudlayer/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/cloudlayer/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/cloudlayer/app/cloudlayer.app.ts b/components/cloudlayer/app/cloudlayer.app.ts deleted file mode 100644 index 599ea0871bf14..0000000000000 --- a/components/cloudlayer/app/cloudlayer.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "cloudlayer", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/cloudlayer/cloudlayer.app.mjs b/components/cloudlayer/cloudlayer.app.mjs new file mode 100644 index 0000000000000..67ecd81b02aeb --- /dev/null +++ b/components/cloudlayer/cloudlayer.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cloudlayer", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/cloudlayer/package.json b/components/cloudlayer/package.json index 717ab83b5bd6c..1918afe7d1a47 100644 --- a/components/cloudlayer/package.json +++ b/components/cloudlayer/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/cloudlayer", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Cloudlayer Components", - "main": "dist/app/cloudlayer.app.mjs", + "main": "cloudlayer.app.mjs", "keywords": [ "pipedream", "cloudlayer" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/cloudlayer", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/cloudmersive/package.json b/components/cloudmersive/package.json index a584a9ae2da31..ee16bdd650b46 100644 --- a/components/cloudmersive/package.json +++ b/components/cloudmersive/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/cloudmersive", - "version": "1.0.0", + "version": "1.0.1", "description": "Pipedream Cloudmersive Components", "main": "dist/app/cloudmersive.app.mjs", "keywords": [ @@ -17,7 +17,9 @@ }, "dependencies": { "@pipedream/platform": "^3.1.0", - "@pipedream/types": "^0.1.4", "form-data": "^4.0.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/cloudmersive/tsconfig.json b/components/cloudmersive/tsconfig.json index 910b87fc8266a..3a9389484d040 100644 --- a/components/cloudmersive/tsconfig.json +++ b/components/cloudmersive/tsconfig.json @@ -1,24 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/cloudtables/package.json b/components/cloudtables/package.json index a8f9068299d42..5a8b43ebb3659 100644 --- a/components/cloudtables/package.json +++ b/components/cloudtables/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/cloudtables", - "version": "0.6.0", + "version": "0.6.1", "description": "Pipedream cloudtables Components", "main": "cloudtables.app.mjs", "keywords": [ @@ -13,6 +13,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.0.0" + "@pipedream/platform": "^3.1.0", + "qs": "^6.11.0" } } diff --git a/components/cloudtalk/.gitignore b/components/cloudtalk/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/cloudtalk/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/cloudtalk/app/cloudtalk.app.ts b/components/cloudtalk/app/cloudtalk.app.ts deleted file mode 100644 index a7eca3d1cb10e..0000000000000 --- a/components/cloudtalk/app/cloudtalk.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "cloudtalk", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/cloudtalk/cloudtalk.app.mjs b/components/cloudtalk/cloudtalk.app.mjs new file mode 100644 index 0000000000000..6ae14f6167b6c --- /dev/null +++ b/components/cloudtalk/cloudtalk.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cloudtalk", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/cloudtalk/package.json b/components/cloudtalk/package.json index 113d478ebf6ef..944c53b9e39e4 100644 --- a/components/cloudtalk/package.json +++ b/components/cloudtalk/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/cloudtalk", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream CloudTalk Components", - "main": "dist/app/cloudtalk.app.mjs", + "main": "cloudtalk.app.mjs", "keywords": [ "pipedream", "cloudtalk" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/cloudtalk", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/clubworx/.gitignore b/components/clubworx/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/clubworx/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/clubworx/app/clubworx.app.ts b/components/clubworx/app/clubworx.app.ts deleted file mode 100644 index db1056f475e38..0000000000000 --- a/components/clubworx/app/clubworx.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "clubworx", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/clubworx/clubworx.app.mjs b/components/clubworx/clubworx.app.mjs new file mode 100644 index 0000000000000..cfb2d456431d3 --- /dev/null +++ b/components/clubworx/clubworx.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "clubworx", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/clubworx/package.json b/components/clubworx/package.json index 6f9598516a01c..9d11a29766545 100644 --- a/components/clubworx/package.json +++ b/components/clubworx/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/clubworx", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Clubworx Components", - "main": "dist/app/clubworx.app.mjs", + "main": "clubworx.app.mjs", "keywords": [ "pipedream", "clubworx" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/clubworx", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/coassemble/package.json b/components/coassemble/package.json index 77d6c0392d268..fa756bb24141b 100644 --- a/components/coassemble/package.json +++ b/components/coassemble/package.json @@ -1,16 +1,24 @@ { "name": "@pipedream/coassemble", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Coassemble Components", "main": "dist/app/coassemble.app.mjs", "keywords": [ "pipedream", "coassemble" ], - "files": ["dist"], + "files": [ + "dist" + ], "homepage": "https://pipedream.com/apps/coassemble", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/coassemble/tsconfig.json b/components/coassemble/tsconfig.json index a61206464b8c0..3a9389484d040 100644 --- a/components/coassemble/tsconfig.json +++ b/components/coassemble/tsconfig.json @@ -1,23 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/codeq_natural_language_processing_api/package.json b/components/codeq_natural_language_processing_api/package.json index 4ee4b042f9cb4..9e750dda3b716 100644 --- a/components/codeq_natural_language_processing_api/package.json +++ b/components/codeq_natural_language_processing_api/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/codeq_natural_language_processing_api", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Codeq Natural Language Processing API Components", "main": "codeq_natural_language_processing_api.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/coderpad/.gitignore b/components/coderpad/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/coderpad/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/coderpad/app/coderpad.app.ts b/components/coderpad/app/coderpad.app.ts deleted file mode 100644 index ac5b72f299401..0000000000000 --- a/components/coderpad/app/coderpad.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "coderpad", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/coderpad/coderpad.app.mjs b/components/coderpad/coderpad.app.mjs new file mode 100644 index 0000000000000..f6cb98d86b843 --- /dev/null +++ b/components/coderpad/coderpad.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "coderpad", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/coderpad/package.json b/components/coderpad/package.json index 2aafed2596295..67b4ca31aeff8 100644 --- a/components/coderpad/package.json +++ b/components/coderpad/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/coderpad", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream CoderPad Components", - "main": "dist/app/coderpad.app.mjs", + "main": "coderpad.app.mjs", "keywords": [ "pipedream", "coderpad" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/coderpad", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/coinbase_commerce/.gitignore b/components/coinbase_commerce/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/coinbase_commerce/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/coinbase_commerce/app/coinbase_commerce.app.ts b/components/coinbase_commerce/app/coinbase_commerce.app.ts deleted file mode 100644 index 8b479e9bf5f95..0000000000000 --- a/components/coinbase_commerce/app/coinbase_commerce.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "coinbase_commerce", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/coinbase_commerce/coinbase_commerce.app.mjs b/components/coinbase_commerce/coinbase_commerce.app.mjs new file mode 100644 index 0000000000000..5e72d959fa856 --- /dev/null +++ b/components/coinbase_commerce/coinbase_commerce.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "coinbase_commerce", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/coinbase_commerce/package.json b/components/coinbase_commerce/package.json index d15692e2fdce0..b86a122cceb54 100644 --- a/components/coinbase_commerce/package.json +++ b/components/coinbase_commerce/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/coinbase_commerce", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Coinbase Commerce Components", - "main": "dist/app/coinbase_commerce.app.mjs", + "main": "coinbase_commerce.app.mjs", "keywords": [ "pipedream", "coinbase_commerce" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/coinbase_commerce", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/coingecko/coingecko.app.mjs b/components/coingecko/coingecko.app.mjs new file mode 100644 index 0000000000000..d7b554c6b1b97 --- /dev/null +++ b/components/coingecko/coingecko.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "coingecko", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/coingecko/package.json b/components/coingecko/package.json new file mode 100644 index 0000000000000..670349ba096be --- /dev/null +++ b/components/coingecko/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/coingecko", + "version": "0.0.1", + "description": "Pipedream CoinGecko Components", + "main": "coingecko.app.mjs", + "keywords": [ + "pipedream", + "coingecko" + ], + "homepage": "https://pipedream.com/apps/coingecko", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/coinmarketcal_demo_app/.gitignore b/components/coinmarketcal_demo_app/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/coinmarketcal_demo_app/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/coinmarketcal_demo_app/app/coinmarketcal_demo_app.app.ts b/components/coinmarketcal_demo_app/app/coinmarketcal_demo_app.app.ts deleted file mode 100644 index 91a277ab4fc02..0000000000000 --- a/components/coinmarketcal_demo_app/app/coinmarketcal_demo_app.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "coinmarketcal_demo_app", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/coinmarketcal_demo_app/coinmarketcal_demo_app.app.mjs b/components/coinmarketcal_demo_app/coinmarketcal_demo_app.app.mjs new file mode 100644 index 0000000000000..1ae458261ed64 --- /dev/null +++ b/components/coinmarketcal_demo_app/coinmarketcal_demo_app.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "coinmarketcal_demo_app", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/coinmarketcal_demo_app/package.json b/components/coinmarketcal_demo_app/package.json index cba103da59847..3e2d50583cf29 100644 --- a/components/coinmarketcal_demo_app/package.json +++ b/components/coinmarketcal_demo_app/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/coinmarketcal_demo_app", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream CoinMarketCal Demo App Components", - "main": "dist/app/coinmarketcal_demo_app.app.mjs", + "main": "coinmarketcal_demo_app.app.mjs", "keywords": [ "pipedream", "coinmarketcal_demo_app" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/coinmarketcal_demo_app", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/college_football_data/.gitignore b/components/college_football_data/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/college_football_data/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/college_football_data/app/college_football_data.app.ts b/components/college_football_data/app/college_football_data.app.ts deleted file mode 100644 index 2553f1ceabc23..0000000000000 --- a/components/college_football_data/app/college_football_data.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "college_football_data", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/college_football_data/college_football_data.app.mjs b/components/college_football_data/college_football_data.app.mjs new file mode 100644 index 0000000000000..2ffef8607484f --- /dev/null +++ b/components/college_football_data/college_football_data.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "college_football_data", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/college_football_data/package.json b/components/college_football_data/package.json index fefab9eb9c3f5..c2aea4ce4ee34 100644 --- a/components/college_football_data/package.json +++ b/components/college_football_data/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/college_football_data", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream College Football Data Components", - "main": "dist/app/college_football_data.app.mjs", + "main": "college_football_data.app.mjs", "keywords": [ "pipedream", "college_football_data" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/college_football_data", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/commcare/.gitignore b/components/commcare/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/commcare/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/commcare/app/commcare.app.ts b/components/commcare/app/commcare.app.ts deleted file mode 100644 index fce2c48409c8d..0000000000000 --- a/components/commcare/app/commcare.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "commcare", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/commcare/commcare.app.mjs b/components/commcare/commcare.app.mjs new file mode 100644 index 0000000000000..860030722e118 --- /dev/null +++ b/components/commcare/commcare.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "commcare", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/commcare/package.json b/components/commcare/package.json index d223ad1b8b5ab..2f18486d91c6b 100644 --- a/components/commcare/package.json +++ b/components/commcare/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/commcare", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream CommCare Components", - "main": "dist/app/commcare.app.mjs", + "main": "commcare.app.mjs", "keywords": [ "pipedream", "commcare" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/commcare", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/concord/package.json b/components/concord/package.json index ac93efe6433a0..8785d10d0ff8c 100644 --- a/components/concord/package.json +++ b/components/concord/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/concord", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Concord Components", "main": "dist/app/concord.app.mjs", "keywords": [ @@ -14,7 +14,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.5.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/concord/tsconfig.json b/components/concord/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/concord/tsconfig.json +++ b/components/concord/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/confluence/actions/create-page/create-page.mjs b/components/confluence/actions/create-page/create-page.mjs index 8aee1d8dbf783..6faa5afc71371 100644 --- a/components/confluence/actions/create-page/create-page.mjs +++ b/components/confluence/actions/create-page/create-page.mjs @@ -4,7 +4,7 @@ export default { key: "confluence-create-page", name: "Create Page", description: "Creates a new page in the space. [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-post)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { confluence, diff --git a/components/confluence/actions/create-post/create-post.mjs b/components/confluence/actions/create-post/create-post.mjs index 100b896e409f4..bf89b63c67d5b 100644 --- a/components/confluence/actions/create-post/create-post.mjs +++ b/components/confluence/actions/create-post/create-post.mjs @@ -4,7 +4,7 @@ export default { key: "confluence-create-post", name: "Create Post", description: "Creates a new page or blog post on Confluence. [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-blog-post/#api-blogposts-post)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { confluence, diff --git a/components/confluence/actions/delete-post/delete-post.mjs b/components/confluence/actions/delete-post/delete-post.mjs index 240cf5508c49e..818daf66a7925 100644 --- a/components/confluence/actions/delete-post/delete-post.mjs +++ b/components/confluence/actions/delete-post/delete-post.mjs @@ -4,7 +4,7 @@ export default { key: "confluence-delete-post", name: "Delete Post", description: "Removes a blog post from Confluence by its ID. Use with caution, the action is irreversible. [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-blog-post/#api-blogposts-id-delete)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { confluence, diff --git a/components/confluence/actions/search-content/search-content.mjs b/components/confluence/actions/search-content/search-content.mjs index 93abc58322072..52a279019a598 100644 --- a/components/confluence/actions/search-content/search-content.mjs +++ b/components/confluence/actions/search-content/search-content.mjs @@ -4,7 +4,7 @@ export default { key: "confluence-search-content", name: "Search Content", description: "Searches for content using the Confluence Query Language (CQL). [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search#api-wiki-rest-api-search-get)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { confluence, diff --git a/components/confluence/actions/update-post/update-post.mjs b/components/confluence/actions/update-post/update-post.mjs index fe718dbd90c89..7a49005359b8a 100644 --- a/components/confluence/actions/update-post/update-post.mjs +++ b/components/confluence/actions/update-post/update-post.mjs @@ -5,7 +5,7 @@ export default { key: "confluence-update-post", name: "Update a Post", description: "Updates a page or blog post on Confluence by its ID. [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-blog-post/#api-blogposts-id-put)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { confluence, diff --git a/components/confluence/confluence.app.mjs b/components/confluence/confluence.app.mjs index 8e7cb2aebdad2..695ccb44a7465 100644 --- a/components/confluence/confluence.app.mjs +++ b/components/confluence/confluence.app.mjs @@ -146,7 +146,15 @@ export default { _extractCursorFromLink(link) { if (!link) return null; try { - const url = new URL(link); + // Handle cases where link might be just a path or relative URL + let url; + if (link.startsWith("http")) { + url = new URL(link); + } else { + // If it's a path or relative URL, construct a full URL + const baseUrl = "https://api.atlassian.com"; + url = new URL(link, baseUrl); + } return url.searchParams.get("cursor"); } catch (e) { console.log("Error extracting cursor from link:", e); diff --git a/components/confluence/package.json b/components/confluence/package.json index e73d2d67a713f..bd1e5d6c1848b 100644 --- a/components/confluence/package.json +++ b/components/confluence/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/confluence", - "version": "0.2.0", + "version": "0.2.1", "description": "Pipedream Confluence Components", "main": "confluence.app.mjs", "keywords": [ diff --git a/components/confluence/sources/new-page-or-blog-post/new-page-or-blog-post.mjs b/components/confluence/sources/new-page-or-blog-post/new-page-or-blog-post.mjs index e5100d461df69..7d4204fbd53a8 100644 --- a/components/confluence/sources/new-page-or-blog-post/new-page-or-blog-post.mjs +++ b/components/confluence/sources/new-page-or-blog-post/new-page-or-blog-post.mjs @@ -6,7 +6,7 @@ export default { key: "confluence-new-page-or-blog-post", name: "New Page or Blog Post", description: "Emit new event whenever a new page or blog post is created in a specified space", - version: "0.0.3", + version: "0.0.4", type: "source", dedupe: "unique", props: { diff --git a/components/confluence/sources/watch-blog-posts/watch-blog-posts.mjs b/components/confluence/sources/watch-blog-posts/watch-blog-posts.mjs index 313a298c49532..d0415a26d6c0d 100644 --- a/components/confluence/sources/watch-blog-posts/watch-blog-posts.mjs +++ b/components/confluence/sources/watch-blog-posts/watch-blog-posts.mjs @@ -6,7 +6,7 @@ export default { key: "confluence-watch-blog-posts", name: "Watch Blog Posts", description: "Emit new event when a blog post is created or updated", - version: "0.0.3", + version: "0.0.4", type: "source", dedupe: "unique", methods: { diff --git a/components/confluence/sources/watch-pages/watch-pages.mjs b/components/confluence/sources/watch-pages/watch-pages.mjs index d74123bfe8edc..fd0fe16e98696 100644 --- a/components/confluence/sources/watch-pages/watch-pages.mjs +++ b/components/confluence/sources/watch-pages/watch-pages.mjs @@ -6,7 +6,7 @@ export default { key: "confluence-watch-pages", name: "Watch Pages", description: "Emit new event when a page is created or updated in Confluence", - version: "0.0.3", + version: "0.0.4", type: "source", dedupe: "unique", methods: { diff --git a/components/confluent/.gitignore b/components/confluent/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/confluent/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/confluent/app/confluent.app.ts b/components/confluent/app/confluent.app.ts deleted file mode 100644 index 66dd261b78ba7..0000000000000 --- a/components/confluent/app/confluent.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "confluent", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/confluent/confluent.app.mjs b/components/confluent/confluent.app.mjs new file mode 100644 index 0000000000000..666fc566af897 --- /dev/null +++ b/components/confluent/confluent.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "confluent", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/confluent/package.json b/components/confluent/package.json index fafd8cf03faf7..f3e371872caac 100644 --- a/components/confluent/package.json +++ b/components/confluent/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/confluent", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Confluent Components", - "main": "dist/app/confluent.app.mjs", + "main": "confluent.app.mjs", "keywords": [ "pipedream", "confluent" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/confluent", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/congress_gov/.gitignore b/components/congress_gov/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/congress_gov/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/congress_gov/app/congress_gov.app.ts b/components/congress_gov/app/congress_gov.app.ts deleted file mode 100644 index e73b46393a91a..0000000000000 --- a/components/congress_gov/app/congress_gov.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "congress_gov", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/congress_gov/congress_gov.app.mjs b/components/congress_gov/congress_gov.app.mjs new file mode 100644 index 0000000000000..ad0350de7f3c1 --- /dev/null +++ b/components/congress_gov/congress_gov.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "congress_gov", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/congress_gov/package.json b/components/congress_gov/package.json index ffc69f9cb5205..6a6cd6c911a99 100644 --- a/components/congress_gov/package.json +++ b/components/congress_gov/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/congress_gov", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Congress.gov Components", - "main": "dist/app/congress_gov.app.mjs", + "main": "congress_gov.app.mjs", "keywords": [ "pipedream", "congress_gov" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/congress_gov", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/consulta_unica/consulta_unica.app.mjs b/components/consulta_unica/consulta_unica.app.mjs index bf2801c0c5369..262e6cbd9f334 100644 --- a/components/consulta_unica/consulta_unica.app.mjs +++ b/components/consulta_unica/consulta_unica.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/conveyor/.gitignore b/components/conveyor/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/conveyor/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/conveyor/app/conveyor.app.ts b/components/conveyor/app/conveyor.app.ts deleted file mode 100644 index 8cba3c42f48de..0000000000000 --- a/components/conveyor/app/conveyor.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "conveyor", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/conveyor/conveyor.app.mjs b/components/conveyor/conveyor.app.mjs new file mode 100644 index 0000000000000..cae73c1fc8f5b --- /dev/null +++ b/components/conveyor/conveyor.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "conveyor", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/conveyor/package.json b/components/conveyor/package.json index 7eebc9a3a2325..42992699e87e1 100644 --- a/components/conveyor/package.json +++ b/components/conveyor/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/conveyor", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Conveyor Components", - "main": "dist/app/conveyor.app.mjs", + "main": "conveyor.app.mjs", "keywords": [ "pipedream", "conveyor" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/conveyor", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/corrently/.gitignore b/components/corrently/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/corrently/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/corrently/app/corrently.app.ts b/components/corrently/app/corrently.app.ts deleted file mode 100644 index 3415ad322361a..0000000000000 --- a/components/corrently/app/corrently.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "corrently", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/corrently/corrently.app.mjs b/components/corrently/corrently.app.mjs new file mode 100644 index 0000000000000..340bf498401cc --- /dev/null +++ b/components/corrently/corrently.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "corrently", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/corrently/package.json b/components/corrently/package.json index 8c1a85295dfb6..ca7929570ff85 100644 --- a/components/corrently/package.json +++ b/components/corrently/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/corrently", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Corrently Components", - "main": "dist/app/corrently.app.mjs", + "main": "corrently.app.mjs", "keywords": [ "pipedream", "corrently" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/corrently", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/cortex/cortex.app.mjs b/components/cortex/cortex.app.mjs new file mode 100644 index 0000000000000..a2e332a65b69d --- /dev/null +++ b/components/cortex/cortex.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cortex", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/cortex/package.json b/components/cortex/package.json new file mode 100644 index 0000000000000..96453b9976e5b --- /dev/null +++ b/components/cortex/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/cortex", + "version": "0.0.1", + "description": "Pipedream Cortex Components", + "main": "cortex.app.mjs", + "keywords": [ + "pipedream", + "cortex" + ], + "homepage": "https://pipedream.com/apps/cortex", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/countly/countly.app.mjs b/components/countly/countly.app.mjs new file mode 100644 index 0000000000000..4fb5f978346e4 --- /dev/null +++ b/components/countly/countly.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "countly", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/countly/package.json b/components/countly/package.json new file mode 100644 index 0000000000000..73ffd49eb576d --- /dev/null +++ b/components/countly/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/countly", + "version": "0.0.1", + "description": "Pipedream Countly Components", + "main": "countly.app.mjs", + "keywords": [ + "pipedream", + "countly" + ], + "homepage": "https://pipedream.com/apps/countly", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/coupontools/.gitignore b/components/coupontools/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/coupontools/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/coupontools/app/coupontools.app.ts b/components/coupontools/app/coupontools.app.ts deleted file mode 100644 index c32449a8105d5..0000000000000 --- a/components/coupontools/app/coupontools.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "coupontools", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/coupontools/coupontools.app.mjs b/components/coupontools/coupontools.app.mjs new file mode 100644 index 0000000000000..5e4e9b50e91d8 --- /dev/null +++ b/components/coupontools/coupontools.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "coupontools", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/coupontools/package.json b/components/coupontools/package.json index 28103d24c9550..682098a42fc85 100644 --- a/components/coupontools/package.json +++ b/components/coupontools/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/coupontools", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Coupontools Components", - "main": "dist/app/coupontools.app.mjs", + "main": "coupontools.app.mjs", "keywords": [ "pipedream", "coupontools" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/coupontools", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/covalent/.gitignore b/components/covalent/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/covalent/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/covalent/app/covalent.app.ts b/components/covalent/app/covalent.app.ts deleted file mode 100644 index 87a24e522867a..0000000000000 --- a/components/covalent/app/covalent.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "covalent", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/covalent/covalent.app.mjs b/components/covalent/covalent.app.mjs new file mode 100644 index 0000000000000..61659b275e482 --- /dev/null +++ b/components/covalent/covalent.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "covalent", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/covalent/package.json b/components/covalent/package.json index a51253109990c..97f17d60e7775 100644 --- a/components/covalent/package.json +++ b/components/covalent/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/covalent", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Covalent Components", - "main": "dist/app/covalent.app.mjs", + "main": "covalent.app.mjs", "keywords": [ "pipedream", "covalent" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/covalent", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/craftmypdf/package.json b/components/craftmypdf/package.json index 8f79f7be9c849..458cda70a8736 100644 --- a/components/craftmypdf/package.json +++ b/components/craftmypdf/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/craftmypdf", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream CraftMyPDF Components", "main": "craftmypdf.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/credit_repair_cloud/package.json b/components/credit_repair_cloud/package.json index 6d61bbedcef4b..04a02768066b8 100644 --- a/components/credit_repair_cloud/package.json +++ b/components/credit_repair_cloud/package.json @@ -1,22 +1,19 @@ { "name": "@pipedream/credit_repair_cloud", - "version": "0.1.0", + "version": "0.1.2", "description": "Pipedream Credit Repair Cloud Components", - "main": "dist/app/credit_repair_cloud.app.mjs", + "main": "credit_repair_cloud.app.mjs", "keywords": [ "pipedream", "credit_repair_cloud" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/credit_repair_cloud", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" }, "dependencies": { - "axios": "^1.4.0", + "@pipedream/platform": "^3.0.3", "js2xmlparser": "^5.0.0", "xml2js": "^0.6.0" } diff --git a/components/crisp/.gitignore b/components/crisp/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/crisp/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/crisp/app/crisp.app.ts b/components/crisp/app/crisp.app.ts deleted file mode 100644 index 93c62b92abc93..0000000000000 --- a/components/crisp/app/crisp.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "crisp", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/crisp/crisp.app.mjs b/components/crisp/crisp.app.mjs new file mode 100644 index 0000000000000..6b421b52ed132 --- /dev/null +++ b/components/crisp/crisp.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "crisp", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/crisp/package.json b/components/crisp/package.json index 42378fdc47b36..41ae9ed7eadb5 100644 --- a/components/crisp/package.json +++ b/components/crisp/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/crisp", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Crisp Components", - "main": "dist/app/crisp.app.mjs", + "main": "crisp.app.mjs", "keywords": [ "pipedream", "crisp" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/crisp", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/crove_app/package.json b/components/crove_app/package.json index 824eb2365a696..4e75b26e42849 100644 --- a/components/crove_app/package.json +++ b/components/crove_app/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/crove_app", - "version": "2.0.3", + "version": "2.0.4", "description": "Pipedream Crove Components", "main": "crove_app.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/crowdpower/.gitignore b/components/crowdpower/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/crowdpower/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/crowdpower/app/crowdpower.app.ts b/components/crowdpower/app/crowdpower.app.ts deleted file mode 100644 index 72d066642e8c6..0000000000000 --- a/components/crowdpower/app/crowdpower.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "crowdpower", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/crowdpower/crowdpower.app.mjs b/components/crowdpower/crowdpower.app.mjs new file mode 100644 index 0000000000000..92280f098b7ae --- /dev/null +++ b/components/crowdpower/crowdpower.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "crowdpower", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/crowdpower/package.json b/components/crowdpower/package.json index 0d16c41014973..b40ebf6c87087 100644 --- a/components/crowdpower/package.json +++ b/components/crowdpower/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/crowdpower", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream CrowdPower Components", - "main": "dist/app/crowdpower.app.mjs", + "main": "crowdpower.app.mjs", "keywords": [ "pipedream", "crowdpower" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/crowdpower", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/currencyapi/.gitignore b/components/currencyapi/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/currencyapi/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/currencyapi/app/currencyapi.app.ts b/components/currencyapi/app/currencyapi.app.ts deleted file mode 100644 index 359387d7a2895..0000000000000 --- a/components/currencyapi/app/currencyapi.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "currencyapi", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/currencyapi/currencyapi.app.mjs b/components/currencyapi/currencyapi.app.mjs new file mode 100644 index 0000000000000..a05604bb2e090 --- /dev/null +++ b/components/currencyapi/currencyapi.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "currencyapi", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/currencyapi/package.json b/components/currencyapi/package.json index aedd35a6f2ea7..771a07fa491de 100644 --- a/components/currencyapi/package.json +++ b/components/currencyapi/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/currencyapi", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream currencyapi Components", - "main": "dist/app/currencyapi.app.mjs", + "main": "currencyapi.app.mjs", "keywords": [ "pipedream", "currencyapi" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/currencyapi", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/currencyscoop/package.json b/components/currencyscoop/package.json index 764490f016521..00ae6c57a9715 100644 --- a/components/currencyscoop/package.json +++ b/components/currencyscoop/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/currencyscoop", - "version": "0.1.1", + "version": "0.1.2", "description": "Pipedream CurrencyScoop Components", "main": "dist/app/currencyscoop.app.mjs", "keywords": [ @@ -14,7 +14,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.5.1", - "@pipedream/types": "^0.1.6" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/currencyscoop/tsconfig.json b/components/currencyscoop/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/currencyscoop/tsconfig.json +++ b/components/currencyscoop/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/currents_api/currents_api.app.mjs b/components/currents_api/currents_api.app.mjs index 8edebfef1e28e..068b060bc6089 100644 --- a/components/currents_api/currents_api.app.mjs +++ b/components/currents_api/currents_api.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/customer_guru/.gitignore b/components/customer_guru/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/customer_guru/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/customer_guru/app/customer_guru.app.ts b/components/customer_guru/app/customer_guru.app.ts deleted file mode 100644 index 6de95f5ffd9bc..0000000000000 --- a/components/customer_guru/app/customer_guru.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "customer_guru", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/customer_guru/customer_guru.app.mjs b/components/customer_guru/customer_guru.app.mjs new file mode 100644 index 0000000000000..75c614b124979 --- /dev/null +++ b/components/customer_guru/customer_guru.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "customer_guru", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/customer_guru/package.json b/components/customer_guru/package.json index d3d8c2b94d086..b5fcfaa8c7b27 100644 --- a/components/customer_guru/package.json +++ b/components/customer_guru/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/customer_guru", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Customer.guru Components", - "main": "dist/app/customer_guru.app.mjs", + "main": "customer_guru.app.mjs", "keywords": [ "pipedream", "customer_guru" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/customer_guru", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/cyfe/.gitignore b/components/cyfe/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/cyfe/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/cyfe/app/cyfe.app.ts b/components/cyfe/app/cyfe.app.ts deleted file mode 100644 index ff7bf93957ec2..0000000000000 --- a/components/cyfe/app/cyfe.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "cyfe", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/cyfe/cyfe.app.mjs b/components/cyfe/cyfe.app.mjs new file mode 100644 index 0000000000000..0031197dfdd65 --- /dev/null +++ b/components/cyfe/cyfe.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "cyfe", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/cyfe/package.json b/components/cyfe/package.json index 5a1b0fc82b3b7..4802781c8b70d 100644 --- a/components/cyfe/package.json +++ b/components/cyfe/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/cyfe", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Cyfe Components", - "main": "dist/app/cyfe.app.mjs", + "main": "cyfe.app.mjs", "keywords": [ "pipedream", "cyfe" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/cyfe", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/dachser/actions/get-delivery-order-status/get-delivery-order-status.mjs b/components/dachser/actions/get-delivery-order-status/get-delivery-order-status.mjs new file mode 100644 index 0000000000000..636db682a4196 --- /dev/null +++ b/components/dachser/actions/get-delivery-order-status/get-delivery-order-status.mjs @@ -0,0 +1,99 @@ +import app from "../../dachser.app.mjs"; + +export default { + name: "Get Delivery Order Status", + description: "Retrieve the delivery order status using reference and customer details. [See the documentation](https://api-portal.dachser.com/bi.b2b.portal/api/library/deliveryorderstatus?6)", + key: "dachser-get-delivery-order-status", + version: "0.0.1", + type: "action", + props: { + app, + info: { + type: "alert", + alertType: "info", + content: "At least one shipment reference or an order date is necessary to get the status.", + }, + referenceNumber1: { + type: "string", + label: "Reference Number 1", + description: "Reference number 1.", + optional: true, + }, + referenceNumber2: { + type: "string", + label: "Reference Number 2", + description: "Reference number 2.", + optional: true, + }, + referenceNumber3: { + type: "string", + label: "Reference Number 3", + description: "Reference number 3.", + optional: true, + }, + purchaseOrderNumber: { + type: "string", + label: "Purchase Order Number", + description: "Purchase order number.", + optional: true, + }, + deliveryOrderDate: { + type: "string", + label: "Delivery Order Date", + description: "Delivery order date in `YYYY-MM-DD` format.", + optional: true, + }, + eventCode: { + type: "string", + label: "Event Code", + description: "Event code.", + optional: true, + }, + customerId: { + propDefinition: [ + app, + "customerId", + ], + }, + acceptLanguage: { + propDefinition: [ + app, + "acceptLanguage", + ], + }, + }, + async run({ $ }) { + const { + app, + acceptLanguage, + referenceNumber1, + referenceNumber2, + referenceNumber3, + purchaseOrderNumber, + deliveryOrderDate, + eventCode, + customerId, + } = this; + + const response = await app.getDeliveryOrderStatus({ + $, + params: { + "reference-number1": referenceNumber1, + "reference-number2": referenceNumber2, + "reference-number3": referenceNumber3, + "purchase-order-number": purchaseOrderNumber, + "delivery-order-date": deliveryOrderDate, + "event-code": eventCode, + "customer-id": customerId, + }, + headers: { + "Accept-Language": acceptLanguage, + }, + }); + + $.export("$summary", `Successfully retrieved delivery order status for \`${response.deliveryOrders?.length ?? 0}\` delivery orders.`); + + return response; + }, +}; + diff --git a/components/dachser/actions/get-shipment-history/get-shipment-history.mjs b/components/dachser/actions/get-shipment-history/get-shipment-history.mjs new file mode 100644 index 0000000000000..5d86615438116 --- /dev/null +++ b/components/dachser/actions/get-shipment-history/get-shipment-history.mjs @@ -0,0 +1,54 @@ +import app from "../../dachser.app.mjs"; + +export default { + name: "Get Shipment History", + description: "Retrieve the full history for a shipment by tracking number and customer ID. [See the documentation](https://api-portal.dachser.com/bi.b2b.portal/api/library/shipmenthistory?5)", + key: "dachser-get-shipment-history", + version: "0.0.1", + type: "action", + props: { + app, + trackingNumber: { + propDefinition: [ + app, + "trackingNumber", + ], + }, + customerId: { + propDefinition: [ + app, + "customerId", + ], + }, + acceptLanguage: { + propDefinition: [ + app, + "acceptLanguage", + ], + }, + }, + async run({ $ }) { + const { + app, + acceptLanguage, + trackingNumber, + customerId, + } = this; + + const response = await app.getShipmentHistory({ + $, + params: { + "tracking-number": trackingNumber, + "customer-id": customerId, + }, + headers: { + "Accept-Language": acceptLanguage, + }, + }); + + $.export("$summary", `Successfully retrieved shipment history for \`${response.shipments?.length ?? 0}\` shipments.`); + + return response; + }, +}; + diff --git a/components/dachser/actions/get-shipment-status/get-shipment-status.mjs b/components/dachser/actions/get-shipment-status/get-shipment-status.mjs new file mode 100644 index 0000000000000..f572db2e6747b --- /dev/null +++ b/components/dachser/actions/get-shipment-status/get-shipment-status.mjs @@ -0,0 +1,54 @@ +import app from "../../dachser.app.mjs"; + +export default { + name: "Get Shipment Status", + description: "Retrieve the current status for a shipment by tracking number and customer ID. [See the documentation](https://api-portal.dachser.com/bi.b2b.portal/api/library/shipmentstatus?1)", + key: "dachser-get-shipment-status", + version: "0.0.1", + type: "action", + props: { + app, + trackingNumber: { + propDefinition: [ + app, + "trackingNumber", + ], + }, + customerId: { + propDefinition: [ + app, + "customerId", + ], + }, + acceptLanguage: { + propDefinition: [ + app, + "acceptLanguage", + ], + }, + }, + async run({ $ }) { + const { + app, + acceptLanguage, + trackingNumber, + customerId, + } = this; + + const response = await app.getShipmentStatus({ + $, + params: { + "tracking-number": trackingNumber, + "customer-id": customerId, + }, + headers: { + "Accept-Language": acceptLanguage, + }, + }); + + $.export("$summary", `Successfully retrieved shipment status for \`${response.shipments?.length ?? 0}\` shipments.`); + + return response; + }, +}; + diff --git a/components/dachser/dachser.app.mjs b/components/dachser/dachser.app.mjs new file mode 100644 index 0000000000000..b260ec24d1dbb --- /dev/null +++ b/components/dachser/dachser.app.mjs @@ -0,0 +1,79 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "dachser", + propDefinitions: { + trackingNumber: { + type: "string", + label: "Tracking Number", + description: `The shipment tracking number. The search can be done by: + +- DACHSER Customer order number +- consignment number +- Delivery Note Number +- Purchase Order Number +- SSCC (bar codes) +- House Bill of Lading (HB/L) +- House AirWay Bill (HAWB) +- Container number +- Invoice Number +- Batch Number +- Packing List Number. + `, + }, + customerId: { + type: "string", + label: "Customer ID", + description: "Your Dachser customer identifier. Separate multiple values by comma.", + optional: true, + }, + acceptLanguage: { + type: "string", + label: "Accept-Language", + description: "Translation of service code descriptions. (ISO 639-1 standard language codes.) Examples: `en-US`, `de-DE`, `fr-FR`.", + optional: true, + }, + }, + methods: { + getUrl(path) { + return `https://api-gateway.dachser.com/rest/v2${path}`; + }, + headers(headers) { + const { api_token: apiToken } = this.$auth; + return { + "Accept": "application/json", + "X-API-Key": apiToken, + "Accept-Language": "en-US", + ...headers, + }; + }, + makeRequest({ + $ = this, path, headers, ...args + } = {}) { + return axios($, { + ...args, + url: this.getUrl(path), + headers: this.headers(headers), + }); + }, + getShipmentStatus(args = {}) { + return this.makeRequest({ + path: "/shipmentstatus", + ...args, + }); + }, + getShipmentHistory(args = {}) { + return this.makeRequest({ + path: "/shipmenthistory", + ...args, + }); + }, + getDeliveryOrderStatus(args = {}) { + return this.makeRequest({ + path: "/deliveryorderstatus", + ...args, + }); + }, + }, +}; diff --git a/components/dachser/package.json b/components/dachser/package.json new file mode 100644 index 0000000000000..f3a2acbd655fd --- /dev/null +++ b/components/dachser/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/dachser", + "version": "0.1.0", + "description": "Pipedream Dachser Components", + "main": "dachser.app.mjs", + "keywords": [ + "pipedream", + "dachser" + ], + "homepage": "https://pipedream.com/apps/dachser", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + } +} diff --git a/components/daffy/package.json b/components/daffy/package.json index 984eba79ae946..2340e28081abd 100644 --- a/components/daffy/package.json +++ b/components/daffy/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/daffy", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Daffy Components", "main": "daffy.app.mjs", "keywords": [ @@ -11,5 +11,11 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/danny_test_app/.gitignore b/components/danny_test_app/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/danny_test_app/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/danny_test_app/app/danny_test_app.app.ts b/components/danny_test_app/app/danny_test_app.app.ts deleted file mode 100644 index 9fcb0c065ea5f..0000000000000 --- a/components/danny_test_app/app/danny_test_app.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "danny_test_app", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/danny_test_app/package.json b/components/danny_test_app/package.json index 2c1b12139656a..c753bbf513cb3 100644 --- a/components/danny_test_app/package.json +++ b/components/danny_test_app/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/danny_test_app", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Danny -- Test App Components", - "main": "dist/app/danny_test_app.app.mjs", + "main": "danny_test_app.app.mjs", "keywords": [ "pipedream", "danny_test_app" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/danny_test_app", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/dante_ai/dante_ai.app.mjs b/components/dante_ai/dante_ai.app.mjs new file mode 100644 index 0000000000000..4b9cb152d1600 --- /dev/null +++ b/components/dante_ai/dante_ai.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "dante_ai", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/dante_ai/package.json b/components/dante_ai/package.json new file mode 100644 index 0000000000000..d8574e2ae60f8 --- /dev/null +++ b/components/dante_ai/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/dante_ai", + "version": "0.0.1", + "description": "Pipedream Dante AI Components", + "main": "dante_ai.app.mjs", + "keywords": [ + "pipedream", + "dante_ai" + ], + "homepage": "https://pipedream.com/apps/dante_ai", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/dappier/dappier.app.mjs b/components/dappier/dappier.app.mjs index 8e801c8d9d868..ceff9fe576e0d 100644 --- a/components/dappier/dappier.app.mjs +++ b/components/dappier/dappier.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/darwinbox/.gitignore b/components/darwinbox/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/darwinbox/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/darwinbox/app/darwinbox.app.ts b/components/darwinbox/app/darwinbox.app.ts deleted file mode 100644 index 49d9af42c2206..0000000000000 --- a/components/darwinbox/app/darwinbox.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "darwinbox", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/darwinbox/darwinbox.app.mjs b/components/darwinbox/darwinbox.app.mjs new file mode 100644 index 0000000000000..23873e3cf3315 --- /dev/null +++ b/components/darwinbox/darwinbox.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "darwinbox", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/darwinbox/package.json b/components/darwinbox/package.json index 9cdca33078c7d..c8d95f7c03857 100644 --- a/components/darwinbox/package.json +++ b/components/darwinbox/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/darwinbox", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Darwinbox Components", - "main": "dist/app/darwinbox.app.mjs", + "main": "darwinbox.app.mjs", "keywords": [ "pipedream", "darwinbox" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/darwinbox", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/data247/.gitignore b/components/data247/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/data247/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/data247/app/data247.app.ts b/components/data247/app/data247.app.ts deleted file mode 100644 index 41444fbf9c120..0000000000000 --- a/components/data247/app/data247.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "data247", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/data247/data247.app.mjs b/components/data247/data247.app.mjs new file mode 100644 index 0000000000000..8cbf3f43d1b6b --- /dev/null +++ b/components/data247/data247.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "data247", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/data247/package.json b/components/data247/package.json index f9ff520dc808c..f2664af52981f 100644 --- a/components/data247/package.json +++ b/components/data247/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/data247", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Data247 Components", - "main": "dist/app/data247.app.mjs", + "main": "data247.app.mjs", "keywords": [ "pipedream", "data247" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/data247", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/data_axle_platform/package.json b/components/data_axle_platform/package.json index 4bbeb2048f502..865c443df1536 100644 --- a/components/data_axle_platform/package.json +++ b/components/data_axle_platform/package.json @@ -1,16 +1,24 @@ { "name": "@pipedream/data_axle_platform", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Data Axle Platform Components", "main": "dist/app/data_axle_platform.app.mjs", "keywords": [ "pipedream", "data_axle_platform" ], - "files": ["dist"], + "files": [ + "dist" + ], "homepage": "https://pipedream.com/apps/data_axle_platform", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/data_axle_platform/tsconfig.json b/components/data_axle_platform/tsconfig.json index ef45a29c82455..3a9389484d040 100644 --- a/components/data_axle_platform/tsconfig.json +++ b/components/data_axle_platform/tsconfig.json @@ -1,24 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/databricks/actions/create-sql-warehouse/create-sql-warehouse.mjs b/components/databricks/actions/create-sql-warehouse/create-sql-warehouse.mjs new file mode 100644 index 0000000000000..3efeb90ef1d60 --- /dev/null +++ b/components/databricks/actions/create-sql-warehouse/create-sql-warehouse.mjs @@ -0,0 +1,171 @@ +import databricks from "../../databricks.app.mjs"; +import constants from "../../common/constants.mjs"; +import utils from "../../common/utils.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "databricks-create-sql-warehouse", + name: "Create SQL Warehouse", + description: "Creates a new SQL Warehouse in Databricks. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/create)", + version: "0.0.1", + type: "action", + props: { + databricks, + name: { + type: "string", + label: "Warehouse Name", + description: "A human-readable name for the warehouse", + }, + clusterSize: { + type: "string", + label: "Cluster Size", + description: "Size of the cluster", + options: constants.CLUSTER_SIZES, + }, + autoStopMinutes: { + type: "integer", + label: "Auto Stop (minutes)", + description: + "Minutes of inactivity before auto-stop. 0 disables auto-stop. Must be 0 or โ‰ฅ 10.", + optional: true, + default: 10, + }, + minNumClusters: { + type: "integer", + label: "Min Number of Clusters", + description: "Minimum number of clusters to maintain (> 0 and โ‰ค min(max_num_clusters, 30)).", + optional: true, + default: 1, + }, + maxNumClusters: { + type: "integer", + label: "Max Number of Clusters", + description: "Maximum number of clusters for autoscaler (โ‰ฅ min_num_clusters and โ‰ค 30).", + optional: true, + default: 1, + }, + enablePhoton: { + type: "boolean", + label: "Enable Photon", + description: "Whether the warehouse should use Photon optimized clusters.", + optional: true, + }, + enableServerlessCompute: { + type: "boolean", + label: "Enable Serverless Compute", + description: "Whether the warehouse should use serverless compute.", + optional: true, + }, + warehouseType: { + type: "string", + label: "Warehouse Type", + description: + "Warehouse type: PRO or CLASSIC. Set PRO + enableServerlessCompute = true to use serverless.", + options: [ + "TYPE_UNSPECIFIED", + "CLASSIC", + "PRO", + ], + optional: true, + }, + spotInstancePolicy: { + type: "string", + label: "Spot Instance Policy", + description: "Configures whether the warehouse should use spot instances.", + options: [ + "POLICY_UNSPECIFIED", + "COST_OPTIMIZED", + "RELIABILITY_OPTIMIZED", + ], + optional: true, + }, + channel: { + type: "object", + label: "Channel", + description: + "Channel details. Example: `{ \"name\": \"CHANNEL_NAME_CUSTOM\", \"dbsql_version\": \"2023.35\" }`", + optional: true, + }, + tags: { + type: "object", + label: "Tags", + description: + "Custom key-value tags for resources associated with this SQL Warehouse.", + optional: true, + }, + instanceProfileArn: { + type: "string", + label: "Instance Profile ARN (Deprecated)", + description: "Deprecated. Instance profile used to pass IAM role to the cluster.", + optional: true, + }, + }, + + async run({ $ }) { + const payload = { + name: this.name, + cluster_size: this.clusterSize, + }; + + if (this.autoStopMinutes !== undefined) { + if (this.autoStopMinutes !== 0 && this.autoStopMinutes < 10) { + throw new ConfigurationError("autoStopMinutes must be 0 or โ‰ฅ 10."); + } + payload.auto_stop_mins = this.autoStopMinutes; + } + + const minNumClusters = this.minNumClusters ?? 1; + if (minNumClusters < 1 || minNumClusters > 30) { + throw new ConfigurationError("minNumClusters must be between 1 and 30."); + } + payload.min_num_clusters = minNumClusters; + + if (this.maxNumClusters !== undefined) { + if ( + this.maxNumClusters < payload.min_num_clusters || + this.maxNumClusters > 30 + ) { + throw new ConfigurationError( + `maxNumClusters must be โ‰ฅ minNumClusters (${payload.min_num_clusters}) and โ‰ค 30.`, + ); + } + payload.max_num_clusters = this.maxNumClusters; + } + + const parsedTags = utils.parseObject(this.tags); + const tagArray = Object.entries(parsedTags).map(([ + key, + value, + ]) => ({ + key, + value, + })); + if (tagArray.length) { + payload.tags = { + custom_tags: tagArray, + }; + } + + if (this.enablePhoton !== undefined) + payload.enable_photon = this.enablePhoton; + if (this.enableServerlessCompute !== undefined) + payload.enable_serverless_compute = this.enableServerlessCompute; + if (this.warehouseType) payload.warehouse_type = this.warehouseType; + if (this.spotInstancePolicy) + payload.spot_instance_policy = this.spotInstancePolicy; + if (this.channel) payload.channel = utils.parseObject(this.channel); + if (this.instanceProfileArn) + payload.instance_profile_arn = this.instanceProfileArn; + + const response = await this.databricks.createSQLWarehouse({ + data: payload, + $, + }); + + $.export( + "$summary", + `Successfully created SQL Warehouse: ${response?.name || this.name}`, + ); + return response; + }, +}; diff --git a/components/databricks/actions/delete-sql-warehouse/delete-sql-warehouse.mjs b/components/databricks/actions/delete-sql-warehouse/delete-sql-warehouse.mjs new file mode 100644 index 0000000000000..2eeea69a7713a --- /dev/null +++ b/components/databricks/actions/delete-sql-warehouse/delete-sql-warehouse.mjs @@ -0,0 +1,30 @@ +import databricks from "../../databricks.app.mjs"; + +export default { + key: "databricks-delete-sql-warehouse", + name: "Delete SQL Warehouse", + description: "Deletes a SQL Warehouse by ID. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/delete)", + version: "0.0.1", + type: "action", + props: { + databricks, + warehouseId: { + description: "The ID of the SQL Warehouse to delete", + propDefinition: [ + databricks, + "warehouseId", + ], + }, + }, + async run({ $ }) { + await this.databricks.deleteSQLWarehouse({ + warehouseId: this.warehouseId, + $, + }); + + $.export("$summary", `Successfully deleted SQL Warehouse with ID ${this.warehouseId}`); + return { + success: true, + }; + }, +}; diff --git a/components/databricks/actions/edit-sql-warehouse/edit-sql-warehouse.mjs b/components/databricks/actions/edit-sql-warehouse/edit-sql-warehouse.mjs new file mode 100644 index 0000000000000..e61b6e987109c --- /dev/null +++ b/components/databricks/actions/edit-sql-warehouse/edit-sql-warehouse.mjs @@ -0,0 +1,183 @@ +import databricks from "../../databricks.app.mjs"; +import constants from "../../common/constants.mjs"; +import utils from "../../common/utils.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "databricks-edit-sql-warehouse", + name: "Edit SQL Warehouse", + description: "Edits the configuration of an existing SQL Warehouse. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/edit)", + version: "0.0.1", + type: "action", + props: { + databricks, + warehouseId: { + description: "The ID of the SQL Warehouse to edit", + propDefinition: [ + databricks, + "warehouseId", + ], + }, + name: { + type: "string", + label: "Warehouse Name", + description: "Logical name for the warehouse. Must be unique within an org and under 100 characters.", + optional: true, + }, + clusterSize: { + type: "string", + label: "Cluster Size", + description: "Size of clusters allocated for this warehouse.", + options: constants.CLUSTER_SIZES, + optional: true, + }, + autoStopMins: { + type: "integer", + label: "Auto Stop (minutes)", + description: "Minutes of inactivity before auto-stop. 0 disables autostop. Must be 0 or โ‰ฅ 10.", + optional: true, + }, + minNumClusters: { + type: "integer", + label: "Min Number of Clusters", + description: "Minimum number of available clusters (> 0 and โ‰ค min(max_num_clusters, 30)).", + optional: true, + }, + maxNumClusters: { + type: "integer", + label: "Max Number of Clusters", + description: "Maximum number of clusters for autoscaler (โ‰ฅ min_num_clusters and โ‰ค 30).", + optional: true, + }, + enablePhoton: { + type: "boolean", + label: "Enable Photon", + description: "Use Photon optimized clusters.", + optional: true, + }, + enableServerlessCompute: { + type: "boolean", + label: "Enable Serverless Compute", + description: "Use serverless compute for this warehouse.", + optional: true, + }, + warehouseType: { + type: "string", + label: "Warehouse Type", + description: "Set to PRO (recommended) or CLASSIC. Set PRO + enable serverless to use serverless.", + options: [ + "TYPE_UNSPECIFIED", + "CLASSIC", + "PRO", + ], + optional: true, + }, + spotInstancePolicy: { + type: "string", + label: "Spot Instance Policy", + description: "Whether the warehouse should use spot instances.", + options: [ + "POLICY_UNSPECIFIED", + "COST_OPTIMIZED", + "RELIABILITY_OPTIMIZED", + ], + optional: true, + }, + tags: { + type: "object", + label: "Tags", + description: "Key-value tags for all resources associated with this warehouse (fewer than 45 tags).", + optional: true, + }, + channel: { + type: "object", + label: "Channel", + description: "Channel details. Example: `{ \"name\": \"CHANNEL_NAME_CUSTOM\", \"dbsql_version\": \"2023.35\" }`", + optional: true, + }, + instanceProfileArn: { + type: "string", + label: "Instance Profile ARN (Deprecated)", + description: "Deprecated. Instance profile used to pass IAM role to the cluster.", + optional: true, + }, + }, + async run({ $ }) { + const payload = {}; + + if (this.name !== undefined) { + if (typeof this.name !== "string" || this.name.length >= 100) { + throw new ConfigurationError("name must be a string with fewer than 100 characters."); + } + payload.name = this.name; + } + if (this.clusterSize !== undefined) payload.cluster_size = this.clusterSize; + + if (this.autoStopMins !== undefined) { + if (this.autoStopMins !== 0 && this.autoStopMins < 10) { + throw new ConfigurationError("autoStopMins must be 0 or >= 10."); + } + payload.auto_stop_mins = this.autoStopMins; + } + + if (this.minNumClusters !== undefined) { + if (this.minNumClusters < 1 || this.minNumClusters > 30) { + throw new ConfigurationError("minNumClusters must be between 1 and 30."); + } + payload.min_num_clusters = this.minNumClusters; + } + + if (this.maxNumClusters !== undefined) { + if (this.maxNumClusters < 1 || this.maxNumClusters > 30) { + throw new ConfigurationError("maxNumClusters must be between 1 and 30."); + } + if (this.minNumClusters !== undefined && this.maxNumClusters < this.minNumClusters) { + throw new ConfigurationError("maxNumClusters must be >= minNumClusters."); + } + payload.max_num_clusters = this.maxNumClusters; + } + + if (this.enablePhoton !== undefined) payload.enable_photon = this.enablePhoton; + if (this.enableServerlessCompute !== undefined) { + if (this.warehouseType === "CLASSIC" && this.enableServerlessCompute) { + throw new ConfigurationError("Serverless compute requires warehouseType = PRO."); + } + payload.enable_serverless_compute = this.enableServerlessCompute; + } + + const parsedTags = utils.parseObject(this.tags); + const tagArray = Object.entries(parsedTags).map(([ + key, + value, + ]) => ({ + key, + value, + })); + if (tagArray.length) { + payload.tags = { + custom_tags: tagArray, + }; + } + if (this.warehouseType !== undefined) payload.warehouse_type = this.warehouseType; + if (this.spotInstancePolicy !== undefined) { + payload.spot_instance_policy = this.spotInstancePolicy; + } + if (this.channel !== undefined) payload.channel = utils.parseObject(this.channel); + if (this.instanceProfileArn !== undefined) { + payload.instance_profile_arn = this.instanceProfileArn; + } + + if (!Object.keys(payload).length) { + throw new ConfigurationError("No fields to update. Provide at least one property."); + } + + const response = await this.databricks.editSQLWarehouse({ + warehouseId: this.warehouseId, + data: payload, + $, + }); + + $.export("$summary", `Successfully edited SQL Warehouse ID ${this.warehouseId}`); + return response; + }, +}; diff --git a/components/databricks/actions/get-run-output/get-run-output.mjs b/components/databricks/actions/get-run-output/get-run-output.mjs index 1fb6c77c9fcdd..ecfa86fcf0576 100644 --- a/components/databricks/actions/get-run-output/get-run-output.mjs +++ b/components/databricks/actions/get-run-output/get-run-output.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-get-run-output", name: "Get Run Output", description: "Retrieve the output and metadata of a single task run. [See the documentation](https://docs.databricks.com/en/workflows/jobs/jobs-2.0-api.html#runs-get-output)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { databricks, diff --git a/components/databricks/actions/get-sql-warehouse-config/get-sql-warehouse-config.mjs b/components/databricks/actions/get-sql-warehouse-config/get-sql-warehouse-config.mjs new file mode 100644 index 0000000000000..37202334854c5 --- /dev/null +++ b/components/databricks/actions/get-sql-warehouse-config/get-sql-warehouse-config.mjs @@ -0,0 +1,19 @@ +import databricks from "../../databricks.app.mjs"; + +export default { + key: "databricks-get-sql-warehouse-config", + name: "Get SQL Warehouse Config", + description: "Retrieves the global configuration for SQL Warehouses. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/getworkspacewarehouseconfig)", + version: "0.0.1", + type: "action", + props: { + databricks, + }, + async run({ $ }) { + const response = await this.databricks.getSQLWarehouseConfig({ + $, + }); + $.export("$summary", "Successfully retrieved SQL Warehouse configuration"); + return response; + }, +}; diff --git a/components/databricks/actions/get-sql-warehouse-permissions/get-sql-warehouse-permissions.mjs b/components/databricks/actions/get-sql-warehouse-permissions/get-sql-warehouse-permissions.mjs new file mode 100644 index 0000000000000..66ec10e7d75a7 --- /dev/null +++ b/components/databricks/actions/get-sql-warehouse-permissions/get-sql-warehouse-permissions.mjs @@ -0,0 +1,28 @@ +import databricks from "../../databricks.app.mjs"; + +export default { + key: "databricks-get-sql-warehouse-permissions", + name: "Get SQL Warehouse Permissions", + description: "Retrieves the permissions for a specific SQL Warehouse. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/getpermissions)", + version: "0.0.1", + type: "action", + props: { + databricks, + warehouseId: { + description: "The ID of the SQL Warehouse to fetch permissions for", + propDefinition: [ + databricks, + "warehouseId", + ], + }, + }, + async run({ $ }) { + const response = await this.databricks.getSQLWarehousePermissions({ + warehouseId: this.warehouseId, + $, + }); + + $.export("$summary", `Retrieved permissions for SQL Warehouse ID ${this.warehouseId}`); + return response; + }, +}; diff --git a/components/databricks/actions/get-sql-warehouse/get-sql-warehouse.mjs b/components/databricks/actions/get-sql-warehouse/get-sql-warehouse.mjs new file mode 100644 index 0000000000000..3c5849846d41f --- /dev/null +++ b/components/databricks/actions/get-sql-warehouse/get-sql-warehouse.mjs @@ -0,0 +1,28 @@ +import databricks from "../../databricks.app.mjs"; + +export default { + key: "databricks-get-sql-warehouse", + name: "Get SQL Warehouse", + description: "Retrieves details for a specific SQL Warehouse. [See docs](https://docs.databricks.com/api/workspace/warehouses/get)", + version: "0.0.1", + type: "action", + props: { + databricks, + warehouseId: { + description: "The ID of the SQL Warehouse to retrieve", + propDefinition: [ + databricks, + "warehouseId", + ], + }, + }, + async run({ $ }) { + const response = await this.databricks.getSQLWarehouse({ + warehouseId: this.warehouseId, + $, + }); + + $.export("$summary", `Retrieved details for SQL Warehouse ID ${this.warehouseId}`); + return response; + }, +}; diff --git a/components/databricks/actions/list-runs/list-runs.mjs b/components/databricks/actions/list-runs/list-runs.mjs index 4ad98bd866b54..f24e52369b6e9 100644 --- a/components/databricks/actions/list-runs/list-runs.mjs +++ b/components/databricks/actions/list-runs/list-runs.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-list-runs", name: "List Runs", description: "Lists all runs available to the user. [See the documentation](https://docs.databricks.com/en/workflows/jobs/jobs-2.0-api.html#runs-list)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { databricks, diff --git a/components/databricks/actions/list-sql-warehouses/list-sql-warehouses.mjs b/components/databricks/actions/list-sql-warehouses/list-sql-warehouses.mjs new file mode 100644 index 0000000000000..fbcf1865e22ed --- /dev/null +++ b/components/databricks/actions/list-sql-warehouses/list-sql-warehouses.mjs @@ -0,0 +1,28 @@ +import databricks from "../../databricks.app.mjs"; + +export default { + key: "databricks-list-sql-warehouses", + name: "List SQL Warehouses", + description: "Lists all SQL Warehouses available in the Databricks workspace. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/list)", + version: "0.0.1", + type: "action", + props: { + databricks, + }, + async run({ $ }) { + const { warehouses } = await this.databricks.listSQLWarehouses({ + $, + }); + + if (!warehouses?.length) { + $.export("$summary", "No warehouses found."); + return []; + } + + $.export("$summary", `Successfully retrieved ${warehouses.length} warehouse${warehouses.length === 1 + ? "" + : "s"}.`); + + return warehouses; + }, +}; diff --git a/components/databricks/actions/run-job-now/run-job-now.mjs b/components/databricks/actions/run-job-now/run-job-now.mjs index f0c75c2c1a8cb..5de3e46e4ea59 100644 --- a/components/databricks/actions/run-job-now/run-job-now.mjs +++ b/components/databricks/actions/run-job-now/run-job-now.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-run-job-now", name: "Run Job Now", description: "Run a job now and return the id of the triggered run. [See the documentation](https://docs.databricks.com/en/workflows/jobs/jobs-2.0-api.html#runs-list)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { databricks, diff --git a/components/databricks/actions/set-sql-warehouse-config/set-sql-warehouse-config.mjs b/components/databricks/actions/set-sql-warehouse-config/set-sql-warehouse-config.mjs new file mode 100644 index 0000000000000..730cd3b96cb26 --- /dev/null +++ b/components/databricks/actions/set-sql-warehouse-config/set-sql-warehouse-config.mjs @@ -0,0 +1,161 @@ +import databricks from "../../databricks.app.mjs"; +import utils from "../../common/utils.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "databricks-set-sql-warehouse-config", + name: "Set SQL Warehouse Config", + description: "Updates the global configuration for SQL Warehouses. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/setworkspacewarehouseconfig)", + version: "0.0.1", + type: "action", + props: { + databricks, + instanceProfileArn: { + type: "string", + label: "Instance Profile ARN", + description: "Instance profile ARN used to pass an IAM role to clusters (AWS).", + optional: true, + }, + googleServiceAccount: { + type: "string", + label: "Google Service Account", + description: "Service account email used for GCP workspaces, if applicable.", + optional: true, + }, + securityPolicy: { + type: "string", + label: "Security Policy", + description: "Workspace-wide security policy for SQL Warehouses (if applicable).", + options: [ + "NONE", + "DATA_ACCESS_CONTROL", + "PASSTHROUGH", + ], + optional: true, + }, + channel: { + type: "object", + label: "Channel", + description: "Channel details. Example: `{ \"name\": \"CHANNEL_NAME_CUSTOM\", \"dbsql_version\": \"2023.35\" }`", + optional: true, + }, + enabledWarehouseTypes: { + type: "string[]", + label: "Enabled Warehouse Types", + description: "Specify which warehouse types are enabled. Example item: `{ \"warehouse_type\": \"PRO\", \"enabled\": true }`", + optional: true, + }, + configParam: { + type: "object", + label: "Config Parameters", + description: "General config key/value pairs. Example item: `{ \"key\": \"some.config\", \"value\": \"true\" }`", + optional: true, + }, + globalParam: { + type: "object", + label: "Global Parameters", + description: "Global config key/value pairs applied to all warehouses.", + optional: true, + }, + sqlConfigurationParameters: { + type: "object", + label: "SQL Configuration Parameters", + description: "SQL-specific configuration key/value pairs.", + optional: true, + }, + dataAccessConfig: { + type: "object", + label: "Data Access Config", + description: "Key/value pairs for data access configuration (e.g., credentials passthrough, external storage access).", + optional: true, + }, + }, + async run({ $ }) { + const current = await this.databricks.getSQLWarehouseConfig({ + $, + }); + const allowed = [ + "enable_serverless_compute", + "instance_profile_arn", + "google_service_account", + "security_policy", + "channel", + "enabled_warehouse_types", + "config_param", + "global_param", + "sql_configuration_parameters", + "data_access_config", + ]; + const payload = Object.fromEntries( + Object.entries(current || {}).filter(([ + k, + ]) => allowed.includes(k)), + ); + + if (this.instanceProfileArn !== undefined) { + payload.instance_profile_arn = this.instanceProfileArn; + } + if (this.googleServiceAccount !== undefined) { + payload.google_service_account = this.googleServiceAccount; + } + if (this.securityPolicy !== undefined) { + payload.security_policy = this.securityPolicy; + } + if (this.channel !== undefined) { + payload.channel = utils.parseObject(this.channel); + } + const enabledWarehouseTypes = utils.parseObject(this.enabledWarehouseTypes); + if (Array.isArray(enabledWarehouseTypes) && enabledWarehouseTypes.length) { + payload.enabled_warehouse_types = enabledWarehouseTypes.map((item, idx) => { + let obj = item; + if (typeof item === "string") { + try { obj = JSON.parse(item); } catch (e) { + throw new ConfigurationError(`enabledWarehouseTypes[${idx}] must be valid JSON: ${e.message}`); + } + } + if (!obj || typeof obj !== "object") { + throw new ConfigurationError(`enabledWarehouseTypes[${idx}] must be an object with { "warehouse_type": string, "enabled": boolean }`); + } + const { + warehouse_type, enabled, + } = obj; + if (typeof warehouse_type !== "string" || typeof enabled !== "boolean") { + throw new ConfigurationError(`enabledWarehouseTypes[${idx}] invalid shape; expected { "warehouse_type": string, "enabled": boolean }`); + } + return { + warehouse_type, + enabled: Boolean(enabled), + }; + }); + } + const configParam = utils.parseObject(this.configParam); + if (Array.isArray(configParam) && configParam.length) { + payload.config_param = { + configuration_pairs: configParam, + }; + } + const globalParam = utils.parseObject(this.globalParam); + if (Array.isArray(globalParam) && globalParam.length) { + payload.global_param = { + configuration_pairs: globalParam, + }; + } + const sqlConfigurationParameters = utils.parseObject(this.sqlConfigurationParameters); + if (Array.isArray(sqlConfigurationParameters) && sqlConfigurationParameters.length) { + payload.sql_configuration_parameters = { + configuration_pairs: sqlConfigurationParameters, + }; + } + const dataAccessConfig = utils.parseObject(this.dataAccessConfig); + if (Array.isArray(dataAccessConfig) && dataAccessConfig.length) { + payload.data_access_config = dataAccessConfig; + } + const response = await this.databricks.setSQLWarehouseConfig({ + data: payload, + $, + }); + + $.export("$summary", "Successfully updated SQL Warehouse configuration"); + return response; + }, +}; diff --git a/components/databricks/actions/set-sql-warehouse-permissions/set-sql-warehouse-permissions.mjs b/components/databricks/actions/set-sql-warehouse-permissions/set-sql-warehouse-permissions.mjs new file mode 100644 index 0000000000000..7fc5ae029df47 --- /dev/null +++ b/components/databricks/actions/set-sql-warehouse-permissions/set-sql-warehouse-permissions.mjs @@ -0,0 +1,45 @@ +import databricks from "../../databricks.app.mjs"; +import utils from "../../common/utils.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "databricks-set-sql-warehouse-permissions", + name: "Set SQL Warehouse Permissions", + description: "Updates the permissions for a specific SQL Warehouse. [See docs](https://docs.databricks.com/api/workspace/warehouses/setpermissions)", + version: "0.0.1", + type: "action", + props: { + databricks, + warehouseId: { + description: "The ID of the SQL Warehouse to update permissions for", + propDefinition: [ + databricks, + "warehouseId", + ], + }, + accessControlList: { + type: "string[]", + label: "Access Control List", + description: "List of access control entries. Each entry must include one of `user_name`, `group_name`, or `service_principal_name`, and a `permission_level` (`CAN_VIEW`, `CAN_MONITOR`, `CAN_USE`, `CAN_MANAGE`).", + }, + }, + async run({ $ }) { + let acl = utils.parseObject(this.accessControlList); + if (!Array.isArray(acl)) { + throw new ConfigurationError("Access Control List must be an array"); + } + acl = acl.filter((entry) => entry && Object.keys(entry).length > 0); + + const response = await this.databricks.setSQLWarehousePermissions({ + warehouseId: this.warehouseId, + data: { + access_control_list: acl, + }, + $, + }); + + $.export("$summary", `Successfully updated permissions for SQL Warehouse ID ${this.warehouseId}`); + return response; + }, + +}; diff --git a/components/databricks/actions/start-sql-warehouse/start-sql-warehouse.mjs b/components/databricks/actions/start-sql-warehouse/start-sql-warehouse.mjs new file mode 100644 index 0000000000000..2de2b61cba5ac --- /dev/null +++ b/components/databricks/actions/start-sql-warehouse/start-sql-warehouse.mjs @@ -0,0 +1,28 @@ +import databricks from "../../databricks.app.mjs"; + +export default { + key: "databricks-start-sql-warehouse", + name: "Start SQL Warehouse", + description: "Starts a SQL Warehouse by ID. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/start)", + version: "0.0.1", + type: "action", + props: { + databricks, + warehouseId: { + description: "The ID of the SQL Warehouse to start", + propDefinition: [ + databricks, + "warehouseId", + ], + }, + }, + async run({ $ }) { + const response = await this.databricks.startSQLWarehouse({ + warehouseId: this.warehouseId, + $, + }); + + $.export("$summary", `Successfully started SQL Warehouse with ID ${this.warehouseId}`); + return response; + }, +}; diff --git a/components/databricks/actions/stop-sql-warehouse/stop-sql-warehouse.mjs b/components/databricks/actions/stop-sql-warehouse/stop-sql-warehouse.mjs new file mode 100644 index 0000000000000..1388ec5102b61 --- /dev/null +++ b/components/databricks/actions/stop-sql-warehouse/stop-sql-warehouse.mjs @@ -0,0 +1,28 @@ +import databricks from "../../databricks.app.mjs"; + +export default { + key: "databricks-stop-sql-warehouse", + name: "Stop SQL Warehouse", + description: "Stops a SQL Warehouse by ID. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/stop)", + version: "0.0.1", + type: "action", + props: { + databricks, + warehouseId: { + description: "The ID of the SQL Warehouse to stop", + propDefinition: [ + databricks, + "warehouseId", + ], + }, + }, + async run({ $ }) { + const response = await this.databricks.stopSQLWarehouse({ + warehouseId: this.warehouseId, + $, + }); + + $.export("$summary", `Successfully stopped SQL Warehouse with ID ${this.warehouseId}`); + return response; + }, +}; diff --git a/components/databricks/common/constants.mjs b/components/databricks/common/constants.mjs new file mode 100644 index 0000000000000..4b53df7a27a86 --- /dev/null +++ b/components/databricks/common/constants.mjs @@ -0,0 +1,15 @@ +export const CLUSTER_SIZES = [ + "2X-Small", + "X-Small", + "Small", + "Medium", + "Large", + "X-Large", + "2X-Large", + "3X-Large", + "4X-Large", +]; + +export default { + CLUSTER_SIZES, +}; diff --git a/components/databricks/common/utils.mjs b/components/databricks/common/utils.mjs new file mode 100644 index 0000000000000..40bdddb456371 --- /dev/null +++ b/components/databricks/common/utils.mjs @@ -0,0 +1,31 @@ +const parseObject = (obj) => { + if (!obj) return {}; + + if (typeof obj === "string") { + try { + return JSON.parse(obj); + } catch (e) { + return obj; + } + } + + if (Array.isArray(obj)) { + return obj.map((item) => parseObject(item)); + } + + if (typeof obj === "object") { + return Object.fromEntries(Object.entries(obj).map(([ + key, + value, + ]) => [ + key, + parseObject(value), + ])); + } + + return obj; +}; + +export default { + parseObject, +}; diff --git a/components/databricks/databricks.app.mjs b/components/databricks/databricks.app.mjs index 6daaf8eec3e84..05d6f88d697ab 100644 --- a/components/databricks/databricks.app.mjs +++ b/components/databricks/databricks.app.mjs @@ -44,6 +44,21 @@ export default { })) || []; }, }, + warehouseId: { + type: "string", + label: "Warehouse ID", + description: "The ID of the SQL Warehouse to get runs from", + async options() { + const { warehouses } = await this.listSQLWarehouses(); + return warehouses?.map(({ + id: value, + name: label, + }) => ({ + value, + label, + })) || []; + }, + }, }, methods: { _baseUrl() { @@ -90,5 +105,99 @@ export default { ...args, }); }, + createSQLWarehouse(args = {}) { + return this._makeRequest({ + path: "/sql/warehouses", + method: "POST", + ...args, + }); + }, + deleteSQLWarehouse({ + warehouseId, ...args + }) { + return this._makeRequest({ + path: `/sql/warehouses/${warehouseId}`, + method: "DELETE", + ...args, + }); + }, + getSQLWarehouse({ + warehouseId, ...args + }) { + return this._makeRequest({ + path: `/sql/warehouses/${warehouseId}`, + method: "GET", + ...args, + }); + }, + listSQLWarehouses(args = {}) { + return this._makeRequest({ + path: "/sql/warehouses", + ...args, + }); + }, + editSQLWarehouse({ + warehouseId, ...args + }) { + return this._makeRequest({ + path: `/sql/warehouses/${warehouseId}/edit`, + method: "POST", + ...args, + }); + }, + startSQLWarehouse({ + warehouseId, ...args + }) { + return this._makeRequest({ + path: `/sql/warehouses/${warehouseId}/start`, + method: "POST", + ...args, + }); + }, + + stopSQLWarehouse({ + warehouseId, ...args + }) { + return this._makeRequest({ + path: `/sql/warehouses/${warehouseId}/stop`, + method: "POST", + ...args, + }); + }, + + getSQLWarehouseConfig(args = {}) { + return this._makeRequest({ + path: "/sql/config/warehouses", + method: "GET", + ...args, + }); + }, + + setSQLWarehouseConfig(args = {}) { + return this._makeRequest({ + path: "/sql/config/warehouses", + method: "PUT", + ...args, + }); + }, + getSQLWarehousePermissions({ + warehouseId, ...args + }) { + return this._makeRequest({ + path: `/permissions/warehouses/${warehouseId}`, + method: "GET", + ...args, + }); + }, + + setSQLWarehousePermissions({ + warehouseId, ...args + }) { + return this._makeRequest({ + path: `/permissions/warehouses/${warehouseId}`, + method: "PUT", + ...args, + }); + }, }, }; diff --git a/components/databricks/package.json b/components/databricks/package.json index 50b863968a934..f49e7482191ef 100644 --- a/components/databricks/package.json +++ b/components/databricks/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/databricks", - "version": "0.1.0", + "version": "0.2.0", "description": "Pipedream Databricks Components", "main": "databricks.app.mjs", "keywords": [ diff --git a/components/dataforseo/actions/get-app-intersection/get-app-intersection.mjs b/components/dataforseo/actions/get-app-intersection/get-app-intersection.mjs new file mode 100644 index 0000000000000..374a1086d130b --- /dev/null +++ b/components/dataforseo/actions/get-app-intersection/get-app-intersection.mjs @@ -0,0 +1,69 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; +import { parseArray } from "../../common/utils.mjs"; + +export default { + key: "dataforseo-get-app-intersection", + name: "Get App Intersection", + description: "Compare keyword overlap between mobile apps to find shared ranking opportunities. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/app_intersection/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + appIds: { + type: "string[]", + label: "App IDs", + description: "Package names (IDs) of target Android apps on Google Play; you can find the package name in the app page URL (e.g., com.example.app)", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const appIds = {}; + const parsedAppIds = parseArray(this.appIds); + + for (let i = 0; i < parsedAppIds.length; i++) { + appIds[`${i + 1}`] = parsedAppIds[i]; + } + + const response = await this.dataforseo.getAppIntersection({ + $, + debug: true, + data: [ + { + app_ids: appIds, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved app intersection."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-app-reviews-summary/get-app-reviews-summary.mjs b/components/dataforseo/actions/get-app-reviews-summary/get-app-reviews-summary.mjs new file mode 100644 index 0000000000000..1286194a3ee19 --- /dev/null +++ b/components/dataforseo/actions/get-app-reviews-summary/get-app-reviews-summary.mjs @@ -0,0 +1,64 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-app-reviews-summary", + name: "Get App Reviews Summary", + description: "Get app reviews and ratings summary for mobile app reputation analysis. [See the documentation](https://docs.dataforseo.com/v3/app_data/apple/app_reviews/task_post/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + appId: { + type: "string", + label: "App ID", + description: "The ID of the mobile application on App Store. Yyou can find the ID in the URL of every app listed on App Store. Example: in the URL https://apps.apple.com/us/app/id835599320, the id is `835599320`", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + sortBy: { + type: "string", + label: "Sort By", + description: "Sort reviews by specific criteria", + options: [ + "most_recent", + "most_helpful", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getAppReviewsSummary({ + $, + data: [ + { + app_id: this.appId, + location_code: this.locationCode, + language_code: this.languageCode, + sort_by: this.sortBy, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved app reviews summary for "${this.appId}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-app-store-search/get-app-store-search.mjs b/components/dataforseo/actions/get-app-store-search/get-app-store-search.mjs new file mode 100644 index 0000000000000..40e99a17d12e0 --- /dev/null +++ b/components/dataforseo/actions/get-app-store-search/get-app-store-search.mjs @@ -0,0 +1,85 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-app-store-search", + name: "Get App Store Search", + description: "Search iOS App Store apps by keywords for app store optimization (ASO) analysis. [See the documentation](https://docs.dataforseo.com/v3/app_data/apple/app_searches/task_post/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + waitForResults: { + type: "boolean", + label: "Wait for Results", + description: "Wait for the results to be available. Not for use with Pipedream Connect.", + default: true, + optional: true, + }, + postbackUrl: { + type: "string", + label: "Postback URL", + description: "The URL to receive the search results. Only applicable when \"Wait for Results\" = `FALSE`", + optional: true, + }, + }, + async run({ $ }) { + let response; + const context = $.context; + const run = context + ? context.run + : { + runs: 1, + }; + + if (run.runs === 1) { + let postbackUrl = this.postbackUrl; + if (context && this.waitForResults) { + ({ resume_url: postbackUrl } = $.flow.rerun(600000, null, 1)); + } + response = await this.dataforseo.getAppStoreSearch({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + postback_url: postbackUrl, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + } + + if (run.runs > 1) { + response = run.callback_request.body; + } + + $.export("$summary", `Successfully searched App Store for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-backlinks-history/get-backlinks-history.mjs b/components/dataforseo/actions/get-backlinks-history/get-backlinks-history.mjs index 1d3799d566e97..e0f3c87b1c760 100644 --- a/components/dataforseo/actions/get-backlinks-history/get-backlinks-history.mjs +++ b/components/dataforseo/actions/get-backlinks-history/get-backlinks-history.mjs @@ -5,7 +5,7 @@ export default { name: "Get Backlinks History", description: "Get historical backlinks data back to the beginning of 2019. [See the documentation](https://docs.dataforseo.com/v3/backlinks/history/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBacklinksHistory(args = {}) { diff --git a/components/dataforseo/actions/get-backlinks-summary/get-backlinks-summary.mjs b/components/dataforseo/actions/get-backlinks-summary/get-backlinks-summary.mjs index 9648d58170fd6..86045edd63625 100644 --- a/components/dataforseo/actions/get-backlinks-summary/get-backlinks-summary.mjs +++ b/components/dataforseo/actions/get-backlinks-summary/get-backlinks-summary.mjs @@ -6,7 +6,7 @@ export default { name: "Get Backlinks Summary", description: "Get an overview of backlinks data available for a given domain, subdomain, or webpage. [See the documentation](https://docs.dataforseo.com/v3/backlinks/summary/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBacklinksSummary(args = {}) { diff --git a/components/dataforseo/actions/get-backlinks/get-backlinks.mjs b/components/dataforseo/actions/get-backlinks/get-backlinks.mjs index d2cc5879f8730..fa7e0ae44becd 100644 --- a/components/dataforseo/actions/get-backlinks/get-backlinks.mjs +++ b/components/dataforseo/actions/get-backlinks/get-backlinks.mjs @@ -6,7 +6,7 @@ export default { name: "Get Backlinks", description: "Get a list of backlinks and relevant data for a given domain, subdomain, or webpage. [See the documentation](https://docs.dataforseo.com/v3/backlinks/backlinks/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBacklinks(args = {}) { diff --git a/components/dataforseo/actions/get-bing-organic-results/get-bing-organic-results.mjs b/components/dataforseo/actions/get-bing-organic-results/get-bing-organic-results.mjs new file mode 100644 index 0000000000000..f4b051ac8dbce --- /dev/null +++ b/components/dataforseo/actions/get-bing-organic-results/get-bing-organic-results.mjs @@ -0,0 +1,69 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-bing-organic-results", + name: "Get Bing Organic Results", + description: "Retrieve Bing organic search results for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/serp/bing/organic/live/regular/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + depth: { + type: "integer", + label: "Depth", + description: "The parsing depth. Default: 100", + max: 700, + optional: true, + }, + maxCrawlPages: { + type: "integer", + label: "Max Crawl Pages", + description: "The page crawl limit", + max: 100, + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getBingOrganicResults({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + depth: this.depth, + max_crawl_pages: this.maxCrawlPages, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Bing organic results for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-bulk-backlinks/get-bulk-backlinks.mjs b/components/dataforseo/actions/get-bulk-backlinks/get-bulk-backlinks.mjs index c94c1c9d0b7d1..892647c9953f8 100644 --- a/components/dataforseo/actions/get-bulk-backlinks/get-bulk-backlinks.mjs +++ b/components/dataforseo/actions/get-bulk-backlinks/get-bulk-backlinks.mjs @@ -5,7 +5,7 @@ export default { name: "Get Bulk Backlinks", description: "Get the number of backlinks pointing to specified domains, subdomains, and pages. [See the documentation](https://docs.dataforseo.com/v3/backlinks/bulk_backlinks/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBulkBacklinks(args = {}) { diff --git a/components/dataforseo/actions/get-bulk-ranks/get-bulk-ranks.mjs b/components/dataforseo/actions/get-bulk-ranks/get-bulk-ranks.mjs index 6b86621c249fc..f686cb90e6ea3 100644 --- a/components/dataforseo/actions/get-bulk-ranks/get-bulk-ranks.mjs +++ b/components/dataforseo/actions/get-bulk-ranks/get-bulk-ranks.mjs @@ -5,7 +5,7 @@ export default { name: "Get Bulk Ranks", description: "Get rank scores of specified domains, subdomains, and pages. [See the documentation](https://docs.dataforseo.com/v3/backlinks/bulk_ranks/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBacklinksBulkRanks(args = {}) { diff --git a/components/dataforseo/actions/get-bulk-referring-domains/get-bulk-referring-domains.mjs b/components/dataforseo/actions/get-bulk-referring-domains/get-bulk-referring-domains.mjs index 8ab65b58f051e..324313c46c208 100644 --- a/components/dataforseo/actions/get-bulk-referring-domains/get-bulk-referring-domains.mjs +++ b/components/dataforseo/actions/get-bulk-referring-domains/get-bulk-referring-domains.mjs @@ -5,7 +5,7 @@ export default { name: "Get Bulk Referring Domains", description: "Get the number of referring domains pointing to the specified domains, subdomains, and pages. [See the documentation](https://docs.dataforseo.com/v3/backlinks/bulk_referring_domains/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBulkReferringDomains(args = {}) { diff --git a/components/dataforseo/actions/get-bulk-spam-score/get-bulk-spam-score.mjs b/components/dataforseo/actions/get-bulk-spam-score/get-bulk-spam-score.mjs index 08feabaec805b..01d665ed7b74c 100644 --- a/components/dataforseo/actions/get-bulk-spam-score/get-bulk-spam-score.mjs +++ b/components/dataforseo/actions/get-bulk-spam-score/get-bulk-spam-score.mjs @@ -5,7 +5,7 @@ export default { name: "Get Bulk Spam Score", description: "Get spam scores of the specified domains, subdomains, and pages. [See the documentation](https://docs.dataforseo.com/v3/backlinks/bulk_spam_score/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBulkSpamScore(args = {}) { diff --git a/components/dataforseo/actions/get-bulk-traffic-analytics/get-bulk-traffic-analytics.mjs b/components/dataforseo/actions/get-bulk-traffic-analytics/get-bulk-traffic-analytics.mjs new file mode 100644 index 0000000000000..4cd1f94dbafdb --- /dev/null +++ b/components/dataforseo/actions/get-bulk-traffic-analytics/get-bulk-traffic-analytics.mjs @@ -0,0 +1,54 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-bulk-traffic-analytics", + name: "Get Bulk Traffic Analytics", + description: "Get traffic estimates and analytics for multiple domains in bulk. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/bulk_traffic_estimation/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + targets: { + propDefinition: [ + dataforseo, + "targets", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getBulkTrafficAnalytics({ + $, + data: [ + { + targets: this.targets, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved bulk traffic analytics for ${this.targets.length} domains.`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-business-listings-categories/get-business-listings-categories.mjs b/components/dataforseo/actions/get-business-listings-categories/get-business-listings-categories.mjs new file mode 100644 index 0000000000000..b64030edc86c2 --- /dev/null +++ b/components/dataforseo/actions/get-business-listings-categories/get-business-listings-categories.mjs @@ -0,0 +1,29 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-business-listings-categories", + name: "Get Business Listings Categories", + description: "Get available business categories for business listings and local SEO. [See the documentation](https://docs.dataforseo.com/v3/business_data/business_listings/categories/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getBusinessListingsCategories({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved business listings categories."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-business-listings/get-business-listings.mjs b/components/dataforseo/actions/get-business-listings/get-business-listings.mjs index 078405645f80a..cd6a340c323c2 100644 --- a/components/dataforseo/actions/get-business-listings/get-business-listings.mjs +++ b/components/dataforseo/actions/get-business-listings/get-business-listings.mjs @@ -4,7 +4,7 @@ export default { key: "dataforseo-get-business-listings", name: "Get Business Listings", description: "Get Business Listings. [See the documentation](https://docs.dataforseo.com/v3/business_data/business_listings/search/live/?bash)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { dataforseo, diff --git a/components/dataforseo/actions/get-categories-aggregation/get-categories-aggregation.mjs b/components/dataforseo/actions/get-categories-aggregation/get-categories-aggregation.mjs index 032fba1faa865..04bb26bc21b37 100644 --- a/components/dataforseo/actions/get-categories-aggregation/get-categories-aggregation.mjs +++ b/components/dataforseo/actions/get-categories-aggregation/get-categories-aggregation.mjs @@ -6,7 +6,7 @@ export default { name: "Get Categories Aggregation", description: "Get information about groups of related categories and the number of entities in each category. [See the documentation](https://docs.dataforseo.com/v3/business_data/business_listings/categories_aggregation/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getCategoriesAggregation(args = {}) { diff --git a/components/dataforseo/actions/get-competitor-domains/get-competitor-domains.mjs b/components/dataforseo/actions/get-competitor-domains/get-competitor-domains.mjs new file mode 100644 index 0000000000000..10107c66de228 --- /dev/null +++ b/components/dataforseo/actions/get-competitor-domains/get-competitor-domains.mjs @@ -0,0 +1,61 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-competitor-domains", + name: "Get Competitor Domains", + description: "Find competing domains for specified keywords or target domain. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/competitors_domain/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + target: { + propDefinition: [ + dataforseo, + "target", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getCompetitorDomains({ + $, + data: [ + { + target: this.target, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved competitor domains for "${this.target}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-content-citations/get-content-citations.mjs b/components/dataforseo/actions/get-content-citations/get-content-citations.mjs new file mode 100644 index 0000000000000..13aa4851dcf4c --- /dev/null +++ b/components/dataforseo/actions/get-content-citations/get-content-citations.mjs @@ -0,0 +1,46 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-content-citations", + name: "Get Content Citations", + description: "Find mentions and citations of keywords or brands online for brand monitoring and content strategy. [See the documentation](https://docs.dataforseo.com/v3/content_analysis/search/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getContentCitations({ + $, + data: [ + { + keyword: this.keyword, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved content citations for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-content-summary/get-content-summary.mjs b/components/dataforseo/actions/get-content-summary/get-content-summary.mjs new file mode 100644 index 0000000000000..c79ab1836b2f9 --- /dev/null +++ b/components/dataforseo/actions/get-content-summary/get-content-summary.mjs @@ -0,0 +1,39 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-content-summary", + name: "Get Content Summary", + description: "Get content performance metrics and summary for content strategy optimization. [See the documentation](https://docs.dataforseo.com/v3/content_analysis/summary/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getContentSummary({ + $, + data: [ + { + keyword: this.keyword, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved content summary for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-domain-intersection/get-domain-intersection.mjs b/components/dataforseo/actions/get-domain-intersection/get-domain-intersection.mjs new file mode 100644 index 0000000000000..ab565b7b3c621 --- /dev/null +++ b/components/dataforseo/actions/get-domain-intersection/get-domain-intersection.mjs @@ -0,0 +1,66 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-domain-intersection", + name: "Get Domain Intersection", + description: "Compare keyword overlap between multiple domains to find shared ranking opportunities. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/domain_intersection/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + target1: { + type: "string", + label: "Target 1", + description: "The first domain to compare. The domain should be specified without https:// and www.", + }, + target2: { + type: "string", + label: "Target 2", + description: "The second domain to compare. The domain should be specified without https:// and www.", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getDomainIntersection({ + $, + data: [ + { + target1: this.target1, + target2: this.target2, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved domain intersection for domains ${this.target1} and ${this.target2}.`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-domain-keywords/get-domain-keywords.mjs b/components/dataforseo/actions/get-domain-keywords/get-domain-keywords.mjs new file mode 100644 index 0000000000000..ab162e4a4ea41 --- /dev/null +++ b/components/dataforseo/actions/get-domain-keywords/get-domain-keywords.mjs @@ -0,0 +1,61 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-domain-keywords", + name: "Get Domain Keywords", + description: "Get all keywords a domain ranks for in organic search results. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/ranked_keywords/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + target: { + propDefinition: [ + dataforseo, + "target", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getDomainKeywords({ + $, + data: [ + { + target: this.target, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved domain keywords for "${this.target}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-domain-pages-summary/get-domain-pages-summary.mjs b/components/dataforseo/actions/get-domain-pages-summary/get-domain-pages-summary.mjs index 6a7ee01178cb0..1ab9e1de0a573 100644 --- a/components/dataforseo/actions/get-domain-pages-summary/get-domain-pages-summary.mjs +++ b/components/dataforseo/actions/get-domain-pages-summary/get-domain-pages-summary.mjs @@ -6,7 +6,7 @@ export default { name: "Get Domain Pages Summary", description: "Get detailed summary data on all backlinks and related metrics for each page of the specified domain or subdomain. [See the documentation](https://docs.dataforseo.com/v3/backlinks/domain_pages_summary/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getDomainPagesSummary(args = {}) { diff --git a/components/dataforseo/actions/get-domain-rank-overview/get-domain-rank-overview.mjs b/components/dataforseo/actions/get-domain-rank-overview/get-domain-rank-overview.mjs new file mode 100644 index 0000000000000..af3d93cf00ffc --- /dev/null +++ b/components/dataforseo/actions/get-domain-rank-overview/get-domain-rank-overview.mjs @@ -0,0 +1,54 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-domain-rank-overview", + name: "Get Domain Rank Overview", + description: "Retrieve domain authority and ranking metrics for specified domains. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/domain_rank_overview/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + target: { + propDefinition: [ + dataforseo, + "target", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getDomainRankOverview({ + $, + data: [ + { + target: this.target, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved domain rank overview for "${this.target}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-domain-whois-overview/get-domain-whois-overview.mjs b/components/dataforseo/actions/get-domain-whois-overview/get-domain-whois-overview.mjs new file mode 100644 index 0000000000000..091add601f27f --- /dev/null +++ b/components/dataforseo/actions/get-domain-whois-overview/get-domain-whois-overview.mjs @@ -0,0 +1,40 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-domain-whois-overview", + name: "Get Domain Whois Overview", + description: "Get domain registration data and ownership information. [See the documentation](https://docs.dataforseo.com/v3/domain_analytics/whois/overview/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getDomainWhoisOverview({ + $, + data: [ + { + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved domain whois overview."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-ad-traffic-by-keyword/get-google-ads-ad-traffic-by-keyword.mjs b/components/dataforseo/actions/get-google-ads-ad-traffic-by-keyword/get-google-ads-ad-traffic-by-keyword.mjs new file mode 100644 index 0000000000000..29038dc1687a2 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-ad-traffic-by-keyword/get-google-ads-ad-traffic-by-keyword.mjs @@ -0,0 +1,73 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-ad-traffic-by-keyword", + name: "Get Google Ads Ad Traffic By Keyword", + description: "Retrieve estimates for impressions, clicks, and cost-per-click for specified keywords, aiding in assessing keyword demand. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/ad_traffic_by_keywords/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keywords: { + propDefinition: [ + dataforseo, + "keywords", + ], + }, + bid: { + type: "integer", + label: "Bid", + description: "The maximum custom bid", + }, + match: { + type: "string", + label: "Match", + description: "The keywords match type", + options: [ + "exact", + "broad", + "phrase", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + optional: true, + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsAdTrafficByKeywords({ + $, + data: [ + { + keywords: this.keywords, + bid: this.bid, + match: this.match, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads ad traffic by keyword."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-keywords-for-keywords-completed-tasks/get-google-ads-keywords-for-keywords-completed-tasks.mjs b/components/dataforseo/actions/get-google-ads-keywords-for-keywords-completed-tasks/get-google-ads-keywords-for-keywords-completed-tasks.mjs new file mode 100644 index 0000000000000..ed49027f2dde2 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-keywords-for-keywords-completed-tasks/get-google-ads-keywords-for-keywords-completed-tasks.mjs @@ -0,0 +1,29 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-keywords-for-keywords-completed-tasks", + name: "Get Google Ads Keywords For Keywords Completed Tasks", + description: "Retrieve the results of completed 'Keywords For Keywords' tasks, providing related keywords for previously submitted keyword requests. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/keywords_for_keywords/tasks_ready/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsKeywordsForKeywordsCompletedTasks({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads keywords for keywords completed tasks."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-keywords-for-keywords/get-google-ads-keywords-for-keywords.mjs b/components/dataforseo/actions/get-google-ads-keywords-for-keywords/get-google-ads-keywords-for-keywords.mjs new file mode 100644 index 0000000000000..bd88e09ec29c3 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-keywords-for-keywords/get-google-ads-keywords-for-keywords.mjs @@ -0,0 +1,56 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-keywords-for-keywords", + name: "Get Google Ads Keywords For Keywords", + description: "Retrieve keywords related to specified terms, helping you discover new keyword opportunities. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/keywords_for_keywords/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keywords: { + propDefinition: [ + dataforseo, + "keywords", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + optional: true, + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsKeywordsForKeywords({ + $, + data: [ + { + keywords: this.keywords, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads keywords for keywords."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-keywords-for-site-completed-tasks/get-google-ads-keywords-for-site-completed-tasks.mjs b/components/dataforseo/actions/get-google-ads-keywords-for-site-completed-tasks/get-google-ads-keywords-for-site-completed-tasks.mjs new file mode 100644 index 0000000000000..bbb00ca92e30c --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-keywords-for-site-completed-tasks/get-google-ads-keywords-for-site-completed-tasks.mjs @@ -0,0 +1,29 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-keywords-for-site-completed-tasks", + name: "Get Google Ads Keywords For Site Completed Tasks", + description: "Retrieve the results of completed 'Keywords For Site' tasks, which haven't been collected yet. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/keywords_for_site/tasks_ready/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsKeywordsForSiteCompletedTasks({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads keywords for site completed tasks."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-languages/get-google-ads-languages.mjs b/components/dataforseo/actions/get-google-ads-languages/get-google-ads-languages.mjs new file mode 100644 index 0000000000000..917f5dfa9703d --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-languages/get-google-ads-languages.mjs @@ -0,0 +1,29 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-languages", + name: "Get Google Ads Languages", + description: "Retrieve a list of languages supported by the Google Ads API, allowing you to specify language targeting in your requests. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/languages/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsLanguages({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads languages."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-locations/get-google-ads-locations.mjs b/components/dataforseo/actions/get-google-ads-locations/get-google-ads-locations.mjs new file mode 100644 index 0000000000000..75ce8d8a1d6a2 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-locations/get-google-ads-locations.mjs @@ -0,0 +1,35 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-locations", + name: "Get Google Ads Locations", + description: "Retrieve a list of available locations supported by the Google Ads API, which can be used to specify geographic targeting in your requests. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/locations/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + countryCode: { + type: "string", + label: "Country Code", + description: "The country code to get locations for. Ex: `US`", + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsLocations({ + $, + countryCode: this.countryCode, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads locations"); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-search-volume-completed-tasks/get-google-ads-search-volume-completed-tasks.mjs b/components/dataforseo/actions/get-google-ads-search-volume-completed-tasks/get-google-ads-search-volume-completed-tasks.mjs new file mode 100644 index 0000000000000..81da04af60f0f --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-search-volume-completed-tasks/get-google-ads-search-volume-completed-tasks.mjs @@ -0,0 +1,29 @@ +import { ConfigurationError } from "@pipedream/platform"; +import dataforseo from "../../dataforseo.app.mjs"; + +export default { + key: "dataforseo-get-google-ads-search-volume-completed-tasks", + name: "Get Google Ads Search Volume Completed Tasks", + description: "Retrieve the results of completed 'Search Volume' tasks, which haven't been collected yet. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/search_volume/tasks_ready/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsSearchVolumeCompletedTasks({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads search volume completed tasks."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-search-volume/get-google-ads-search-volume.mjs b/components/dataforseo/actions/get-google-ads-search-volume/get-google-ads-search-volume.mjs new file mode 100644 index 0000000000000..e8ab6b57c08f2 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-search-volume/get-google-ads-search-volume.mjs @@ -0,0 +1,56 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-search-volume", + name: "Get Google Ads Search Volume", + description: "Retrieve search volume data for specified keywords from Google Ads. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/search_volume/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keywords: { + propDefinition: [ + dataforseo, + "keywords", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + optional: true, + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsSearchVolume({ + $, + data: [ + { + keywords: this.keywords, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads search volume data."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-status/get-google-ads-status.mjs b/components/dataforseo/actions/get-google-ads-status/get-google-ads-status.mjs new file mode 100644 index 0000000000000..09b383122a537 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-status/get-google-ads-status.mjs @@ -0,0 +1,29 @@ +import { ConfigurationError } from "@pipedream/platform"; +import dataforseo from "../../dataforseo.app.mjs"; + +export default { + key: "dataforseo-get-google-ads-status", + name: "Get Google Ads Status", + description: "Check the status of Google Ads data updates, indicating whether the keyword data has been refreshed for the previous month. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/status/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsStatus({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads status"); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-traffic-by-keywords-completed-tasks/get-google-ads-traffic-by-keywords-completed-tasks.mjs b/components/dataforseo/actions/get-google-ads-traffic-by-keywords-completed-tasks/get-google-ads-traffic-by-keywords-completed-tasks.mjs new file mode 100644 index 0000000000000..322bffe8ae9c2 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-traffic-by-keywords-completed-tasks/get-google-ads-traffic-by-keywords-completed-tasks.mjs @@ -0,0 +1,29 @@ +import { ConfigurationError } from "@pipedream/platform"; +import dataforseo from "../../dataforseo.app.mjs"; + +export default { + key: "dataforseo-get-google-ads-traffic-by-keywords-completed-tasks", + name: "Get Google Ads Traffic By Keywords Completed Tasks", + description: "Retrieve the results of completed 'Ad Traffic By Keywords' tasks, which haven't been collected yet. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/ad_traffic_by_keywords/tasks_ready/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsAdTrafficByKeywordsCompletedTasks({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads traffic by keywords completed tasks."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-images-results/get-google-images-results.mjs b/components/dataforseo/actions/get-google-images-results/get-google-images-results.mjs new file mode 100644 index 0000000000000..9af386afc8133 --- /dev/null +++ b/components/dataforseo/actions/get-google-images-results/get-google-images-results.mjs @@ -0,0 +1,53 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-images-results", + name: "Get Google Images Results", + description: "Retrieve Google Images search results for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/serp/google/images/live/advanced/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleImagesResults({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Google Images results for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-my-business-info/get-google-my-business-info.mjs b/components/dataforseo/actions/get-google-my-business-info/get-google-my-business-info.mjs new file mode 100644 index 0000000000000..107d2896ac48d --- /dev/null +++ b/components/dataforseo/actions/get-google-my-business-info/get-google-my-business-info.mjs @@ -0,0 +1,53 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-my-business-info", + name: "Get Google My Business Info", + description: "Get detailed Google My Business listing information for local SEO analysis. [See the documentation](https://docs.dataforseo.com/v3/business_data/google/my_business_info/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleMyBusinessInfo({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Google My Business info for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-news-results/get-google-news-results.mjs b/components/dataforseo/actions/get-google-news-results/get-google-news-results.mjs new file mode 100644 index 0000000000000..9486b9b8dc4bf --- /dev/null +++ b/components/dataforseo/actions/get-google-news-results/get-google-news-results.mjs @@ -0,0 +1,53 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-news-results", + name: "Get Google News Results", + description: "Retrieve Google News search results for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/serp/google/news/live/advanced/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleNewsResults({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Google News results for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-organic-results/get-google-organic-results.mjs b/components/dataforseo/actions/get-google-organic-results/get-google-organic-results.mjs new file mode 100644 index 0000000000000..9f572089bb9c5 --- /dev/null +++ b/components/dataforseo/actions/get-google-organic-results/get-google-organic-results.mjs @@ -0,0 +1,69 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-organic-results", + name: "Get Google Organic Results", + description: "Retrieve Google organic search results for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/serp/google/organic/live/regular/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + depth: { + type: "integer", + label: "Depth", + description: "The parsing depth. Default: 100", + max: 700, + optional: true, + }, + maxCrawlPages: { + type: "integer", + label: "Max Crawl Pages", + description: "The page crawl limit", + max: 100, + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleOrganicResults({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + depth: this.depth, + max_crawl_pages: this.maxCrawlPages, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Google organic results for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-play-search/get-google-play-search.mjs b/components/dataforseo/actions/get-google-play-search/get-google-play-search.mjs new file mode 100644 index 0000000000000..b277e570c7367 --- /dev/null +++ b/components/dataforseo/actions/get-google-play-search/get-google-play-search.mjs @@ -0,0 +1,53 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-play-search", + name: "Get Google Play Search", + description: "Search Google Play Store apps by keywords for app store optimization (ASO) analysis. [See the documentation](https://docs.dataforseo.com/v3/app_data/google/app_searches/task_post/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGooglePlaySearch({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully searched Google Play Store for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-reviews/get-google-reviews.mjs b/components/dataforseo/actions/get-google-reviews/get-google-reviews.mjs new file mode 100644 index 0000000000000..e84faa2356a5e --- /dev/null +++ b/components/dataforseo/actions/get-google-reviews/get-google-reviews.mjs @@ -0,0 +1,53 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-reviews", + name: "Get Google Reviews", + description: "Get Google business reviews and ratings for local SEO and reputation management. [See the documentation](https://docs.dataforseo.com/v3/business_data/google/reviews/task_post/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCoordinate: { + propDefinition: [ + dataforseo, + "locationCoordinate", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleReviews({ + $, + data: [ + { + keyword: this.keyword, + location_coordinate: this.locationCoordinate, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Google reviews for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-historical-serp-data/get-historical-serp-data.mjs b/components/dataforseo/actions/get-historical-serp-data/get-historical-serp-data.mjs new file mode 100644 index 0000000000000..9f46c1687cea9 --- /dev/null +++ b/components/dataforseo/actions/get-historical-serp-data/get-historical-serp-data.mjs @@ -0,0 +1,67 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-historical-serp-data", + name: "Get Historical SERP Data", + description: "Get ranking history for keywords over time. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/historical_serps/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + dateFrom: { + type: "string", + label: "Date From", + description: "Start date for historical data in YYYY-MM-DD format", + optional: true, + }, + dateTo: { + type: "string", + label: "Date To", + description: "End date for historical data in YYYY-MM-DD format", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getHistoricalSerpData({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + date_from: this.dateFrom, + date_to: this.dateTo, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved historical SERP data for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-keyword-data-errors/get-keyword-data-errors.mjs b/components/dataforseo/actions/get-keyword-data-errors/get-keyword-data-errors.mjs new file mode 100644 index 0000000000000..d18f4a6f910cd --- /dev/null +++ b/components/dataforseo/actions/get-keyword-data-errors/get-keyword-data-errors.mjs @@ -0,0 +1,77 @@ +import { ConfigurationError } from "@pipedream/platform"; +import dataforseo from "../../dataforseo.app.mjs"; + +export default { + key: "dataforseo-get-keyword-data-errors", + name: "Get Keyword Data Errors", + description: "Retrieve information about the Keywords Data API tasks that returned an error within the past 7 days [See the documentation](https://docs.dataforseo.com/v3/keywords_data/errors/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + dateTimeFrom: { + type: "string", + label: "Date Time From", + description: "The start time for filtering results in the format \"yyyy-mm-dd hh-mm-ss +00:00\". Example: `2023-01-15 12:57:46 +00:00`. Allows filtering results by the datetime parameter within the range of the last 7 days.", + }, + dateTimeTo: { + type: "string", + label: "Date Time To", + description: "The finish time for filtering results in the format \"yyyy-mm-dd hh-mm-ss +00:00\". Example: `2023-01-15 12:57:46 +00:00`. Allows filtering results by the datetime parameter within the range of the last 7 days.", + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + methods: { + validateDateRange(dateTimeFrom, dateTimeTo) { + const from = new Date(dateTimeFrom); + const to = new Date(dateTimeTo); + const now = new Date(); + + if (isNaN(from) || isNaN(to)) { + throw new ConfigurationError("Invalid date format. Use yyyy-mm-dd hh:mm:ss +00:00"); + } + + if (from >= to) { + throw new ConfigurationError("DateTimeFrom must be before DateTimeTo"); + } + + const sevenDaysAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000); + if (from < sevenDaysAgo || from > now) { + throw new ConfigurationError("DateTimeFrom must be within the last 7 days"); + } + if (to < sevenDaysAgo || to > now) { + throw new ConfigurationError("DateTimeTo must be within the last 7 days"); + } + }, + }, + async run({ $ }) { + this.validateDateRange(this.dateTimeFrom, this.dateTimeTo); + + const response = await this.dataforseo.getKeywordDataErrors({ + $, + data: [ + { + datetime_from: this.dateTimeFrom, + datetime_to: this.dateTimeTo, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved keyword data errors."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-keyword-data-id-list/get-keyword-data-id-list.mjs b/components/dataforseo/actions/get-keyword-data-id-list/get-keyword-data-id-list.mjs new file mode 100644 index 0000000000000..edfe509c20b06 --- /dev/null +++ b/components/dataforseo/actions/get-keyword-data-id-list/get-keyword-data-id-list.mjs @@ -0,0 +1,96 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-keyword-data-id-list", + name: "Get Keyword Data ID List", + description: "Retrieve the list of IDs and metadata of the completed Keywords Data tasks during the specified period. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/id_list/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + dateTimeFrom: { + type: "string", + label: "Date Time From", + description: "The start time for filtering results in the format \"yyyy-mm-dd hh-mm-ss +00:00\". Example: `2023-01-15 12:57:46 +00:00`. If include_metadata is set to true, minimum value: a month before the current datetime. If include_metadata is set to false, minimum value: six months before the current datetime", + }, + dateTimeTo: { + type: "string", + label: "Date Time To", + description: "The finish time for filtering results in the format \"yyyy-mm-dd hh-mm-ss +00:00\". Example: `2023-01-15 12:57:46 +00:00`", + }, + includeMetadata: { + type: "boolean", + label: "Include Metadata", + description: "If set to `true`, the response will include the metadata of the completed tasks", + optional: true, + }, + sort: { + type: "string", + label: "Sort", + description: "The sort direction", + options: [ + "asc", + "desc", + ], + optional: true, + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + methods: { + validateDateRange(dateTimeFrom, dateTimeTo, includeMetadata) { + const from = new Date(dateTimeFrom); + const to = new Date(dateTimeTo); + + if (isNaN(from) || isNaN(to)) { + throw new ConfigurationError("Invalid date format. Use yyyy-mm-dd hh:mm:ss +00:00"); + } + + if (from >= to) { + throw new ConfigurationError("DateTimeFrom must be before DateTimeTo"); + } + + const monthsBack = includeMetadata + ? 1 + : 6; + const minDate = new Date(); + minDate.setMonth(minDate.getMonth() - monthsBack); + + if (from < minDate) { + throw new ConfigurationError(`DateTimeFrom must not be earlier than ${monthsBack} month(s) ago`); + } + }, + }, + async run({ $ }) { + this.validateDateRange(this.dateTimeFrom, this.dateTimeTo, this.includeMetadata); + + const response = await this.dataforseo.getKeywordDataIdList({ + $, + data: [ + { + datetime_from: this.dateTimeFrom, + datetime_to: this.dateTimeTo, + include_metadata: this.includeMetadata, + sort: this.sort, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved keyword data ID list."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-keyword-difficulty/get-keyword-difficulty.mjs b/components/dataforseo/actions/get-keyword-difficulty/get-keyword-difficulty.mjs index 2ee9bc3c7fe64..8a1cca329d7e6 100644 --- a/components/dataforseo/actions/get-keyword-difficulty/get-keyword-difficulty.mjs +++ b/components/dataforseo/actions/get-keyword-difficulty/get-keyword-difficulty.mjs @@ -4,7 +4,7 @@ export default { key: "dataforseo-get-keyword-difficulty", name: "Get Keyword Difficulty", description: "Get Keyword Difficulty. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/bulk_keyword_difficulty/live/?bash)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { dataforseo, diff --git a/components/dataforseo/actions/get-keyword-ideas-live/get-keyword-ideas-live.mjs b/components/dataforseo/actions/get-keyword-ideas-live/get-keyword-ideas-live.mjs new file mode 100644 index 0000000000000..5ab61d8016980 --- /dev/null +++ b/components/dataforseo/actions/get-keyword-ideas-live/get-keyword-ideas-live.mjs @@ -0,0 +1,61 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-keyword-ideas-live", + name: "Get Keyword Ideas Live", + description: "Generate live keyword suggestions and ideas for content strategy. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/keyword_ideas/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keywords: { + propDefinition: [ + dataforseo, + "keywords", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getKeywordIdeasLive({ + $, + data: [ + { + keywords: this.keywords, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved keyword ideas for ${this.keywords.length} keywords.`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-keyword-suggestions/get-keyword-suggestions.mjs b/components/dataforseo/actions/get-keyword-suggestions/get-keyword-suggestions.mjs new file mode 100644 index 0000000000000..8b232496f8d46 --- /dev/null +++ b/components/dataforseo/actions/get-keyword-suggestions/get-keyword-suggestions.mjs @@ -0,0 +1,60 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-keyword-suggestions", + name: "Get Keyword Suggestions", + description: "Get keyword ideas and related terms for specified seed keywords. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/keyword_suggestions/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getKeywordSuggestions({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved keyword suggestions for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-ranked-keywords/get-ranked-keywords.mjs b/components/dataforseo/actions/get-ranked-keywords/get-ranked-keywords.mjs index a32347ac42732..6134e16806841 100644 --- a/components/dataforseo/actions/get-ranked-keywords/get-ranked-keywords.mjs +++ b/components/dataforseo/actions/get-ranked-keywords/get-ranked-keywords.mjs @@ -4,7 +4,7 @@ export default { key: "dataforseo-get-ranked-keywords", name: "Get Ranked Keywords", description: "Description for get-ranked-keywords. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/keywords_for_site/task_post/?bash)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { dataforseo, diff --git a/components/dataforseo/actions/get-referring-domains/get-referring-domains.mjs b/components/dataforseo/actions/get-referring-domains/get-referring-domains.mjs index 6cfbcaccdd9f8..59a4249172cc1 100644 --- a/components/dataforseo/actions/get-referring-domains/get-referring-domains.mjs +++ b/components/dataforseo/actions/get-referring-domains/get-referring-domains.mjs @@ -6,7 +6,7 @@ export default { name: "Get Referring Domains", description: "Get detailed overview of referring domains pointing to the specified target. [See the documentation](https://docs.dataforseo.com/v3/backlinks/referring_domains/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getReferringDomains(args = {}) { diff --git a/components/dataforseo/actions/get-sentiment-analysis/get-sentiment-analysis.mjs b/components/dataforseo/actions/get-sentiment-analysis/get-sentiment-analysis.mjs new file mode 100644 index 0000000000000..1c8f8a90f9359 --- /dev/null +++ b/components/dataforseo/actions/get-sentiment-analysis/get-sentiment-analysis.mjs @@ -0,0 +1,39 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-sentiment-analysis", + name: "Get Sentiment Analysis", + description: "Analyze sentiment of brand mentions and content for reputation management. [See the documentation](https://docs.dataforseo.com/v3/content_analysis/sentiment_analysis/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getSentimentAnalysis({ + $, + data: [ + { + keyword: this.keyword, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully analyzed sentiment for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-technologies-domain-list/get-technologies-domain-list.mjs b/components/dataforseo/actions/get-technologies-domain-list/get-technologies-domain-list.mjs new file mode 100644 index 0000000000000..68e719889e9ac --- /dev/null +++ b/components/dataforseo/actions/get-technologies-domain-list/get-technologies-domain-list.mjs @@ -0,0 +1,40 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-technologies-domain-list", + name: "Get Technologies Domain List", + description: "Get technologies used by a domain (CMS, analytics, frameworks, etc.). [See the documentation](https://docs.dataforseo.com/v3/domain_analytics/technologies/domain_technologies/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + target: { + propDefinition: [ + dataforseo, + "target", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getTechnologiesDomainList({ + $, + data: [ + { + target: this.target, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved technologies for "${this.target}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-top-serp-results/get-top-serp-results.mjs b/components/dataforseo/actions/get-top-serp-results/get-top-serp-results.mjs new file mode 100644 index 0000000000000..f425b83840745 --- /dev/null +++ b/components/dataforseo/actions/get-top-serp-results/get-top-serp-results.mjs @@ -0,0 +1,61 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-top-serp-results", + name: "Get Top SERP Results", + description: "Get top-ranking pages and competitor analysis for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/serp_competitors/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keywords: { + propDefinition: [ + dataforseo, + "keywords", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getTopSerpResults({ + $, + data: [ + { + keywords: this.keywords, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved top SERP results for ${this.keywords.length} keywords.`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-tripadvisor-reviews/get-tripadvisor-reviews.mjs b/components/dataforseo/actions/get-tripadvisor-reviews/get-tripadvisor-reviews.mjs new file mode 100644 index 0000000000000..3ef45f845e395 --- /dev/null +++ b/components/dataforseo/actions/get-tripadvisor-reviews/get-tripadvisor-reviews.mjs @@ -0,0 +1,105 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-tripadvisor-reviews", + name: "Get TripAdvisor Reviews", + description: "Get TripAdvisor business reviews and ratings, especially useful for hospitality businesses. [See the documentation](https://docs.dataforseo.com/v3/business_data/tripadvisor/reviews/task_post/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + countryCode: { + type: "string", + label: "Country Code", + description: "The country code of the target location. Ex: `US`", + }, + locationCode: { + propDefinition: [ + dataforseo, + "tripAdvisorLocationCode", + (c) => ({ + countryCode: c.countryCode, + }), + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + optional: true, + }, + sortBy: { + type: "string", + label: "Sort By", + description: "Sort reviews by specific criteria", + options: [ + "most_recent", + "detailed_reviews", + ], + optional: true, + }, + waitForResults: { + type: "boolean", + label: "Wait for Results", + description: "Wait for the results to be available. Not for use with Pipedream Connect.", + default: true, + optional: true, + }, + postbackUrl: { + type: "string", + label: "Postback URL", + description: "The URL to receive the search results. Only applicable when \"Wait for Results\" = `FALSE`", + optional: true, + }, + }, + async run({ $ }) { + let response; + const context = $.context; + const run = context + ? context.run + : { + runs: 1, + }; + + if (run.runs === 1) { + let postbackUrl = this.postbackUrl; + if (context && this.waitForResults) { + ({ resume_url: postbackUrl } = $.flow.rerun(600000, null, 1)); + } + response = await this.dataforseo.getTripadvisorReviews({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + sort_by: this.sortBy, + postback_url: postbackUrl, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + } + + if (run.runs > 1) { + response = run.callback_request.body; + } + + $.export("$summary", `Successfully retrieved TripAdvisor reviews for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-trustpilot-reviews/get-trustpilot-reviews.mjs b/components/dataforseo/actions/get-trustpilot-reviews/get-trustpilot-reviews.mjs new file mode 100644 index 0000000000000..b78bd1e4db6c3 --- /dev/null +++ b/components/dataforseo/actions/get-trustpilot-reviews/get-trustpilot-reviews.mjs @@ -0,0 +1,50 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-trustpilot-reviews", + name: "Get Trustpilot Reviews", + description: "Get Trustpilot business reviews and ratings for reputation management. [See the documentation](https://docs.dataforseo.com/v3/business_data/trustpilot/reviews/task_post/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + domain: { + type: "string", + label: "Domain", + description: "Domain of the local establishment. Example: `www.thepearlsource.com`", + }, + sortBy: { + type: "string", + label: "Sort By", + description: "Sort reviews by specific criteria", + options: [ + "recency", + "relevance", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getTrustpilotReviews({ + $, + data: [ + { + domain: this.domain, + sort_by: this.sortBy, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Trustpilot reviews for "${this.domain}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-yahoo-organic-results/get-yahoo-organic-results.mjs b/components/dataforseo/actions/get-yahoo-organic-results/get-yahoo-organic-results.mjs new file mode 100644 index 0000000000000..6728b9b6fe4a1 --- /dev/null +++ b/components/dataforseo/actions/get-yahoo-organic-results/get-yahoo-organic-results.mjs @@ -0,0 +1,69 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-yahoo-organic-results", + name: "Get Yahoo Organic Results", + description: "Retrieve Yahoo organic search results for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/serp/yahoo/organic/live/regular/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + depth: { + type: "integer", + label: "Depth", + description: "The parsing depth. Default: 100", + max: 700, + optional: true, + }, + maxCrawlPages: { + type: "integer", + label: "Max Crawl Pages", + description: "The page crawl limit", + max: 100, + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getYahooOrganicResults({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + depth: this.depth, + max_crawl_pages: this.maxCrawlPages, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Yahoo organic results for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/parse-page-content/parse-page-content.mjs b/components/dataforseo/actions/parse-page-content/parse-page-content.mjs index 2f11cb3565745..349aaa429a1a1 100644 --- a/components/dataforseo/actions/parse-page-content/parse-page-content.mjs +++ b/components/dataforseo/actions/parse-page-content/parse-page-content.mjs @@ -6,7 +6,7 @@ export default { name: "Parse Page Content", description: "Parse the content on any page and return its structured content. [See the documentation](https://docs.dataforseo.com/v3/on_page/content_parsing/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { parsePageContent(args = {}) { diff --git a/components/dataforseo/actions/search-business-listings/search-business-listings.mjs b/components/dataforseo/actions/search-business-listings/search-business-listings.mjs index 9eb387aceedb2..d7ea44368447c 100644 --- a/components/dataforseo/actions/search-business-listings/search-business-listings.mjs +++ b/components/dataforseo/actions/search-business-listings/search-business-listings.mjs @@ -6,7 +6,7 @@ export default { name: "Search Business Listings", description: "Get information about business entities listed on Google Maps. [See the documentation](https://docs.dataforseo.com/v3/business_data/business_listings/search/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { searchBusinessListings(args = {}) { diff --git a/components/dataforseo/common/utils.mjs b/components/dataforseo/common/utils.mjs index bfc96415c2b39..e9d8507bf45f7 100644 --- a/components/dataforseo/common/utils.mjs +++ b/components/dataforseo/common/utils.mjs @@ -20,3 +20,11 @@ export function parseObjectEntries(value = {}) { ]), ); } + +export function parseArray(value) { + if (!value) return []; + if (typeof value === "string") { + return JSON.parse(value); + } + return value; +} diff --git a/components/dataforseo/dataforseo.app.mjs b/components/dataforseo/dataforseo.app.mjs index daf4c86d17a28..147e4f7d04fc3 100644 --- a/components/dataforseo/dataforseo.app.mjs +++ b/components/dataforseo/dataforseo.app.mjs @@ -6,7 +6,7 @@ export default { app: "dataforseo", propDefinitions: { locationCode: { - type: "string", + type: "integer", label: "Location Code", description: "The code of the target location", async options() { @@ -20,12 +20,27 @@ export default { })); }, }, + tripAdvisorLocationCode: { + type: "integer", + label: "Location Code", + description: "The code of the target location", + async options({ countryCode }) { + const response = await this.getTripadvisorLocations({ + countryCode, + }); + const locationCodes = response.tasks[0].result; + return locationCodes?.map(({ + location_name, location_code, + }) => ({ + value: location_code, + label: location_name, + })) || []; + }, + }, locationCoordinate: { type: "string", label: "Location Coordinate", - description: - "The location to search, in the format `latitude,longitude,radius` where radius is specified in kilometers. Example: `53.476225,-2.243572,200`", - + description: "The location to search, in the format `latitude,longitude,radius` where radius is specified in kilometers. Example: `53.476225,-2.243572,200`", }, targetType: { type: "string", @@ -36,13 +51,12 @@ export default { target: { type: "string", label: "Target", - description: "The domain name or the url of the target website or page", + description: "The domain name or the url of the target website or page. The domain should be specified without https:// and www.", }, backlinksTarget: { type: "string", label: "Target", - description: - "Domain, subdomain or webpage to get data for. A domain or a subdomain should be specified without `https://` and `www`. A page should be specified with absolute URL (including `http://` or `https://`", + description: "Domain, subdomain or webpage to get data for. A domain or a subdomain should be specified without `https://` and `www`. A page should be specified with absolute URL (including `http://` or `https://`)", }, categories: { type: "string[]", @@ -69,9 +83,9 @@ export default { optional: true, }, limit: { - type: "string", + type: "integer", label: "Limit", - description: "The maximum number of returned businesses", + description: "The maximum number of results to return. Maximum: 1000", optional: true, }, languageCode: { @@ -104,8 +118,7 @@ export default { rankScale: { type: "string", label: "Rank Scale", - description: - "Whether rank values are presented on a 0-100 or 0-1000 scale", + description: "Whether rank values are presented on a 0-100 or 0-1000 scale", optional: true, options: [ "one_hundred", @@ -116,36 +129,31 @@ export default { tag: { type: "string", label: "Tag", - description: - "You can use this parameter to identify the task and match it with the result.", + description: "You can use this parameter to identify the task and match it with the result.", optional: true, }, includeSubdomains: { type: "boolean", label: "Include Subdomains", - description: - "Whether the subdomains of the `target` will be included in the search. Default is `true`", + description: "Whether the subdomains of the `target` will be included in the search. Default is `true`", optional: true, }, includeIndirectLinks: { type: "boolean", label: "Include Indirect Links", - description: - "Whether indirect links to the target will be included in the results. Default is `true`", + description: "Whether indirect links to the target will be included in the results. Default is `true`", optional: true, }, excludeInternalBacklinks: { type: "boolean", label: "Exclude Internal Backlinks", - description: - "Indicates if internal backlinks from subdomains to the target will be excluded from the results. Default is `true`", + description: "Indicates if internal backlinks from subdomains to the target will be excluded from the results. Default is `true`", optional: true, }, backlinksStatusType: { type: "string", label: "Backlinks Status Type", - description: - "You can use this field to choose what backlinks will be returned and used for aggregated metrics for your target", + description: "You can use this field to choose what backlinks will be returned and used for aggregated metrics for your target", optional: true, options: [ { @@ -180,7 +188,7 @@ export default { _baseUrl() { return "https://api.dataforseo.com/v3"; }, - async _makeRequest(opts = {}) { + _makeRequest(opts = {}) { const { $ = this, path, @@ -195,38 +203,320 @@ export default { }, }); }, - async getKeywordDifficulty(args = {}) { + getKeywordDifficulty(args = {}) { return this._makeRequest({ path: "/dataforseo_labs/google/bulk_keyword_difficulty/live", method: "post", ...args, }); }, - async getBusinessListings(args = {}) { + getBusinessListings(args = {}) { return this._makeRequest({ path: "/business_data/business_listings/search/live", method: "post", ...args, }); }, - async getRankedKeywords(args = {}) { + getRankedKeywords(args = {}) { return this._makeRequest({ path: "/keywords_data/google_ads/keywords_for_site/live", method: "post", ...args, }); }, - async getLanguageCode(args = {}) { + getLanguageCode(args = {}) { return this._makeRequest({ path: "/keywords_data/google_ads/languages", ...args, }); }, - async getLocations(args = {}) { + getLocations(args = {}) { return this._makeRequest({ path: "/serp/google/ads_search/locations", ...args, }); }, + getKeywordDataIdList(args = {}) { + return this._makeRequest({ + path: "/keywords_data/id_list", + method: "post", + ...args, + }); + }, + getKeywordDataErrors(args = {}) { + return this._makeRequest({ + path: "/keywords_data/errors", + method: "post", + ...args, + }); + }, + getGoogleAdsStatus(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/status", + ...args, + }); + }, + getGoogleAdsLocations({ + countryCode, ...args + }) { + return this._makeRequest({ + path: `/keywords_data/google_ads/locations/${countryCode}`, + ...args, + }); + }, + getTripadvisorLocations({ + countryCode, ...args + }) { + return this._makeRequest({ + path: `/business_data/tripadvisor/locations/${countryCode}`, + ...args, + }); + }, + getGoogleAdsLanguages(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/languages", + ...args, + }); + }, + getGoogleAdsSearchVolume(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/search_volume/live", + method: "post", + ...args, + }); + }, + getGoogleAdsSearchVolumeCompletedTasks(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/search_volume/tasks_ready", + ...args, + }); + }, + getGoogleAdsKeywordsForSiteCompletedTasks(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/keywords_for_site/tasks_ready", + ...args, + }); + }, + getGoogleAdsKeywordsForKeywords(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/keywords_for_keywords/live", + method: "post", + ...args, + }); + }, + getGoogleAdsKeywordsForKeywordsCompletedTasks(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/keywords_for_keywords/tasks_ready", + ...args, + }); + }, + getGoogleAdsAdTrafficByKeywords(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/ad_traffic_by_keywords/live", + method: "post", + ...args, + }); + }, + getGoogleAdsAdTrafficByKeywordsCompletedTasks(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/ad_traffic_by_keywords/tasks_ready", + ...args, + }); + }, + getGoogleOrganicResults(args = {}) { + return this._makeRequest({ + path: "/serp/google/organic/live/regular", + method: "post", + ...args, + }); + }, + getGoogleImagesResults(args = {}) { + return this._makeRequest({ + path: "/serp/google/images/live/advanced", + method: "post", + ...args, + }); + }, + getGoogleNewsResults(args = {}) { + return this._makeRequest({ + path: "/serp/google/news/live/advanced", + method: "post", + ...args, + }); + }, + getBingOrganicResults(args = {}) { + return this._makeRequest({ + path: "/serp/bing/organic/live/regular", + method: "post", + ...args, + }); + }, + getYahooOrganicResults(args = {}) { + return this._makeRequest({ + path: "/serp/yahoo/organic/live/regular", + method: "post", + ...args, + }); + }, + getDomainRankOverview(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/domain_rank_overview/live", + method: "post", + ...args, + }); + }, + getCompetitorDomains(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/competitors_domain/live", + method: "post", + ...args, + }); + }, + getDomainKeywords(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/ranked_keywords/live", + method: "post", + ...args, + }); + }, + getKeywordSuggestions(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/keyword_suggestions/live", + method: "post", + ...args, + }); + }, + getHistoricalSerpData(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/historical_serps/live", + method: "post", + ...args, + }); + }, + getDomainIntersection(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/domain_intersection/live", + method: "post", + ...args, + }); + }, + getTopSerpResults(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/serp_competitors/live", + method: "post", + ...args, + }); + }, + getKeywordIdeasLive(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/keyword_ideas/live", + method: "post", + ...args, + }); + }, + getDomainWhoisOverview(args = {}) { + return this._makeRequest({ + path: "/domain_analytics/whois/overview/live", + method: "post", + ...args, + }); + }, + getTechnologiesDomainList(args = {}) { + return this._makeRequest({ + path: "/domain_analytics/technologies/domain_technologies/live", + method: "post", + ...args, + }); + }, + getAppIntersection(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/app_intersection/live", + method: "post", + ...args, + }); + }, + getBulkTrafficAnalytics(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/bulk_traffic_estimation/live", + method: "post", + ...args, + }); + }, + getGoogleMyBusinessInfo(args = {}) { + return this._makeRequest({ + path: "/business_data/google/my_business_info/live", + method: "post", + ...args, + }); + }, + getTrustpilotReviews(args = {}) { + return this._makeRequest({ + path: "/business_data/trustpilot/reviews/task_post", + method: "post", + ...args, + }); + }, + getTripadvisorReviews(args = {}) { + return this._makeRequest({ + path: "/business_data/tripadvisor/reviews/task_post", + method: "post", + ...args, + }); + }, + getGoogleReviews(args = {}) { + return this._makeRequest({ + path: "/business_data/google/reviews/task_post", + method: "post", + ...args, + }); + }, + getBusinessListingsCategories(args = {}) { + return this._makeRequest({ + path: "/business_data/business_listings/categories", + ...args, + }); + }, + getAppStoreSearch(args = {}) { + return this._makeRequest({ + path: "/app_data/apple/app_searches/task_post", + method: "post", + ...args, + }); + }, + getGooglePlaySearch(args = {}) { + return this._makeRequest({ + path: "/app_data/google/app_searches/task_post", + method: "post", + ...args, + }); + }, + getAppReviewsSummary(args = {}) { + return this._makeRequest({ + path: "/app_data/apple/app_reviews/task_post", + method: "post", + ...args, + }); + }, + getContentCitations(args = {}) { + return this._makeRequest({ + path: "/content_analysis/search/live", + method: "post", + ...args, + }); + }, + getSentimentAnalysis(args = {}) { + return this._makeRequest({ + path: "/content_analysis/sentiment_analysis/live", + method: "post", + ...args, + }); + }, + getContentSummary(args = {}) { + return this._makeRequest({ + path: "/content_analysis/summary/live", + method: "post", + ...args, + }); + }, }, }; diff --git a/components/dataforseo/package.json b/components/dataforseo/package.json index 6b25a7c7a2b06..bc6ed849bae2a 100644 --- a/components/dataforseo/package.json +++ b/components/dataforseo/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/dataforseo", - "version": "0.2.0", + "version": "0.3.0", "description": "Pipedream DataForSEO Components", "main": "dataforseo.app.mjs", "keywords": [ diff --git a/components/dataset/.gitignore b/components/dataset/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/dataset/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/dataset/app/dataset.app.ts b/components/dataset/app/dataset.app.ts deleted file mode 100644 index 4790d6755fa56..0000000000000 --- a/components/dataset/app/dataset.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "dataset", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/dataset/dataset.app.mjs b/components/dataset/dataset.app.mjs new file mode 100644 index 0000000000000..ecd1dce838b77 --- /dev/null +++ b/components/dataset/dataset.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "dataset", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/dataset/package.json b/components/dataset/package.json index 99d25b3e7616c..544cef4502685 100644 --- a/components/dataset/package.json +++ b/components/dataset/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/dataset", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream DataSet Components", - "main": "dist/app/dataset.app.mjs", + "main": "dataset.app.mjs", "keywords": [ "pipedream", "dataset" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/dataset", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/datumbox/.gitignore b/components/datumbox/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/datumbox/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/datumbox/app/datumbox.app.ts b/components/datumbox/app/datumbox.app.ts deleted file mode 100644 index 995e2270eb7d6..0000000000000 --- a/components/datumbox/app/datumbox.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "datumbox", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/datumbox/datumbox.app.mjs b/components/datumbox/datumbox.app.mjs new file mode 100644 index 0000000000000..44352be87c6fe --- /dev/null +++ b/components/datumbox/datumbox.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "datumbox", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/datumbox/package.json b/components/datumbox/package.json index 4986b456a527f..6dc5b56ebb4d3 100644 --- a/components/datumbox/package.json +++ b/components/datumbox/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/datumbox", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Datumbox Components", - "main": "dist/app/datumbox.app.mjs", + "main": "datumbox.app.mjs", "keywords": [ "pipedream", "datumbox" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/datumbox", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/deepl/.gitignore b/components/deepl/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/deepl/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/deepl/app/deepl.app.ts b/components/deepl/app/deepl.app.ts deleted file mode 100644 index 907474254149c..0000000000000 --- a/components/deepl/app/deepl.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "deepl", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/deepl/deepl.app.mjs b/components/deepl/deepl.app.mjs new file mode 100644 index 0000000000000..f46c121e4663c --- /dev/null +++ b/components/deepl/deepl.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "deepl", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/deepl/package.json b/components/deepl/package.json index 1bdf2d026e452..b1672c9909b04 100644 --- a/components/deepl/package.json +++ b/components/deepl/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/deepl", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream DeepL Components", - "main": "dist/app/deepl.app.mjs", + "main": "deepl.app.mjs", "keywords": [ "pipedream", "deepl" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/deepl", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/deeplogix/deeplogix.app.mjs b/components/deeplogix/deeplogix.app.mjs new file mode 100644 index 0000000000000..84db7e3b09545 --- /dev/null +++ b/components/deeplogix/deeplogix.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "deeplogix", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/deeplogix/package.json b/components/deeplogix/package.json new file mode 100644 index 0000000000000..d06a050ca760b --- /dev/null +++ b/components/deeplogix/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/deeplogix", + "version": "0.0.1", + "description": "Pipedream Deeplogix Components", + "main": "deeplogix.app.mjs", + "keywords": [ + "pipedream", + "deeplogix" + ], + "homepage": "https://pipedream.com/apps/deeplogix", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/degreed/.gitignore b/components/degreed/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/degreed/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/degreed/app/degreed.app.ts b/components/degreed/app/degreed.app.ts deleted file mode 100644 index 272596cc5cac8..0000000000000 --- a/components/degreed/app/degreed.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "degreed", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/degreed/degreed.app.mjs b/components/degreed/degreed.app.mjs new file mode 100644 index 0000000000000..2b7a1c1b550e8 --- /dev/null +++ b/components/degreed/degreed.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "degreed", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/degreed/package.json b/components/degreed/package.json index dee930688c568..b3931523fb531 100644 --- a/components/degreed/package.json +++ b/components/degreed/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/degreed", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Degreed Components", - "main": "dist/app/degreed.app.mjs", + "main": "degreed.app.mjs", "keywords": [ "pipedream", "degreed" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/degreed", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/detrack/package.json b/components/detrack/package.json index ac2297b21938f..32143b45db593 100644 --- a/components/detrack/package.json +++ b/components/detrack/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/detrack", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Detrack Components", "main": "dist/app/detrack.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.0", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/detrack/tsconfig.json b/components/detrack/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/detrack/tsconfig.json +++ b/components/detrack/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/devin/devin.app.mjs b/components/devin/devin.app.mjs new file mode 100644 index 0000000000000..03fe3bc115c5d --- /dev/null +++ b/components/devin/devin.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "devin", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/devin/package.json b/components/devin/package.json new file mode 100644 index 0000000000000..3e8737002c3bb --- /dev/null +++ b/components/devin/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/devin", + "version": "0.0.1", + "description": "Pipedream Devin Components", + "main": "devin.app.mjs", + "keywords": [ + "pipedream", + "devin" + ], + "homepage": "https://pipedream.com/apps/devin", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/dhl/actions/get-tracking/get-tracking.mjs b/components/dhl/actions/get-tracking/get-tracking.mjs new file mode 100644 index 0000000000000..04244f961eab8 --- /dev/null +++ b/components/dhl/actions/get-tracking/get-tracking.mjs @@ -0,0 +1,78 @@ +import dhl from "../../dhl.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "dhl-get-tracking", + name: "Get Tracking Information", + description: "Get tracking information for shipments. [See the documentation](https://developer.dhl.com/api-reference/shipment-tracking#operations-default-getTrackingShipment)", + version: "0.0.1", + type: "action", + props: { + dhl, + trackingNumber: { + type: "string", + label: "Tracking Number", + description: "The tracking number of the shipment to get tracking information for", + }, + service: { + type: "string", + label: "Service", + description: "The service of the shipment to get tracking information for", + options: constants.SHIPPING_SERVICES, + optional: true, + }, + requesterCountryCode: { + type: "string", + label: "Requester Country Code", + description: "Optional ISO 3166-1 alpha-2 country code represents country of the consumer of the API response.", + optional: true, + }, + originCountryCode: { + type: "string", + label: "Origin Country Code", + description: "Optional ISO 3166-1 alpha-2 country code of the shipment origin to further qualify the shipment tracking number (trackingNumber) parameter of the request.", + optional: true, + }, + recipientPostalCode: { + type: "string", + label: "Requester Postal Code", + description: "Postal code of the destination address", + optional: true, + }, + language: { + type: "string", + label: "Language", + description: "ISO 639-1 2-character language code for the response. This parameter serves as an indication of the client preferences ONLY. Language availability depends on the service used.", + optional: true, + }, + limit: { + type: "integer", + label: "Limit", + description: "Maximum number of events to be returned in the response. Default: 5", + optional: true, + }, + offset: { + type: "integer", + label: "Offset", + description: "Offset of the first event to be returned in the response. Default: 0", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dhl.getTracking({ + $, + params: { + trackingNumber: this.trackingNumber, + service: this.service, + requesterCountryCode: this.requesterCountryCode, + originCountryCode: this.originCountryCode, + recipientPostalCode: this.recipientPostalCode, + language: this.language, + limit: this.limit, + offset: this.offset, + }, + }); + $.export("$summary", `Successfully fetched tracking information for ${this.trackingNumber}`); + return response; + }, +}; diff --git a/components/dhl/common/constants.mjs b/components/dhl/common/constants.mjs new file mode 100644 index 0000000000000..1f5d50813d71d --- /dev/null +++ b/components/dhl/common/constants.mjs @@ -0,0 +1,23 @@ +const SHIPPING_SERVICES = [ + "dgf", + "dsc", + "ecommerce", + "ecommerce-apac", + "ecommerce-europe", + "ecommerce-ppl", + "ecommerce-iberia", + "express", + "freight", + "parcel-de", + "parcel-nl", + "parcel-pl", + "parcel-uk", + "post-de", + "post-international", + "sameday", + "svb", +]; + +export default { + SHIPPING_SERVICES, +}; diff --git a/components/dhl/dhl.app.mjs b/components/dhl/dhl.app.mjs new file mode 100644 index 0000000000000..e99d352ab5cb2 --- /dev/null +++ b/components/dhl/dhl.app.mjs @@ -0,0 +1,29 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "dhl", + propDefinitions: {}, + methods: { + _baseUrl() { + return this.$auth.api_url; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: { + "dhl-api-key": `${this.$auth.api_key}`, + }, + ...opts, + }); + }, + getTracking(opts = {}) { + return this._makeRequest({ + path: "/track/shipments", + ...opts, + }); + }, + }, +}; diff --git a/components/dhl/package.json b/components/dhl/package.json new file mode 100644 index 0000000000000..86300e6662d13 --- /dev/null +++ b/components/dhl/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/dhl", + "version": "0.1.0", + "description": "Pipedream DHL Components", + "main": "dhl.app.mjs", + "keywords": [ + "pipedream", + "dhl" + ], + "homepage": "https://pipedream.com/apps/dhl", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + } +} diff --git a/components/dialmycalls/.gitignore b/components/dialmycalls/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/dialmycalls/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/dialmycalls/app/dialmycalls.app.ts b/components/dialmycalls/app/dialmycalls.app.ts deleted file mode 100644 index 7fe1abd3f1b61..0000000000000 --- a/components/dialmycalls/app/dialmycalls.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "dialmycalls", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/dialmycalls/dialmycalls.app.mjs b/components/dialmycalls/dialmycalls.app.mjs new file mode 100644 index 0000000000000..9a48c0f461a9d --- /dev/null +++ b/components/dialmycalls/dialmycalls.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "dialmycalls", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/dialmycalls/package.json b/components/dialmycalls/package.json index d00a8770f488d..922ffc21ea98b 100644 --- a/components/dialmycalls/package.json +++ b/components/dialmycalls/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/dialmycalls", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream DialMyCalls Components", - "main": "dist/app/dialmycalls.app.mjs", + "main": "dialmycalls.app.mjs", "keywords": [ "pipedream", "dialmycalls" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/dialmycalls", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/dialpad/tsconfig.json b/components/dialpad/tsconfig.json index 610c2a8f6418b..3a9389484d040 100644 --- a/components/dialpad/tsconfig.json +++ b/components/dialpad/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/dictionary_api/app/dictionary_api.app.ts b/components/dictionary_api/app/dictionary_api.app.ts deleted file mode 100644 index 2e4f34739b361..0000000000000 --- a/components/dictionary_api/app/dictionary_api.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "dictionary_api", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/dictionary_api/package.json b/components/dictionary_api/package.json index 73b5562010bd0..433b883ee6c53 100644 --- a/components/dictionary_api/package.json +++ b/components/dictionary_api/package.json @@ -1,18 +1,18 @@ { "name": "@pipedream/dictionary_api", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Free Dictionary Components", - "main": "dist/app/dictionary_api.app.mjs", + "main": "dictionary_api.app.mjs", "keywords": [ "pipedream", "dictionary_api" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/dictionary_api", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/digicert/.gitignore b/components/digicert/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/digicert/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/digicert/app/digicert.app.ts b/components/digicert/app/digicert.app.ts deleted file mode 100644 index df8c19e62ddcc..0000000000000 --- a/components/digicert/app/digicert.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "digicert", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/digicert/digicert.app.mjs b/components/digicert/digicert.app.mjs new file mode 100644 index 0000000000000..241fdec173e81 --- /dev/null +++ b/components/digicert/digicert.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "digicert", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/digicert/package.json b/components/digicert/package.json index 5a928e143b48d..cbcfe7526526c 100644 --- a/components/digicert/package.json +++ b/components/digicert/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/digicert", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream DigiCert Components", - "main": "dist/app/digicert.app.mjs", + "main": "digicert.app.mjs", "keywords": [ "pipedream", "digicert" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/digicert", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/digistore24/.gitignore b/components/digistore24/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/digistore24/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/digistore24/app/digistore24.app.ts b/components/digistore24/app/digistore24.app.ts deleted file mode 100644 index 812e613b65f2b..0000000000000 --- a/components/digistore24/app/digistore24.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "digistore24", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/digistore24/digistore24.app.mjs b/components/digistore24/digistore24.app.mjs new file mode 100644 index 0000000000000..4a8ff52a4b91c --- /dev/null +++ b/components/digistore24/digistore24.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "digistore24", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/digistore24/package.json b/components/digistore24/package.json index 00a942b9c7876..89d1c86bdbadd 100644 --- a/components/digistore24/package.json +++ b/components/digistore24/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/digistore24", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Digistore24 Components", - "main": "dist/app/digistore24.app.mjs", + "main": "digistore24.app.mjs", "keywords": [ "pipedream", "digistore24" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/digistore24", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/dispatch/.gitignore b/components/dispatch/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/dispatch/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/dispatch/app/dispatch.app.ts b/components/dispatch/app/dispatch.app.ts deleted file mode 100644 index 520ecdc5d22d0..0000000000000 --- a/components/dispatch/app/dispatch.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "dispatch", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/dispatch/dispatch.app.mjs b/components/dispatch/dispatch.app.mjs new file mode 100644 index 0000000000000..94ee2948ee1cc --- /dev/null +++ b/components/dispatch/dispatch.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "dispatch", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/dispatch/package.json b/components/dispatch/package.json index ce0d83b008ea4..6e8574ebbe4d7 100644 --- a/components/dispatch/package.json +++ b/components/dispatch/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/dispatch", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Dispatch Components", - "main": "dist/app/dispatch.app.mjs", + "main": "dispatch.app.mjs", "keywords": [ "pipedream", "dispatch" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/dispatch", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/docker_engine/docker_engine.app.mjs b/components/docker_engine/docker_engine.app.mjs index d7b1b1d979f14..a19a7ef9ddc5d 100644 --- a/components/docker_engine/docker_engine.app.mjs +++ b/components/docker_engine/docker_engine.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/docraptor/.gitignore b/components/docraptor/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/docraptor/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/docraptor/app/docraptor.app.ts b/components/docraptor/app/docraptor.app.ts deleted file mode 100644 index bb2a58213a5a6..0000000000000 --- a/components/docraptor/app/docraptor.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "docraptor", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/docraptor/docraptor.app.mjs b/components/docraptor/docraptor.app.mjs new file mode 100644 index 0000000000000..19e78bbbd82b9 --- /dev/null +++ b/components/docraptor/docraptor.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "docraptor", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/docraptor/package.json b/components/docraptor/package.json index 2a9ed8d003c9e..8d5dd43e1f894 100644 --- a/components/docraptor/package.json +++ b/components/docraptor/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/docraptor", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream DocRaptor Components", - "main": "dist/app/docraptor.app.mjs", + "main": "docraptor.app.mjs", "keywords": [ "pipedream", "docraptor" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/docraptor", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/docupilot/package.json b/components/docupilot/package.json index 45f49e18d788d..bf554bf79f961 100644 --- a/components/docupilot/package.json +++ b/components/docupilot/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/docupilot", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Docupilot Components", "main": "dist/app/docupilot.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.0", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/docupilot/tsconfig.json b/components/docupilot/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/docupilot/tsconfig.json +++ b/components/docupilot/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/dokan/.gitignore b/components/dokan/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/dokan/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/dokan/app/dokan.app.ts b/components/dokan/app/dokan.app.ts deleted file mode 100644 index 6d88ad52bfad3..0000000000000 --- a/components/dokan/app/dokan.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "dokan", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/dokan/dokan.app.mjs b/components/dokan/dokan.app.mjs new file mode 100644 index 0000000000000..bdfd0c0d1437d --- /dev/null +++ b/components/dokan/dokan.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "dokan", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/dokan/package.json b/components/dokan/package.json index fc511cabdce30..3886170bdb718 100644 --- a/components/dokan/package.json +++ b/components/dokan/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/dokan", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Dokan Components", - "main": "dist/app/dokan.app.mjs", + "main": "dokan.app.mjs", "keywords": [ "pipedream", "dokan" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/dokan", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/dots_/.gitignore b/components/dots_/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/dots_/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/dots_/app/dots_.app.ts b/components/dots_/app/dots_.app.ts deleted file mode 100644 index ca16ffccadf1c..0000000000000 --- a/components/dots_/app/dots_.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "dots_", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/dots_/dots_.app.mjs b/components/dots_/dots_.app.mjs new file mode 100644 index 0000000000000..a31ed1563711c --- /dev/null +++ b/components/dots_/dots_.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "dots_", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/dots_/package.json b/components/dots_/package.json index ac3e13285ca7a..ce970826d8639 100644 --- a/components/dots_/package.json +++ b/components/dots_/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/dots_", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Dots! Components", - "main": "dist/app/dots_.app.mjs", + "main": "dots_.app.mjs", "keywords": [ "pipedream", "dots_" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/dots_", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/dungeon_fighter_online/dungeon_fighter_online.app.mjs b/components/dungeon_fighter_online/dungeon_fighter_online.app.mjs index be8dd600aa1b4..d6c592a71a57d 100644 --- a/components/dungeon_fighter_online/dungeon_fighter_online.app.mjs +++ b/components/dungeon_fighter_online/dungeon_fighter_online.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/dynamic_content_snippet/dynamic_content_snippet.app.mjs b/components/dynamic_content_snippet/dynamic_content_snippet.app.mjs new file mode 100644 index 0000000000000..90dad4416ef37 --- /dev/null +++ b/components/dynamic_content_snippet/dynamic_content_snippet.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "dynamic_content_snippet", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/dynamic_content_snippet/package.json b/components/dynamic_content_snippet/package.json new file mode 100644 index 0000000000000..9b2643dd0a65c --- /dev/null +++ b/components/dynamic_content_snippet/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/dynamic_content_snippet", + "version": "0.0.1", + "description": "Pipedream Dynamic Content Snippet Components", + "main": "dynamic_content_snippet.app.mjs", + "keywords": [ + "pipedream", + "dynamic_content_snippet" + ], + "homepage": "https://pipedream.com/apps/dynamic_content_snippet", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/dynatrace_api/.gitignore b/components/dynatrace_api/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/dynatrace_api/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/dynatrace_api/app/dynatrace_api.app.ts b/components/dynatrace_api/app/dynatrace_api.app.ts deleted file mode 100644 index ea88ed1e1419b..0000000000000 --- a/components/dynatrace_api/app/dynatrace_api.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "dynatrace_api", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/dynatrace_api/dynatrace_api.app.mjs b/components/dynatrace_api/dynatrace_api.app.mjs new file mode 100644 index 0000000000000..ed227494da38c --- /dev/null +++ b/components/dynatrace_api/dynatrace_api.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "dynatrace_api", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/dynatrace_api/package.json b/components/dynatrace_api/package.json index 3d40d09fb4d2f..bed5fd9e9fbd1 100644 --- a/components/dynatrace_api/package.json +++ b/components/dynatrace_api/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/dynatrace_api", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Dynatrace API Components", - "main": "dist/app/dynatrace_api.app.mjs", + "main": "dynatrace_api.app.mjs", "keywords": [ "pipedream", "dynatrace_api" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/dynatrace_api", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/e_conomic/.gitignore b/components/e_conomic/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/e_conomic/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/e_conomic/app/e_conomic.app.ts b/components/e_conomic/app/e_conomic.app.ts deleted file mode 100644 index 7191dc6e37258..0000000000000 --- a/components/e_conomic/app/e_conomic.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "e_conomic", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/e_conomic/e_conomic.app.mjs b/components/e_conomic/e_conomic.app.mjs new file mode 100644 index 0000000000000..ff994ac26d5ce --- /dev/null +++ b/components/e_conomic/e_conomic.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "e_conomic", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/e_conomic/package.json b/components/e_conomic/package.json index c3326484d5e04..a256491b24532 100644 --- a/components/e_conomic/package.json +++ b/components/e_conomic/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/e_conomic", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream E-conomic Components", - "main": "dist/app/e_conomic.app.mjs", + "main": "e_conomic.app.mjs", "keywords": [ "pipedream", "e_conomic" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/e_conomic", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/easy_projects/.gitignore b/components/easy_projects/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/easy_projects/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/easy_projects/app/easy_projects.app.ts b/components/easy_projects/app/easy_projects.app.ts deleted file mode 100644 index 5a30657e19b73..0000000000000 --- a/components/easy_projects/app/easy_projects.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "easy_projects", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/easy_projects/easy_projects.app.mjs b/components/easy_projects/easy_projects.app.mjs new file mode 100644 index 0000000000000..538d939e36da0 --- /dev/null +++ b/components/easy_projects/easy_projects.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "easy_projects", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/easy_projects/package.json b/components/easy_projects/package.json index 8aaa9073cb2a3..9c5894a7ba927 100644 --- a/components/easy_projects/package.json +++ b/components/easy_projects/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/easy_projects", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Easy Projects Components", - "main": "dist/app/easy_projects.app.mjs", + "main": "easy_projects.app.mjs", "keywords": [ "pipedream", "easy_projects" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/easy_projects", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/ebay/ebay.app.mjs b/components/ebay/ebay.app.mjs new file mode 100644 index 0000000000000..9c0d45187b83d --- /dev/null +++ b/components/ebay/ebay.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "ebay", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/ebay/package.json b/components/ebay/package.json new file mode 100644 index 0000000000000..ac880addc782a --- /dev/null +++ b/components/ebay/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/ebay", + "version": "0.0.1", + "description": "Pipedream eBay Components", + "main": "ebay.app.mjs", + "keywords": [ + "pipedream", + "ebay" + ], + "homepage": "https://pipedream.com/apps/ebay", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/ecologi/package.json b/components/ecologi/package.json index 18c0bc2bc525b..0ffc0f4a4a0cd 100644 --- a/components/ecologi/package.json +++ b/components/ecologi/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/ecologi", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Ecologi Components", - "main": "dist/app/ecologi.app.mjs", + "main": "ecologi.app.mjs", "keywords": [ "pipedream", "ecologi" diff --git a/components/edapp/.gitignore b/components/edapp/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/edapp/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/edapp/app/edapp.app.ts b/components/edapp/app/edapp.app.ts deleted file mode 100644 index df8f76b161079..0000000000000 --- a/components/edapp/app/edapp.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "edapp", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/edapp/edapp.app.mjs b/components/edapp/edapp.app.mjs new file mode 100644 index 0000000000000..ab97267db322d --- /dev/null +++ b/components/edapp/edapp.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "edapp", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/edapp/package.json b/components/edapp/package.json index fe0f3fbeaeb89..99aa09d5a2802 100644 --- a/components/edapp/package.json +++ b/components/edapp/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/edapp", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream EdApp Components", - "main": "dist/app/edapp.app.mjs", + "main": "edapp.app.mjs", "keywords": [ "pipedream", "edapp" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/edapp", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/elopage/.gitignore b/components/elopage/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/elopage/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/elopage/app/elopage.app.ts b/components/elopage/app/elopage.app.ts deleted file mode 100644 index f8356dfb428c3..0000000000000 --- a/components/elopage/app/elopage.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "elopage", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/elopage/elopage.app.mjs b/components/elopage/elopage.app.mjs new file mode 100644 index 0000000000000..e9dddeef7b7e1 --- /dev/null +++ b/components/elopage/elopage.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "elopage", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/elopage/package.json b/components/elopage/package.json index 64ba0075f5cd1..eec9bdfc5883c 100644 --- a/components/elopage/package.json +++ b/components/elopage/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/elopage", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream elopage Components", - "main": "dist/app/elopage.app.mjs", + "main": "elopage.app.mjs", "keywords": [ "pipedream", "elopage" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/elopage", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/emailverify_io/emailverify_io.app.mjs b/components/emailverify_io/emailverify_io.app.mjs index d8911c5423712..3e153ff12636b 100644 --- a/components/emailverify_io/emailverify_io.app.mjs +++ b/components/emailverify_io/emailverify_io.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/emelia/.gitignore b/components/emelia/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/emelia/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/emelia/app/emelia.app.ts b/components/emelia/app/emelia.app.ts deleted file mode 100644 index e7bfab54effe8..0000000000000 --- a/components/emelia/app/emelia.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "emelia", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/emelia/emelia.app.mjs b/components/emelia/emelia.app.mjs new file mode 100644 index 0000000000000..a1074c269c2e4 --- /dev/null +++ b/components/emelia/emelia.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "emelia", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/emelia/package.json b/components/emelia/package.json index e5e057cbb66b5..6e797d952b20d 100644 --- a/components/emelia/package.json +++ b/components/emelia/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/emelia", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Emelia Components", - "main": "dist/app/emelia.app.mjs", + "main": "emelia.app.mjs", "keywords": [ "pipedream", "emelia" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/emelia", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/encharge/.gitignore b/components/encharge/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/encharge/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/encharge/app/encharge.app.ts b/components/encharge/app/encharge.app.ts deleted file mode 100644 index 644d77ac609e6..0000000000000 --- a/components/encharge/app/encharge.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "encharge", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/encharge/encharge.app.mjs b/components/encharge/encharge.app.mjs new file mode 100644 index 0000000000000..32eb5dceb5a53 --- /dev/null +++ b/components/encharge/encharge.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "encharge", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/encharge/package.json b/components/encharge/package.json index dd55516b6317f..d5f4ed7920251 100644 --- a/components/encharge/package.json +++ b/components/encharge/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/encharge", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Encharge Components", - "main": "dist/app/encharge.app.mjs", + "main": "encharge.app.mjs", "keywords": [ "pipedream", "encharge" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/encharge", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/enginemailer/enginemailer.app.mjs b/components/enginemailer/enginemailer.app.mjs index ae7f9461ea35e..62e2ea5f1fb89 100644 --- a/components/enginemailer/enginemailer.app.mjs +++ b/components/enginemailer/enginemailer.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/enigma/.gitignore b/components/enigma/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/enigma/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/enigma/app/enigma.app.ts b/components/enigma/app/enigma.app.ts deleted file mode 100644 index 9b217da8bb775..0000000000000 --- a/components/enigma/app/enigma.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "enigma", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/enigma/enigma.app.mjs b/components/enigma/enigma.app.mjs new file mode 100644 index 0000000000000..64107d11bc246 --- /dev/null +++ b/components/enigma/enigma.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "enigma", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/enigma/package.json b/components/enigma/package.json index 46b4632183b1f..a395b9a4b16e4 100644 --- a/components/enigma/package.json +++ b/components/enigma/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/enigma", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Enigma Components", - "main": "dist/app/enigma.app.mjs", + "main": "enigma.app.mjs", "keywords": [ "pipedream", "enigma" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/enigma", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/enormail/.gitignore b/components/enormail/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/enormail/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/enormail/app/enormail.app.ts b/components/enormail/app/enormail.app.ts deleted file mode 100644 index c52b9c643482f..0000000000000 --- a/components/enormail/app/enormail.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "enormail", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/enormail/enormail.app.mjs b/components/enormail/enormail.app.mjs new file mode 100644 index 0000000000000..e8549c2f51b85 --- /dev/null +++ b/components/enormail/enormail.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "enormail", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/enormail/package.json b/components/enormail/package.json index 1aef6c7dd0109..073a5fce35371 100644 --- a/components/enormail/package.json +++ b/components/enormail/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/enormail", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Enormail Components", - "main": "dist/app/enormail.app.mjs", + "main": "enormail.app.mjs", "keywords": [ "pipedream", "enormail" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/enormail", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/eodhd_apis/package.json b/components/eodhd_apis/package.json index cef6f0429a10c..8dbea7ffa71ba 100644 --- a/components/eodhd_apis/package.json +++ b/components/eodhd_apis/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/eodhd_apis", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream EODHD APIs Components", "main": "eodhd_apis.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/ethereum/.gitignore b/components/ethereum/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/ethereum/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/ethereum/app/ethereum.app.ts b/components/ethereum/app/ethereum.app.ts deleted file mode 100644 index e6d4e94d60c23..0000000000000 --- a/components/ethereum/app/ethereum.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "ethereum", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/ethereum/ethereum.app.mjs b/components/ethereum/ethereum.app.mjs new file mode 100644 index 0000000000000..4b36e242c9742 --- /dev/null +++ b/components/ethereum/ethereum.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "ethereum", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/ethereum/package.json b/components/ethereum/package.json index 5396f1c9f73cb..47bbcc55f7df3 100644 --- a/components/ethereum/package.json +++ b/components/ethereum/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/ethereum", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Etherscan Components", - "main": "dist/app/ethereum.app.mjs", + "main": "ethereum.app.mjs", "keywords": [ "pipedream", "ethereum" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/ethereum", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/expensify/package.json b/components/expensify/package.json index d96ce4c177f78..3532abb388df2 100644 --- a/components/expensify/package.json +++ b/components/expensify/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/expensify", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Expensify Components", "main": "dist/app/expensify.app.mjs", "keywords": [ @@ -16,8 +16,10 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.0", - "@pipedream/types": "^0.1.3", + "@pipedream/platform": "^3.1.0", "qs": "^6.11.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/expensify/tsconfig.json b/components/expensify/tsconfig.json index a61206464b8c0..3a9389484d040 100644 --- a/components/expensify/tsconfig.json +++ b/components/expensify/tsconfig.json @@ -1,23 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/extracta_ai/extracta_ai.app.mjs b/components/extracta_ai/extracta_ai.app.mjs index a8f13ab79a3b8..fc44a53aef2c7 100644 --- a/components/extracta_ai/extracta_ai.app.mjs +++ b/components/extracta_ai/extracta_ai.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/ez_texting/.gitignore b/components/ez_texting/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/ez_texting/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/ez_texting/app/ez_texting.app.ts b/components/ez_texting/app/ez_texting.app.ts deleted file mode 100644 index d26ba948ebcab..0000000000000 --- a/components/ez_texting/app/ez_texting.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "ez_texting", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/ez_texting/ez_texting.app.mjs b/components/ez_texting/ez_texting.app.mjs new file mode 100644 index 0000000000000..1145df1f41692 --- /dev/null +++ b/components/ez_texting/ez_texting.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "ez_texting", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/ez_texting/package.json b/components/ez_texting/package.json index abb5f463dcd22..3cd15ad49103d 100644 --- a/components/ez_texting/package.json +++ b/components/ez_texting/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/ez_texting", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream iHomefinder Components", - "main": "dist/app/ez_texting.app.mjs", + "main": "ez_texting.app.mjs", "keywords": [ "pipedream", "ez_texting" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/ez_texting", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/ez_texting_/.gitignore b/components/ez_texting_/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/ez_texting_/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/ez_texting_/app/ez_texting_.app.ts b/components/ez_texting_/app/ez_texting_.app.ts deleted file mode 100644 index 465f2c04e440f..0000000000000 --- a/components/ez_texting_/app/ez_texting_.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "ez_texting_", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/ez_texting_/ez_texting_.app.mjs b/components/ez_texting_/ez_texting_.app.mjs new file mode 100644 index 0000000000000..98a6f7effb3ac --- /dev/null +++ b/components/ez_texting_/ez_texting_.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "ez_texting_", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/ez_texting_/package.json b/components/ez_texting_/package.json index 229f6f47c644f..35d6bf4ac861e 100644 --- a/components/ez_texting_/package.json +++ b/components/ez_texting_/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/ez_texting_", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream EZ Texting_ Components", - "main": "dist/app/ez_texting_.app.mjs", + "main": "ez_texting_.app.mjs", "keywords": [ "pipedream", "ez_texting_" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/ez_texting_", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/facebook_conversions/.gitignore b/components/facebook_conversions/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/facebook_conversions/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/facebook_conversions/app/facebook_conversions.app.ts b/components/facebook_conversions/app/facebook_conversions.app.ts deleted file mode 100644 index 6d07277894f45..0000000000000 --- a/components/facebook_conversions/app/facebook_conversions.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "facebook_conversions", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/facebook_conversions/facebook_conversions.app.mjs b/components/facebook_conversions/facebook_conversions.app.mjs new file mode 100644 index 0000000000000..f400ac3266fb2 --- /dev/null +++ b/components/facebook_conversions/facebook_conversions.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "facebook_conversions", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/facebook_conversions/package.json b/components/facebook_conversions/package.json index 95e383af79c1b..72d976a56135b 100644 --- a/components/facebook_conversions/package.json +++ b/components/facebook_conversions/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/facebook_conversions", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Facebook Conversions API Components", - "main": "dist/app/facebook_conversions.app.mjs", + "main": "facebook_conversions.app.mjs", "keywords": [ "pipedream", "facebook_conversions" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/facebook_conversions", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/facebook_lead_ads/.gitignore b/components/facebook_lead_ads/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/facebook_lead_ads/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/facebook_lead_ads/app/facebook_lead_ads.app.ts b/components/facebook_lead_ads/app/facebook_lead_ads.app.ts deleted file mode 100644 index aa9ff1927c724..0000000000000 --- a/components/facebook_lead_ads/app/facebook_lead_ads.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "facebook_lead_ads", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/facebook_lead_ads/facebook_lead_ads.app.mjs b/components/facebook_lead_ads/facebook_lead_ads.app.mjs new file mode 100644 index 0000000000000..1b56263d74659 --- /dev/null +++ b/components/facebook_lead_ads/facebook_lead_ads.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "facebook_lead_ads", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/facebook_lead_ads/package.json b/components/facebook_lead_ads/package.json index 4a2517a4f9019..95613fdec7cff 100644 --- a/components/facebook_lead_ads/package.json +++ b/components/facebook_lead_ads/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/facebook_lead_ads", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Facebook Lead Ads Components", - "main": "dist/app/facebook_lead_ads.app.mjs", + "main": "facebook_lead_ads.app.mjs", "keywords": [ "pipedream", "facebook_lead_ads" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/facebook_lead_ads", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/facturadirecta/.gitignore b/components/facturadirecta/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/facturadirecta/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/facturadirecta/app/facturadirecta.app.ts b/components/facturadirecta/app/facturadirecta.app.ts deleted file mode 100644 index 1768e4e63b546..0000000000000 --- a/components/facturadirecta/app/facturadirecta.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "facturadirecta", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/facturadirecta/facturadirecta.app.mjs b/components/facturadirecta/facturadirecta.app.mjs new file mode 100644 index 0000000000000..96021aebaaca4 --- /dev/null +++ b/components/facturadirecta/facturadirecta.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "facturadirecta", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/facturadirecta/package.json b/components/facturadirecta/package.json index 10f697801bd15..f9bcd1a405685 100644 --- a/components/facturadirecta/package.json +++ b/components/facturadirecta/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/facturadirecta", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream FacturaDirecta Components", - "main": "dist/app/facturadirecta.app.mjs", + "main": "facturadirecta.app.mjs", "keywords": [ "pipedream", "facturadirecta" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/facturadirecta", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/faire/.gitignore b/components/faire/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/faire/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/faire/app/faire.app.ts b/components/faire/app/faire.app.ts deleted file mode 100644 index af07e76a5e9d4..0000000000000 --- a/components/faire/app/faire.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "faire", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/faire/faire.app.mjs b/components/faire/faire.app.mjs new file mode 100644 index 0000000000000..5fcf61bd360a7 --- /dev/null +++ b/components/faire/faire.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "faire", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/faire/package.json b/components/faire/package.json index e499c271cae1f..ab22ac19ac279 100644 --- a/components/faire/package.json +++ b/components/faire/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/faire", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Faire Components", - "main": "dist/app/faire.app.mjs", + "main": "faire.app.mjs", "keywords": [ "pipedream", "faire" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/faire", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/fastfield_mobile_forms/.gitignore b/components/fastfield_mobile_forms/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/fastfield_mobile_forms/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/fastfield_mobile_forms/app/fastfield_mobile_forms.app.ts b/components/fastfield_mobile_forms/app/fastfield_mobile_forms.app.ts deleted file mode 100644 index 6c87403916afe..0000000000000 --- a/components/fastfield_mobile_forms/app/fastfield_mobile_forms.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "fastfield_mobile_forms", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/fastfield_mobile_forms/fastfield_mobile_forms.app.mjs b/components/fastfield_mobile_forms/fastfield_mobile_forms.app.mjs new file mode 100644 index 0000000000000..445bd7ffcd7ec --- /dev/null +++ b/components/fastfield_mobile_forms/fastfield_mobile_forms.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "fastfield_mobile_forms", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/fastfield_mobile_forms/package.json b/components/fastfield_mobile_forms/package.json index cf93014f5b0c5..d35c0b0c3f09d 100644 --- a/components/fastfield_mobile_forms/package.json +++ b/components/fastfield_mobile_forms/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/fastfield_mobile_forms", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream FastField Mobile Forms Components", - "main": "dist/app/fastfield_mobile_forms.app.mjs", + "main": "fastfield_mobile_forms.app.mjs", "keywords": [ "pipedream", "fastfield_mobile_forms" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/fastfield_mobile_forms", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/fedex/.gitignore b/components/fedex/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/fedex/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/fedex/app/fedex.app.ts b/components/fedex/app/fedex.app.ts deleted file mode 100644 index 27acb1e0a844f..0000000000000 --- a/components/fedex/app/fedex.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "fedex", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/fedex/fedex.app.mjs b/components/fedex/fedex.app.mjs new file mode 100644 index 0000000000000..9e882a7078da7 --- /dev/null +++ b/components/fedex/fedex.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "fedex", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/fedex/package.json b/components/fedex/package.json index 4efef17fe00dc..7cdc62da02c63 100644 --- a/components/fedex/package.json +++ b/components/fedex/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/fedex", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream FedEx Components", - "main": "dist/app/fedex.app.mjs", + "main": "fedex.app.mjs", "keywords": [ "pipedream", "fedex" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/fedex", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/finmo/.gitignore b/components/finmo/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/finmo/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/finmo/app/finmo.app.ts b/components/finmo/app/finmo.app.ts deleted file mode 100644 index e2891358a24eb..0000000000000 --- a/components/finmo/app/finmo.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "finmo", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/finmo/finmo.app.mjs b/components/finmo/finmo.app.mjs new file mode 100644 index 0000000000000..208b74f03a402 --- /dev/null +++ b/components/finmo/finmo.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "finmo", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/finmo/package.json b/components/finmo/package.json index 24c5783eeaccb..17fdd81eb3e93 100644 --- a/components/finmo/package.json +++ b/components/finmo/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/finmo", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Finmo Components", - "main": "dist/app/finmo.app.mjs", + "main": "finmo.app.mjs", "keywords": [ "pipedream", "finmo" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/finmo", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/firecrawl/actions/map-url/map-url.mjs b/components/firecrawl/actions/map-url/map-url.mjs new file mode 100644 index 0000000000000..5f80d03c85c1f --- /dev/null +++ b/components/firecrawl/actions/map-url/map-url.mjs @@ -0,0 +1,49 @@ +import firecrawl from "../../firecrawl.app.mjs"; + +export default { + key: "firecrawl-map-url", + name: "Map URL", + description: "Maps a given URL using Firecrawl's Map endpoint. Optionally, you can provide a search term to filter the mapping. [See the documentation](https://docs.firecrawl.dev/features/map)", + version: "0.0.1", + type: "action", + props: { + firecrawl, + url: { + propDefinition: [ + firecrawl, + "url", + ], + description: "The URL to map using Firecrawl.", + }, + search: { + type: "string", + label: "Search", + description: "Optional search term to filter the mapping results. [See the documentation](https://docs.firecrawl.dev/features/map).", + optional: true, + }, + }, + async run({ $ }) { + const { + firecrawl, search, ...data + } = this; + + // Including search parameter in payload only when its not empty + if (search && search.trim() !== "") { + data.search = search.trim(); + } + + const response = await firecrawl._makeRequest({ + $, + path: "/map", + method: "POST", + data, + }); + + console.log("Firecrawl Response:", response); + + if ($ && typeof $.export === "function") { + $.export("$summary", `Mapped URL: ${this.url}`); + } + return response; + }, +}; diff --git a/components/firecrawl/package.json b/components/firecrawl/package.json index 4ec3137c71db3..f5805483f3d68 100644 --- a/components/firecrawl/package.json +++ b/components/firecrawl/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/firecrawl", - "version": "1.2.0", + "version": "1.3.0", "description": "Pipedream FireCrawl Components", "main": "firecrawl.app.mjs", "keywords": [ diff --git a/components/firmalyzer_iotvas/.gitignore b/components/firmalyzer_iotvas/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/firmalyzer_iotvas/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/firmalyzer_iotvas/app/firmalyzer_iotvas.app.ts b/components/firmalyzer_iotvas/app/firmalyzer_iotvas.app.ts deleted file mode 100644 index a79d0970c240a..0000000000000 --- a/components/firmalyzer_iotvas/app/firmalyzer_iotvas.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "firmalyzer_iotvas", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/firmalyzer_iotvas/firmalyzer_iotvas.app.mjs b/components/firmalyzer_iotvas/firmalyzer_iotvas.app.mjs new file mode 100644 index 0000000000000..417c7a5e9890f --- /dev/null +++ b/components/firmalyzer_iotvas/firmalyzer_iotvas.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "firmalyzer_iotvas", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/firmalyzer_iotvas/package.json b/components/firmalyzer_iotvas/package.json index 02c455e0b4ca0..24b7f6aa475f3 100644 --- a/components/firmalyzer_iotvas/package.json +++ b/components/firmalyzer_iotvas/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/firmalyzer_iotvas", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Firmalyzer IoTVAS API Components", - "main": "dist/app/firmalyzer_iotvas.app.mjs", + "main": "firmalyzer_iotvas.app.mjs", "keywords": [ "pipedream", "firmalyzer_iotvas" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/firmalyzer_iotvas", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/firmao/package.json b/components/firmao/package.json index d94706316def3..e1ef5923bb449 100644 --- a/components/firmao/package.json +++ b/components/firmao/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/firmao", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Firmao Components", "main": "firmao.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/fivetran/.gitignore b/components/fivetran/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/fivetran/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/fivetran/app/fivetran.app.ts b/components/fivetran/app/fivetran.app.ts deleted file mode 100644 index 1eb9a748b8d93..0000000000000 --- a/components/fivetran/app/fivetran.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "fivetran", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/fivetran/fivetran.app.mjs b/components/fivetran/fivetran.app.mjs new file mode 100644 index 0000000000000..06eab1daf621a --- /dev/null +++ b/components/fivetran/fivetran.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "fivetran", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/fivetran/package.json b/components/fivetran/package.json index 2a3a6f9d546a2..ab6a84539a1fd 100644 --- a/components/fivetran/package.json +++ b/components/fivetran/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/fivetran", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Fivetran Components", - "main": "dist/app/fivetran.app.mjs", + "main": "fivetran.app.mjs", "keywords": [ "pipedream", "fivetran" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/fivetran", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/float/.gitignore b/components/float/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/float/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/float/app/float.app.ts b/components/float/app/float.app.ts deleted file mode 100644 index 4dfcd04653452..0000000000000 --- a/components/float/app/float.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "float", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/float/float.app.mjs b/components/float/float.app.mjs new file mode 100644 index 0000000000000..0edf8dd132d1c --- /dev/null +++ b/components/float/float.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "float", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/float/package.json b/components/float/package.json index 0eb4ef6499221..3f497bb958d2c 100644 --- a/components/float/package.json +++ b/components/float/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/float", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Float Components", - "main": "dist/app/float.app.mjs", + "main": "float.app.mjs", "keywords": [ "pipedream", "float" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/float", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/fluent_support/.gitignore b/components/fluent_support/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/fluent_support/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/fluent_support/app/fluent_support.app.ts b/components/fluent_support/app/fluent_support.app.ts deleted file mode 100644 index f36f3cb930cf1..0000000000000 --- a/components/fluent_support/app/fluent_support.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "fluent_support", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/fluent_support/fluent_support.app.mjs b/components/fluent_support/fluent_support.app.mjs new file mode 100644 index 0000000000000..f511579a4e34b --- /dev/null +++ b/components/fluent_support/fluent_support.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "fluent_support", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/fluent_support/package.json b/components/fluent_support/package.json index 27cf9bcd0c972..a8fb67c1d09f9 100644 --- a/components/fluent_support/package.json +++ b/components/fluent_support/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/fluent_support", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Fluent Support Components", - "main": "dist/app/fluent_support.app.mjs", + "main": "fluent_support.app.mjs", "keywords": [ "pipedream", "fluent_support" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/fluent_support", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/focuster/.gitignore b/components/focuster/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/focuster/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/focuster/app/focuster.app.ts b/components/focuster/app/focuster.app.ts deleted file mode 100644 index b6117f684d3c1..0000000000000 --- a/components/focuster/app/focuster.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "focuster", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/focuster/focuster.app.mjs b/components/focuster/focuster.app.mjs new file mode 100644 index 0000000000000..a52930e3658c2 --- /dev/null +++ b/components/focuster/focuster.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "focuster", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/focuster/package.json b/components/focuster/package.json index c1cc2d8903413..2896f8f08363a 100644 --- a/components/focuster/package.json +++ b/components/focuster/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/focuster", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Focuster Components", - "main": "dist/app/focuster.app.mjs", + "main": "focuster.app.mjs", "keywords": [ "pipedream", "focuster" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/focuster", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/follow_up_boss/.gitignore b/components/follow_up_boss/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/follow_up_boss/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/follow_up_boss/app/follow_up_boss.app.ts b/components/follow_up_boss/app/follow_up_boss.app.ts deleted file mode 100644 index cec5be6e8cb57..0000000000000 --- a/components/follow_up_boss/app/follow_up_boss.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "follow_up_boss", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/follow_up_boss/follow_up_boss.app.mjs b/components/follow_up_boss/follow_up_boss.app.mjs new file mode 100644 index 0000000000000..5f006e1a26fbf --- /dev/null +++ b/components/follow_up_boss/follow_up_boss.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "follow_up_boss", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/follow_up_boss/package.json b/components/follow_up_boss/package.json index d0c959e91ea37..0c580f8797eed 100644 --- a/components/follow_up_boss/package.json +++ b/components/follow_up_boss/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/follow_up_boss", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Follow Up Boss Components", - "main": "dist/app/follow_up_boss.app.mjs", + "main": "follow_up_boss.app.mjs", "keywords": [ "pipedream", "follow_up_boss" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/follow_up_boss", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/form_io/.gitignore b/components/form_io/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/form_io/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/form_io/app/form_io.app.ts b/components/form_io/app/form_io.app.ts deleted file mode 100644 index 7c01685f93fa0..0000000000000 --- a/components/form_io/app/form_io.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "form_io", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/form_io/form_io.app.mjs b/components/form_io/form_io.app.mjs new file mode 100644 index 0000000000000..8057b2f356123 --- /dev/null +++ b/components/form_io/form_io.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "form_io", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/form_io/package.json b/components/form_io/package.json index b31c9332fb280..d4d5e5b52c9a8 100644 --- a/components/form_io/package.json +++ b/components/form_io/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/form_io", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Form.io Components", - "main": "dist/app/form_io.app.mjs", + "main": "form_io.app.mjs", "keywords": [ "pipedream", "form_io" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/form_io", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/formatting/formatting.app.mjs b/components/formatting/formatting.app.mjs index 2686dd33b36cc..5f8369d97d73f 100644 --- a/components/formatting/formatting.app.mjs +++ b/components/formatting/formatting.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/formatting/package.json b/components/formatting/package.json index 434033f0350e5..e83e67fd181f3 100644 --- a/components/formatting/package.json +++ b/components/formatting/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/formatting", - "version": "0.2.0", + "version": "0.2.1", "description": "Pipedream Formatting Components", "main": "dist/app/formatting.app.mjs", "keywords": [ @@ -16,13 +16,15 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.1", - "@pipedream/types": "^0.1.4", + "@pipedream/platform": "^3.1.0", "html-to-text": "^8.2.1", "linkedom": "^0.14.26", "pluralize": "^8.0.0", "showdown": "^2.1.0", "sugar": "^2.0.6", "title-case": "^3.0.3" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/formatting/tsconfig.json b/components/formatting/tsconfig.json index 0b82410677792..3a9389484d040 100644 --- a/components/formatting/tsconfig.json +++ b/components/formatting/tsconfig.json @@ -1,23 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/formdesk/.gitignore b/components/formdesk/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/formdesk/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/formdesk/app/formdesk.app.ts b/components/formdesk/app/formdesk.app.ts deleted file mode 100644 index a532128f828c1..0000000000000 --- a/components/formdesk/app/formdesk.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "formdesk", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/formdesk/formdesk.app.mjs b/components/formdesk/formdesk.app.mjs new file mode 100644 index 0000000000000..eac39527a940b --- /dev/null +++ b/components/formdesk/formdesk.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "formdesk", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/formdesk/package.json b/components/formdesk/package.json index 5a2541c99f558..12b18f9aabc2b 100644 --- a/components/formdesk/package.json +++ b/components/formdesk/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/formdesk", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Formdesk Components", - "main": "dist/app/formdesk.app.mjs", + "main": "formdesk.app.mjs", "keywords": [ "pipedream", "formdesk" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/formdesk", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/forms_on_fire/.gitignore b/components/forms_on_fire/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/forms_on_fire/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/forms_on_fire/app/forms_on_fire.app.ts b/components/forms_on_fire/app/forms_on_fire.app.ts deleted file mode 100644 index af6343b393156..0000000000000 --- a/components/forms_on_fire/app/forms_on_fire.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "forms_on_fire", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/forms_on_fire/forms_on_fire.app.mjs b/components/forms_on_fire/forms_on_fire.app.mjs new file mode 100644 index 0000000000000..a904ce251b6a1 --- /dev/null +++ b/components/forms_on_fire/forms_on_fire.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "forms_on_fire", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/forms_on_fire/package.json b/components/forms_on_fire/package.json index 5a595799e4f12..e666dcd8fd3d7 100644 --- a/components/forms_on_fire/package.json +++ b/components/forms_on_fire/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/forms_on_fire", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Forms On Fire Components", - "main": "dist/app/forms_on_fire.app.mjs", + "main": "forms_on_fire.app.mjs", "keywords": [ "pipedream", "forms_on_fire" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/forms_on_fire", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/formsite/.gitignore b/components/formsite/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/formsite/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/formsite/app/formsite.app.ts b/components/formsite/app/formsite.app.ts deleted file mode 100644 index b47588544253d..0000000000000 --- a/components/formsite/app/formsite.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "formsite", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/formsite/formsite.app.mjs b/components/formsite/formsite.app.mjs new file mode 100644 index 0000000000000..efa56a4d1098b --- /dev/null +++ b/components/formsite/formsite.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "formsite", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/formsite/package.json b/components/formsite/package.json index ba094511d06b9..6099250928edc 100644 --- a/components/formsite/package.json +++ b/components/formsite/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/formsite", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Formsite Components", - "main": "dist/app/formsite.app.mjs", + "main": "formsite.app.mjs", "keywords": [ "pipedream", "formsite" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/formsite", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/foxy/.gitignore b/components/foxy/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/foxy/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/foxy/app/foxy.app.ts b/components/foxy/app/foxy.app.ts deleted file mode 100644 index 2ae5fb24b076c..0000000000000 --- a/components/foxy/app/foxy.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "foxy", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/foxy/foxy.app.mjs b/components/foxy/foxy.app.mjs new file mode 100644 index 0000000000000..1648413312337 --- /dev/null +++ b/components/foxy/foxy.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "foxy", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/foxy/package.json b/components/foxy/package.json index 5718dc1ccae65..91340989c3ddb 100644 --- a/components/foxy/package.json +++ b/components/foxy/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/foxy", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Foxy Components", - "main": "dist/app/foxy.app.mjs", + "main": "foxy.app.mjs", "keywords": [ "pipedream", "foxy" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/foxy", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/freedcamp/.gitignore b/components/freedcamp/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/freedcamp/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/freedcamp/app/freedcamp.app.ts b/components/freedcamp/app/freedcamp.app.ts deleted file mode 100644 index 26e3635873ccd..0000000000000 --- a/components/freedcamp/app/freedcamp.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "freedcamp", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/freedcamp/freedcamp.app.mjs b/components/freedcamp/freedcamp.app.mjs new file mode 100644 index 0000000000000..be35aa26e926c --- /dev/null +++ b/components/freedcamp/freedcamp.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "freedcamp", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/freedcamp/package.json b/components/freedcamp/package.json index fef33f21547b3..63f798cb1abe3 100644 --- a/components/freedcamp/package.json +++ b/components/freedcamp/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/freedcamp", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Freedcamp Components", - "main": "dist/app/freedcamp.app.mjs", + "main": "freedcamp.app.mjs", "keywords": [ "pipedream", "freedcamp" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/freedcamp", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/freshbooks/.gitignore b/components/freshbooks/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/freshbooks/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/freshbooks/app/freshbooks.app.ts b/components/freshbooks/app/freshbooks.app.ts deleted file mode 100644 index e1a75b51ea146..0000000000000 --- a/components/freshbooks/app/freshbooks.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "freshbooks", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/freshbooks/freshbooks.app.mjs b/components/freshbooks/freshbooks.app.mjs new file mode 100644 index 0000000000000..2ce5af8e928bd --- /dev/null +++ b/components/freshbooks/freshbooks.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "freshbooks", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/freshbooks/package.json b/components/freshbooks/package.json index 511a16bec3395..2f06a2dbc5d9b 100644 --- a/components/freshbooks/package.json +++ b/components/freshbooks/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/freshbooks", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream FreshBooks Components", - "main": "dist/app/freshbooks.app.mjs", + "main": "freshbooks.app.mjs", "keywords": [ "pipedream", "freshbooks" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/freshbooks", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/freshdesk/actions/add-note-to-ticket/add-note-to-ticket.mjs b/components/freshdesk/actions/add-note-to-ticket/add-note-to-ticket.mjs index f8fa1cc684abd..a15df6d315641 100644 --- a/components/freshdesk/actions/add-note-to-ticket/add-note-to-ticket.mjs +++ b/components/freshdesk/actions/add-note-to-ticket/add-note-to-ticket.mjs @@ -5,7 +5,7 @@ export default { key: "freshdesk-add-note-to-ticket", name: "Add Note to Ticket", description: "Add a note or conversation to an existing ticket. [See the documentation](https://developers.freshdesk.com/api/#add_note_to_a_ticket).", - version: "0.0.1", + version: "0.0.2", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/add-ticket-tags/add-ticket-tags.mjs b/components/freshdesk/actions/add-ticket-tags/add-ticket-tags.mjs index c96706ba9990c..76d31e92a0626 100644 --- a/components/freshdesk/actions/add-ticket-tags/add-ticket-tags.mjs +++ b/components/freshdesk/actions/add-ticket-tags/add-ticket-tags.mjs @@ -6,7 +6,7 @@ export default { name: "Add Ticket Tags", description: "Add tags to a ticket (appends to existing tags). [See the documentation](https://developers.freshdesk.com/api/#update_ticket)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { freshdesk, ticketId: { diff --git a/components/freshdesk/actions/assign-ticket-to-agent/assign-ticket-to-agent.mjs b/components/freshdesk/actions/assign-ticket-to-agent/assign-ticket-to-agent.mjs index 159c2756d867b..d22aa548dc842 100644 --- a/components/freshdesk/actions/assign-ticket-to-agent/assign-ticket-to-agent.mjs +++ b/components/freshdesk/actions/assign-ticket-to-agent/assign-ticket-to-agent.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-assign-ticket-to-agent", name: "Assign Ticket to Agent", description: "Assign a Freshdesk ticket to a specific agent. [See the documentation](https://developers.freshdesk.com/api/#update_ticket).", - version: "0.0.3", + version: "0.0.4", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/assign-ticket-to-group/assign-ticket-to-group.mjs b/components/freshdesk/actions/assign-ticket-to-group/assign-ticket-to-group.mjs index dab86e1316c0e..1801ecab852a5 100644 --- a/components/freshdesk/actions/assign-ticket-to-group/assign-ticket-to-group.mjs +++ b/components/freshdesk/actions/assign-ticket-to-group/assign-ticket-to-group.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-assign-ticket-to-group", name: "Assign Ticket to Group", description: "Assign a Freshdesk ticket to a specific group [See the documentation](https://developers.freshdesk.com/api/#update_ticket).", - version: "0.0.3", + version: "0.0.4", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/close-ticket/close-ticket.mjs b/components/freshdesk/actions/close-ticket/close-ticket.mjs index 6697f7e56db1a..7326b78cf33ba 100644 --- a/components/freshdesk/actions/close-ticket/close-ticket.mjs +++ b/components/freshdesk/actions/close-ticket/close-ticket.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-close-ticket", name: "Close Ticket", description: "Set a Freshdesk ticket's status to 'Closed'. [See docs](https://developers.freshdesk.com/api/#update_a_ticket)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/create-agent/create-agent.mjs b/components/freshdesk/actions/create-agent/create-agent.mjs new file mode 100644 index 0000000000000..9575454993368 --- /dev/null +++ b/components/freshdesk/actions/create-agent/create-agent.mjs @@ -0,0 +1,103 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "freshdesk-create-agent", + name: "Create Agent", + description: "Create an agent in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#create_agent)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + email: { + type: "string", + label: "Email", + description: "Email address of the Agent.", + }, + ticketScope: { + type: "integer", + label: "Ticket Scope", + description: "Ticket permission of the agent. Current logged in agent can't update his/her ticket_scope", + options: constants.TICKET_SCOPE, + }, + occasional: { + type: "boolean", + label: "Occasional", + description: "Set to true if this is an occasional agent (true => occasional, false => full-time)", + optional: true, + }, + signature: { + type: "string", + label: "Signature", + description: "Signature of the agent in HTML format", + optional: true, + }, + skillIds: { + propDefinition: [ + freshdesk, + "skillIds", + ], + }, + groupIds: { + propDefinition: [ + freshdesk, + "groupId", + ], + type: "string[]", + label: "Group IDs", + description: "Array of group IDs", + optional: true, + }, + roleIds: { + propDefinition: [ + freshdesk, + "roleIds", + ], + }, + agentType: { + type: "integer", + label: "Agent Type", + description: "Type of the agent", + options: constants.AGENT_TYPE, + optional: true, + }, + language: { + type: "string", + label: "Language", + description: " Language of the Agent. Default language is `en`", + optional: true, + }, + timeZone: { + type: "string", + label: "Time Zone", + description: "Time zone of the agent. Default value is time zone of the domain.", + optional: true, + }, + focusMode: { + type: "boolean", + label: "Focus Mode", + description: "Focus mode of the agent. Default value is `true`", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.freshdesk.createAgent({ + $, + data: { + email: this.email, + ticket_scope: this.ticketScope, + occasional: this.occasional, + signature: this.signature, + skill_ids: this.skillIds, + group_ids: this.groupIds, + role_ids: this.roleIds, + agent_type: this.agentType, + language: this.language, + time_zone: this.timeZone, + focus_mode: this.focusMode, + }, + }); + $.export("$summary", `Agent ${this.email} created successfully`); + return response; + }, +}; diff --git a/components/freshdesk/actions/create-company/create-company.mjs b/components/freshdesk/actions/create-company/create-company.mjs index 77c77ee7a217f..c8d1a041bf3ae 100644 --- a/components/freshdesk/actions/create-company/create-company.mjs +++ b/components/freshdesk/actions/create-company/create-company.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-create-company", name: "Create a Company", description: "Create a company. [See the documentation](https://developers.freshdesk.com/api/#create_company)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/create-contact/create-contact.mjs b/components/freshdesk/actions/create-contact/create-contact.mjs index c3a092d912504..06a90e47580bb 100644 --- a/components/freshdesk/actions/create-contact/create-contact.mjs +++ b/components/freshdesk/actions/create-contact/create-contact.mjs @@ -5,7 +5,7 @@ export default { key: "freshdesk-create-contact", name: "Create a Contact", description: "Create a contact. [See the documentation](https://developers.freshdesk.com/api/#create_contact)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/create-solution-article/create-solution-article.mjs b/components/freshdesk/actions/create-solution-article/create-solution-article.mjs new file mode 100644 index 0000000000000..82518193554cf --- /dev/null +++ b/components/freshdesk/actions/create-solution-article/create-solution-article.mjs @@ -0,0 +1,72 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import constants from "../../common/constants.mjs"; +import { parseObject } from "../../common/utils.mjs"; + +export default { + key: "freshdesk-create-solution-article", + name: "Create Solution Article", + description: "Create a solution article in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + categoryId: { + propDefinition: [ + freshdesk, + "categoryId", + ], + }, + folderId: { + propDefinition: [ + freshdesk, + "folderId", + (c) => ({ + categoryId: c.categoryId, + }), + ], + }, + title: { + type: "string", + label: "Title", + description: "Title of the article", + }, + description: { + type: "string", + label: "Description", + description: "Description of the article", + }, + status: { + type: "integer", + label: "Status", + description: "Status of the article", + options: constants.ARTICLE_STATUS, + }, + seoData: { + type: "object", + label: "SEO Data", + description: "Meta data for search engine optimization. Allows meta_title, meta_description and meta_keywords", + optional: true, + }, + tags: { + type: "string[]", + label: "Tags", + description: "Tags for the article", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.freshdesk.createArticle({ + $, + folderId: this.folderId, + data: { + title: this.title, + description: this.description, + status: this.status, + seo_data: parseObject(this.seoData), + tags: this.tags, + }, + }); + $.export("$summary", `Successfully created solution article ${this.title}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs b/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs new file mode 100644 index 0000000000000..7c1cfc4b3da19 --- /dev/null +++ b/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs @@ -0,0 +1,109 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import { parseObject } from "../../common/utils.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "freshdesk-create-ticket-field", + name: "Create Ticket Field", + description: "Create a ticket field in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#create_ticket_field)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + label: { + type: "string", + label: "Label", + description: "Display the name of the Ticket Field", + }, + labelForCustomers: { + type: "string", + label: "Label for Customers", + description: "The label for the field as seen by customers", + }, + type: { + type: "string", + label: "Type", + description: "The type of the field. Can be custom_dropdown, custom_checkbox, custom_text, etc...", + default: "custom_text", + }, + customersCanEdit: { + type: "boolean", + label: "Customers Can Edit", + description: "Whether customers can edit the field", + optional: true, + }, + displayedToCustomers: { + type: "boolean", + label: "Displayed to Customers", + description: "Whether the field is displayed to customers", + optional: true, + }, + position: { + type: "integer", + label: "Position", + description: "The position of the fieldPosition in which the ticket field is displayed in the form. If not given, it will be displayed on top", + optional: true, + }, + requiredForClosure: { + type: "boolean", + label: "Required for Closure", + description: "Set to `true` if the field is mandatory for closing the ticket", + optional: true, + }, + requiredForAgents: { + type: "boolean", + label: "Required for Agents", + description: "Set to `true` if the field is mandatory for agents", + optional: true, + }, + requiredForCustomers: { + type: "boolean", + label: "Required for Customers", + description: "Set to `true` if the field is mandatory for customers", + optional: true, + }, + choices: { + type: "string[]", + label: "Choices", + description: "Array of key, value pairs containing the value and position of dropdown choices. Example: `[{ \"value\": \"Refund\", \"position\": 1 }, { \"value\": \"FaultyProduct\", \"position\": 2 }]`", + optional: true, + }, + dependentFields: { + type: "string[]", + label: "Dependent Fields", + description: "Applicable only for dependent fields, this contains details of nested fields Example: `[{ \"label\": \"District\", \"label_for_customers\": \"District\", \"level\": 2 }, { \"label\": \"Branch\", \"label_for_customers\": \"Branch\", \"level\": 3 }]`", + optional: true, + }, + sectionMappings: { + type: "string[]", + label: "Section Mappings", + description: "Applicable only if the field is part of a section. This contains the details of a section (ID, position) for which it is been a part of. Example: `[{ \"position\": 3, \"section_id\": 1 }]`", + optional: true, + }, + }, + async run({ $ }) { + if (this.type === "custom_dropdown" && !this.choices) { + throw new ConfigurationError("Choices are required for custom_dropdown fields"); + } + + const response = await this.freshdesk.createTicketField({ + $, + data: { + label: this.label, + customers_can_edit: this.customersCanEdit, + label_for_customers: this.labelForCustomers, + displayed_to_customers: this.displayedToCustomers, + position: this.position, + type: this.type, + required_for_closure: this.requiredForClosure, + required_for_agents: this.requiredForAgents, + required_for_customers: this.requiredForCustomers, + choices: parseObject(this.choices), + dependent_fields: parseObject(this.dependentFields), + section_mappings: parseObject(this.sectionMappings), + }, + }); + $.export("$summary", `Successfully created ticket field: ${response.label}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/create-ticket/create-ticket.mjs b/components/freshdesk/actions/create-ticket/create-ticket.mjs index 2ca3a9844b591..c95065f55a6c5 100644 --- a/components/freshdesk/actions/create-ticket/create-ticket.mjs +++ b/components/freshdesk/actions/create-ticket/create-ticket.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-create-ticket", name: "Create a Ticket", description: "Create a ticket. [See the documentation](https://developers.freshdesk.com/api/#create_ticket)", - version: "0.0.7", + version: "0.0.8", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/delete-solution-article/delete-solution-article.mjs b/components/freshdesk/actions/delete-solution-article/delete-solution-article.mjs new file mode 100644 index 0000000000000..1763cebdd1960 --- /dev/null +++ b/components/freshdesk/actions/delete-solution-article/delete-solution-article.mjs @@ -0,0 +1,44 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-delete-solution-article", + name: "Delete Solution Article", + description: "Delete a solution article in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + categoryId: { + propDefinition: [ + freshdesk, + "categoryId", + ], + }, + folderId: { + propDefinition: [ + freshdesk, + "folderId", + (c) => ({ + categoryId: c.categoryId, + }), + ], + }, + articleId: { + propDefinition: [ + freshdesk, + "articleId", + (c) => ({ + folderId: c.folderId, + }), + ], + }, + }, + async run({ $ }) { + const response = await this.freshdesk.deleteArticle({ + $, + articleId: this.articleId, + }); + $.export("$summary", `Successfully deleted solution article ${this.articleId}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/get-contact/get-contact.mjs b/components/freshdesk/actions/get-contact/get-contact.mjs new file mode 100644 index 0000000000000..4577a0a82ae0d --- /dev/null +++ b/components/freshdesk/actions/get-contact/get-contact.mjs @@ -0,0 +1,26 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-get-contact", + name: "Get Contact", + description: "Get a contact from Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#view_contact)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + contactId: { + propDefinition: [ + freshdesk, + "contactId", + ], + }, + }, + async run({ $ }) { + const contact = await this.freshdesk.getContact({ + $, + contactId: this.contactId, + }); + $.export("$summary", `Successfully fetched contact: ${contact.name}`); + return contact; + }, +}; diff --git a/components/freshdesk/actions/get-solution-article/get-solution-article.mjs b/components/freshdesk/actions/get-solution-article/get-solution-article.mjs new file mode 100644 index 0000000000000..7bdcb9a4bbbbd --- /dev/null +++ b/components/freshdesk/actions/get-solution-article/get-solution-article.mjs @@ -0,0 +1,44 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-get-solution-article", + name: "Get Solution Article", + description: "Get a solution article in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + categoryId: { + propDefinition: [ + freshdesk, + "categoryId", + ], + }, + folderId: { + propDefinition: [ + freshdesk, + "folderId", + (c) => ({ + categoryId: c.categoryId, + }), + ], + }, + articleId: { + propDefinition: [ + freshdesk, + "articleId", + (c) => ({ + folderId: c.folderId, + }), + ], + }, + }, + async run({ $ }) { + const response = await this.freshdesk.getArticle({ + $, + articleId: this.articleId, + }); + $.export("$summary", `Successfully retrieved solution article ${this.articleId}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/get-ticket/get-ticket.mjs b/components/freshdesk/actions/get-ticket/get-ticket.mjs index 2e5b5ed1cca0c..7f24bce4cf03f 100644 --- a/components/freshdesk/actions/get-ticket/get-ticket.mjs +++ b/components/freshdesk/actions/get-ticket/get-ticket.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-get-ticket", name: "Get Ticket Details", description: "Get details of a Ticket. [See the documentation](https://developers.freshdesk.com/api/#view_a_ticket)", - version: "0.1.4", + version: "0.1.5", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/list-agents/list-agents.mjs b/components/freshdesk/actions/list-agents/list-agents.mjs new file mode 100644 index 0000000000000..83613598a5200 --- /dev/null +++ b/components/freshdesk/actions/list-agents/list-agents.mjs @@ -0,0 +1,66 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-list-agents", + name: "List Agents", + description: "List all agents in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#list_all_agents)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + email: { + type: "string", + label: "Email", + description: "Filter results by email address", + optional: true, + }, + mobile: { + type: "string", + label: "Mobile", + description: "Filter results by mobile number", + optional: true, + }, + phone: { + type: "string", + label: "Phone", + description: "Filter results by phone number", + optional: true, + }, + state: { + type: "string", + label: "State", + description: "Filter results by state", + options: [ + "fulltime", + "occasional", + ], + optional: true, + }, + maxResults: { + propDefinition: [ + freshdesk, + "maxResults", + ], + }, + }, + async run({ $ }) { + const results = await this.freshdesk.getPaginatedResources({ + fn: this.freshdesk.listAgents, + args: { + $, + params: { + email: this.email, + mobile: this.mobile, + phone: this.phone, + state: this.state, + }, + }, + max: this.maxResults, + }); + + $.export("$summary", `Successfully listed ${results.length} agent${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/freshdesk/actions/list-all-tickets/list-all-tickets.mjs b/components/freshdesk/actions/list-all-tickets/list-all-tickets.mjs index 54d1386349165..0a78de2e6b99f 100644 --- a/components/freshdesk/actions/list-all-tickets/list-all-tickets.mjs +++ b/components/freshdesk/actions/list-all-tickets/list-all-tickets.mjs @@ -5,7 +5,7 @@ export default { name: "List Tickets", description: "Fetch up to 100 tickets according to the selected filters. [See the documentation](https://developers.freshdesk.com/api/#list_all_tickets)", - version: "0.2.4", + version: "0.2.5", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/list-category-folders/list-category-folders.mjs b/components/freshdesk/actions/list-category-folders/list-category-folders.mjs new file mode 100644 index 0000000000000..76cf555e66934 --- /dev/null +++ b/components/freshdesk/actions/list-category-folders/list-category-folders.mjs @@ -0,0 +1,28 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-list-category-folders", + name: "List Category Folders", + description: "List category folders in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_folder_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + categoryId: { + propDefinition: [ + freshdesk, + "categoryId", + ], + }, + }, + async run({ $ }) { + const response = await this.freshdesk.listCategoryFolders({ + $, + categoryId: this.categoryId, + }); + $.export("$summary", `Successfully listed ${response.length} solution folder${response.length === 1 + ? "" + : "s"}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs b/components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs new file mode 100644 index 0000000000000..6ac720ada9fc4 --- /dev/null +++ b/components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs @@ -0,0 +1,47 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-list-folder-articles", + name: "List Folder Articles", + description: "List folder articles in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + categoryId: { + propDefinition: [ + freshdesk, + "categoryId", + ], + }, + folderId: { + propDefinition: [ + freshdesk, + "folderId", + (c) => ({ + categoryId: c.categoryId, + }), + ], + }, + maxResults: { + propDefinition: [ + freshdesk, + "maxResults", + ], + }, + }, + async run({ $ }) { + const results = await this.freshdesk.getPaginatedResources({ + fn: this.freshdesk.listFolderArticles, + args: { + $, + folderId: this.folderId, + }, + max: this.maxResults, + }); + $.export("$summary", `Successfully listed ${results.length} solution article${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs b/components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs new file mode 100644 index 0000000000000..41c4cfb28344a --- /dev/null +++ b/components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs @@ -0,0 +1,21 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-list-solution-categories", + name: "List Solution Categories", + description: "List solution categories in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_category_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + }, + async run({ $ }) { + const response = await this.freshdesk.listSolutionCategories({ + $, + }); + $.export("$summary", `Successfully listed ${response.length} solution category${response.length === 1 + ? "" + : "s"}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs b/components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs new file mode 100644 index 0000000000000..8513d8c4b2ce3 --- /dev/null +++ b/components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs @@ -0,0 +1,32 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-list-ticket-fields", + name: "List Ticket Fields", + description: "List all ticket fields in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#list_all_ticket_fields)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + maxResults: { + propDefinition: [ + freshdesk, + "maxResults", + ], + }, + }, + async run({ $ }) { + const results = await this.freshdesk.getPaginatedResources({ + fn: this.freshdesk.listTicketFields, + args: { + $, + }, + max: this.maxResults, + }); + + $.export("$summary", `Successfully listed ${results.length} ticket field${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/freshdesk/actions/remove-ticket-tags/remove-ticket-tags.mjs b/components/freshdesk/actions/remove-ticket-tags/remove-ticket-tags.mjs index 6709bd0269688..16f8f96fc5bfc 100644 --- a/components/freshdesk/actions/remove-ticket-tags/remove-ticket-tags.mjs +++ b/components/freshdesk/actions/remove-ticket-tags/remove-ticket-tags.mjs @@ -6,7 +6,7 @@ export default { name: "Remove Ticket Tags", description: "Remove specific tags from a ticket. [See the documentation](https://developers.freshdesk.com/api/#update_ticket)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { freshdesk, ticketId: { diff --git a/components/freshdesk/actions/set-ticket-priority/set-ticket-priority.mjs b/components/freshdesk/actions/set-ticket-priority/set-ticket-priority.mjs index d995792ab33da..faf78476b4330 100644 --- a/components/freshdesk/actions/set-ticket-priority/set-ticket-priority.mjs +++ b/components/freshdesk/actions/set-ticket-priority/set-ticket-priority.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-set-ticket-priority", name: "Set Ticket Priority", description: "Update the priority of a ticket in Freshdesk [See the documentation](https://developers.freshdesk.com/api/#update_ticket).", - version: "0.0.3", + version: "0.0.4", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/set-ticket-status/set-ticket-status.mjs b/components/freshdesk/actions/set-ticket-status/set-ticket-status.mjs index 82f40ada10849..538969565d434 100644 --- a/components/freshdesk/actions/set-ticket-status/set-ticket-status.mjs +++ b/components/freshdesk/actions/set-ticket-status/set-ticket-status.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-set-ticket-status", name: "Set Ticket Status", description: "Update the status of a ticket in Freshdesk [See the documentation](https://developers.freshdesk.com/api/#update_ticket).", - version: "0.0.3", + version: "0.0.4", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/set-ticket-tags/set-ticket-tags.mjs b/components/freshdesk/actions/set-ticket-tags/set-ticket-tags.mjs index a7adcce2437f9..bb77f1f2f6c27 100644 --- a/components/freshdesk/actions/set-ticket-tags/set-ticket-tags.mjs +++ b/components/freshdesk/actions/set-ticket-tags/set-ticket-tags.mjs @@ -6,7 +6,7 @@ export default { name: "Set Ticket Tags", description: "Set tags on a ticket (replaces all existing tags). [See the documentation](https://developers.freshdesk.com/api/#update_ticket)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { freshdesk, ticketId: { diff --git a/components/freshdesk/actions/update-agent/update-agent.mjs b/components/freshdesk/actions/update-agent/update-agent.mjs new file mode 100644 index 0000000000000..f63e6fe3dfe02 --- /dev/null +++ b/components/freshdesk/actions/update-agent/update-agent.mjs @@ -0,0 +1,112 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "freshdesk-update-agent", + name: "Update Agent", + description: "Update an agent in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#update_agent)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + agentId: { + propDefinition: [ + freshdesk, + "agentId", + ], + }, + email: { + type: "string", + label: "Email", + description: "Email address of the Agent.", + optional: true, + }, + ticketScope: { + type: "integer", + label: "Ticket Scope", + description: "Ticket permission of the agent. Current logged in agent can't update his/her ticket_scope", + options: constants.TICKET_SCOPE, + optional: true, + }, + occasional: { + type: "boolean", + label: "Occasional", + description: "Set to true if this is an occasional agent (true => occasional, false => full-time)", + optional: true, + }, + signature: { + type: "string", + label: "Signature", + description: "Signature of the agent in HTML format", + optional: true, + }, + skillIds: { + propDefinition: [ + freshdesk, + "skillIds", + ], + }, + groupIds: { + propDefinition: [ + freshdesk, + "groupId", + ], + type: "string[]", + label: "Group IDs", + description: "Array of group IDs", + optional: true, + }, + roleIds: { + propDefinition: [ + freshdesk, + "roleIds", + ], + }, + agentType: { + type: "integer", + label: "Agent Type", + description: "Type of the agent", + options: constants.AGENT_TYPE, + optional: true, + }, + language: { + type: "string", + label: "Language", + description: " Language of the Agent. Default language is `en`", + optional: true, + }, + timeZone: { + type: "string", + label: "Time Zone", + description: "Time zone of the agent. Default value is time zone of the domain.", + optional: true, + }, + focusMode: { + type: "boolean", + label: "Focus Mode", + description: "Focus mode of the agent. Default value is `true`", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.freshdesk.updateAgent({ + $, + agentId: this.agentId, + data: { + email: this.email, + ticket_scope: this.ticketScope, + occasional: this.occasional, + signature: this.signature, + skill_ids: this.skillIds, + group_ids: this.groupIds, + role_ids: this.roleIds, + agent_type: this.agentType, + language: this.language, + time_zone: this.timeZone, + focus_mode: this.focusMode, + }, + }); + $.export("$summary", `Agent ${this.email} updated successfully`); + return response; + }, +}; diff --git a/components/freshdesk/actions/update-contact/update-contact.mjs b/components/freshdesk/actions/update-contact/update-contact.mjs new file mode 100644 index 0000000000000..95255b768fc66 --- /dev/null +++ b/components/freshdesk/actions/update-contact/update-contact.mjs @@ -0,0 +1,64 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-update-contact", + name: "Update Contact", + description: "Update a contact in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#update_contact)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + contactId: { + propDefinition: [ + freshdesk, + "contactId", + ], + }, + name: { + type: "string", + label: "Name", + description: "Name of the contact.", + optional: true, + }, + email: { + type: "string", + label: "Email Address", + description: "Primary email address of the contact", + optional: true, + }, + otherEmails: { + type: "string[]", + label: "Additional Email Addresses", + description: "One or more additional email addresses for the contact", + optional: true, + }, + phone: { + type: "string", + label: "Phone Number", + description: "Phone number of the contact", + optional: true, + }, + companyId: { + propDefinition: [ + freshdesk, + "companyId", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.freshdesk.updateContact({ + $, + contactId: this.contactId, + data: { + name: this.name, + email: this.email, + other_emails: this.otherEmails, + phone: this.phone, + company_id: this.companyId, + }, + }); + $.export("$summary", `Contact successfully updated: ${response.name}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/update-solution-article/update-solution-article.mjs b/components/freshdesk/actions/update-solution-article/update-solution-article.mjs new file mode 100644 index 0000000000000..8b000841d5800 --- /dev/null +++ b/components/freshdesk/actions/update-solution-article/update-solution-article.mjs @@ -0,0 +1,84 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import constants from "../../common/constants.mjs"; +import { parseObject } from "../../common/utils.mjs"; + +export default { + key: "freshdesk-update-solution-article", + name: "Update Solution Article", + description: "Update a solution article in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + categoryId: { + propDefinition: [ + freshdesk, + "categoryId", + ], + }, + folderId: { + propDefinition: [ + freshdesk, + "folderId", + (c) => ({ + categoryId: c.categoryId, + }), + ], + }, + articleId: { + propDefinition: [ + freshdesk, + "articleId", + (c) => ({ + folderId: c.folderId, + }), + ], + }, + title: { + type: "string", + label: "Title", + description: "Title of the article", + optional: true, + }, + description: { + type: "string", + label: "Description", + description: "Description of the article", + optional: true, + }, + status: { + type: "integer", + label: "Status", + description: "Status of the article", + options: constants.ARTICLE_STATUS, + optional: true, + }, + seoData: { + type: "object", + label: "SEO Data", + description: "Meta data for search engine optimization. Allows meta_title, meta_description and meta_keywords", + optional: true, + }, + tags: { + type: "string[]", + label: "Tags", + description: "Tags for the article", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.freshdesk.updateArticle({ + $, + articleId: this.articleId, + data: { + title: this.title, + description: this.description, + status: this.status, + seo_data: parseObject(this.seoData), + tags: this.tags, + }, + }); + $.export("$summary", `Successfully updated solution article ${this.title}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs b/components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs new file mode 100644 index 0000000000000..3bcd6c374bfc7 --- /dev/null +++ b/components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs @@ -0,0 +1,106 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import { parseObject } from "../../common/utils.mjs"; + +export default { + key: "freshdesk-update-ticket-field", + name: "Update Ticket Field", + description: "Update a ticket field in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#update_ticket_field)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + ticketFieldId: { + propDefinition: [ + freshdesk, + "ticketFieldId", + ], + }, + label: { + type: "string", + label: "Label", + description: "Display the name of the Ticket Field", + optional: true, + }, + labelForCustomers: { + type: "string", + label: "Label for Customers", + description: "The label for the field as seen by customers", + optional: true, + }, + customersCanEdit: { + type: "boolean", + label: "Customers Can Edit", + description: "Whether customers can edit the field", + optional: true, + }, + displayedToCustomers: { + type: "boolean", + label: "Displayed to Customers", + description: "Whether the field is displayed to customers", + optional: true, + }, + position: { + type: "integer", + label: "Position", + description: "The position of the fieldPosition in which the ticket field is displayed in the form. If not given, it will be displayed on top", + optional: true, + }, + requiredForClosure: { + type: "boolean", + label: "Required for Closure", + description: "Set to `true` if the field is mandatory for closing the ticket", + optional: true, + }, + requiredForAgents: { + type: "boolean", + label: "Required for Agents", + description: "Set to `true` if the field is mandatory for agents", + optional: true, + }, + requiredForCustomers: { + type: "boolean", + label: "Required for Customers", + description: "Set to `true` if the field is mandatory for customers", + optional: true, + }, + choices: { + type: "string[]", + label: "Choices", + description: "Array of key, value pairs containing the value and position of dropdown choices. Example: `[{ \"value\": \"Refund\", \"position\": 1 }, { \"value\": \"FaultyProduct\", \"position\": 2 }]`", + optional: true, + }, + dependentFields: { + type: "string[]", + label: "Dependent Fields", + description: "Applicable only for dependent fields, this contains details of nested fields Example: `[{ \"label\": \"District\", \"label_for_customers\": \"District\", \"level\": 2 }, { \"label\": \"Branch\", \"label_for_customers\": \"Branch\", \"level\": 3 }]`", + optional: true, + }, + sectionMappings: { + type: "string[]", + label: "Section Mappings", + description: "Applicable only if the field is part of a section. This contains the details of a section (ID, position) for which it is been a part of. Example: `[{ \"position\": 3, \"section_id\": 1 }]`", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.freshdesk.updateTicketField({ + $, + ticketFieldId: this.ticketFieldId, + data: { + label: this.label, + label_for_customers: this.labelForCustomers, + customers_can_edit: this.customersCanEdit, + displayed_to_customers: this.displayedToCustomers, + position: this.position, + required_for_closure: this.requiredForClosure, + required_for_agents: this.requiredForAgents, + required_for_customers: this.requiredForCustomers, + choices: parseObject(this.choices), + dependent_fields: parseObject(this.dependentFields), + section_mappings: parseObject(this.sectionMappings), + }, + }); + $.export("$summary", `Successfully updated ticket field: ${response.label}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/update-ticket/update-ticket.mjs b/components/freshdesk/actions/update-ticket/update-ticket.mjs index 77e7804dedd2c..3a136b2b13bc5 100644 --- a/components/freshdesk/actions/update-ticket/update-ticket.mjs +++ b/components/freshdesk/actions/update-ticket/update-ticket.mjs @@ -5,7 +5,7 @@ export default { key: "freshdesk-update-ticket", name: "Update a Ticket", description: "Update status, priority, subject, description, agent, group, etc. [See the documentation](https://developers.freshdesk.com/api/#update_ticket).", - version: "0.0.3", + version: "0.0.4", type: "action", props: { freshdesk, diff --git a/components/freshdesk/common/constants.mjs b/components/freshdesk/common/constants.mjs index afaa9889c90c8..b2247687f33ca 100644 --- a/components/freshdesk/common/constants.mjs +++ b/components/freshdesk/common/constants.mjs @@ -37,4 +37,42 @@ export default { value: 4, }, ], + TICKET_SCOPE: [ + { + label: "Global Access", + value: 1, + }, + { + label: "Group Access", + value: 2, + }, + { + label: "Restricted Access", + value: 3, + }, + ], + AGENT_TYPE: [ + { + label: "Support Agent", + value: 1, + }, + { + label: "Field Agent", + value: 2, + }, + { + label: "Collaborator", + value: 3, + }, + ], + ARTICLE_STATUS: [ + { + label: "Draft", + value: 1, + }, + { + label: "Published", + value: 2, + }, + ], }; diff --git a/components/freshdesk/common/utils.mjs b/components/freshdesk/common/utils.mjs index b62df586026b1..455eb6e600236 100644 --- a/components/freshdesk/common/utils.mjs +++ b/components/freshdesk/common/utils.mjs @@ -22,6 +22,33 @@ const removeNullEntries = (obj) => : acc; }, {}); +const parseObject = (obj) => { + if (!obj) { + return undefined; + } + if (typeof obj === "string") { + try { + return JSON.parse(obj); + } catch (e) { + return obj; + } + } + if (Array.isArray(obj)) { + return obj.map(parseObject); + } + if (typeof obj === "object") { + return Object.fromEntries(Object.entries(obj).map(([ + key, + value, + ]) => [ + key, + parseObject(value), + ])); + } + return obj; +}; + export { removeNullEntries, + parseObject, }; diff --git a/components/freshdesk/freshdesk.app.mjs b/components/freshdesk/freshdesk.app.mjs index a9d816414dacb..d0da926b38256 100644 --- a/components/freshdesk/freshdesk.app.mjs +++ b/components/freshdesk/freshdesk.app.mjs @@ -19,7 +19,6 @@ export default { })); }, }, - ticketId: { type: "integer", label: "Ticket ID", @@ -79,7 +78,6 @@ export default { })); }, }, - ticketStatus: { type: "integer", label: "Status", @@ -116,6 +114,138 @@ export default { })); }, }, + contactId: { + type: "string", + label: "Contact ID", + description: "The ID of a contact", + async options({ + companyId, page, + }) { + const contacts = await this.getContacts({ + params: { + company_id: companyId, + page: page + 1, + }, + }); + return contacts + .map(({ + id, name, email, + }) => ({ + label: name || email, + value: id, + })); + }, + }, + ticketFieldId: { + type: "string", + label: "Ticket Field ID", + description: "The ID of a ticket field", + async options({ page }) { + const fields = await this.listTicketFields({ + params: { + page: page + 1, + }, + }); + return fields.map(({ + id, label, + }) => ({ + label: label || id, + value: id, + })); + }, + }, + skillIds: { + type: "string[]", + label: "Skill IDs", + description: "Array of skill IDs", + optional: true, + async options({ page }) { + const skills = await this.listSkills({ + params: { + page: page + 1, + }, + }); + return skills.map(({ + id, name, + }) => ({ + label: name || id, + value: id, + })); + }, + }, + roleIds: { + type: "string[]", + label: "Role IDs", + description: "Array of role IDs", + optional: true, + async options() { + const roles = await this.listRoles(); + return roles.map(({ + id, name, + }) => ({ + label: name || id, + value: id, + })); + }, + }, + categoryId: { + type: "integer", + label: "Category ID", + description: "The ID of a category", + async options() { + const categories = await this.listSolutionCategories(); + return categories.map(({ + id, name, + }) => ({ + label: name || id, + value: id, + })); + }, + }, + folderId: { + type: "integer", + label: "Folder ID", + description: "The ID of a folder", + async options({ categoryId }) { + const folders = await this.listCategoryFolders({ + categoryId, + }); + return folders.map(({ + id, name, + }) => ({ + label: name || id, + value: id, + })); + }, + }, + articleId: { + type: "integer", + label: "Article ID", + description: "The ID of an article", + async options({ + page, folderId, + }) { + const articles = await this.listFolderArticles({ + folderId, + params: { + page: page + 1, + }, + }); + return articles.map(({ + id, title, + }) => ({ + label: title || id, + value: id, + })); + }, + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of results to return", + default: 100, + optional: true, + }, ticketTags: { type: "string[]", label: "Tags", @@ -210,6 +340,14 @@ export default { ...args, }); }, + async getContact({ + contactId, ...args + }) { + return this._makeRequest({ + url: `/contacts/${contactId}`, + ...args, + }); + }, async getContacts(args) { return this._makeRequest({ url: "/contacts", @@ -223,6 +361,15 @@ export default { ...args, }); }, + async updateContact({ + contactId, ...args + }) { + return this._makeRequest({ + url: `/contacts/${contactId}`, + method: "put", + ...args, + }); + }, async createTicket(args) { return this._makeRequest({ url: "/tickets", @@ -250,6 +397,119 @@ export default { ...args, }); }, + async listTicketFields(args) { + return this._makeRequest({ + url: "/ticket_fields", + ...args, + }); + }, + async createTicketField(args) { + return this._makeRequest({ + url: "/admin/ticket_fields", + method: "post", + ...args, + }); + }, + async updateTicketField({ + ticketFieldId, ...args + }) { + return this._makeRequest({ + url: `/admin/ticket_fields/${ticketFieldId}`, + method: "put", + ...args, + }); + }, + async listAgents(args) { + return this._makeRequest({ + url: "/agents", + ...args, + }); + }, + async createAgent(args) { + return this._makeRequest({ + url: "/agents", + method: "post", + ...args, + }); + }, + async updateAgent({ + agentId, ...args + }) { + return this._makeRequest({ + url: `/agents/${agentId}`, + method: "put", + ...args, + }); + }, + async listSkills(args) { + return this._makeRequest({ + url: "/admin/skills", + ...args, + }); + }, + async listRoles(args) { + return this._makeRequest({ + url: "/roles", + ...args, + }); + }, + async listSolutionCategories(args) { + return this._makeRequest({ + url: "/solutions/categories", + ...args, + }); + }, + async listCategoryFolders({ + categoryId, ...args + }) { + return this._makeRequest({ + url: `/solutions/categories/${categoryId}/folders`, + ...args, + }); + }, + async listFolderArticles({ + folderId, ...args + }) { + return this._makeRequest({ + url: `/solutions/folders/${folderId}/articles`, + ...args, + }); + }, + async getArticle({ + articleId, ...args + }) { + return this._makeRequest({ + url: `/solutions/articles/${articleId}`, + ...args, + }); + }, + async createArticle({ + folderId, ...args + }) { + return this._makeRequest({ + url: `/solutions/folders/${folderId}/articles`, + method: "post", + ...args, + }); + }, + async updateArticle({ + articleId, ...args + }) { + return this._makeRequest({ + url: `/solutions/articles/${articleId}`, + method: "put", + ...args, + }); + }, + async deleteArticle({ + articleId, ...args + }) { + return this._makeRequest({ + url: `/solutions/articles/${articleId}`, + method: "delete", + ...args, + }); + }, async listTickets(args) { return this._makeRequest({ url: "/tickets", @@ -375,5 +635,39 @@ export default { ...args, }); }, + async *paginate({ + fn, args, max, + }) { + args = { + ...args, + params: { + ...args?.params, + page: 1, + per_page: 100, + }, + }; + let total, count = 0; + do { + const results = await fn(args); + total = results?.length; + if (!total) { + return; + } + for (const result of results) { + yield result; + if (max && ++count >= max) { + return; + } + } + args.params.page += 1; + } while (total === args.params.per_page); + }, + async getPaginatedResources(opts) { + const results = []; + for await (const result of this.paginate(opts)) { + results.push(result); + } + return results; + }, }, }; diff --git a/components/freshdesk/package.json b/components/freshdesk/package.json index 7b0c3c96ae7af..a37abb1407f9a 100644 --- a/components/freshdesk/package.json +++ b/components/freshdesk/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/freshdesk", - "version": "0.3.1", + "version": "0.4.0", "description": "Pipedream Freshdesk Components", "main": "freshdesk.app.mjs", "keywords": [ diff --git a/components/freshdesk/sources/common/polling.mjs b/components/freshdesk/sources/common/polling.mjs new file mode 100644 index 0000000000000..671f72abdf0af --- /dev/null +++ b/components/freshdesk/sources/common/polling.mjs @@ -0,0 +1,63 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import moment from "moment"; + +export default { + props: { + freshdesk, + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + db: "$.service.db", + }, + methods: { + getResourceFn() { + throw new Error("getResourceFn is not implemented"); + }, + getTsField() { + throw new Error("getTsField is not implemented"); + }, + generateMeta() { + throw new Error("generateMeta is not implemented"); + }, + }, + async run() { + const data = []; + let lastDateChecked = this.freshdesk.getLastDateChecked(this.db); + if (!lastDateChecked) { + lastDateChecked = new Date().toISOString(); + this.freshdesk.setLastDateChecked(this.db, lastDateChecked); + } + let maxTs = lastDateChecked; + + const resourceFn = this.getResourceFn(); + const tsField = this.getTsField(); + + const formatedDate = lastDateChecked.substr( + 0, + (lastDateChecked + "T").indexOf("T"), + ); + const results = await resourceFn({ + query: `"${tsField}:>'${formatedDate}'"`, + page: 1, + }); + for await (const result of results) { + data.push(result); + } + + data && + data.reverse().forEach((item) => { + if (moment(item[tsField]).isAfter(lastDateChecked)) { + if (moment(item[tsField]).isAfter(maxTs)) { + maxTs = item[tsField]; + } + this.$emit(item, this.generateMeta(item)); + } + }); + + this.freshdesk.setLastDateChecked(this.db, maxTs); + }, +}; diff --git a/components/freshdesk/sources/contact-updated/contact-updated.mjs b/components/freshdesk/sources/contact-updated/contact-updated.mjs new file mode 100644 index 0000000000000..3857b5d006a99 --- /dev/null +++ b/components/freshdesk/sources/contact-updated/contact-updated.mjs @@ -0,0 +1,28 @@ +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "freshdesk-contact-updated", + name: "Contact Updated", + description: "Emit new event when a contact is updated. [See the documentation](https://developers.freshdesk.com/api/#filter_contacts)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getResourceFn() { + return this.freshdesk.filterContacts; + }, + getTsField() { + return "updated_at"; + }, + generateMeta(item) { + const ts = Date.parse(item.updated_at); + return { + id: `${item.id}-${ts}`, + summary: `Contact Updated (ID: ${item.id})`, + ts, + }; + }, + }, +}; diff --git a/components/freshdesk/sources/new-contact/new-contact.mjs b/components/freshdesk/sources/new-contact/new-contact.mjs index 3b67fb9814b11..beb5930fcd539 100644 --- a/components/freshdesk/sources/new-contact/new-contact.mjs +++ b/components/freshdesk/sources/new-contact/new-contact.mjs @@ -1,49 +1,27 @@ -import freshdesk from "../../freshdesk.app.mjs"; -import moment from "moment"; -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import common from "../common/polling.mjs"; export default { + ...common, key: "freshdesk-new-contact", name: "New Contact Created", description: "Emit new event when a contact is created. [See the documentation](https://developers.freshdesk.com/api/#filter_contacts)", - version: "0.0.7", + version: "0.0.8", type: "source", - props: { - freshdesk, - timer: { - type: "$.interface.timer", - default: { - intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, - }, - }, - db: "$.service.db", - }, dedupe: "unique", - async run() { - const data = []; - let lastDateChecked = this.freshdesk.getLastDateChecked(this.db); - if (!lastDateChecked) { - lastDateChecked = new Date().toISOString(); - this.freshdesk.setLastDateChecked(this.db, lastDateChecked); - } - const formatedDate = lastDateChecked.substr(0, (lastDateChecked + "T").indexOf("T")); - const contacts = await this.freshdesk.filterContacts({ - query: `"created_at:>'${formatedDate}'"`, - page: 1, - }); - for await (const contact of contacts) { - data.push(contact); - } - data && data.reverse().forEach((contact) => { - this.freshdesk.setLastDateChecked(this.db, contact.created_at); - if (moment(contact.created_at).isAfter(lastDateChecked)) { - this.$emit(contact, - { - id: contact.id, - summary: `New Contact: "${contact.name}"`, - ts: Date.parse(contact.created_at), - }); - } - }); + methods: { + ...common.methods, + getResourceFn() { + return this.freshdesk.filterContacts; + }, + getTsField() { + return "created_at"; + }, + generateMeta(item) { + return { + id: item.id, + summary: `New Contact: "${item.name}"`, + ts: Date.parse(item.created_at), + }; + }, }, }; diff --git a/components/freshdesk/sources/new-ticket/new-ticket.mjs b/components/freshdesk/sources/new-ticket/new-ticket.mjs index 3d9f9ef4fea5e..62700a639a582 100644 --- a/components/freshdesk/sources/new-ticket/new-ticket.mjs +++ b/components/freshdesk/sources/new-ticket/new-ticket.mjs @@ -1,52 +1,27 @@ -import freshdesk from "../../freshdesk.app.mjs"; -import moment from "moment"; -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import common from "../common/polling.mjs"; export default { + ...common, key: "freshdesk-new-ticket", name: "New Ticket Created", description: "Emit new event when a ticket is created. [See the documentation](https://developers.freshdesk.com/api/#filter_tickets)", - version: "0.0.7", + version: "0.0.8", type: "source", - props: { - freshdesk, - timer: { - type: "$.interface.timer", - default: { - intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, - }, - }, - db: "$.service.db", - }, dedupe: "unique", - async run() { - const data = []; - let lastDateChecked = this.freshdesk.getLastDateChecked(this.db); - if (!lastDateChecked) { - lastDateChecked = new Date().toISOString(); - this.freshdesk.setLastDateChecked(this.db, lastDateChecked); - } - const formatedDate = lastDateChecked.substr( - 0, - (lastDateChecked + "T").indexOf("T"), - ); - const tickets = await this.freshdesk.filterTickets({ - query: `"created_at:>'${formatedDate}'"`, - page: 1, - }); - for await (const ticket of tickets) { - data.push(ticket); - } - data && - data.reverse().forEach((ticket) => { - this.freshdesk.setLastDateChecked(this.db, ticket.created_at); - if (moment(ticket.created_at).isAfter(lastDateChecked)) { - this.$emit(ticket, { - id: ticket.id, - summary: `New Ticket (ID: ${ticket.id})`, - ts: Date.parse(ticket.created_at), - }); - } - }); + methods: { + ...common.methods, + getResourceFn() { + return this.freshdesk.filterTickets; + }, + getTsField() { + return "created_at"; + }, + generateMeta(item) { + return { + id: item.id, + summary: `New Ticket (ID: ${item.id})`, + ts: Date.parse(item.created_at), + }; + }, }, }; diff --git a/components/freshdesk/sources/ticket-updated/ticket-updated.mjs b/components/freshdesk/sources/ticket-updated/ticket-updated.mjs new file mode 100644 index 0000000000000..43c6295fe91e7 --- /dev/null +++ b/components/freshdesk/sources/ticket-updated/ticket-updated.mjs @@ -0,0 +1,28 @@ +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "freshdesk-ticket-updated", + name: "Ticket Updated", + description: "Emit new event when a ticket is updated. [See the documentation](https://developers.freshdesk.com/api/#filter_tickets)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getResourceFn() { + return this.freshdesk.filterTickets; + }, + getTsField() { + return "updated_at"; + }, + generateMeta(item) { + const ts = Date.parse(item.updated_at); + return { + id: `${item.id}-${ts}`, + summary: `Ticket Updated (ID: ${item.id})`, + ts, + }; + }, + }, +}; diff --git a/components/freshservice/actions/create-solution-article/create-solution-article.mjs b/components/freshservice/actions/create-solution-article/create-solution-article.mjs new file mode 100644 index 0000000000000..34c0550dbb6ba --- /dev/null +++ b/components/freshservice/actions/create-solution-article/create-solution-article.mjs @@ -0,0 +1,85 @@ +import freshservice from "../../freshservice.app.mjs"; + +export default { + key: "freshservice-create-solution-article", + name: "Create Solution Article", + description: "Create a solution article. [See the documentation](https://api.freshservice.com/#create_solution_article)", + version: "0.0.1", + type: "action", + props: { + freshservice, + title: { + type: "string", + label: "Title", + description: "The title of the solution article", + }, + description: { + type: "string", + label: "Description", + description: "The description of the solution article", + }, + categoryId: { + propDefinition: [ + freshservice, + "solutionCategoryId", + ], + }, + folderId: { + propDefinition: [ + freshservice, + "solutionFolderId", + (c) => ({ + solutionCategoryId: c.categoryId, + }), + ], + }, + status: { + propDefinition: [ + freshservice, + "solutionArticleStatus", + ], + }, + articleType: { + propDefinition: [ + freshservice, + "solutionArticleType", + ], + optional: true, + }, + tags: { + type: "string[]", + label: "Tags", + description: "The tags of the solution article", + optional: true, + }, + keywords: { + type: "string[]", + label: "Keywords", + description: "The keywords of the solution article", + optional: true, + }, + reviewDate: { + type: "string", + label: "Review Date", + description: "Date in future when this article would need to be reviewed again. E.g. `2020-03-29T16:44:26Z`", + optional: true, + }, + }, + async run({ $ }) { + const { article } = await this.freshservice.createSolutionArticle({ + $, + data: { + title: this.title, + description: this.description, + folder_id: this.folderId, + article_type: this.articleType, + status: this.status, + tags: this.tags, + keywords: this.keywords, + review_date: this.reviewDate, + }, + }); + $.export("$summary", `Successfully created solution article with ID ${article.id}`); + return article; + }, +}; diff --git a/components/freshservice/actions/create-ticket/create-ticket.mjs b/components/freshservice/actions/create-ticket/create-ticket.mjs new file mode 100644 index 0000000000000..a7b4906fa187c --- /dev/null +++ b/components/freshservice/actions/create-ticket/create-ticket.mjs @@ -0,0 +1,60 @@ +import freshservice from "../../freshservice.app.mjs"; + +export default { + key: "freshservice-create-ticket", + name: "Create Ticket", + description: "Create a new ticket. [See the documentation](https://api.freshservice.com/#create_ticket)", + version: "0.0.1", + type: "action", + props: { + freshservice, + source: { + propDefinition: [ + freshservice, + "ticketSourceType", + ], + }, + status: { + propDefinition: [ + freshservice, + "ticketStatus", + ], + }, + priority: { + propDefinition: [ + freshservice, + "ticketPriority", + ], + }, + subject: { + type: "string", + label: "Ticket Subject", + description: "The subject of a ticket", + }, + description: { + type: "string", + label: "Ticket Description", + description: "The description of a ticket", + }, + email: { + type: "string", + label: "Email", + description: "The email address accociated with the ticket", + }, + }, + async run({ $ }) { + const { ticket } = await this.freshservice.createTicket({ + $, + data: { + source: this.source, + status: this.status, + priority: this.priority, + subject: this.subject, + description: this.description, + email: this.email, + }, + }); + $.export("$summary", `Successfully created ticket with ID ${ticket.id}`); + return ticket; + }, +}; diff --git a/components/freshservice/actions/delete-solution-article/delete-solution-article.mjs b/components/freshservice/actions/delete-solution-article/delete-solution-article.mjs new file mode 100644 index 0000000000000..7b77ef929b1d6 --- /dev/null +++ b/components/freshservice/actions/delete-solution-article/delete-solution-article.mjs @@ -0,0 +1,44 @@ +import freshservice from "../../freshservice.app.mjs"; + +export default { + key: "freshservice-delete-solution-article", + name: "Delete Solution Article", + description: "Delete a solution article. [See the documentation](https://api.freshservice.com/#delete_solution_article)", + version: "0.0.1", + type: "action", + props: { + freshservice, + solutionCategoryId: { + propDefinition: [ + freshservice, + "solutionCategoryId", + ], + }, + solutionFolderId: { + propDefinition: [ + freshservice, + "solutionFolderId", + (c) => ({ + solutionCategoryId: c.solutionCategoryId, + }), + ], + }, + solutionArticleId: { + propDefinition: [ + freshservice, + "solutionArticleId", + (c) => ({ + solutionFolderId: c.solutionFolderId, + }), + ], + }, + }, + async run({ $ }) { + const article = await this.freshservice.deleteSolutionArticle({ + $, + articleId: this.solutionArticleId, + }); + $.export("$summary", `Successfully deleted solution article with ID ${this.solutionArticleId}`); + return article; + }, +}; diff --git a/components/freshservice/actions/get-solution-article/get-solution-article.mjs b/components/freshservice/actions/get-solution-article/get-solution-article.mjs new file mode 100644 index 0000000000000..1cb764670e92b --- /dev/null +++ b/components/freshservice/actions/get-solution-article/get-solution-article.mjs @@ -0,0 +1,44 @@ +import freshservice from "../../freshservice.app.mjs"; + +export default { + key: "freshservice-get-solution-article", + name: "Get Solution Article", + description: "Get a solution article by ID. [See the documentation](https://api.freshservice.com/#view_solution_article)", + version: "0.0.1", + type: "action", + props: { + freshservice, + solutionCategoryId: { + propDefinition: [ + freshservice, + "solutionCategoryId", + ], + }, + solutionFolderId: { + propDefinition: [ + freshservice, + "solutionFolderId", + (c) => ({ + solutionCategoryId: c.solutionCategoryId, + }), + ], + }, + solutionArticleId: { + propDefinition: [ + freshservice, + "solutionArticleId", + (c) => ({ + solutionFolderId: c.solutionFolderId, + }), + ], + }, + }, + async run({ $ }) { + const { article } = await this.freshservice.getSolutionArticle({ + $, + articleId: this.solutionArticleId, + }); + $.export("$summary", `Successfully fetched solution article with ID ${article.id}`); + return article; + }, +}; diff --git a/components/freshservice/actions/get-ticket/get-ticket.mjs b/components/freshservice/actions/get-ticket/get-ticket.mjs new file mode 100644 index 0000000000000..4af702d941d44 --- /dev/null +++ b/components/freshservice/actions/get-ticket/get-ticket.mjs @@ -0,0 +1,26 @@ +import freshservice from "../../freshservice.app.mjs"; + +export default { + key: "freshservice-get-ticket", + name: "Get Ticket", + description: "Get a ticket by ID. [See the documentation](https://api.freshservice.com/#view_a_ticket)", + version: "0.0.1", + type: "action", + props: { + freshservice, + ticketId: { + propDefinition: [ + freshservice, + "ticketId", + ], + }, + }, + async run({ $ }) { + const { ticket } = await this.freshservice.getTicket({ + $, + ticketId: this.ticketId, + }); + $.export("$summary", `Successfully fetched ticket with ID ${ticket.id}`); + return ticket; + }, +}; diff --git a/components/freshservice/actions/list-solution-articles/list-solution-articles.mjs b/components/freshservice/actions/list-solution-articles/list-solution-articles.mjs new file mode 100644 index 0000000000000..17505353083f0 --- /dev/null +++ b/components/freshservice/actions/list-solution-articles/list-solution-articles.mjs @@ -0,0 +1,37 @@ +import freshservice from "../../freshservice.app.mjs"; + +export default { + key: "freshservice-list-solution-articles", + name: "List Solution Articles", + description: "List all solution articles. [See the documentation](https://api.freshservice.com/#view_all_solution_article)", + version: "0.0.1", + type: "action", + props: { + freshservice, + solutionCategoryId: { + propDefinition: [ + freshservice, + "solutionCategoryId", + ], + }, + solutionFolderId: { + propDefinition: [ + freshservice, + "solutionFolderId", + (c) => ({ + solutionCategoryId: c.solutionCategoryId, + }), + ], + }, + }, + async run({ $ }) { + const { articles } = await this.freshservice.listSolutionArticles({ + $, + params: { + folder_id: this.solutionFolderId, + }, + }); + $.export("$summary", `Successfully listed ${articles.length} solution articles`); + return articles; + }, +}; diff --git a/components/freshservice/actions/list-solution-categories/list-solution-categories.mjs b/components/freshservice/actions/list-solution-categories/list-solution-categories.mjs new file mode 100644 index 0000000000000..fcda76fdc1da3 --- /dev/null +++ b/components/freshservice/actions/list-solution-categories/list-solution-categories.mjs @@ -0,0 +1,19 @@ +import freshservice from "../../freshservice.app.mjs"; + +export default { + key: "freshservice-list-solution-categories", + name: "List Solution Categories", + description: "List all solution categories. [See the documentation](https://api.freshservice.com/#view_all_solution_category)", + version: "0.0.1", + type: "action", + props: { + freshservice, + }, + async run({ $ }) { + const { categories } = await this.freshservice.listSolutionCategories({ + $, + }); + $.export("$summary", `Successfully listed ${categories.length} solution categories`); + return categories; + }, +}; diff --git a/components/freshservice/actions/update-solution-article/update-solution-article.mjs b/components/freshservice/actions/update-solution-article/update-solution-article.mjs new file mode 100644 index 0000000000000..55d94228964c0 --- /dev/null +++ b/components/freshservice/actions/update-solution-article/update-solution-article.mjs @@ -0,0 +1,98 @@ +import freshservice from "../../freshservice.app.mjs"; + +export default { + key: "freshservice-update-solution-article", + name: "Update Solution Article", + description: "Update a solution article. [See the documentation](https://api.freshservice.com/#update_solution_article)", + version: "0.0.1", + type: "action", + props: { + freshservice, + solutionCategoryId: { + propDefinition: [ + freshservice, + "solutionCategoryId", + ], + }, + solutionFolderId: { + propDefinition: [ + freshservice, + "solutionFolderId", + (c) => ({ + solutionCategoryId: c.solutionCategoryId, + }), + ], + }, + solutionArticleId: { + propDefinition: [ + freshservice, + "solutionArticleId", + (c) => ({ + solutionFolderId: c.solutionFolderId, + }), + ], + }, + title: { + type: "string", + label: "Title", + description: "The title of the solution article", + optional: true, + }, + description: { + type: "string", + label: "Description", + description: "The description of the solution article", + optional: true, + }, + articleType: { + propDefinition: [ + freshservice, + "solutionArticleType", + ], + optional: true, + }, + status: { + propDefinition: [ + freshservice, + "solutionArticleStatus", + ], + optional: true, + }, + tags: { + type: "string[]", + label: "Tags", + description: "The tags of the solution article", + optional: true, + }, + keywords: { + type: "string[]", + label: "Keywords", + description: "The keywords of the solution article", + optional: true, + }, + reviewDate: { + type: "string", + label: "Review Date", + description: "Date in future when this article would need to be reviewed again. E.g. `2020-03-29T16:44:26Z`", + optional: true, + }, + }, + async run({ $ }) { + const { article } = await this.freshservice.updateSolutionArticle({ + $, + articleId: this.solutionArticleId, + data: { + title: this.title, + description: this.description, + folder_id: this.solutionFolderId, + article_type: this.articleType, + status: this.status, + tags: this.tags, + keywords: this.keywords, + review_date: this.reviewDate, + }, + }); + $.export("$summary", `Successfully updated solution article with ID ${article.id}`); + return article; + }, +}; diff --git a/components/freshservice/actions/update-ticket/update-ticket.mjs b/components/freshservice/actions/update-ticket/update-ticket.mjs new file mode 100644 index 0000000000000..9425f59fbc672 --- /dev/null +++ b/components/freshservice/actions/update-ticket/update-ticket.mjs @@ -0,0 +1,73 @@ +import freshservice from "../../freshservice.app.mjs"; + +export default { + key: "freshservice-update-ticket", + name: "Update Ticket", + description: "Update a ticket. [See the documentation](https://api.freshservice.com/#update_ticket_priority)", + version: "0.0.1", + type: "action", + props: { + freshservice, + ticketId: { + propDefinition: [ + freshservice, + "ticketId", + ], + }, + source: { + propDefinition: [ + freshservice, + "ticketSourceType", + ], + optional: true, + }, + status: { + propDefinition: [ + freshservice, + "ticketStatus", + ], + optional: true, + }, + priority: { + propDefinition: [ + freshservice, + "ticketPriority", + ], + optional: true, + }, + subject: { + type: "string", + label: "Ticket Subject", + description: "The subject of a ticket", + optional: true, + }, + description: { + type: "string", + label: "Ticket Description", + description: "The description of a ticket", + optional: true, + }, + email: { + type: "string", + label: "Email", + description: "The email address accociated with the ticket", + optional: true, + }, + }, + async run({ $ }) { + const { ticket } = await this.freshservice.updateTicket({ + $, + ticketId: this.ticketId, + data: { + source: this.source, + status: this.status, + priority: this.priority, + subject: this.subject, + description: this.description, + email: this.email, + }, + }); + $.export("$summary", `Successfully updated ticket with ID ${ticket.id}`); + return ticket; + }, +}; diff --git a/components/freshservice/common/constants.mjs b/components/freshservice/common/constants.mjs new file mode 100644 index 0000000000000..d37795bf7e464 --- /dev/null +++ b/components/freshservice/common/constants.mjs @@ -0,0 +1,110 @@ +const TICKET_SOURCE_TYPES = [ + { + label: "Email", + value: 1, + }, + { + label: "Portal", + value: 2, + }, + { + label: "Phone", + value: 3, + }, + { + label: "Chat", + value: 4, + }, + { + label: "Feedback widget", + value: 5, + }, + { + label: "Yammer", + value: 6, + }, + { + label: "AWS Cloudwatch", + value: 7, + }, + { + label: "Pagerduty", + value: 8, + }, + { + label: "Walkup", + value: 9, + }, + { + label: "Slack", + value: 10, + }, +]; + +const TICKET_STATUS = [ + { + label: "Open", + value: 2, + }, + { + label: "Pending", + value: 3, + }, + { + label: "Resolved", + value: 4, + }, + { + label: "Closed", + value: 5, + }, +]; + +const TICKET_PRIORITIES = [ + { + label: "Low", + value: 1, + }, + { + label: "Medium", + value: 2, + }, + { + label: "High", + value: 3, + }, + { + label: "Urgent", + value: 4, + }, +]; + +const SOLUTION_ARTICLE_TYPES = [ + { + label: "Permanent", + value: 1, + }, + { + label: "Workaround", + value: 2, + }, +]; + +const SOLUTION_ARTICLE_STATUS = [ + { + label: "Draft", + value: 1, + }, + { + label: "Published", + value: 2, + }, +]; + +export default { + TICKET_SOURCE_TYPES, + TICKET_STATUS, + TICKET_PRIORITIES, + SOLUTION_ARTICLE_TYPES, + SOLUTION_ARTICLE_STATUS, +}; diff --git a/components/freshservice/freshservice.app.mjs b/components/freshservice/freshservice.app.mjs index 44f4558e415e2..542b7a814c2d4 100644 --- a/components/freshservice/freshservice.app.mjs +++ b/components/freshservice/freshservice.app.mjs @@ -1,9 +1,101 @@ import { axios } from "@pipedream/platform"; +import constants from "./common/constants.mjs"; export default { type: "app", app: "freshservice", - propDefinitions: {}, + propDefinitions: { + solutionCategoryId: { + type: "string", + label: "Solution Category ID", + description: "The ID of a solution category", + async options() { + const { categories } = await this.listSolutionCategories(); + return categories.map((category) => ({ + label: category.name, + value: category.id, + })); + }, + }, + solutionFolderId: { + type: "string", + label: "Solution Folder ID", + description: "The ID of a solution folder", + async options({ solutionCategoryId }) { + const { folders } = await this.listSolutionFolders({ + params: { + category_id: solutionCategoryId, + }, + }); + return folders.map((folder) => ({ + label: folder.name, + value: folder.id, + })); + }, + }, + solutionArticleId: { + type: "string", + label: "Solution Article ID", + description: "The ID of a solution article", + async options({ solutionFolderId }) { + const { articles } = await this.listSolutionArticles({ + params: { + folder_id: solutionFolderId, + }, + }); + return articles.map((article) => ({ + label: article.title, + value: article.id, + })); + }, + }, + ticketId: { + type: "string", + label: "Ticket ID", + description: "The ID of a ticket", + async options({ page }) { + const { tickets } = await this.listTickets({ + params: { + page: page + 1, + }, + }); + return tickets.map((ticket) => ({ + label: ticket.subject, + value: ticket.id, + })); + }, + }, + ticketSourceType: { + type: "integer", + label: "Ticket Source Type", + description: "The source type of a ticket", + options: constants.TICKET_SOURCE_TYPES, + }, + ticketStatus: { + type: "integer", + label: "Ticket Status", + description: "The status of a ticket", + options: constants.TICKET_STATUS, + }, + ticketPriority: { + type: "integer", + label: "Ticket Priority", + description: "The priority of a ticket", + options: constants.TICKET_PRIORITIES, + }, + solutionArticleType: { + type: "integer", + label: "Solution Article Type", + description: "The type of a solution article", + options: constants.SOLUTION_ARTICLE_TYPES, + }, + solutionArticleStatus: { + type: "integer", + label: "Solution Article Status", + description: "The status of a solution article", + options: constants.SOLUTION_ARTICLE_STATUS, + }, + }, methods: { _domain() { return this.$auth.domain; @@ -12,9 +104,9 @@ export default { return this.$auth.api_key; }, _apiUrl() { - return `https://${this._domain()}.freshservice.com/api`; + return `https://${this._domain()}.freshservice.com/api/v2`; }, - async _makeRequest({ + _makeRequest({ $ = this, path, ...args }) { return axios($, { @@ -26,9 +118,84 @@ export default { ...args, }); }, - async getTickets(args = {}) { + getTicket({ + ticketId, ...args + }) { + return this._makeRequest({ + path: `/tickets/${ticketId}`, + ...args, + }); + }, + getSolutionArticle({ + articleId, ...args + }) { + return this._makeRequest({ + path: `/solutions/articles/${articleId}`, + ...args, + }); + }, + listTickets(args = {}) { + return this._makeRequest({ + path: "/tickets", + ...args, + }); + }, + listSolutionCategories(args = {}) { + return this._makeRequest({ + path: "/solutions/categories", + ...args, + }); + }, + listSolutionFolders(args = {}) { + return this._makeRequest({ + path: "/solutions/folders", + ...args, + }); + }, + listSolutionArticles(args = {}) { + return this._makeRequest({ + path: "/solutions/articles", + ...args, + }); + }, + createTicket(args = {}) { + return this._makeRequest({ + path: "/tickets", + method: "POST", + ...args, + }); + }, + createSolutionArticle(args = {}) { + return this._makeRequest({ + path: "/solutions/articles", + method: "POST", + ...args, + }); + }, + updateTicket({ + ticketId, ...args + }) { + return this._makeRequest({ + path: `/tickets/${ticketId}`, + method: "PUT", + ...args, + }); + }, + updateSolutionArticle({ + articleId, ...args + }) { + return this._makeRequest({ + path: `/solutions/articles/${articleId}`, + method: "PUT", + ...args, + }); + }, + deleteSolutionArticle({ + articleId, ...args + }) { return this._makeRequest({ - path: "/v2/tickets", + path: `/solutions/articles/${articleId}`, + method: "DELETE", ...args, }); }, diff --git a/components/freshservice/package.json b/components/freshservice/package.json index 728e72d3243f5..f5b0fbb872315 100644 --- a/components/freshservice/package.json +++ b/components/freshservice/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/freshservice", - "version": "0.0.2", + "version": "0.1.0", "description": "Pipedream Freshservice Components", "main": "freshservice.app.mjs", "keywords": [ @@ -14,6 +14,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.5.1" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/freshservice/sources/common/base.mjs b/components/freshservice/sources/common/base.mjs new file mode 100644 index 0000000000000..c8c8bacd4f061 --- /dev/null +++ b/components/freshservice/sources/common/base.mjs @@ -0,0 +1,82 @@ +import freshservice from "../../freshservice.app.mjs"; +import { + DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, ConfigurationError, +} from "@pipedream/platform"; + +export default { + props: { + freshservice, + db: "$.service.db", + timer: { + type: "$.interface.timer", + static: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + methods: { + _getLastTs() { + return this.db.get("lastTs"); + }, + _setLastTs(ts) { + this.db.set("lastTs", ts); + }, + getParams() { + return {}; + }, + getTsField() { + return "created_at"; + }, + async processEvents(max = 100) { + const lastTs = this._getLastTs(); + let maxTs = lastTs; + + const fn = this.getResourceFn(); + const params = { + ...this.getParams(), + per_page: max, + }; + const tsField = this.getTsField(); + const resourceKey = this.getResourceKey(); + + const results = await fn({ + params, + }); + const resources = results[resourceKey]; + + if (!resources.length) { + return; + } + + for (const resource of resources) { + const ts = Date.parse(resource[tsField]); + if (!lastTs || ts > Date.parse(lastTs)) { + if (!maxTs || ts > Date.parse(maxTs)) { + maxTs = resource[tsField]; + } + const meta = this.generateMeta(resource); + this.$emit(resource, meta); + } + } + + this._setLastTs(maxTs); + }, + getResourceFn() { + throw new ConfigurationError("getResourceFn must be implemented"); + }, + getResourceKey() { + throw new ConfigurationError("getResourceKey must be implemented"); + }, + generateMeta() { + throw new ConfigurationError("generateMeta must be implemented"); + }, + }, + hooks: { + async deploy() { + await this.processEvents(25); + }, + }, + async run() { + await this.processEvents(); + }, +}; diff --git a/components/freshservice/sources/new-solution-article/new-solution-article.mjs b/components/freshservice/sources/new-solution-article/new-solution-article.mjs new file mode 100644 index 0000000000000..ba315d4a52d99 --- /dev/null +++ b/components/freshservice/sources/new-solution-article/new-solution-article.mjs @@ -0,0 +1,50 @@ +import common from "../common/base.mjs"; + +export default { + ...common, + name: "New Solution Article", + version: "0.0.1", + key: "freshservice-new-solution-article", + description: "Emit new event for each created solution article. [See documentation](https://api.freshservice.com/#view_all_solution_article)", + type: "source", + dedupe: "unique", + props: { + ...common.props, + solutionCategoryId: { + propDefinition: [ + common.props.freshservice, + "solutionCategoryId", + ], + }, + solutionFolderId: { + propDefinition: [ + common.props.freshservice, + "solutionFolderId", + (c) => ({ + solutionCategoryId: c.solutionCategoryId, + }), + ], + }, + }, + methods: { + ...common.methods, + getResourceFn() { + return this.freshservice.listSolutionArticles; + }, + getParams() { + return { + folder_id: this.solutionFolderId, + }; + }, + getResourceKey() { + return "articles"; + }, + generateMeta(article) { + return { + id: article.id, + summary: `New solution article with ID ${article.id}`, + ts: Date.parse(article.created_at), + }; + }, + }, +}; diff --git a/components/freshservice/sources/new-ticket/new-ticket.mjs b/components/freshservice/sources/new-ticket/new-ticket.mjs index c34f7e71676d8..198d843ab896a 100644 --- a/components/freshservice/sources/new-ticket/new-ticket.mjs +++ b/components/freshservice/sources/new-ticket/new-ticket.mjs @@ -1,48 +1,32 @@ -import app from "../../freshservice.app.mjs"; -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import common from "../common/base.mjs"; export default { + ...common, name: "New Ticket", - version: "0.0.2", + version: "0.0.3", key: "freshservice-new-ticket", description: "Emit new event for each created ticket. [See documentation](https://api.freshservice.com/#view_all_ticket)", type: "source", dedupe: "unique", - props: { - app, - db: "$.service.db", - timer: { - type: "$.interface.timer", - static: { - intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, - }, - }, - }, methods: { - emitEvent(data) { - this.$emit(data, { - id: data.id, - summary: `New ticket with ID ${data.id}`, - ts: Date.parse(data.created_at), - }); + ...common.methods, + getResourceFn() { + return this.freshservice.listTickets; }, - async emitEvents() { - const { tickets: resources } = await this.app.getTickets({ - params: { - filter: "new_and_my_open", - order_type: "desc", - }, - }); - - resources.reverse().forEach(this.emitEvent); + getParams() { + return { + order_type: "desc", + }; }, - }, - hooks: { - async deploy() { - await this.emitEvents(); + getResourceKey() { + return "tickets"; + }, + generateMeta(ticket) { + return { + id: ticket.id, + summary: `New ticket with ID ${ticket.id}`, + ts: Date.parse(ticket.created_at), + }; }, - }, - async run() { - await this.emitEvents(); }, }; diff --git a/components/freshservice/sources/solution-article-updated/solution-article-updated.mjs b/components/freshservice/sources/solution-article-updated/solution-article-updated.mjs new file mode 100644 index 0000000000000..d6bc669a8e833 --- /dev/null +++ b/components/freshservice/sources/solution-article-updated/solution-article-updated.mjs @@ -0,0 +1,54 @@ +import common from "../common/base.mjs"; + +export default { + ...common, + name: "Solution Article Updated", + version: "0.0.1", + key: "freshservice-solution-article-updated", + description: "Emit new event for each updated solution article. [See documentation](https://api.freshservice.com/#view_all_solution_article)", + type: "source", + dedupe: "unique", + props: { + ...common.props, + solutionCategoryId: { + propDefinition: [ + common.props.freshservice, + "solutionCategoryId", + ], + }, + solutionFolderId: { + propDefinition: [ + common.props.freshservice, + "solutionFolderId", + (c) => ({ + solutionCategoryId: c.solutionCategoryId, + }), + ], + }, + }, + methods: { + ...common.methods, + getResourceFn() { + return this.freshservice.listSolutionArticles; + }, + getParams() { + return { + folder_id: this.solutionFolderId, + }; + }, + getTsField() { + return "updated_at"; + }, + getResourceKey() { + return "articles"; + }, + generateMeta(article) { + const ts = Date.parse(article.updated_at); + return { + id: `${article.id}-${ts}`, + summary: `Updated solution article with ID ${article.id}`, + ts, + }; + }, + }, +}; diff --git a/components/freshservice/sources/ticket-updated/ticket-updated.mjs b/components/freshservice/sources/ticket-updated/ticket-updated.mjs new file mode 100644 index 0000000000000..7f3aa8b9b07a5 --- /dev/null +++ b/components/freshservice/sources/ticket-updated/ticket-updated.mjs @@ -0,0 +1,37 @@ +import common from "../common/base.mjs"; + +export default { + ...common, + name: "Ticket Updated", + version: "0.0.1", + key: "freshservice-ticket-updated", + description: "Emit new event for each updated ticket. [See documentation](https://api.freshservice.com/#view_all_ticket)", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getResourceFn() { + return this.freshservice.listTickets; + }, + getParams(lastTs) { + return { + updated_since: lastTs, + order_type: "desc", + }; + }, + getTsField() { + return "updated_at"; + }, + getResourceKey() { + return "tickets"; + }, + generateMeta(ticket) { + const ts = Date.parse(ticket.updated_at); + return { + id: `${ticket.id}-${ts}`, + summary: `Updated ticket with ID ${ticket.id}`, + ts, + }; + }, + }, +}; diff --git a/components/frontapp/actions/add-comment/add-comment.mjs b/components/frontapp/actions/add-comment/add-comment.mjs index 399742563e934..72e214fe8840f 100644 --- a/components/frontapp/actions/add-comment/add-comment.mjs +++ b/components/frontapp/actions/add-comment/add-comment.mjs @@ -5,7 +5,7 @@ export default { key: "frontapp-add-comment", name: "Add Comment", description: "Add a comment to a conversation. [See the documentation](https://dev.frontapp.com/reference/add-comment)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/archive-conversation/archive-conversation.mjs b/components/frontapp/actions/archive-conversation/archive-conversation.mjs index ea17d398d66b3..e5d3f85ac5c61 100644 --- a/components/frontapp/actions/archive-conversation/archive-conversation.mjs +++ b/components/frontapp/actions/archive-conversation/archive-conversation.mjs @@ -4,7 +4,7 @@ export default { key: "frontapp-archive-conversation", name: "Archive Conversation", description: "Archives a conversation. [See the documentation](https://dev.frontapp.com/reference/patch_conversations-conversation-id)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/assign-conversation/assign-conversation.mjs b/components/frontapp/actions/assign-conversation/assign-conversation.mjs index 2332fa1c45639..e2229f8c4d79f 100644 --- a/components/frontapp/actions/assign-conversation/assign-conversation.mjs +++ b/components/frontapp/actions/assign-conversation/assign-conversation.mjs @@ -4,7 +4,7 @@ export default { key: "frontapp-assign-conversation", name: "Assign Conversation", description: "Assign or unassign a conversation. [See the documentation](https://dev.frontapp.com/reference/update-conversation-assignee)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/create-draft-reply/create-draft-reply.mjs b/components/frontapp/actions/create-draft-reply/create-draft-reply.mjs index 56fa9c241505a..5a1da95bcb01e 100644 --- a/components/frontapp/actions/create-draft-reply/create-draft-reply.mjs +++ b/components/frontapp/actions/create-draft-reply/create-draft-reply.mjs @@ -5,7 +5,7 @@ export default { key: "frontapp-create-draft-reply", name: "Create Draft Reply", description: "Create a new draft as a reply to the last message in the conversation. [See the documentation](https://dev.frontapp.com/reference/create-draft-reply)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/create-draft/create-draft.mjs b/components/frontapp/actions/create-draft/create-draft.mjs index c324eac39cd55..38b22e07992eb 100644 --- a/components/frontapp/actions/create-draft/create-draft.mjs +++ b/components/frontapp/actions/create-draft/create-draft.mjs @@ -5,7 +5,7 @@ export default { key: "frontapp-create-draft", name: "Create Draft", description: "Create a draft message which is the first message of a new conversation. [See the documentation](https://dev.frontapp.com/reference/create-draft)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/create-inbox/create-inbox.mjs b/components/frontapp/actions/create-inbox/create-inbox.mjs new file mode 100644 index 0000000000000..356f99096c389 --- /dev/null +++ b/components/frontapp/actions/create-inbox/create-inbox.mjs @@ -0,0 +1,47 @@ +import frontApp from "../../frontapp.app.mjs"; + +export default { + key: "frontapp-create-inbox", + name: "Create Inbox", + description: "Create an inbox in the default team (workspace). [See the documentation](https://dev.frontapp.com/reference/create-inbox).", + version: "0.0.1", + type: "action", + props: { + frontApp, + name: { + type: "string", + label: "Name", + description: "The name of the inbox", + }, + teammateIds: { + propDefinition: [ + frontApp, + "teammateId", + ], + type: "string[]", + label: "Teammate IDs", + description: "One or more IDs of teammates that should have access to the inbox", + optional: true, + }, + }, + async run({ $ }) { + const { + frontApp, + name, + teammateIds, + } = this; + + const data = { + name, + teammate_ids: teammateIds, + }; + + const response = await frontApp.createInbox({ + data, + $, + }); + + $.export("$summary", `Successfully created inbox "${name}"`); + return response; + }, +}; diff --git a/components/frontapp/actions/create-message-template/create-message-template.mjs b/components/frontapp/actions/create-message-template/create-message-template.mjs new file mode 100644 index 0000000000000..d22e078e3b164 --- /dev/null +++ b/components/frontapp/actions/create-message-template/create-message-template.mjs @@ -0,0 +1,125 @@ +import FormData from "form-data"; +import { getFileStreamAndMetadata } from "@pipedream/platform"; +import frontApp from "../../frontapp.app.mjs"; + +export default { + key: "frontapp-create-message-template", + name: "Create Message Template", + description: "Create a new message template. [See the documentation](https://dev.frontapp.com/reference/create-message-template).", + version: "0.0.1", + type: "action", + props: { + frontApp, + name: { + type: "string", + label: "Name", + description: "Name of the message template", + }, + subject: { + type: "string", + label: "Subject", + description: "Subject of the message template", + optional: true, + }, + body: { + type: "string", + label: "Body", + description: "Body of the message template. You can supply HTML with inline CSS to structure and style your template", + }, + folderId: { + propDefinition: [ + frontApp, + "folderId", + ], + description: "ID of the message template folder to place this message template in", + }, + inboxIds: { + type: "string[]", + label: "Inbox IDs", + description: "The specific inboxes this template is available in. If not specified, it will be available in all inboxes", + propDefinition: [ + frontApp, + "inboxId", + ], + optional: true, + }, + attachments: { + propDefinition: [ + frontApp, + "attachments", + ], + }, + syncDir: { + type: "dir", + accessMode: "read", + sync: true, + optional: true, + }, + }, + async run({ $ }) { + const { + frontApp, + name, + subject, + body, + folderId, + inboxIds, + attachments, + } = this; + + let data, headers = {}; + + // Handle attachments if provided + if (attachments?.length > 0) { + const formData = new FormData(); + + formData.append("name", name); + formData.append("body", body); + if (subject !== undefined) { + formData.append("subject", subject); + } + if (folderId !== undefined) { + formData.append("folder_id", folderId); + } + if (typeof inboxIds === "string") { + formData.append("inbox_ids", inboxIds); + } else if (Array.isArray(inboxIds)) { + for (const inboxId of inboxIds) { + formData.append("inbox_ids", inboxId); + } + } + + for (const attachment of attachments) { + const { + stream, metadata, + } = await getFileStreamAndMetadata(attachment); + formData.append("attachments", stream, { + contentType: metadata.contentType, + knownLength: metadata.size, + filename: metadata.name, + }); + } + + data = formData; + headers = formData.getHeaders(); + } else { + // Simple JSON request without attachments + data = { + name, + subject, + body, + folder_id: folderId, + inbox_ids: inboxIds, + }; + } + + const response = await frontApp.createMessageTemplate({ + data, + headers, + $, + }); + + $.export("$summary", `Successfully created message template "${name}"`); + return response; + }, +}; diff --git a/components/frontapp/actions/delete-message-template/delete-message-template.mjs b/components/frontapp/actions/delete-message-template/delete-message-template.mjs new file mode 100644 index 0000000000000..2c0b20477e032 --- /dev/null +++ b/components/frontapp/actions/delete-message-template/delete-message-template.mjs @@ -0,0 +1,33 @@ +import frontApp from "../../frontapp.app.mjs"; + +export default { + key: "frontapp-delete-message-template", + name: "Delete Message Template", + description: "Delete a message template. [See the documentation](https://dev.frontapp.com/reference/delete-message-template).", + version: "0.0.1", + type: "action", + props: { + frontApp, + messageTemplateId: { + propDefinition: [ + frontApp, + "messageTemplateId", + ], + description: "ID of the message template to delete", + }, + }, + async run({ $ }) { + const { + frontApp, + messageTemplateId, + } = this; + + const response = await frontApp.deleteMessageTemplate({ + messageTemplateId, + $, + }); + + $.export("$summary", `Successfully deleted message template ${messageTemplateId}`); + return response; + }, +}; diff --git a/components/frontapp/actions/get-comment/get-comment.mjs b/components/frontapp/actions/get-comment/get-comment.mjs index c51214587acdf..6d0f12a67c0a0 100644 --- a/components/frontapp/actions/get-comment/get-comment.mjs +++ b/components/frontapp/actions/get-comment/get-comment.mjs @@ -4,7 +4,7 @@ export default { key: "frontapp-get-comment", name: "Get Comment", description: "Retrieve a comment from a conversation. [See the documentation](https://dev.frontapp.com/reference/get-comment)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/get-conversation/get-conversation.mjs b/components/frontapp/actions/get-conversation/get-conversation.mjs new file mode 100644 index 0000000000000..dd8ca292f587b --- /dev/null +++ b/components/frontapp/actions/get-conversation/get-conversation.mjs @@ -0,0 +1,46 @@ +import frontapp from "../../frontapp.app.mjs"; + +export default { + key: "frontapp-get-conversation", + name: "Get Conversation", + description: "Retrieve a conversation by its ID from Front. [See the documentation](https://dev.frontapp.com/reference/get-conversation-by-id)", + version: "0.0.2", + type: "action", + props: { + frontapp, + conversationId: { + propDefinition: [ + frontapp, + "conversationId", + ], + }, + includeMessages: { + type: "boolean", + label: "Include Messages", + description: "Whether to include all messages from the conversation", + default: false, + optional: true, + }, + }, + async run({ $ }) { + const conversation = await this.frontapp.getConversation({ + $, + conversationId: this.conversationId, + }); + + if (this.includeMessages) { + const messages = []; + for await (const message of this.frontapp.paginate({ + fn: this.frontapp.makeRequest, + path: `/conversations/${this.conversationId}/messages`, + })) { + messages.push(message); + } + conversation.messages = messages; + } + + $.export("$summary", `Successfully retrieved conversation with ID: ${this.conversationId}`); + + return conversation; + }, +}; diff --git a/components/frontapp/actions/get-message/get-message.mjs b/components/frontapp/actions/get-message/get-message.mjs new file mode 100644 index 0000000000000..9210927a23a4a --- /dev/null +++ b/components/frontapp/actions/get-message/get-message.mjs @@ -0,0 +1,25 @@ +import frontApp from "../../frontapp.app.mjs"; + +export default { + key: "frontapp-get-message", + name: "Get Message", + description: "Retrieve a message by its ID. [See the documentation](https://dev.frontapp.com/reference/get-message)", + version: "0.0.1", + type: "action", + props: { + frontApp, + messageId: { + type: "string", + label: "Message ID", + description: "The unique identifier of the message to retrieve", + }, + }, + async run({ $ }) { + const response = await this.frontApp.makeRequest({ + $, + path: `/messages/${this.messageId}`, + }); + $.export("$summary", `Successfully retrieved message with ID: ${this.messageId}`); + return response; + }, +}; diff --git a/components/frontapp/actions/get-teammate/get-teammate.mjs b/components/frontapp/actions/get-teammate/get-teammate.mjs index c0cac11fc155c..89c0f41598908 100644 --- a/components/frontapp/actions/get-teammate/get-teammate.mjs +++ b/components/frontapp/actions/get-teammate/get-teammate.mjs @@ -4,7 +4,7 @@ export default { key: "frontapp-get-teammate", name: "Get Teammate", description: "Retrieve a teammate by ID. [See the documentation](https://dev.frontapp.com/reference/get-teammate)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/import-message/import-message.mjs b/components/frontapp/actions/import-message/import-message.mjs index 7d21b63cac714..042ff683a122c 100644 --- a/components/frontapp/actions/import-message/import-message.mjs +++ b/components/frontapp/actions/import-message/import-message.mjs @@ -4,8 +4,8 @@ import frontApp from "../../frontapp.app.mjs"; export default { key: "frontapp-import-message", name: "Import Message", - description: "Appends a new message into an inbox. [See the docs here](https://dev.frontapp.com/reference/import-inbox-message).", - version: "0.1.7", + description: "Appends a new message into an inbox. [See the documentation](https://dev.frontapp.com/reference/import-inbox-message).", + version: "0.1.8", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/list-comment-mentions/list-comment-mentions.mjs b/components/frontapp/actions/list-comment-mentions/list-comment-mentions.mjs index f371f9009d5c4..da31a3f5e230b 100644 --- a/components/frontapp/actions/list-comment-mentions/list-comment-mentions.mjs +++ b/components/frontapp/actions/list-comment-mentions/list-comment-mentions.mjs @@ -4,7 +4,7 @@ export default { key: "frontapp-list-comment-mentions", name: "List Comment Mentions", description: "List the teammates mentioned in a comment. [See the documentation](https://dev.frontapp.com/reference/list-comment-mentions)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/list-comments/list-comments.mjs b/components/frontapp/actions/list-comments/list-comments.mjs index 72331db31cea7..c659f7816b392 100644 --- a/components/frontapp/actions/list-comments/list-comments.mjs +++ b/components/frontapp/actions/list-comments/list-comments.mjs @@ -4,7 +4,7 @@ export default { key: "frontapp-list-comments", name: "List Conversation Comments", description: "List the comments in a conversation. [See the documentation](https://dev.frontapp.com/reference/list-conversation-comments)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/list-conversations/list-conversations.mjs b/components/frontapp/actions/list-conversations/list-conversations.mjs index ee19fe0e67ad9..b458621046c19 100644 --- a/components/frontapp/actions/list-conversations/list-conversations.mjs +++ b/components/frontapp/actions/list-conversations/list-conversations.mjs @@ -4,7 +4,7 @@ export default { key: "frontapp-list-conversations", name: "List Conversations", description: "List conversations in the company. [See the documentation](https://dev.frontapp.com/reference/list-conversations)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/list-message-templates/list-message-templates.mjs b/components/frontapp/actions/list-message-templates/list-message-templates.mjs new file mode 100644 index 0000000000000..719779b414f74 --- /dev/null +++ b/components/frontapp/actions/list-message-templates/list-message-templates.mjs @@ -0,0 +1,70 @@ +import frontApp from "../../frontapp.app.mjs"; + +export default { + key: "frontapp-list-message-templates", + name: "List Message Templates", + description: "List the message templates. [See the documentation](https://dev.frontapp.com/reference/list-message-templates).", + version: "0.0.1", + type: "action", + props: { + frontApp, + sortBy: { + type: "string", + label: "Sort By Field", + description: "Field used to sort the message templates", + options: [ + { + label: "Created At", + value: "created_at", + }, + { + label: "Updated At", + value: "updated_at", + }, + ], + optional: true, + }, + sortOrder: { + type: "string", + label: "Sort Order", + description: "Order by which results should be sorted", + options: [ + { + label: "Ascending", + value: "asc", + }, + { + label: "Descending", + value: "desc", + }, + ], + optional: true, + }, + maxResults: { + propDefinition: [ + frontApp, + "maxResults", + ], + }, + }, + async run({ $ }) { + const items = this.frontApp.paginate({ + fn: this.frontApp.listMessageTemplates, + params: { + sort_by: this.sortBy, + sort_order: this.sortOrder, + }, + maxResults: this.maxResults, + $, + }); + + const results = []; + for await (const item of items) { + results.push(item); + } + $.export("$summary", `Successfully retrieved ${results?.length} message template${results?.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/frontapp/actions/list-teammates/list-teammates.mjs b/components/frontapp/actions/list-teammates/list-teammates.mjs index 5c1076b955cda..b8867a1aa5c0e 100644 --- a/components/frontapp/actions/list-teammates/list-teammates.mjs +++ b/components/frontapp/actions/list-teammates/list-teammates.mjs @@ -4,7 +4,7 @@ export default { key: "frontapp-list-teammates", name: "List Teammate", description: "List teammates in the company. [See the documentation](https://dev.frontapp.com/reference/list-teammates)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs b/components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs index 294c0d1df55d6..bf25964f07d41 100644 --- a/components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs +++ b/components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs @@ -4,8 +4,8 @@ import frontApp from "../../frontapp.app.mjs"; export default { key: "frontapp-receive-custom-messages", name: "Receive Custom Messages", - description: "Receive a custom message in Front. [See the docs here](https://dev.frontapp.com/reference/post_channels-channel-id-incoming-messages).", - version: "0.0.4", + description: "Receive a custom message in Front. [See the documentation](https://dev.frontapp.com/reference/post_channels-channel-id-incoming-messages).", + version: "0.0.5", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs b/components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs index 4f227cc4cc884..2f74ec08aea07 100644 --- a/components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs +++ b/components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs @@ -4,8 +4,8 @@ import frontApp from "../../frontapp.app.mjs"; export default { key: "frontapp-reply-to-conversation", name: "Reply To Conversation", - description: "Reply to a conversation by sending a message and appending it to the conversation. [See the docs here](https://dev.frontapp.com/reference/post_conversations-conversation-id-messages).", - version: "0.0.3", + description: "Reply to a conversation by sending a message and appending it to the conversation. [See the documentation](https://dev.frontapp.com/reference/post_conversations-conversation-id-messages).", + version: "0.0.4", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/send-new-message/send-new-message.mjs b/components/frontapp/actions/send-new-message/send-new-message.mjs index 748f86e65af4e..3cd9234f34c60 100644 --- a/components/frontapp/actions/send-new-message/send-new-message.mjs +++ b/components/frontapp/actions/send-new-message/send-new-message.mjs @@ -4,8 +4,8 @@ import frontApp from "../../frontapp.app.mjs"; export default { key: "frontapp-send-new-message", name: "Send New Message", - description: "Sends a new message from a channel. It will create a new conversation. [See the docs here](https://dev.frontapp.com/reference/post_channels-channel-id-messages).", - version: "0.2.6", + description: "Sends a new message from a channel. It will create a new conversation. [See the documentation](https://dev.frontapp.com/reference/post_channels-channel-id-messages).", + version: "0.2.7", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/tag-conversation/tag-conversation.mjs b/components/frontapp/actions/tag-conversation/tag-conversation.mjs index cda17006754ff..8ef633625ddff 100644 --- a/components/frontapp/actions/tag-conversation/tag-conversation.mjs +++ b/components/frontapp/actions/tag-conversation/tag-conversation.mjs @@ -4,7 +4,7 @@ export default { key: "frontapp-tag-conversation", name: "Tag Conversation", description: "Add tags to a conversation. [See the documentation](https://dev.frontapp.com/reference/patch_conversations-conversation-id)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/update-conversation/update-conversation.mjs b/components/frontapp/actions/update-conversation/update-conversation.mjs index 4d69740438a6a..99206fca0bbf9 100644 --- a/components/frontapp/actions/update-conversation/update-conversation.mjs +++ b/components/frontapp/actions/update-conversation/update-conversation.mjs @@ -4,8 +4,8 @@ import frontApp from "../../frontapp.app.mjs"; export default { key: "frontapp-update-conversation", name: "Update Conversation", - description: "Updates a conversation. [See the docs here](https://dev.frontapp.com/reference/patch_conversations-conversation-id).", - version: "0.1.6", + description: "Updates a conversation. [See the documentation](https://dev.frontapp.com/reference/patch_conversations-conversation-id).", + version: "0.1.7", type: "action", props: { frontApp, diff --git a/components/frontapp/actions/update-teammate/update-teammate.mjs b/components/frontapp/actions/update-teammate/update-teammate.mjs new file mode 100644 index 0000000000000..c2c7ea33bf167 --- /dev/null +++ b/components/frontapp/actions/update-teammate/update-teammate.mjs @@ -0,0 +1,77 @@ +import frontApp from "../../frontapp.app.mjs"; + +export default { + key: "frontapp-update-teammate", + name: "Update Teammate", + description: "Update a teammate. [See the documentation](https://dev.frontapp.com/reference/update-teammate).", + version: "0.0.1", + type: "action", + props: { + frontApp, + teammateId: { + propDefinition: [ + frontApp, + "teammateId", + ], + description: "ID of the teammate to update", + }, + username: { + type: "string", + label: "Username", + description: "New username. It must be unique and can only contains lowercase letters, numbers and underscores", + optional: true, + }, + firstName: { + type: "string", + label: "First Name", + description: "New first name", + optional: true, + }, + lastName: { + type: "string", + label: "Last Name", + description: "New last name", + optional: true, + }, + isAvailable: { + type: "boolean", + label: "Is Available", + description: "New availability status", + optional: true, + }, + customFields: { + type: "object", + label: "Custom Fields", + description: "Custom fields for this teammate. If included, all current custom fields will be replaced with the object supplied here", + optional: true, + }, + }, + async run({ $ }) { + const { + frontApp, + teammateId, + username, + firstName, + lastName, + isAvailable, + customFields, + } = this; + + const data = { + username, + first_name: firstName, + last_name: lastName, + is_available: isAvailable, + custom_fields: customFields, + }; + + const response = await frontApp.updateTeammate({ + teammateId, + data, + $, + }); + + $.export("$summary", `Successfully updated teammate ${teammateId}`); + return response; + }, +}; diff --git a/components/frontapp/common/utils.mjs b/components/frontapp/common/utils.mjs index aac27a8eca825..6245a23112828 100644 --- a/components/frontapp/common/utils.mjs +++ b/components/frontapp/common/utils.mjs @@ -89,7 +89,7 @@ function buildFormData(formData, data, parentKey) { buildFormData(formData, data[key], parentKey && `${parentKey}[${key}]` || key); }); - } else if (data && parentKey.includes("attachment")) { + } else if (data && parentKey?.includes("attachment")) { formData.append(parentKey, createReadStream(data)); } else if (data) { diff --git a/components/frontapp/frontapp.app.mjs b/components/frontapp/frontapp.app.mjs index 8d3f031c4db91..82b79386b7df1 100644 --- a/components/frontapp/frontapp.app.mjs +++ b/components/frontapp/frontapp.app.mjs @@ -273,13 +273,48 @@ export default { default: 100, optional: true, }, + messageTemplateId: { + type: "string", + label: "Message Template ID", + description: "The message template ID", + async options({ prevContext }) { + return this.paginateOptions({ + prevContext, + listResourcesFn: this.listMessageTemplates, + mapper: ({ + id, name, + }) => ({ + label: name, + value: id, + }), + }); + }, + }, + folderId: { + type: "string", + label: "Folder ID", + description: "ID of the message template folder", + async options({ prevContext }) { + return this.paginateOptions({ + prevContext, + listResourcesFn: this.listMessageTemplateFolders, + mapper: ({ + id, name, + }) => ({ + label: name, + value: id, + }), + }); + }, + optional: true, + }, }, methods: { getUrl(path, url) { return url || `${constants.BASE_URL}${path}`; }, hasMultipartHeader(headers) { - return headers && headers["Content-Type"].includes("multipart/form-data"); + return headers?.["Content-Type"]?.includes("multipart/form-data"); }, getHeaders(headers) { return { @@ -293,7 +328,10 @@ export default { headers, path, url, data: originalData, ...args } = {}) { const hasMultipartHeader = this.hasMultipartHeader(headers); - const data = hasMultipartHeader && utils.getFormData(originalData) || originalData; + const isFormData = originalData instanceof FormData; + const data = (!isFormData && hasMultipartHeader) + ? utils.getFormData(originalData) + : originalData; const currentHeaders = this.getHeaders(headers); const builtHeaders = hasMultipartHeader ? { @@ -510,6 +548,50 @@ export default { ...args, }); }, + async listMessageTemplates(args = {}) { + return this.makeRequest({ + path: "/message_templates", + ...args, + }); + }, + async listMessageTemplateFolders(args = {}) { + return this.makeRequest({ + path: "/message_template_folders", + ...args, + }); + }, + async updateTeammate({ + teammateId, ...args + } = {}) { + return this.makeRequest({ + method: "patch", + path: `/teammates/${teammateId}`, + ...args, + }); + }, + async createInbox(args = {}) { + return this.makeRequest({ + method: "post", + path: "/inboxes", + ...args, + }); + }, + async createMessageTemplate(args = {}) { + return this.makeRequest({ + method: "post", + path: "/message_templates", + ...args, + }); + }, + async deleteMessageTemplate({ + messageTemplateId, ...args + } = {}) { + return this.makeRequest({ + method: "delete", + path: `/message_templates/${messageTemplateId}`, + ...args, + }); + }, async paginateOptions({ prevContext, listResourcesFn, diff --git a/components/frontapp/package.json b/components/frontapp/package.json index f46650a4cda8d..bfffde0ab0072 100644 --- a/components/frontapp/package.json +++ b/components/frontapp/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/frontapp", - "version": "0.6.0", + "version": "0.7.2", "description": "Pipedream Frontapp Components", "main": "frontapp.app.mjs", "keywords": [ @@ -10,7 +10,7 @@ "homepage": "https://pipedream.com/apps/frontapp", "author": "Pipedream (https://pipedream.com/)", "dependencies": { - "@pipedream/platform": "^3.0.3", + "@pipedream/platform": "^3.1.0", "form-data": "^4.0.0" }, "gitHead": "e12480b94cc03bed4808ebc6b13e7fdb3a1ba535", diff --git a/components/frontapp/sources/common/base.mjs b/components/frontapp/sources/common/base.mjs index be15ec62602a5..69c839c4704d2 100644 --- a/components/frontapp/sources/common/base.mjs +++ b/components/frontapp/sources/common/base.mjs @@ -19,7 +19,10 @@ export default { _setLastTs(lastTs) { this.db.set("lastTs", lastTs); }, - async startEvent(maxResults = 0) { + _getItemTs(item) { + return item.created_at * 1000; + }, + async startEvent(maxResults = 0, filterFn = null) { const lastTs = this._getLastTs(); const items = this.frontapp.paginate({ fn: this._getFunction(), @@ -30,10 +33,18 @@ export default { let responseArray = []; for await (const item of items) { - responseArray.push(item); + // If filterFn is provided, use it to filter items, otherwise add all items + if (!filterFn || filterFn(item, lastTs)) { + responseArray.push(item); + } } - if (responseArray.length) this._setLastTs(responseArray[0].emitted_at); + if (responseArray.length) { + if (filterFn) { + responseArray.sort((a, b) => b.created_at - a.created_at); + } + this._setLastTs(this._getEmit(responseArray[0]).ts); + } for (const item of responseArray.reverse()) { this.$emit( diff --git a/components/frontapp/sources/new-conversation-created/new-conversation-created.mjs b/components/frontapp/sources/new-conversation-created/new-conversation-created.mjs new file mode 100644 index 0000000000000..32c8973f538fa --- /dev/null +++ b/components/frontapp/sources/new-conversation-created/new-conversation-created.mjs @@ -0,0 +1,40 @@ +import common from "../common/base.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "frontapp-new-conversation-created", + name: "New Conversation Created", + description: "Emit new event when a conversation is created. [See the documentation](https://dev.frontapp.com/reference/list-conversations)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + _getFunction() { + return this.frontapp.listConversations; + }, + _getParams() { + return { + sort_by: "date", + sort_order: "desc", + }; + }, + _getEmit(conversation) { + return { + id: conversation.id, + summary: `New conversation: ${conversation.subject}`, + ts: conversation.created_at * 1000, + }; + }, + }, + hooks: { + async deploy() { + await this.startEvent(25, (item, lastTs) => this._getItemTs(item) > lastTs); + }, + }, + async run() { + await this.startEvent(0, (item, lastTs) => this._getItemTs(item) > lastTs); + }, + sampleEmit, +}; diff --git a/components/frontapp/sources/new-conversation-created/test-event.mjs b/components/frontapp/sources/new-conversation-created/test-event.mjs new file mode 100644 index 0000000000000..0da0e3a74c5db --- /dev/null +++ b/components/frontapp/sources/new-conversation-created/test-event.mjs @@ -0,0 +1,96 @@ +export default { + "_links": { + "self": "string", + "related": { + "events": "string", + "followers": "string", + "messages": "string", + "comments": "string", + "inboxes": "string", + "last_message": "string" + } + }, + "id": "cnv_123abc", + "subject": "New conversation subject", + "status": "open", + "assignee": { + "_links": { + "self": "string", + "related": { + "inboxes": "string", + "conversations": "string" + } + }, + "id": "tea_123abc", + "email": "teammate@example.com", + "username": "teammate", + "first_name": "John", + "last_name": "Doe", + "is_admin": false, + "is_available": true, + "is_blocked": false, + "custom_fields": {} + }, + "recipient": { + "_links": { + "related": { + "contact": "string" + } + }, + "name": "Customer Name", + "handle": "customer@example.com", + "role": "from" + }, + "tags": [ + { + "_links": { + "self": "string", + "related": { + "conversations": "string", + "owner": "string", + "children": "string" + } + }, + "id": "tag_123abc", + "name": "urgent", + "description": "Urgent conversations", + "highlight": "red", + "is_private": false, + "is_visible_in_conversation_lists": true, + "created_at": 1640995200, + "updated_at": 1640995200 + } + ], + "links": [ + { + "_links": { + "self": "string" + }, + "id": "link_123abc", + "name": "Related Ticket", + "type": "string", + "external_url": "https://example.com/ticket/123", + "custom_fields": {} + } + ], + "custom_fields": {}, + "created_at": 1640995200, + "is_private": false, + "scheduled_reminders": [ + { + "_links": { + "related": { + "owner": "string" + } + }, + "created_at": 1640995200, + "scheduled_at": 1641081600, + "updated_at": 1640995200 + } + ], + "metadata": { + "external_conversation_ids": [ + "external_123" + ] + } +}; \ No newline at end of file diff --git a/components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs b/components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs index edc90a1610223..549e0814361e2 100644 --- a/components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs +++ b/components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs @@ -6,8 +6,8 @@ export default { ...common, key: "frontapp-new-conversation-state-change", name: "New Conversation State Change", - description: "Emit new event when a conversation reaches a specific state. [See the docs](https://dev.frontapp.com/reference/list-conversations)", - version: "0.0.2", + description: "Emit new event when a conversation reaches a specific state. [See the documentation](https://dev.frontapp.com/reference/list-conversations)", + version: "0.0.3", type: "source", dedupe: "unique", props: { @@ -15,7 +15,7 @@ export default { types: { type: "string[]", label: "States to Listen For", - description: "Trigger a workflow when a conversation reaches any of these states. [See the docs](https://dev.frontapp.com/reference/list-conversations) for more detail.", + description: "Trigger a workflow when a conversation reaches any of these states. [See the documentation](https://dev.frontapp.com/reference/list-conversations) for more detail.", options: utils.TYPES_OPTIONS, }, }, diff --git a/components/frontapp/sources/new-conversation-tag/new-conversation-tag.mjs b/components/frontapp/sources/new-conversation-tag/new-conversation-tag.mjs index f3a71bffa3ee9..6b25ebb92789f 100644 --- a/components/frontapp/sources/new-conversation-tag/new-conversation-tag.mjs +++ b/components/frontapp/sources/new-conversation-tag/new-conversation-tag.mjs @@ -6,7 +6,7 @@ export default { key: "frontapp-new-conversation-tag", name: "New Conversation Tag", description: "Emit new event when a conversation is tagged with a specific tag or any tag. [See the documentation](https://dev.frontapp.com/reference/events)", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/components/frontapp/sources/new-message-template-created/new-message-template-created.mjs b/components/frontapp/sources/new-message-template-created/new-message-template-created.mjs new file mode 100644 index 0000000000000..c28549fc98ea9 --- /dev/null +++ b/components/frontapp/sources/new-message-template-created/new-message-template-created.mjs @@ -0,0 +1,40 @@ +import common from "../common/base.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "frontapp-new-message-template-created", + name: "New Message Template Created", + description: "Emit new event when a message template is created. [See the documentation](https://dev.frontapp.com/reference/list-message-templates)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + _getFunction() { + return this.frontapp.listMessageTemplates; + }, + _getParams() { + return { + sort_by: "created_at", + sort_order: "desc", + }; + }, + _getEmit(template) { + return { + id: template.id, + summary: `New template: ${template.name}`, + ts: template.created_at * 1000, + }; + }, + }, + hooks: { + async deploy() { + await this.startEvent(25, (item, lastTs) => this._getItemTs(item) > lastTs); + }, + }, + async run() { + await this.startEvent(0, (item, lastTs) => this._getItemTs(item) > lastTs); + }, + sampleEmit, +}; diff --git a/components/frontapp/sources/new-message-template-created/test-event.mjs b/components/frontapp/sources/new-message-template-created/test-event.mjs new file mode 100644 index 0000000000000..8ee6c9cac0632 --- /dev/null +++ b/components/frontapp/sources/new-message-template-created/test-event.mjs @@ -0,0 +1,56 @@ +export default { + "_links": { + "self": "string", + "related": { + "folder": "string", + "inboxes": "string" + } + }, + "id": "tpl_123abc", + "name": "Welcome Email Template", + "subject": "Welcome to our service!", + "body": "

Welcome to our service! We're excited to have you on board.

Best regards,
The Team

", + "folder_id": "fol_123abc", + "inbox_ids": [ + "inb_123abc", + "inb_456def" + ], + "attachments": [ + { + "filename": "welcome-guide.pdf", + "url": "string", + "content_type": "application/pdf", + "size": 1024000 + } + ], + "created_at": 1640995200, + "updated_at": 1640995200, + "is_available_for_all_inboxes": false, + "folder": { + "_links": { + "self": "string", + "related": { + "owner": "string" + } + }, + "id": "fol_123abc", + "name": "Customer Onboarding", + "description": "Templates for customer onboarding process" + }, + "inboxes": [ + { + "_links": { + "self": "string", + "related": { + "conversations": "string", + "teammates": "string", + "channels": "string", + "owner": "string" + } + }, + "id": "inb_123abc", + "name": "Support Inbox", + "is_private": false + } + ] +}; \ No newline at end of file diff --git a/components/funnelcockpit/.gitignore b/components/funnelcockpit/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/funnelcockpit/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/funnelcockpit/app/funnelcockpit.app.ts b/components/funnelcockpit/app/funnelcockpit.app.ts deleted file mode 100644 index c9ed9d6962f54..0000000000000 --- a/components/funnelcockpit/app/funnelcockpit.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "funnelcockpit", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/funnelcockpit/funnelcockpit.app.mjs b/components/funnelcockpit/funnelcockpit.app.mjs new file mode 100644 index 0000000000000..502e1e612f520 --- /dev/null +++ b/components/funnelcockpit/funnelcockpit.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "funnelcockpit", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/funnelcockpit/package.json b/components/funnelcockpit/package.json index 9d640158fcb87..a1084ed139fae 100644 --- a/components/funnelcockpit/package.json +++ b/components/funnelcockpit/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/funnelcockpit", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream FunnelCockpit Components", - "main": "dist/app/funnelcockpit.app.mjs", + "main": "funnelcockpit.app.mjs", "keywords": [ "pipedream", "funnelcockpit" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/funnelcockpit", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/gatekeeper/.gitignore b/components/gatekeeper/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/gatekeeper/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/gatekeeper/app/gatekeeper.app.ts b/components/gatekeeper/app/gatekeeper.app.ts deleted file mode 100644 index 928caf39a75e9..0000000000000 --- a/components/gatekeeper/app/gatekeeper.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "gatekeeper", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/gatekeeper/gatekeeper.app.mjs b/components/gatekeeper/gatekeeper.app.mjs new file mode 100644 index 0000000000000..dd910bcc23386 --- /dev/null +++ b/components/gatekeeper/gatekeeper.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "gatekeeper", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/gatekeeper/package.json b/components/gatekeeper/package.json index 6507c4686c9a8..4844e34500a8e 100644 --- a/components/gatekeeper/package.json +++ b/components/gatekeeper/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/gatekeeper", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Gatekeeper Components", - "main": "dist/app/gatekeeper.app.mjs", + "main": "gatekeeper.app.mjs", "keywords": [ "pipedream", "gatekeeper" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/gatekeeper", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/gender_api/.gitignore b/components/gender_api/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/gender_api/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/gender_api/app/gender_api.app.ts b/components/gender_api/app/gender_api.app.ts deleted file mode 100644 index 3f841297b0035..0000000000000 --- a/components/gender_api/app/gender_api.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "gender_api", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/gender_api/gender_api.app.mjs b/components/gender_api/gender_api.app.mjs new file mode 100644 index 0000000000000..e2ae8ad32e59f --- /dev/null +++ b/components/gender_api/gender_api.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "gender_api", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/gender_api/package.json b/components/gender_api/package.json index ce947737d7bf6..cf61bc60a45c5 100644 --- a/components/gender_api/package.json +++ b/components/gender_api/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/gender_api", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Gender API Components", - "main": "dist/app/gender_api.app.mjs", + "main": "gender_api.app.mjs", "keywords": [ "pipedream", "gender_api" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/gender_api", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/getemails/actions/find-email/find-email.mjs b/components/getemails/actions/find-email/find-email.mjs index 1b528efde3af2..3374b9b00038d 100644 --- a/components/getemails/actions/find-email/find-email.mjs +++ b/components/getemails/actions/find-email/find-email.mjs @@ -4,7 +4,7 @@ export default { name: "Find Email", description: "Provide Full name of your prospect with Domain or Website and Api will provide you an email address of the prospect in response. [See the documentation](https://app2.getemail.io/dash/integration/api/v2/1#).", key: "getemails-find-email", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/getemails/actions/status-find-email/status-find-email.mjs b/components/getemails/actions/status-find-email/status-find-email.mjs index 5e239125baa1a..717802dc199a4 100644 --- a/components/getemails/actions/status-find-email/status-find-email.mjs +++ b/components/getemails/actions/status-find-email/status-find-email.mjs @@ -4,7 +4,7 @@ export default { name: "Status Find Email", description: "Use this Api when you want to know the status of any previous find-email Api request. [See the documentation](https://app2.getemail.io/dash/integration/api/v2/2).", key: "getemails-status-find-email", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/getemails/actions/verify-email/verify-email.mjs b/components/getemails/actions/verify-email/verify-email.mjs index e2b094720fd98..d5567096bc5e2 100644 --- a/components/getemails/actions/verify-email/verify-email.mjs +++ b/components/getemails/actions/verify-email/verify-email.mjs @@ -4,7 +4,7 @@ export default { name: "Verify Email", description: "The Api verifies your requested email address, whether it is a Good or Bad email address. [See the documentation](https://app2.getemail.io/dash/integration/api/v2/3).", key: "getemails-verify-email", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/getemails/getemails.app.mjs b/components/getemails/getemails.app.mjs index 40b4e415565c9..47a15419a4e38 100644 --- a/components/getemails/getemails.app.mjs +++ b/components/getemails/getemails.app.mjs @@ -1,4 +1,4 @@ -import { axios } from "@pipedreamhq/platform"; +import { axios } from "@pipedream/platform"; export default { type: "app", diff --git a/components/getemails/package.json b/components/getemails/package.json index 81c82bdf7d0cf..3f72229146bd7 100644 --- a/components/getemails/package.json +++ b/components/getemails/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/getemails", - "version": "0.1.0", + "version": "0.1.2", "description": "Pipedream GetEmails Components", "main": "getemails.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/getprospect/.gitignore b/components/getprospect/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/getprospect/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/getprospect/app/getprospect.app.ts b/components/getprospect/app/getprospect.app.ts deleted file mode 100644 index cd7994466b455..0000000000000 --- a/components/getprospect/app/getprospect.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "getprospect", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/getprospect/getprospect.app.mjs b/components/getprospect/getprospect.app.mjs new file mode 100644 index 0000000000000..449ed5914db49 --- /dev/null +++ b/components/getprospect/getprospect.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "getprospect", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/getprospect/package.json b/components/getprospect/package.json index c0084a0ed601b..c3e3771715f7a 100644 --- a/components/getprospect/package.json +++ b/components/getprospect/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/getprospect", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream GetProspect Components", - "main": "dist/app/getprospect.app.mjs", + "main": "getprospect.app.mjs", "keywords": [ "pipedream", "getprospect" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/getprospect", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/getswift/.gitignore b/components/getswift/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/getswift/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/getswift/app/getswift.app.ts b/components/getswift/app/getswift.app.ts deleted file mode 100644 index 4d0205fe6ac21..0000000000000 --- a/components/getswift/app/getswift.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "getswift", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/getswift/getswift.app.mjs b/components/getswift/getswift.app.mjs new file mode 100644 index 0000000000000..ee5852829b68a --- /dev/null +++ b/components/getswift/getswift.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "getswift", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/getswift/package.json b/components/getswift/package.json index 3db531571f481..285bc6c37891b 100644 --- a/components/getswift/package.json +++ b/components/getswift/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/getswift", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Getswift Components", - "main": "dist/app/getswift.app.mjs", + "main": "getswift.app.mjs", "keywords": [ "pipedream", "getswift" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/getswift", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/getty_images/getty_images.app.mjs b/components/getty_images/getty_images.app.mjs index 8d21342140951..f67cb63ae9e0c 100644 --- a/components/getty_images/getty_images.app.mjs +++ b/components/getty_images/getty_images.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/gitlab_developer_app/actions/create-branch/create-branch.mjs b/components/gitlab_developer_app/actions/create-branch/create-branch.mjs index b2226dce7f8af..fe78073eec7e0 100644 --- a/components/gitlab_developer_app/actions/create-branch/create-branch.mjs +++ b/components/gitlab_developer_app/actions/create-branch/create-branch.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/actions/create-branch/create-branch.mjs"; +import common from "@pipedream/gitlab/actions/create-branch/create-branch.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-create-branch", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/actions/create-epic/create-epic.mjs b/components/gitlab_developer_app/actions/create-epic/create-epic.mjs index b56c7ad7452b4..2366094e21dbb 100644 --- a/components/gitlab_developer_app/actions/create-epic/create-epic.mjs +++ b/components/gitlab_developer_app/actions/create-epic/create-epic.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/actions/create-epic/create-epic.mjs"; +import common from "@pipedream/gitlab/actions/create-epic/create-epic.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; const { @@ -10,7 +10,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-create-epic", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/actions/create-issue/create-issue.mjs b/components/gitlab_developer_app/actions/create-issue/create-issue.mjs index 6d69fab7737f8..087e8cc592ee6 100644 --- a/components/gitlab_developer_app/actions/create-issue/create-issue.mjs +++ b/components/gitlab_developer_app/actions/create-issue/create-issue.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/actions/create-issue/create-issue.mjs"; +import common from "@pipedream/gitlab/actions/create-issue/create-issue.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-create-issue", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/actions/get-issue/get-issue.mjs b/components/gitlab_developer_app/actions/get-issue/get-issue.mjs index ecdae4575d656..d64a0a9caea46 100644 --- a/components/gitlab_developer_app/actions/get-issue/get-issue.mjs +++ b/components/gitlab_developer_app/actions/get-issue/get-issue.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/actions/get-issue/get-issue.mjs"; +import common from "@pipedream/gitlab/actions/get-issue/get-issue.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-get-issue", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/actions/get-repo-branch/get-repo-branch.mjs b/components/gitlab_developer_app/actions/get-repo-branch/get-repo-branch.mjs index 18135cd745cf2..e9a297545cb3f 100644 --- a/components/gitlab_developer_app/actions/get-repo-branch/get-repo-branch.mjs +++ b/components/gitlab_developer_app/actions/get-repo-branch/get-repo-branch.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/actions/get-repo-branch/get-repo-branch.mjs"; +import common from "@pipedream/gitlab/actions/get-repo-branch/get-repo-branch.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-get-repo-branch", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/actions/list-commits/list-commits.mjs b/components/gitlab_developer_app/actions/list-commits/list-commits.mjs index 8e9d749b59a9a..ab05610c93b26 100644 --- a/components/gitlab_developer_app/actions/list-commits/list-commits.mjs +++ b/components/gitlab_developer_app/actions/list-commits/list-commits.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/actions/list-commits/list-commits.mjs"; +import common from "@pipedream/gitlab/actions/list-commits/list-commits.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-list-commits", - version: "0.0.2", + version: "0.0.3", name, description, type, diff --git a/components/gitlab_developer_app/actions/list-repo-branches/list-repo-branches.mjs b/components/gitlab_developer_app/actions/list-repo-branches/list-repo-branches.mjs index 4a2ad20cae132..7ba05e730e904 100644 --- a/components/gitlab_developer_app/actions/list-repo-branches/list-repo-branches.mjs +++ b/components/gitlab_developer_app/actions/list-repo-branches/list-repo-branches.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/actions/list-repo-branches/list-repo-branches.mjs"; +import common from "@pipedream/gitlab/actions/list-repo-branches/list-repo-branches.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-list-repo-branches", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/actions/search-issues/search-issues.mjs b/components/gitlab_developer_app/actions/search-issues/search-issues.mjs index 8c5033594c30f..125aa60a77025 100644 --- a/components/gitlab_developer_app/actions/search-issues/search-issues.mjs +++ b/components/gitlab_developer_app/actions/search-issues/search-issues.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/actions/search-issues/search-issues.mjs"; +import common from "@pipedream/gitlab/actions/search-issues/search-issues.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-search-issues", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/actions/update-epic/update-epic.mjs b/components/gitlab_developer_app/actions/update-epic/update-epic.mjs index 2ea00e29e0669..9b867828b9a79 100644 --- a/components/gitlab_developer_app/actions/update-epic/update-epic.mjs +++ b/components/gitlab_developer_app/actions/update-epic/update-epic.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/actions/update-epic/update-epic.mjs"; +import common from "@pipedream/gitlab/actions/update-epic/update-epic.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-update-epic", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/actions/update-issue/update-issue.mjs b/components/gitlab_developer_app/actions/update-issue/update-issue.mjs index c920fa14d3294..819bc5b548301 100644 --- a/components/gitlab_developer_app/actions/update-issue/update-issue.mjs +++ b/components/gitlab_developer_app/actions/update-issue/update-issue.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/actions/update-issue/update-issue.mjs"; +import common from "@pipedream/gitlab/actions/update-issue/update-issue.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-update-issue", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/gitlab_developer_app.app.mjs b/components/gitlab_developer_app/gitlab_developer_app.app.mjs index f0acf0cef2a71..ba24c7b97795e 100644 --- a/components/gitlab_developer_app/gitlab_developer_app.app.mjs +++ b/components/gitlab_developer_app/gitlab_developer_app.app.mjs @@ -1,4 +1,4 @@ -import common from "../gitlab/gitlab.app.mjs"; +import common from "@pipedream/gitlab"; export default { ...common, diff --git a/components/gitlab_developer_app/package.json b/components/gitlab_developer_app/package.json index 2b2f4b4e0b262..33edf69a3b7ed 100644 --- a/components/gitlab_developer_app/package.json +++ b/components/gitlab_developer_app/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/gitlab_developer_app", - "version": "0.1.1", + "version": "0.1.2", "description": "Pipedream GitLab (Developer App) Components", "main": "gitlab_developer_app.app.mjs", "keywords": [ @@ -12,7 +12,8 @@ "dependencies": { "@pipedream/platform": "^1.6.4", "lodash": "^4.17.21", - "uuid": "^8.3.2" + "uuid": "^8.3.2", + "@pipedream/gitlab": "^0.5.6" }, "publishConfig": { "access": "public" diff --git a/components/gitlab_developer_app/sources/new-audit-event/new-audit-event.mjs b/components/gitlab_developer_app/sources/new-audit-event/new-audit-event.mjs index 22342654d28a9..e19afd0533df9 100644 --- a/components/gitlab_developer_app/sources/new-audit-event/new-audit-event.mjs +++ b/components/gitlab_developer_app/sources/new-audit-event/new-audit-event.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/sources/new-audit-event/new-audit-event.mjs"; +import common from "@pipedream/gitlab/sources/new-audit-event/new-audit-event.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; const { @@ -10,7 +10,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-new-audit-event", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/sources/new-branch/new-branch.mjs b/components/gitlab_developer_app/sources/new-branch/new-branch.mjs index 7b33d38ed0199..1d3effc3d6ecd 100644 --- a/components/gitlab_developer_app/sources/new-branch/new-branch.mjs +++ b/components/gitlab_developer_app/sources/new-branch/new-branch.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/sources/new-branch/new-branch.mjs"; +import common from "@pipedream/gitlab/sources/new-branch/new-branch.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; const { @@ -10,7 +10,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-new-branch", - version: "0.0.2", + version: "0.0.3", name, description, type, diff --git a/components/gitlab_developer_app/sources/new-commit-comment/new-commit-comment.mjs b/components/gitlab_developer_app/sources/new-commit-comment/new-commit-comment.mjs index e150550caa4de..68a745e91ae0a 100644 --- a/components/gitlab_developer_app/sources/new-commit-comment/new-commit-comment.mjs +++ b/components/gitlab_developer_app/sources/new-commit-comment/new-commit-comment.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/sources/new-commit-comment/new-commit-comment.mjs"; +import common from "@pipedream/gitlab/sources/new-commit-comment/new-commit-comment.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; const { @@ -10,7 +10,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-new-commit-comment", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/sources/new-commit/new-commit.mjs b/components/gitlab_developer_app/sources/new-commit/new-commit.mjs index 0829809b1c2f0..6f82415f9b1c9 100644 --- a/components/gitlab_developer_app/sources/new-commit/new-commit.mjs +++ b/components/gitlab_developer_app/sources/new-commit/new-commit.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/sources/new-commit/new-commit.mjs"; +import common from "@pipedream/gitlab/sources/new-commit/new-commit.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; const { @@ -10,7 +10,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-new-commit", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/sources/new-issue/new-issue.mjs b/components/gitlab_developer_app/sources/new-issue/new-issue.mjs index d9addfda12927..d093548631946 100644 --- a/components/gitlab_developer_app/sources/new-issue/new-issue.mjs +++ b/components/gitlab_developer_app/sources/new-issue/new-issue.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/sources/new-issue/new-issue.mjs"; +import common from "@pipedream/gitlab/sources/new-issue/new-issue.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; const { @@ -10,7 +10,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-new-issue", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/sources/new-mention/new-mention.mjs b/components/gitlab_developer_app/sources/new-mention/new-mention.mjs index 5b6cb41365d29..bb1191cb3db50 100644 --- a/components/gitlab_developer_app/sources/new-mention/new-mention.mjs +++ b/components/gitlab_developer_app/sources/new-mention/new-mention.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/sources/new-mention/new-mention.mjs"; +import common from "@pipedream/gitlab/sources/new-mention/new-mention.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; const { @@ -10,7 +10,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-new-mention", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/sources/new-merge-request/new-merge-request.mjs b/components/gitlab_developer_app/sources/new-merge-request/new-merge-request.mjs index d473a02d5af05..1521a48bf370f 100644 --- a/components/gitlab_developer_app/sources/new-merge-request/new-merge-request.mjs +++ b/components/gitlab_developer_app/sources/new-merge-request/new-merge-request.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/sources/new-merge-request/new-merge-request.mjs"; +import common from "@pipedream/gitlab/sources/new-merge-request/new-merge-request.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; const { @@ -10,7 +10,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-new-merge-request", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/sources/new-milestone/new-milestone.mjs b/components/gitlab_developer_app/sources/new-milestone/new-milestone.mjs index 2c291c5406aeb..dfbcba687c72b 100644 --- a/components/gitlab_developer_app/sources/new-milestone/new-milestone.mjs +++ b/components/gitlab_developer_app/sources/new-milestone/new-milestone.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/sources/new-milestone/new-milestone.mjs"; +import common from "@pipedream/gitlab/sources/new-milestone/new-milestone.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; const { @@ -10,7 +10,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-new-milestone", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/sources/new-project/new-project.mjs b/components/gitlab_developer_app/sources/new-project/new-project.mjs index 65ff7e274316f..863f835c1ec65 100644 --- a/components/gitlab_developer_app/sources/new-project/new-project.mjs +++ b/components/gitlab_developer_app/sources/new-project/new-project.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/sources/new-project/new-project.mjs"; +import common from "@pipedream/gitlab/sources/new-project/new-project.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; const { @@ -10,7 +10,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-new-project", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/gitlab_developer_app/sources/new-review-request/new-review-request.mjs b/components/gitlab_developer_app/sources/new-review-request/new-review-request.mjs index 5993904c01646..89bbe9b21d3b3 100644 --- a/components/gitlab_developer_app/sources/new-review-request/new-review-request.mjs +++ b/components/gitlab_developer_app/sources/new-review-request/new-review-request.mjs @@ -1,5 +1,5 @@ import app from "../../gitlab_developer_app.app.mjs"; -import common from "../../../gitlab/sources/new-review-request/new-review-request.mjs"; +import common from "@pipedream/gitlab/sources/new-review-request/new-review-request.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; const { @@ -10,7 +10,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "gitlab_developer_app-new-review-request", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/givingfuel/.gitignore b/components/givingfuel/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/givingfuel/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/givingfuel/app/givingfuel.app.ts b/components/givingfuel/app/givingfuel.app.ts deleted file mode 100644 index 38d640820d63d..0000000000000 --- a/components/givingfuel/app/givingfuel.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "givingfuel", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/givingfuel/givingfuel.app.mjs b/components/givingfuel/givingfuel.app.mjs new file mode 100644 index 0000000000000..f5f5a4951e96b --- /dev/null +++ b/components/givingfuel/givingfuel.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "givingfuel", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/givingfuel/package.json b/components/givingfuel/package.json index ac8fe9071e772..4ec93e3fcecf8 100644 --- a/components/givingfuel/package.json +++ b/components/givingfuel/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/givingfuel", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream GivingFuel Components", - "main": "dist/app/givingfuel.app.mjs", + "main": "givingfuel.app.mjs", "keywords": [ "pipedream", "givingfuel" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/givingfuel", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/gmail/actions/delete-email/delete-email.mjs b/components/gmail/actions/delete-email/delete-email.mjs new file mode 100644 index 0000000000000..32a24a2509750 --- /dev/null +++ b/components/gmail/actions/delete-email/delete-email.mjs @@ -0,0 +1,36 @@ +import gmail from "../../gmail.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "gmail-delete-email", + name: "Delete Email", + description: "Moves the specified message to the trash. [See the documentation](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/trash)", + version: "0.0.1", + type: "action", + props: { + gmail, + messageId: { + propDefinition: [ + gmail, + "message", + ], + label: "Message ID", + description: "The ID of the message to delete", + }, + }, + methods: { + deleteEmail(opts = {}) { + return this.gmail._client().users.messages.trash({ + userId: constants.USER_ID, + ...opts, + }); + }, + }, + async run({ $ }) { + const response = await this.deleteEmail({ + id: this.messageId, + }); + $.export("$summary", `Deleted email (ID: ${this.messageId})`); + return response; + }, +}; diff --git a/components/gmail/actions/get-send-as-alias/get-send-as-alias.mjs b/components/gmail/actions/get-send-as-alias/get-send-as-alias.mjs new file mode 100644 index 0000000000000..258dd96352cdc --- /dev/null +++ b/components/gmail/actions/get-send-as-alias/get-send-as-alias.mjs @@ -0,0 +1,32 @@ +import gmail from "../../gmail.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "gmail-get-send-as-alias", + name: "Get Send As Alias", + description: "Get a send as alias for the authenticated user. [See the documentation](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.settings.sendAs/get)", + version: "0.0.1", + type: "action", + props: { + gmail, + sendAsEmail: { + type: "string", + label: "Send As Email", + description: "The email address of the send as alias to get", + async options() { + const { sendAs } = await this.gmail.listSignatures(); + return sendAs.map(({ sendAsEmail }) => sendAsEmail); + }, + }, + }, + async run({ $ }) { + const { data } = await this.gmail._client().users.settings.sendAs.get({ + userId: constants.USER_ID, + sendAsEmail: this.sendAsEmail, + }); + + $.export("$summary", "Successfully retrieved send as alias"); + + return data; + }, +}; diff --git a/components/gmail/actions/list-send-as-aliases/list-send-as-aliases.mjs b/components/gmail/actions/list-send-as-aliases/list-send-as-aliases.mjs new file mode 100644 index 0000000000000..7d79b4b1593c5 --- /dev/null +++ b/components/gmail/actions/list-send-as-aliases/list-send-as-aliases.mjs @@ -0,0 +1,21 @@ +import gmail from "../../gmail.app.mjs"; + +export default { + key: "gmail-list-send-as-aliases", + name: "List Send As Aliases", + description: "List all send as aliases for the authenticated user. [See the documentation](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.settings.sendAs/list)", + version: "0.0.1", + type: "action", + props: { + gmail, + }, + async run({ $ }) { + const response = await this.gmail.listSignatures({ + $, + }); + + $.export("$summary", `Successfully retrieved ${response.sendAs?.length} send as aliases`); + + return response; + }, +}; diff --git a/components/gmail/package.json b/components/gmail/package.json index 2bf261697d884..4d4001aff0649 100644 --- a/components/gmail/package.json +++ b/components/gmail/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/gmail", - "version": "1.1.2", + "version": "1.3.0", "description": "Pipedream Gmail Components", "main": "gmail.app.mjs", "keywords": [ diff --git a/components/go_upc/.gitignore b/components/go_upc/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/go_upc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/go_upc/app/go_upc.app.ts b/components/go_upc/app/go_upc.app.ts deleted file mode 100644 index be5a051465e83..0000000000000 --- a/components/go_upc/app/go_upc.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "go_upc", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/go_upc/go_upc.app.mjs b/components/go_upc/go_upc.app.mjs new file mode 100644 index 0000000000000..fd5346fe6cd17 --- /dev/null +++ b/components/go_upc/go_upc.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "go_upc", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/go_upc/package.json b/components/go_upc/package.json index 9605c41cf3bc3..cc4aef9238a1f 100644 --- a/components/go_upc/package.json +++ b/components/go_upc/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/go_upc", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Go-UPC Components", - "main": "dist/app/go_upc.app.mjs", + "main": "go_upc.app.mjs", "keywords": [ "pipedream", "go_upc" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/go_upc", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/gobio_link/.gitignore b/components/gobio_link/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/gobio_link/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/gobio_link/app/gobio_link.app.ts b/components/gobio_link/app/gobio_link.app.ts deleted file mode 100644 index 3591d1c0a8f85..0000000000000 --- a/components/gobio_link/app/gobio_link.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "gobio_link", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/gobio_link/gobio_link.app.mjs b/components/gobio_link/gobio_link.app.mjs new file mode 100644 index 0000000000000..3a11654d43a8a --- /dev/null +++ b/components/gobio_link/gobio_link.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "gobio_link", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/gobio_link/package.json b/components/gobio_link/package.json index 692e19c855d3c..f8555dee66c33 100644 --- a/components/gobio_link/package.json +++ b/components/gobio_link/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/gobio_link", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream gobio.link Components", - "main": "dist/app/gobio_link.app.mjs", + "main": "gobio_link.app.mjs", "keywords": [ "pipedream", "gobio_link" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/gobio_link", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/godaddy/.gitignore b/components/godaddy/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/godaddy/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/godaddy/app/godaddy.app.ts b/components/godaddy/app/godaddy.app.ts deleted file mode 100644 index d2570ff02b048..0000000000000 --- a/components/godaddy/app/godaddy.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "godaddy", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/godaddy/godaddy.app.mjs b/components/godaddy/godaddy.app.mjs new file mode 100644 index 0000000000000..080f2d4ba0a48 --- /dev/null +++ b/components/godaddy/godaddy.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "godaddy", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/godaddy/package.json b/components/godaddy/package.json index 737feed2853ce..03ebbea859d45 100644 --- a/components/godaddy/package.json +++ b/components/godaddy/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/godaddy", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream GoDaddy Components", - "main": "dist/app/godaddy.app.mjs", + "main": "godaddy.app.mjs", "keywords": [ "pipedream", "godaddy" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/godaddy", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/godial/package.json b/components/godial/package.json index f1678d65d7109..680b28218cdee 100644 --- a/components/godial/package.json +++ b/components/godial/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/godial", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream GoDial Components", "main": "app/godial.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/gong/actions/add-new-call/add-new-call.mjs b/components/gong/actions/add-new-call/add-new-call.mjs index 38b21904435c7..6d3058b341d23 100644 --- a/components/gong/actions/add-new-call/add-new-call.mjs +++ b/components/gong/actions/add-new-call/add-new-call.mjs @@ -8,7 +8,7 @@ export default { name: "Add New Call", description: "Add a new call. [See the documentation](https://us-66463.app.gong.io/settings/api/documentation#post-/v2/calls)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { app, clientUniqueId: { diff --git a/components/gong/actions/get-extensive-data/get-extensive-data.mjs b/components/gong/actions/get-extensive-data/get-extensive-data.mjs index fc7d6a642c4b1..d62c4581ab73b 100644 --- a/components/gong/actions/get-extensive-data/get-extensive-data.mjs +++ b/components/gong/actions/get-extensive-data/get-extensive-data.mjs @@ -1,12 +1,13 @@ import app from "../../gong.app.mjs"; import constants from "../../common/constants.mjs"; import { ConfigurationError } from "@pipedream/platform"; +import utils from "../../common/utils.mjs"; export default { key: "gong-get-extensive-data", name: "Get Extensive Data", - description: "Lists detailed call data. [See the documentation](https://us-66463.app.gong.io/settings/api/documentation#post-/v2/calls/extensive)", - version: "0.0.1", + description: "Lists detailed call data. [See the documentation](https://gong.app.gong.io/settings/api/documentation#post-/v2/calls/extensive)", + version: "0.0.3", type: "action", props: { app, @@ -54,6 +55,75 @@ export default { default: constants.DEFAULT_MAX, optional: true, }, + context: { + type: "string", + label: "Context", + description: "If 'Basic', add links to external systems (context objects) such as CRM, Telephony System, Case Management. If 'Extended' include also data (context fields) for these links.", + options: [ + "None", + "Basic", + "Extended", + ], + default: "None", + optional: true, + }, + contextTiming: { + type: "string[]", + label: "Context Timing", + description: "Allowed: Now, TimeOfCall. Timing for the context data. The field is optional and can contain either 'Now' or 'TimeOfCall' or both. The default value is ['Now']. Can be provided only when the context field is set to 'Extended'", + optional: true, + }, + includeParties: { + type: "boolean", + label: "Include Parties", + description: "Whether to include parties in the response", + default: false, + optional: true, + }, + exposedFieldsContent: { + type: "object", + label: "Exposed Fields Content", + description: "Specify which fields to include in the response for the content. Example object: {'structure': false, 'topics': false, 'trackers': false, 'trackerOccurrences': false, 'pointsOfInterest': false, 'brief': true, 'outline': true, 'highlights': true, 'callOutcome': true, 'keyPoints': true}", + default: { + "structure": "false", + "topics": "false", + "trackers": "false", + "trackerOccurrences": "false", + "pointsOfInterest": "false", + "brief": "false", + "outline": "false", + "highlights": "false", + "callOutcome": "false", + "keyPoints": "false", + }, + optional: true, + }, + exposedFieldsInteraction: { + type: "object", + label: "Exposed Fields Interaction", + description: "Specify which fields to include in the response for the interaction. Example object: {'speakers': true, 'video': true, 'personInteractionStats': true, 'questions': true}", + default: { + "speakers": "false", + "video": "false", + "personInteractionStats": "false", + "questions": "false", + }, + optional: true, + }, + includePublicComments: { + type: "boolean", + label: "Include Public Comments", + description: "Whether to include public comments in the response", + default: false, + optional: true, + }, + includeMedia: { + type: "boolean", + label: "Include Media", + description: "Whether to include media in the response", + default: false, + optional: true, + }, }, methods: { getExtensiveData(args = {}) { @@ -68,6 +138,13 @@ export default { app, getExtensiveData, maxResults, + context, + contextTiming, + includeParties, + exposedFieldsContent, + exposedFieldsInteraction, + includePublicComments, + includeMedia, ...filter } = this; @@ -75,6 +152,41 @@ export default { throw new ConfigurationError("Must not provide both `callIds` and `workspaceId`"); } + const exposedFieldsContentObj = utils.parseObject(exposedFieldsContent); + const exposedFieldsInteractionObj = utils.parseObject(exposedFieldsInteraction); + + const contentSelector = { + "context": context || "None", + ...(contextTiming?.length > 0 && { + "contextTiming": contextTiming, + }), + "exposedFields": { + "parties": includeParties || false, + "content": { + "structure": exposedFieldsContentObj?.structure || false, + "topics": exposedFieldsContentObj?.topics || false, + "trackers": exposedFieldsContentObj?.trackers || false, + "trackerOccurrences": exposedFieldsContentObj?.trackerOccurrences || false, + "pointsOfInterest": exposedFieldsContentObj?.pointsOfInterest || false, + "brief": exposedFieldsContentObj?.brief || false, + "outline": exposedFieldsContentObj?.outline || false, + "highlights": exposedFieldsContentObj?.highlights || false, + "callOutcome": exposedFieldsContentObj?.callOutcome || false, + "keyPoints": exposedFieldsContentObj?.keyPoints || false, + }, + "interaction": { + "speakers": exposedFieldsInteractionObj?.speakers || false, + "video": exposedFieldsInteractionObj?.video || false, + "personInteractionStats": exposedFieldsInteractionObj?.personInteractionStats || false, + "questions": exposedFieldsInteractionObj?.questions || false, + }, + "collaboration": { + "publicComments": includePublicComments || false, + }, + "media": includeMedia || false, + }, + }; + try { const calls = await app.paginate({ resourceFn: getExtensiveData, @@ -82,6 +194,7 @@ export default { step: $, data: { filter, + contentSelector, }, }, resourceName: "calls", diff --git a/components/gong/actions/list-calls/list-calls.mjs b/components/gong/actions/list-calls/list-calls.mjs index 3fc6631be0b4e..544547add7ab4 100644 --- a/components/gong/actions/list-calls/list-calls.mjs +++ b/components/gong/actions/list-calls/list-calls.mjs @@ -5,7 +5,7 @@ export default { name: "List calls", description: "List calls. [See the documentation](https://us-66463.app.gong.io/settings/api/documentation#get-/v2/calls)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { app, fromDateTime: { diff --git a/components/gong/actions/retrieve-transcripts-of-calls/retrieve-transcripts-of-calls.mjs b/components/gong/actions/retrieve-transcripts-of-calls/retrieve-transcripts-of-calls.mjs index 5c37201adccb5..0f53c95475c1a 100644 --- a/components/gong/actions/retrieve-transcripts-of-calls/retrieve-transcripts-of-calls.mjs +++ b/components/gong/actions/retrieve-transcripts-of-calls/retrieve-transcripts-of-calls.mjs @@ -5,7 +5,7 @@ export default { name: "Retrieve Transcripts Of Calls", description: "Retrieve transcripts of calls. [See the documentation](https://us-66463.app.gong.io/settings/api/documentation#post-/v2/calls/transcript)", type: "action", - version: "0.0.3", + version: "0.0.4", props: { app, fromDateTime: { diff --git a/components/gong/common/utils.mjs b/components/gong/common/utils.mjs index bea869f0ecd99..cb58fcb169c55 100644 --- a/components/gong/common/utils.mjs +++ b/components/gong/common/utils.mjs @@ -1,7 +1,7 @@ import { ConfigurationError } from "@pipedream/platform"; function emptyStrToUndefined(value) { - const trimmed = typeof(value) === "string" && value.trim(); + const trimmed = typeof (value) === "string" && value.trim(); return trimmed === "" ? undefined : value; @@ -9,7 +9,7 @@ function emptyStrToUndefined(value) { function parse(value) { const valueToParse = emptyStrToUndefined(value); - if (typeof(valueToParse) === "object" || valueToParse === undefined) { + if (typeof (valueToParse) === "object" || valueToParse === undefined) { return valueToParse; } try { @@ -42,6 +42,31 @@ function parseArray(value) { } } +function parseObject(obj) { + if (!obj) return undefined; + + if (Array.isArray(obj)) { + return obj.map((item) => { + if (typeof item === "string") { + try { + return JSON.parse(item); + } catch (e) { + return item; + } + } + return item; + }); + } + if (typeof obj === "string") { + try { + return JSON.parse(obj); + } catch (e) { + return obj; + } + } + return obj; +}; + async function streamIterator(stream) { const resources = []; for await (const resource of stream) { @@ -52,6 +77,7 @@ async function streamIterator(stream) { export default { parseArray, + parseObject, parse, streamIterator, }; diff --git a/components/gong/package.json b/components/gong/package.json index f7a09cd82f3b3..1c039a6a039ef 100644 --- a/components/gong/package.json +++ b/components/gong/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/gong", - "version": "0.2.0", + "version": "0.3.0", "description": "Pipedream Gong Components", "main": "gong.app.mjs", "keywords": [ diff --git a/components/gong/sources/new-call/new-call.mjs b/components/gong/sources/new-call/new-call.mjs index 91b44d543eccb..e9bfadd5a6bc7 100644 --- a/components/gong/sources/new-call/new-call.mjs +++ b/components/gong/sources/new-call/new-call.mjs @@ -6,7 +6,7 @@ export default { name: "New Call", description: "Triggers when a new call is added. [See the documentation](https://us-66463.app.gong.io/settings/api/documentation#get-/v2/calls)", type: "source", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", methods: { ...common.methods, diff --git a/components/google_ads/README.md b/components/google_ads/README.md index bb809836fb400..6f178e61aa5a1 100644 --- a/components/google_ads/README.md +++ b/components/google_ads/README.md @@ -28,7 +28,7 @@ The component accepts a standard Google Ads API request object with the followin ```javascript const googleAdsReq = { method: "get|post|put|delete", // HTTP method - url: "/v18/...", // Google Ads API endpoint path + url: "/v21/...", // Google Ads API endpoint path headers: { Authorization: `Bearer ${this.googleAds.$auth.oauth_access_token}`, }, diff --git a/components/google_ads/actions/add-contact-to-list-by-email/add-contact-to-list-by-email.mjs b/components/google_ads/actions/add-contact-to-list-by-email/add-contact-to-list-by-email.mjs index 0f21076d0d2dd..c5a48569642bb 100644 --- a/components/google_ads/actions/add-contact-to-list-by-email/add-contact-to-list-by-email.mjs +++ b/components/google_ads/actions/add-contact-to-list-by-email/add-contact-to-list-by-email.mjs @@ -7,7 +7,7 @@ export default { key: "google_ads-add-contact-to-list-by-email", name: "Add Contact to Customer List by Email", description: "Adds a contact to a specific customer list in Google Ads. Lists typically update in 6 to 12 hours after operation. [See the documentation](https://developers.google.com/google-ads/api/docs/remarketing/audience-segments/customer-match/get-started)", - version: "0.1.3", + version: "0.1.4", type: "action", props: { ...common.props, diff --git a/components/google_ads/actions/common/props.mjs b/components/google_ads/actions/common/props.mjs index b8f744f4b31f2..4d01e78cbd4bf 100644 --- a/components/google_ads/actions/common/props.mjs +++ b/components/google_ads/actions/common/props.mjs @@ -1,5 +1,5 @@ const DEFAULT_DOCS = - "https://developers.google.com/google-ads/api/rest/reference/rest/v18/UserList"; + "https://developers.google.com/google-ads/api/reference/rpc/v21/UserList"; export const getAdditionalFields = (docsLink = DEFAULT_DOCS) => ({ type: "object", diff --git a/components/google_ads/actions/create-customer-list/common-constants.mjs b/components/google_ads/actions/create-customer-list/common-constants.mjs index 96a44d1f8d4e6..9343275ff767e 100644 --- a/components/google_ads/actions/create-customer-list/common-constants.mjs +++ b/components/google_ads/actions/create-customer-list/common-constants.mjs @@ -57,7 +57,7 @@ const USER_LIST_CRM_BASED_PROPS = { type: "string", label: "App ID", description: - "A string that uniquely identifies a mobile application from which the data was collected. [See the documentation](https://developers.google.com/google-ads/api/rest/reference/rest/v18/UserList#CrmBasedUserListInfo) for more details.", + "A string that uniquely identifies a mobile application from which the data was collected. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/CrmBasedUserListInfo) for more details.", optional: true, }, }; @@ -74,7 +74,7 @@ const USER_LIST_RULE_BASED_PROPS = { type: "object", label: "Flexible Rule Customer List", description: - "Flexible rule representation of visitors with one or multiple actions. [See the documentation](https://developers.google.com/google-ads/api/rest/reference/rest/v18/UserList#FlexibleRuleUserListInfo) on how to build this object. Values will be parsed as JSON where applicable.", + "Flexible rule representation of visitors with one or multiple actions. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/FlexibleRuleUserListInfo) on how to build this object. Values will be parsed as JSON where applicable.", optional: true, }, }; @@ -84,7 +84,7 @@ const USER_LIST_LOGICAL_PROPS = { type: "string[]", label: "Rules", description: - "Logical list rules that define this customer list. [See the documentation](https://developers.google.com/google-ads/api/rest/reference/rest/v18/UserList#UserListLogicalRuleInfo) on how to build each object. Values will be parsed as JSON where applicable.", + "Logical list rules that define this customer list. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/UserListLogicalRuleInfo) on how to build each object. Values will be parsed as JSON where applicable.", }, }; @@ -92,7 +92,7 @@ const USER_LIST_BASIC_PROPS = { conversionActions: { type: "string[]", label: "Conversion action(s)", - description: "One or more [conversion actions](https://developers.google.com/google-ads/api/rest/reference/rest/v18/ConversionAction) to build the list with.", + description: "One or more [conversion actions](https://developers.google.com/google-ads/api/reference/rpc/v21/ConversionAction) to build the list with.", optional: true, options: async() => { const { @@ -115,7 +115,7 @@ const USER_LIST_BASIC_PROPS = { remarketingActions: { type: "string[]", label: "Remarketing action(s)", - description: "One or more [remarketing actions](https://developers.google.com/google-ads/api/rest/reference/rest/v18/RemarketingAction).", + description: "One or more [remarketing actions](https://developers.google.com/google-ads/api/reference/rpc/v21/RemarketingAction).", optional: true, options: async() => { const { @@ -198,21 +198,21 @@ export const USER_LIST_TYPE_OPTIONS = [ label: "CRM-based - a list of provided customers", value: USER_LIST_TYPES.CRM_BASED, docsLink: - "https://developers.google.com/google-ads/api/rest/reference/rest/v18/UserList#CrmBasedUserListInfo", + "https://developers.google.com/google-ads/api/reference/rpc/v21/CrmBasedUserListInfo", props: USER_LIST_CRM_BASED_PROPS, }, { label: "Rule-Based - a customer list generated by a rule", value: USER_LIST_TYPES.RULE_BASED, docsLink: - "https://developers.google.com/google-ads/api/rest/reference/rest/v18/UserList#RuleBasedUserListInfo", + "https://developers.google.com/google-ads/api/reference/rpc/v21/RuleBasedUserListInfo", props: USER_LIST_RULE_BASED_PROPS, }, { label: "Logical - a custom combination of customer lists", value: USER_LIST_TYPES.LOGICAL, docsLink: - "https://developers.google.com/google-ads/api/rest/reference/rest/v18/UserList#LogicalUserListInfo", + "https://developers.google.com/google-ads/api/reference/rpc/v21/LogicalUserListInfo", props: USER_LIST_LOGICAL_PROPS, }, { @@ -220,7 +220,7 @@ export const USER_LIST_TYPE_OPTIONS = [ "Basic - a customer list targeting as a collection of conversions or remarketing actions", value: USER_LIST_TYPES.BASIC, docsLink: - "https://developers.google.com/google-ads/api/rest/reference/rest/v18/UserList#BasicUserListInfo", + "https://developers.google.com/google-ads/api/reference/rpc/v21/BasicUserListInfo", props: USER_LIST_BASIC_PROPS, }, { @@ -228,7 +228,7 @@ export const USER_LIST_TYPE_OPTIONS = [ "Lookalike - a list composed of customers similar to those of a configurable seed", value: USER_LIST_TYPES.LOOKALIKE, docsLink: - "https://developers.google.com/google-ads/api/rest/reference/rest/v18/UserList#LookalikeUserListInfo", + "https://developers.google.com/google-ads/api/reference/rpc/v21/LookalikeUserListInfo", props: USER_LIST_LOOKALIKE_PROPS, }, ]; diff --git a/components/google_ads/actions/create-customer-list/create-customer-list.mjs b/components/google_ads/actions/create-customer-list/create-customer-list.mjs index 729c86dd5c6c1..5ddf1647cacb3 100644 --- a/components/google_ads/actions/create-customer-list/create-customer-list.mjs +++ b/components/google_ads/actions/create-customer-list/create-customer-list.mjs @@ -14,8 +14,8 @@ export default { ...common, key: "google_ads-create-customer-list", name: "Create Customer List", - description: "Create a new customer list in Google Ads. [See the documentation](https://developers.google.com/google-ads/api/rest/reference/rest/v18/UserList)", - version: "0.0.4", + description: "Create a new customer list in Google Ads. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/UserList)", + version: "0.0.5", type: "action", props: { ...common.props, @@ -33,7 +33,7 @@ export default { listType: { type: "string", label: "List Type", - description: "The [type of customer list](https://developers.google.com/google-ads/api/rest/reference/rest/v18/UserList#CrmBasedUserListInfo) to create.", + description: "The [type of customer list](https://developers.google.com/google-ads/api/reference/rpc/v21/CrmBasedUserListInfo) to create.", options: USER_LIST_TYPE_OPTIONS.map(({ label, value, }) => ({ diff --git a/components/google_ads/actions/create-report/create-report.mjs b/components/google_ads/actions/create-report/create-report.mjs index 2044354d2bc9c..6b8f40310dd68 100644 --- a/components/google_ads/actions/create-report/create-report.mjs +++ b/components/google_ads/actions/create-report/create-report.mjs @@ -18,8 +18,8 @@ export default { ...common, key: "google_ads-create-report", name: "Create Report", - description: "Generates a report from your Google Ads data. [See the documentation](https://developers.google.com/google-ads/api/fields/v18/overview)", - version: "0.1.2", + description: "Generates a report from your Google Ads data. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)", + version: "0.1.3", type: "action", props: { ...common.props, @@ -43,7 +43,7 @@ export default { docsAlert: { type: "alert", alertType: "info", - content: `[See the documentation](https://developers.google.com/google-ads/api/fields/v18/${value}) for more information on available fields, segments and metrics.`, + content: `[See the documentation](https://developers.google.com/google-ads/api/fields/v21/${value}) for more information on available fields, segments and metrics.`, }, objectFilter: { type: "string[]", @@ -106,7 +106,7 @@ export default { segments: { type: "string[]", label: "Segments", - description: "Select any segments you want to include in your report. See the documentation [here](https://developers.google.com/google-ads/api/fields/v18/segments)", + description: "Select any segments you want to include in your report. See the documentation [here](https://developers.google.com/google-ads/api/reference/rpc/v21/Segments)", options: resource.segments, default: [ "segments.date", @@ -117,7 +117,7 @@ export default { metrics: { type: "string[]", label: "Metrics", - description: "Select any metrics you want to include in your report. See the documentation [here](https://developers.google.com/google-ads/api/fields/v18/metrics)", + description: "Select any metrics you want to include in your report. See the documentation [here](https://developers.google.com/google-ads/api/reference/rpc/v21/Metrics)", options: resource.metrics, optional: true, reloadProps: true, diff --git a/components/google_ads/actions/send-offline-conversion/send-offline-conversion.mjs b/components/google_ads/actions/send-offline-conversion/send-offline-conversion.mjs index 1895949ff0892..e125dccee3ac3 100644 --- a/components/google_ads/actions/send-offline-conversion/send-offline-conversion.mjs +++ b/components/google_ads/actions/send-offline-conversion/send-offline-conversion.mjs @@ -7,8 +7,8 @@ export default { ...common, key: "google_ads-send-offline-conversion", name: "Send Offline Conversion", - description: "Send an event from to Google Ads to track offline conversions. [See the documentation](https://developers.google.com/google-ads/api/rest/reference/rest/v18/ConversionAction)", - version: "0.0.4", + description: "Send an event to Google Ads to track offline conversions. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/ConversionAction)", + version: "0.0.5", type: "action", props: { ...common.props, @@ -20,10 +20,10 @@ export default { type: { type: "string", label: "Type", - description: "[The type](https://developers.google.com/google-ads/api/rest/reference/rest/v18/ConversionAction#ConversionActionType) of the conversion action.", + description: "[The type](https://developers.google.com/google-ads/api/reference/rpc/v21/ConversionActionTypeEnum.ConversionActionType) of the conversion action.", options: CONVERSION_TYPE_OPTIONS, }, - additionalFields: getAdditionalFields("https://developers.google.com/google-ads/api/rest/reference/rest/v18/ConversionAction"), + additionalFields: getAdditionalFields("https://developers.google.com/google-ads/api/reference/rpc/v21/ConversionAction"), }, async run({ $ }) { const { diff --git a/components/google_ads/google_ads.app.mjs b/components/google_ads/google_ads.app.mjs index c8da4631e1a13..3b8edefdab9e4 100644 --- a/components/google_ads/google_ads.app.mjs +++ b/components/google_ads/google_ads.app.mjs @@ -34,7 +34,7 @@ export default { accountId: { type: "string", label: "Use Google Ads As", - description: "Select an account from the list of [customers directly accessible by the authenticated user](https://developers.google.com/google-ads/api/rest/reference/rest/v18/customers/listAccessibleCustomers). This is usually a **Manager Account**, used as `login-customer-id`", + description: "Select an account from the list of [customers directly accessible by the authenticated user](https://developers.google.com/google-ads/api/reference/rpc/v21/CustomerService/ListAccessibleCustomers?transport=rest). This is usually a **Manager Account**, used as `login-customer-id`", async options() { const response = await this.listAccessibleCustomers(); return response?.map(((resourceName) => ({ @@ -46,7 +46,7 @@ export default { customerClientId: { type: "string", label: "Managed Account", - description: "Select a [customer client](https://developers.google.com/google-ads/api/reference/rpc/v18/CustomerClient) from the list of [customers linked to the selected account](https://developers.google.com/google-ads/api/docs/account-management/get-account-hierarchy).", + description: "Select a [customer client](https://developers.google.com/google-ads/api/reference/rpc/v21/CustomerClient) from the list of [customers linked to the selected account](https://developers.google.com/google-ads/api/docs/account-management/get-account-hierarchy).", useQuery: true, optional: true, async options({ @@ -71,7 +71,7 @@ export default { leadFormId: { type: "string", label: "Lead Form ID", - description: "Select a [Lead Form](https://developers.google.com/google-ads/api/rest/reference/rest/v18/Asset#LeadFormAsset) to watch for new entries.", + description: "Select a [Lead Form](https://developers.google.com/google-ads/api/reference/rpc/v21/LeadFormAsset) to watch for new entries.", async options({ accountId, customerClientId, }) { @@ -121,7 +121,7 @@ export default { }) { console.log("Executing query: ", query); const response = await this._makeRequest({ - path: "/v18/customers/{customerClientId}/googleAds:search", + path: "/v21/customers/{customerClientId}/googleAds:search", method: "post", data: { query, @@ -132,7 +132,7 @@ export default { }, async listAccessibleCustomers() { const response = await this._makeRequest({ - path: "/v18/customers:listAccessibleCustomers", + path: "/v21/customers:listAccessibleCustomers", }); return response.resourceNames; }, @@ -151,7 +151,7 @@ export default { }, async createUserList(args) { const response = await this._makeRequest({ - path: "v18/customers/{customerClientId}/userLists:mutate", + path: "/v21/customers/{customerClientId}/userLists:mutate", method: "post", ...args, }); @@ -216,7 +216,7 @@ export default { }, async createConversionAction(args) { const response = await this._makeRequest({ - path: "v18/customers/{customerClientId}/conversionActions:mutate", + path: "/v21/customers/{customerClientId}/conversionActions:mutate", method: "post", ...args, }); @@ -227,14 +227,14 @@ export default { }) { return this._makeRequest({ method: "POST", - path: `/v18/${path}:addOperations`, + path: `/v21/${path}:addOperations`, ...opts, }); }, async createOfflineUserDataJob(opts = {}) { return this._makeRequest({ method: "POST", - path: "/v18/customers/{customerClientId}/offlineUserDataJobs:create", + path: "/v21/customers/{customerClientId}/offlineUserDataJobs:create", ...opts, }); }, @@ -243,7 +243,7 @@ export default { }) { return this._makeRequest({ method: "POST", - path: `/v18/${path}:run`, + path: `/v21/${path}:run`, ...args, }); }, diff --git a/components/google_ads/package.json b/components/google_ads/package.json index 7f5d6a4d61edd..5d4d4c1fd0344 100644 --- a/components/google_ads/package.json +++ b/components/google_ads/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/google_ads", - "version": "0.3.2", + "version": "0.3.3", "description": "Pipedream Google Ads Components", "main": "google_ads.app.mjs", "keywords": [ diff --git a/components/google_ads/sources/new-campaign-created/new-campaign-created.mjs b/components/google_ads/sources/new-campaign-created/new-campaign-created.mjs index 18078f3f1af76..59cf8f492133d 100644 --- a/components/google_ads/sources/new-campaign-created/new-campaign-created.mjs +++ b/components/google_ads/sources/new-campaign-created/new-campaign-created.mjs @@ -6,8 +6,8 @@ export default { ...common, key: "google_ads-new-campaign-created", name: "New Campaign Created", - description: "Emit new event when a new campaign is created. [See the documentation](https://developers.google.com/google-ads/api/fields/v18/campaign)", - version: "0.0.4", + description: "Emit new event when a new campaign is created. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)", + version: "0.0.5", type: "source", dedupe: "unique", sampleEmit, @@ -19,7 +19,7 @@ export default { fields: { type: "string[]", label: "Extra Fields", - description: "Additional [campaign fields](https://developers.google.com/google-ads/api/fields/v18/campaign) to emit in the event", + description: "Additional [campaign fields](https://developers.google.com/google-ads/api/fields/v21/campaign) to emit in the event", options: campaign.fields, optional: true, default: [ diff --git a/components/google_ads/sources/new-lead-form-entry/new-lead-form-entry.mjs b/components/google_ads/sources/new-lead-form-entry/new-lead-form-entry.mjs index 87d6a4bdc69c9..b46e79b79c4b6 100644 --- a/components/google_ads/sources/new-lead-form-entry/new-lead-form-entry.mjs +++ b/components/google_ads/sources/new-lead-form-entry/new-lead-form-entry.mjs @@ -7,8 +7,8 @@ export default { ...common, key: "google_ads-new-lead-form-entry", name: "New Lead Form Entry", - description: "Emit new event for new leads on a Lead Form. [See the documentation](https://developers.google.com/google-ads/api/fields/v18/lead_form_submission_data)", - version: "0.0.4", + description: "Emit new event for new leads on a Lead Form. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)", + version: "0.0.5", type: "source", dedupe: "unique", sampleEmit, @@ -29,7 +29,7 @@ export default { docsAlert: { type: "alert", alertType: "info", - content: "If needed, see Google's documentation on [submission fields](https://developers.google.com/google-ads/api/reference/rpc/v18/LeadFormSubmissionField) and [custom submission fields](https://developers.google.com/google-ads/api/reference/rpc/v18/CustomLeadFormSubmissionField).", + content: "If needed, see Google's documentation on [submission fields](https://developers.google.com/google-ads/api/reference/rpc/v21/LeadFormSubmissionField) and [custom submission fields](https://developers.google.com/google-ads/api/reference/rpc/v21/CustomLeadFormSubmissionField).", }, }, methods: { diff --git a/components/google_calendar/actions/create-event/create-event.mjs b/components/google_calendar/actions/create-event/create-event.mjs index 5339d76c08e3f..2496aaa80bb53 100644 --- a/components/google_calendar/actions/create-event/create-event.mjs +++ b/components/google_calendar/actions/create-event/create-event.mjs @@ -7,7 +7,7 @@ export default { key: "google_calendar-create-event", name: "Create Event", description: "Create an event in a Google Calendar. [See the documentation](https://developers.google.com/calendar/api/v3/reference/events/insert)", - version: "0.2.5", + version: "0.2.6", type: "action", props: { googleCalendar, @@ -144,14 +144,24 @@ export default { summary: this.summary, location: this.location, description: this.description, - start: this.getDateParam({ - date: this.eventStartDate, + start: { + date: this.eventStartDate?.length <= 10 + ? this.eventStartDate + : undefined, + dateTime: this.eventStartDate?.length > 10 + ? this.eventStartDate + : undefined, timeZone, - }), - end: this.getDateParam({ - date: this.eventEndDate, + }, + end: { + date: this.eventEndDate?.length <= 10 + ? this.eventEndDate + : undefined, + dateTime: this.eventEndDate?.length > 10 + ? this.eventEndDate + : undefined, timeZone, - }), + }, recurrence, attendees, colorId: this.colorId, diff --git a/components/google_calendar/actions/quick-add-event/quick-add-event.mjs b/components/google_calendar/actions/quick-add-event/quick-add-event.mjs index 61ca10131f42f..87167642d329e 100644 --- a/components/google_calendar/actions/quick-add-event/quick-add-event.mjs +++ b/components/google_calendar/actions/quick-add-event/quick-add-event.mjs @@ -1,11 +1,12 @@ import googleCalendar from "../../google_calendar.app.mjs"; import createEventCommon from "../common/create-event-common.mjs"; +import { ConfigurationError } from "@pipedream/platform"; export default { key: "google_calendar-quick-add-event", name: "Add Quick Event", description: "Create a quick event to the Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#quickAdd)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { googleCalendar, @@ -28,6 +29,10 @@ export default { }, }, async run({ $ }) { + if (!this.calendarId) { + throw new ConfigurationError("Calendar ID prop is missing or empty. Please provide a valid string representing the calendar's identifier. For example, 'primary' or an email address such as 'user@example.com'"); + } + const response = await this.googleCalendar.quickAddEvent({ calendarId: this.calendarId, text: this.text, diff --git a/components/google_calendar/package.json b/components/google_calendar/package.json index 204ac83591865..97978b29edb23 100644 --- a/components/google_calendar/package.json +++ b/components/google_calendar/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/google_calendar", - "version": "0.5.8", + "version": "0.5.11", "description": "Pipedream Google_calendar Components", "main": "google_calendar.app.mjs", "keywords": [ diff --git a/components/google_calendar/sources/new-or-updated-event-instant/new-or-updated-event-instant.mjs b/components/google_calendar/sources/new-or-updated-event-instant/new-or-updated-event-instant.mjs index 4b51079c11376..8896149a3e3b2 100644 --- a/components/google_calendar/sources/new-or-updated-event-instant/new-or-updated-event-instant.mjs +++ b/components/google_calendar/sources/new-or-updated-event-instant/new-or-updated-event-instant.mjs @@ -8,7 +8,7 @@ export default { type: "source", name: "New Created or Updated Event (Instant)", description: "Emit new event when a Google Calendar events is created or updated (does not emit cancelled events)", - version: "0.1.15", + version: "0.1.16", dedupe: "unique", props: { googleCalendar, @@ -48,6 +48,7 @@ export default { const params = { maxResults: 25, orderBy: "updated", + timeMin: new Date(new Date().setMonth(new Date().getMonth() - 1)).toISOString(), // 1 month ago }; for (const calendarId of this.calendarIds) { params.calendarId = calendarId; diff --git a/components/google_chat/package.json b/components/google_chat/package.json index 6fd6411578f8b..d13e87e1bce5b 100644 --- a/components/google_chat/package.json +++ b/components/google_chat/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/google_chat", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Google Chat Components", "main": "google_chat.app.mjs", "keywords": [ diff --git a/components/google_chat/sources/new-command-used/new-command-used.mjs b/components/google_chat/sources/new-command-used/new-command-used.mjs index 0a724ab3939c9..3fb68b65e875e 100644 --- a/components/google_chat/sources/new-command-used/new-command-used.mjs +++ b/components/google_chat/sources/new-command-used/new-command-used.mjs @@ -5,7 +5,7 @@ export default { key: "google_chat-new-command-used", name: "New Command Used", description: "Emit new event when a new command is used in a space. [See the documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/list)", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", props: { @@ -19,6 +19,9 @@ export default { methods: { ...common.methods, isRelevant(message) { + if (!message.text) { + return false; + } const command = this.command.startsWith("/") ? this.command : `/${this.command}`; diff --git a/components/google_chat/sources/new-mention-received/new-mention-received.mjs b/components/google_chat/sources/new-mention-received/new-mention-received.mjs index a6a85d666938a..27868ff582173 100644 --- a/components/google_chat/sources/new-mention-received/new-mention-received.mjs +++ b/components/google_chat/sources/new-mention-received/new-mention-received.mjs @@ -5,7 +5,7 @@ export default { key: "google_chat-new-mention-received", name: "New Mention Received", description: "Emit new event when a new mention is received in a space. [See the documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/list)", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", props: { @@ -23,6 +23,9 @@ export default { methods: { ...common.methods, isRelevant(message) { + if (!message.formattedText) { + return false; + } return message.formattedText.includes(``); }, getSummary(message) { diff --git a/components/google_chat/sources/new-message-in-space/new-message-in-space.mjs b/components/google_chat/sources/new-message-in-space/new-message-in-space.mjs index 0683d2a3c9e12..4580452dfa0bb 100644 --- a/components/google_chat/sources/new-message-in-space/new-message-in-space.mjs +++ b/components/google_chat/sources/new-message-in-space/new-message-in-space.mjs @@ -5,13 +5,14 @@ export default { key: "google_chat-new-message-in-space", name: "New Message in Space", description: "Emit new event when a new message is posted in a space. [See the documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/list)", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", methods: { ...common.methods, getSummary(message) { - return `New Message: ${message.text.slice(0, 50)}`; + const preview = (message.text || "").slice(0, 50); + return `New Message: ${preview}`; }, }, }; diff --git a/components/google_docs/actions/append-image/append-image.mjs b/components/google_docs/actions/append-image/append-image.mjs index a18685f7e5a0e..772e357a7c527 100644 --- a/components/google_docs/actions/append-image/append-image.mjs +++ b/components/google_docs/actions/append-image/append-image.mjs @@ -4,7 +4,7 @@ export default { key: "google_docs-append-image", name: "Append Image to Document", description: "Appends an image to the end of a document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/request#InsertInlineImageRequest)", - version: "0.0.7", + version: "0.0.8", type: "action", props: { googleDocs, diff --git a/components/google_docs/actions/append-text/append-text.mjs b/components/google_docs/actions/append-text/append-text.mjs index 522abc58eb982..cab8586ff1c9c 100644 --- a/components/google_docs/actions/append-text/append-text.mjs +++ b/components/google_docs/actions/append-text/append-text.mjs @@ -4,7 +4,7 @@ export default { key: "google_docs-append-text", name: "Append Text", description: "Append text to an existing document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/request#InsertTextRequest)", - version: "0.1.6", + version: "0.1.7", type: "action", props: { googleDocs, diff --git a/components/google_docs/actions/create-document-from-template/create-document-from-template.mjs b/components/google_docs/actions/create-document-from-template/create-document-from-template.mjs index 2d71dcc2e2031..86aac9895c9c4 100644 --- a/components/google_docs/actions/create-document-from-template/create-document-from-template.mjs +++ b/components/google_docs/actions/create-document-from-template/create-document-from-template.mjs @@ -13,7 +13,7 @@ export default { ...others, key: "google_docs-create-document-from-template", name: "Create New Document From Template", - version: "0.0.2", + version: "0.0.3", description, type, props: { diff --git a/components/google_docs/actions/create-document/create-document.mjs b/components/google_docs/actions/create-document/create-document.mjs index 8ee8cd7ebd9d8..9292373fe174f 100644 --- a/components/google_docs/actions/create-document/create-document.mjs +++ b/components/google_docs/actions/create-document/create-document.mjs @@ -4,7 +4,7 @@ export default { key: "google_docs-create-document", name: "Create a New Document", description: "Create a new document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/create)", - version: "0.1.6", + version: "0.1.7", type: "action", props: { googleDocs, diff --git a/components/google_docs/actions/find-document/find-document.mjs b/components/google_docs/actions/find-document/find-document.mjs index ac12ea4ef8499..269f35e495af6 100644 --- a/components/google_docs/actions/find-document/find-document.mjs +++ b/components/google_docs/actions/find-document/find-document.mjs @@ -14,7 +14,7 @@ export default { ...others, key: "google_docs-find-document", name: "Find Document", - version: "0.0.2", + version: "0.0.3", description, type, props: { diff --git a/components/google_docs/actions/get-document/get-document.mjs b/components/google_docs/actions/get-document/get-document.mjs index fec2e70086ff7..8f291fd6b1da3 100644 --- a/components/google_docs/actions/get-document/get-document.mjs +++ b/components/google_docs/actions/get-document/get-document.mjs @@ -5,7 +5,7 @@ export default { key: "google_docs-get-document", name: "Get Document", description: "Get the contents of the latest version of a document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/get)", - version: "0.1.6", + version: "0.1.7", type: "action", props: { googleDocs, diff --git a/components/google_docs/actions/get-tab-content/get-tab-content.mjs b/components/google_docs/actions/get-tab-content/get-tab-content.mjs new file mode 100644 index 0000000000000..ac26e4fa0bae3 --- /dev/null +++ b/components/google_docs/actions/get-tab-content/get-tab-content.mjs @@ -0,0 +1,37 @@ +import googleDocs from "../../google_docs.app.mjs"; + +export default { + key: "google_docs-get-tab-content", + name: "Get Tab Content", + description: "Get the content of a tab in a document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/get)", + version: "0.0.1", + type: "action", + props: { + googleDocs, + docId: { + propDefinition: [ + googleDocs, + "docId", + ], + }, + tabIds: { + type: "string[]", + label: "Tab IDs", + description: "Return content for the specified tabs", + async options() { + const { tabs } = await this.googleDocs.getDocument(this.docId, true); + if (!tabs?.length) return []; + return tabs.map((tab) => ({ + label: tab.tabProperties.title, + value: tab.tabProperties.tabId, + })); + }, + }, + }, + async run({ $ }) { + const response = await this.googleDocs.getDocument(this.docId, true); + const tabs = response.tabs.filter((tab) => this.tabIds.includes(tab.tabProperties.tabId)); + $.export("$summary", `Successfully retrieved tab content for document with ID: ${this.docId}`); + return tabs; + }, +}; diff --git a/components/google_docs/actions/insert-page-break/insert-page-break.mjs b/components/google_docs/actions/insert-page-break/insert-page-break.mjs new file mode 100644 index 0000000000000..cf0e03bc8cfdf --- /dev/null +++ b/components/google_docs/actions/insert-page-break/insert-page-break.mjs @@ -0,0 +1,45 @@ +import googleDocs from "../../google_docs.app.mjs"; + +export default { + key: "google_docs-insert-page-break", + name: "Insert Page Break", + description: "Insert a page break into a document. [See the documentation](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#insertpagebreakrequest)", + version: "0.0.1", + type: "action", + props: { + googleDocs, + docId: { + propDefinition: [ + googleDocs, + "docId", + ], + }, + index: { + type: "integer", + label: "Index", + description: "The index to insert the page break at", + default: 1, + optional: true, + }, + tabId: { + propDefinition: [ + googleDocs, + "tabId", + (c) => ({ + documentId: c.docId, + }), + ], + }, + }, + async run({ $ }) { + const pageBreak = { + location: { + index: this.index, + tabId: this.tabId, + }, + }; + await this.googleDocs.insertPageBreak(this.docId, pageBreak); + $.export("$summary", "Successfully inserted page break"); + return this.googleDocs.getDocument(this.docId, !!this.tabId); + }, +}; diff --git a/components/google_docs/actions/insert-table/insert-table.mjs b/components/google_docs/actions/insert-table/insert-table.mjs new file mode 100644 index 0000000000000..fb555049706e7 --- /dev/null +++ b/components/google_docs/actions/insert-table/insert-table.mjs @@ -0,0 +1,57 @@ +import googleDocs from "../../google_docs.app.mjs"; + +export default { + key: "google_docs-insert-table", + name: "Insert Table", + description: "Insert a table into a document. [See the documentation](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#inserttablerequest)", + version: "0.0.1", + type: "action", + props: { + googleDocs, + docId: { + propDefinition: [ + googleDocs, + "docId", + ], + }, + rows: { + type: "integer", + label: "Rows", + description: "The number of rows in the table", + }, + columns: { + type: "integer", + label: "Columns", + description: "The number of columns in the table", + }, + index: { + type: "integer", + label: "Index", + description: "The index to insert the table at", + default: 1, + optional: true, + }, + tabId: { + propDefinition: [ + googleDocs, + "tabId", + (c) => ({ + documentId: c.docId, + }), + ], + }, + }, + async run({ $ }) { + const table = { + rows: this.rows, + columns: this.columns, + location: { + index: this.index, + tabId: this.tabId, + }, + }; + await this.googleDocs.insertTable(this.docId, table); + $.export("$summary", "Successfully inserted table"); + return this.googleDocs.getDocument(this.docId, !!this.tabId); + }, +}; diff --git a/components/google_docs/actions/insert-text/insert-text.mjs b/components/google_docs/actions/insert-text/insert-text.mjs new file mode 100644 index 0000000000000..5919e3ee82982 --- /dev/null +++ b/components/google_docs/actions/insert-text/insert-text.mjs @@ -0,0 +1,52 @@ +import googleDocs from "../../google_docs.app.mjs"; + +export default { + key: "google_docs-insert-text", + name: "Insert Text", + description: "Insert text into a document. [See the documentation](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#inserttextrequest)", + version: "0.0.1", + type: "action", + props: { + googleDocs, + docId: { + propDefinition: [ + googleDocs, + "docId", + ], + }, + text: { + propDefinition: [ + googleDocs, + "text", + ], + }, + index: { + type: "integer", + label: "Index", + description: "The index to insert the text at", + default: 1, + optional: true, + }, + tabId: { + propDefinition: [ + googleDocs, + "tabId", + (c) => ({ + documentId: c.docId, + }), + ], + }, + }, + async run({ $ }) { + const text = { + text: this.text, + location: { + index: this.index, + tabId: this.tabId, + }, + }; + await this.googleDocs._batchUpdate(this.docId, "insertText", text); + $.export("$summary", "Successfully inserted text"); + return this.googleDocs.getDocument(this.docId, !!this.tabId); + }, +}; diff --git a/components/google_docs/actions/replace-image/replace-image.mjs b/components/google_docs/actions/replace-image/replace-image.mjs index a0b4bb96d5afa..795f6a88fdb13 100644 --- a/components/google_docs/actions/replace-image/replace-image.mjs +++ b/components/google_docs/actions/replace-image/replace-image.mjs @@ -4,7 +4,7 @@ export default { key: "google_docs-replace-image", name: "Replace Image", description: "Replace image in a existing document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/request#ReplaceImageRequest)", - version: "0.0.7", + version: "0.0.8", type: "action", props: { googleDocs, diff --git a/components/google_docs/actions/replace-text/replace-text.mjs b/components/google_docs/actions/replace-text/replace-text.mjs index 3b5f1a996ffaf..7e33c790e8767 100644 --- a/components/google_docs/actions/replace-text/replace-text.mjs +++ b/components/google_docs/actions/replace-text/replace-text.mjs @@ -4,7 +4,7 @@ export default { key: "google_docs-replace-text", name: "Replace Text", description: "Replace all instances of matched text in an existing document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/request#ReplaceAllTextRequest)", - version: "0.0.7", + version: "0.0.8", type: "action", props: { googleDocs, @@ -35,6 +35,19 @@ export default { "matchCase", ], }, + tabIds: { + propDefinition: [ + googleDocs, + "tabId", + (c) => ({ + documentId: c.docId, + }), + ], + type: "string[]", + label: "Tab IDs", + description: "The tab IDs to replace the text in", + optional: true, + }, }, async run({ $ }) { const text = { @@ -43,6 +56,11 @@ export default { text: this.replaced, matchCase: this.matchCase, }, + tabsCriteria: this.tabIds + ? { + tabIds: this.tabIds, + } + : undefined, }; await this.googleDocs.replaceText(this.docId, text); const doc = this.googleDocs.getDocument(this.docId); diff --git a/components/google_docs/google_docs.app.mjs b/components/google_docs/google_docs.app.mjs index 6f91b9c7517cd..011d4e3338160 100644 --- a/components/google_docs/google_docs.app.mjs +++ b/components/google_docs/google_docs.app.mjs @@ -34,6 +34,19 @@ export default { .filter((image) => image.label); }, }, + tabId: { + type: "string", + label: "Tab ID", + description: "The Tab ID", + optional: true, + async options({ documentId }) { + const { tabs } = await this.getDocument(documentId, true); + return Object.values(tabs).map(({ tabProperties }) => ({ + label: tabProperties.title, + value: tabProperties.tabId, + })); + }, + }, imageUri: { type: "string", label: "Image URL", @@ -134,6 +147,18 @@ export default { async replaceImage(documentId, image) { return this._batchUpdate(documentId, "replaceImage", image); }, + async insertTable(documentId, table) { + return this._batchUpdate(documentId, "insertTable", table); + }, + async insertPageBreak(documentId, request) { + return this._batchUpdate(documentId, "insertPageBreak", request); + }, + async createDocument(request) { + const { data } = await this.docs().documents.create({ + requestBody: request, + }); + return data; + }, async listDocsOptions(driveId, query, pageToken = null) { let q = "mimeType='application/vnd.google-apps.document'"; if (query) { diff --git a/components/google_docs/package.json b/components/google_docs/package.json index 9f711c5bf45ad..9d13287b73cbd 100644 --- a/components/google_docs/package.json +++ b/components/google_docs/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/google_docs", - "version": "0.4.4", + "version": "0.5.0", "description": "Pipedream Google_docs Components", "main": "google_docs.app.mjs", "keywords": [ diff --git a/components/google_docs/sources/new-document-created/new-document-created.mjs b/components/google_docs/sources/new-document-created/new-document-created.mjs index 0d12df4ef79fd..9789faa28a69e 100644 --- a/components/google_docs/sources/new-document-created/new-document-created.mjs +++ b/components/google_docs/sources/new-document-created/new-document-created.mjs @@ -5,7 +5,7 @@ export default { key: "google_docs-new-document-created", name: "New Document Created (Instant)", description: "Emit new event when a new document is created in Google Docs. [See the documentation](https://developers.google.com/drive/api/reference/rest/v3/changes/watch)", - version: "0.0.4", + version: "0.0.5", type: "source", dedupe: "unique", methods: { diff --git a/components/google_docs/sources/new-or-updated-document/new-or-updated-document.mjs b/components/google_docs/sources/new-or-updated-document/new-or-updated-document.mjs index d0d2967a5d0b9..b41cd1785f38e 100644 --- a/components/google_docs/sources/new-or-updated-document/new-or-updated-document.mjs +++ b/components/google_docs/sources/new-or-updated-document/new-or-updated-document.mjs @@ -9,7 +9,7 @@ export default { key: "google_docs-new-or-updated-document", name: "New or Updated Document (Instant)", description: "Emit new event when a document is created or updated in Google Docs. [See the documentation](https://developers.google.com/drive/api/reference/rest/v3/changes/watch)", - version: "0.0.4", + version: "0.0.5", type: "source", dedupe: "unique", methods: { diff --git a/components/google_drive/actions/add-file-sharing-preference/add-file-sharing-preference.mjs b/components/google_drive/actions/add-file-sharing-preference/add-file-sharing-preference.mjs index d39fd651ad585..21d45b3bee080 100644 --- a/components/google_drive/actions/add-file-sharing-preference/add-file-sharing-preference.mjs +++ b/components/google_drive/actions/add-file-sharing-preference/add-file-sharing-preference.mjs @@ -20,7 +20,7 @@ export default { name: "Share File or Folder", description: "Add a [sharing permission](https://support.google.com/drive/answer/7166529) to the sharing preferences of a file or folder and provide a sharing URL. [See the documentation](https://developers.google.com/drive/api/v3/reference/permissions/create)", - version: "0.2.2", + version: "0.2.4", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/copy-file/copy-file.mjs b/components/google_drive/actions/copy-file/copy-file.mjs index c546e1bec0060..4770ec9d02e0b 100644 --- a/components/google_drive/actions/copy-file/copy-file.mjs +++ b/components/google_drive/actions/copy-file/copy-file.mjs @@ -4,7 +4,7 @@ export default { key: "google_drive-copy-file", name: "Copy File", description: "Create a copy of the specified file. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/copy) for more information", - version: "0.1.9", + version: "0.1.11", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/create-file-from-template/create-file-from-template.mjs b/components/google_drive/actions/create-file-from-template/create-file-from-template.mjs index 99e42095cd5a2..00cc43cafc351 100644 --- a/components/google_drive/actions/create-file-from-template/create-file-from-template.mjs +++ b/components/google_drive/actions/create-file-from-template/create-file-from-template.mjs @@ -8,7 +8,7 @@ export default { key: "google_drive-create-file-from-template", name: "Create New File From Template", description: "Create a new Google Docs file from a template. Optionally include placeholders in the template document that will get replaced from this action. [See documentation](https://www.npmjs.com/package/google-docs-mustaches)", - version: "0.1.9", + version: "0.1.11", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/create-file-from-text/create-file-from-text.mjs b/components/google_drive/actions/create-file-from-text/create-file-from-text.mjs index 6b47d3a195e3b..0c81c86615e8a 100644 --- a/components/google_drive/actions/create-file-from-text/create-file-from-text.mjs +++ b/components/google_drive/actions/create-file-from-text/create-file-from-text.mjs @@ -5,7 +5,7 @@ export default { key: "google_drive-create-file-from-text", name: "Create New File From Text", description: "Create a new file from plain text. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/create) for more information", - version: "0.2.2", + version: "0.2.4", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/create-folder/create-folder.mjs b/components/google_drive/actions/create-folder/create-folder.mjs index b1cf32ba6fd9b..0d3819ca3b610 100644 --- a/components/google_drive/actions/create-folder/create-folder.mjs +++ b/components/google_drive/actions/create-folder/create-folder.mjs @@ -1,19 +1,19 @@ -import googleDrive from "../../google_drive.app.mjs"; import { getListFilesOpts, toSingleLineString, } from "../../common/utils.mjs"; +import googleDrive from "../../google_drive.app.mjs"; import { - MY_DRIVE_VALUE, GOOGLE_DRIVE_FOLDER_MIME_TYPE, + MY_DRIVE_VALUE, } from "../../common/constants.mjs"; export default { key: "google_drive-create-folder", name: "Create Folder", description: "Create a new empty folder. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/create) for more information", - version: "0.1.10", + version: "0.1.12", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/create-shared-drive/create-shared-drive.mjs b/components/google_drive/actions/create-shared-drive/create-shared-drive.mjs index 6256980964c63..9a7651e09fe18 100644 --- a/components/google_drive/actions/create-shared-drive/create-shared-drive.mjs +++ b/components/google_drive/actions/create-shared-drive/create-shared-drive.mjs @@ -4,7 +4,7 @@ export default { key: "google_drive-create-shared-drive", name: "Create Shared Drive", description: "Create a new shared drive. [See the documentation](https://developers.google.com/drive/api/v3/reference/drives/create) for more information", - version: "0.1.10", + version: "0.1.12", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/delete-file/delete-file.mjs b/components/google_drive/actions/delete-file/delete-file.mjs index 5a75be5629c10..d3a7a7a1136d8 100644 --- a/components/google_drive/actions/delete-file/delete-file.mjs +++ b/components/google_drive/actions/delete-file/delete-file.mjs @@ -5,7 +5,7 @@ export default { name: "Delete File", description: "Permanently delete a file or folder without moving it to the trash. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/delete) for more information", - version: "0.1.10", + version: "0.1.12", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/delete-shared-drive/delete-shared-drive.mjs b/components/google_drive/actions/delete-shared-drive/delete-shared-drive.mjs index 61e1395c2cdb0..d77b6264ab2f6 100644 --- a/components/google_drive/actions/delete-shared-drive/delete-shared-drive.mjs +++ b/components/google_drive/actions/delete-shared-drive/delete-shared-drive.mjs @@ -4,7 +4,7 @@ export default { key: "google_drive-delete-shared-drive", name: "Delete Shared Drive", description: "Delete a shared drive without any content. [See the documentation](https://developers.google.com/drive/api/v3/reference/drives/delete) for more information", - version: "0.1.9", + version: "0.1.11", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/download-file/download-file.mjs b/components/google_drive/actions/download-file/download-file.mjs index f95c2efb3fb50..c1cf74c1ebd60 100644 --- a/components/google_drive/actions/download-file/download-file.mjs +++ b/components/google_drive/actions/download-file/download-file.mjs @@ -1,10 +1,10 @@ -import googleDrive from "../../google_drive.app.mjs"; import fs from "fs"; import stream from "stream"; import { promisify } from "util"; import { GOOGLE_DRIVE_MIME_TYPE_PREFIX } from "../../common/constants.mjs"; -import googleWorkspaceExportFormats from "../common/google-workspace-export-formats.mjs"; import { toSingleLineString } from "../../common/utils.mjs"; +import googleDrive from "../../google_drive.app.mjs"; +import googleWorkspaceExportFormats from "../common/google-workspace-export-formats.mjs"; /** * Uses Google Drive API to download files to a `filePath` in the /tmp @@ -18,7 +18,7 @@ export default { key: "google_drive-download-file", name: "Download File", description: "Download a file. [See the documentation](https://developers.google.com/drive/api/v3/manage-downloads) for more information", - version: "0.1.12", + version: "0.1.14", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/find-file/find-file.mjs b/components/google_drive/actions/find-file/find-file.mjs index caaf24942da15..c5c125eb24bf8 100644 --- a/components/google_drive/actions/find-file/find-file.mjs +++ b/components/google_drive/actions/find-file/find-file.mjs @@ -1,12 +1,12 @@ -import googleDrive from "../../google_drive.app.mjs"; -import { getListFilesOpts } from "../../common/utils.mjs"; import commonSearchQuery from "../../common/commonSearchQuery.mjs"; +import { getListFilesOpts } from "../../common/utils.mjs"; +import googleDrive from "../../google_drive.app.mjs"; export default { key: "google_drive-find-file", name: "Find File", description: "Search for a specific file by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information", - version: "0.1.9", + version: "0.1.11", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/find-folder/find-folder.mjs b/components/google_drive/actions/find-folder/find-folder.mjs index da71be0b6cb9a..dfa5fb15c1f91 100644 --- a/components/google_drive/actions/find-folder/find-folder.mjs +++ b/components/google_drive/actions/find-folder/find-folder.mjs @@ -1,5 +1,5 @@ -import googleDrive from "../../google_drive.app.mjs"; import { getListFilesOpts } from "../../common/utils.mjs"; +import googleDrive from "../../google_drive.app.mjs"; import { GOOGLE_DRIVE_FOLDER_MIME_TYPE } from "../../common/constants.mjs"; @@ -7,7 +7,7 @@ export default { key: "google_drive-find-folder", name: "Find Folder", description: "Search for a specific folder by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information", - version: "0.1.9", + version: "0.1.11", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/find-forms/find-forms.mjs b/components/google_drive/actions/find-forms/find-forms.mjs index 6622b97417a8c..f830ae856b58a 100644 --- a/components/google_drive/actions/find-forms/find-forms.mjs +++ b/components/google_drive/actions/find-forms/find-forms.mjs @@ -1,12 +1,12 @@ -import googleDrive from "../../google_drive.app.mjs"; -import { getListFilesOpts } from "../../common/utils.mjs"; import commonSearchQuery from "../../common/commonSearchQuery.mjs"; +import { getListFilesOpts } from "../../common/utils.mjs"; +import googleDrive from "../../google_drive.app.mjs"; export default { key: "google_drive-find-forms", name: "Find Forms", description: "List Google Form documents or search for a Form by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information", - version: "0.0.10", + version: "0.0.12", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/find-spreadsheets/find-spreadsheets.mjs b/components/google_drive/actions/find-spreadsheets/find-spreadsheets.mjs index af27be3aaa304..992bbc8642977 100644 --- a/components/google_drive/actions/find-spreadsheets/find-spreadsheets.mjs +++ b/components/google_drive/actions/find-spreadsheets/find-spreadsheets.mjs @@ -1,12 +1,12 @@ -import googleDrive from "../../google_drive.app.mjs"; -import { getListFilesOpts } from "../../common/utils.mjs"; import commonSearchQuery from "../../common/commonSearchQuery.mjs"; +import { getListFilesOpts } from "../../common/utils.mjs"; +import googleDrive from "../../google_drive.app.mjs"; export default { key: "google_drive-find-spreadsheets", name: "Find Spreadsheets", description: "Search for a specific spreadsheet by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information", - version: "0.1.9", + version: "0.1.11", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/get-file-by-id/get-file-by-id.mjs b/components/google_drive/actions/get-file-by-id/get-file-by-id.mjs index a4a46a00df3a3..14b387e6782fd 100644 --- a/components/google_drive/actions/get-file-by-id/get-file-by-id.mjs +++ b/components/google_drive/actions/get-file-by-id/get-file-by-id.mjs @@ -5,7 +5,7 @@ export default { key: "google_drive-get-file-by-id", name: "Get File By ID", description: "Get info on a specific file. [See the documentation](https://developers.google.com/drive/api/reference/rest/v3/files/get) for more information", - version: "0.0.6", + version: "0.0.8", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/get-folder-id-for-path/get-folder-id-for-path.mjs b/components/google_drive/actions/get-folder-id-for-path/get-folder-id-for-path.mjs index e0bd2adba3df9..16f61ff5f3570 100644 --- a/components/google_drive/actions/get-folder-id-for-path/get-folder-id-for-path.mjs +++ b/components/google_drive/actions/get-folder-id-for-path/get-folder-id-for-path.mjs @@ -12,7 +12,7 @@ export default { key: "google_drive-get-folder-id-for-path", name: "Get Folder ID for a Path", description: "Retrieve a folderId for a path. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information", - version: "0.1.11", + version: "0.1.13", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/get-shared-drive/get-shared-drive.mjs b/components/google_drive/actions/get-shared-drive/get-shared-drive.mjs index 55e801d9d1e93..e8591f0feb505 100644 --- a/components/google_drive/actions/get-shared-drive/get-shared-drive.mjs +++ b/components/google_drive/actions/get-shared-drive/get-shared-drive.mjs @@ -4,7 +4,7 @@ export default { key: "google_drive-get-shared-drive", name: "Get Shared Drive", description: "Get metadata for one or all shared drives. [See the documentation](https://developers.google.com/drive/api/v3/reference/drives/get) for more information", - version: "0.1.9", + version: "0.1.11", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/list-access-proposals/list-access-proposals.mjs b/components/google_drive/actions/list-access-proposals/list-access-proposals.mjs index 723e586c812ac..b6604211496bb 100644 --- a/components/google_drive/actions/list-access-proposals/list-access-proposals.mjs +++ b/components/google_drive/actions/list-access-proposals/list-access-proposals.mjs @@ -4,7 +4,7 @@ export default { key: "google_drive-list-access-proposals", name: "List Access Proposals", description: "List access proposals for a file or folder. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/accessproposals/list)", - version: "0.0.2", + version: "0.0.4", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/list-files/list-files.mjs b/components/google_drive/actions/list-files/list-files.mjs index 6fa647c2fb8f2..a7651e6754a59 100644 --- a/components/google_drive/actions/list-files/list-files.mjs +++ b/components/google_drive/actions/list-files/list-files.mjs @@ -1,11 +1,11 @@ -import googleDrive from "../../google_drive.app.mjs"; import { getListFilesOpts } from "../../common/utils.mjs"; +import googleDrive from "../../google_drive.app.mjs"; export default { key: "google_drive-list-files", name: "List Files", description: "List files from a specific folder. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/list) for more information", - version: "0.1.13", + version: "0.1.15", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/move-file-to-trash/move-file-to-trash.mjs b/components/google_drive/actions/move-file-to-trash/move-file-to-trash.mjs index ea9b9d5eaf95f..3db9138d0258b 100644 --- a/components/google_drive/actions/move-file-to-trash/move-file-to-trash.mjs +++ b/components/google_drive/actions/move-file-to-trash/move-file-to-trash.mjs @@ -1,11 +1,11 @@ -import googleDrive from "../../google_drive.app.mjs"; import { GOOGLE_DRIVE_FOLDER_MIME_TYPE } from "../../common/constants.mjs"; +import googleDrive from "../../google_drive.app.mjs"; export default { key: "google_drive-move-file-to-trash", name: "Move File to Trash", description: "Move a file or folder to trash. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/update) for more information", - version: "0.1.9", + version: "0.1.11", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/move-file/move-file.mjs b/components/google_drive/actions/move-file/move-file.mjs index 0fb6324a30084..82bd6c4f3ed9d 100644 --- a/components/google_drive/actions/move-file/move-file.mjs +++ b/components/google_drive/actions/move-file/move-file.mjs @@ -4,7 +4,7 @@ export default { key: "google_drive-move-file", name: "Move File", description: "Move a file from one folder to another. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/update) for more information", - version: "0.1.9", + version: "0.1.11", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/resolve-access-proposal/resolve-access-proposal.mjs b/components/google_drive/actions/resolve-access-proposal/resolve-access-proposal.mjs index 981467e0bfbef..0e30d357ad7a1 100644 --- a/components/google_drive/actions/resolve-access-proposal/resolve-access-proposal.mjs +++ b/components/google_drive/actions/resolve-access-proposal/resolve-access-proposal.mjs @@ -1,11 +1,11 @@ -import googleDrive from "../../google_drive.app.mjs"; import { ConfigurationError } from "@pipedream/platform"; +import googleDrive from "../../google_drive.app.mjs"; export default { key: "google_drive-resolve-access-proposal", name: "Resolve Access Proposals", description: "Accept or deny a request for access to a file or folder in Google Drive. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/accessproposals/resolve)", - version: "0.0.2", + version: "0.0.4", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/search-shared-drives/search-shared-drives.mjs b/components/google_drive/actions/search-shared-drives/search-shared-drives.mjs index e26b44c42c7d8..4cc0e9d441e94 100644 --- a/components/google_drive/actions/search-shared-drives/search-shared-drives.mjs +++ b/components/google_drive/actions/search-shared-drives/search-shared-drives.mjs @@ -4,7 +4,7 @@ export default { key: "google_drive-search-shared-drives", name: "Search for Shared Drives", description: "Search for shared drives with query options. [See the documentation](https://developers.google.com/drive/api/v3/search-shareddrives) for more information", - version: "0.1.10", + version: "0.1.12", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/update-file/update-file.mjs b/components/google_drive/actions/update-file/update-file.mjs index d59f85aa853db..1959bf8002eac 100644 --- a/components/google_drive/actions/update-file/update-file.mjs +++ b/components/google_drive/actions/update-file/update-file.mjs @@ -1,12 +1,12 @@ -import googleDrive from "../../google_drive.app.mjs"; -import { toSingleLineString } from "../../common/utils.mjs"; import { getFileStream } from "@pipedream/platform"; +import { toSingleLineString } from "../../common/utils.mjs"; +import googleDrive from "../../google_drive.app.mjs"; export default { key: "google_drive-update-file", name: "Update File", description: "Update a file's metadata and/or content. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/update) for more information", - version: "2.0.1", + version: "2.0.3", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/update-shared-drive/update-shared-drive.mjs b/components/google_drive/actions/update-shared-drive/update-shared-drive.mjs index 7977f60efb7e6..a45ab0ad08425 100644 --- a/components/google_drive/actions/update-shared-drive/update-shared-drive.mjs +++ b/components/google_drive/actions/update-shared-drive/update-shared-drive.mjs @@ -4,7 +4,7 @@ export default { key: "google_drive-update-shared-drive", name: "Update Shared Drive", description: "Update an existing shared drive. [See the documentation](https://developers.google.com/drive/api/v3/reference/drives/update) for more information", - version: "0.1.9", + version: "0.1.11", type: "action", props: { googleDrive, diff --git a/components/google_drive/actions/upload-file/upload-file.mjs b/components/google_drive/actions/upload-file/upload-file.mjs index 7d4b9d8436d4c..18bd15e2732a5 100644 --- a/components/google_drive/actions/upload-file/upload-file.mjs +++ b/components/google_drive/actions/upload-file/upload-file.mjs @@ -1,18 +1,19 @@ -import googleDrive from "../../google_drive.app.mjs"; +import { + ConfigurationError, + getFileStreamAndMetadata, +} from "@pipedream/platform"; +import { GOOGLE_DRIVE_UPLOAD_TYPE_MULTIPART } from "../../common/constants.mjs"; import { omitEmptyStringValues, parseObjectEntries, } from "../../common/utils.mjs"; -import { GOOGLE_DRIVE_UPLOAD_TYPE_MULTIPART } from "../../common/constants.mjs"; -import { - getFileStreamAndMetadata, ConfigurationError, -} from "@pipedream/platform"; +import googleDrive from "../../google_drive.app.mjs"; export default { key: "google_drive-upload-file", name: "Upload File", description: "Upload a file to Google Drive. [See the documentation](https://developers.google.com/drive/api/v3/manage-uploads) for more information", - version: "2.0.2", + version: "2.0.4", type: "action", props: { googleDrive, diff --git a/components/google_drive/common/utils.mjs b/components/google_drive/common/utils.mjs index 7c3c21bcbd084..d6d9390001ade 100644 --- a/components/google_drive/common/utils.mjs +++ b/components/google_drive/common/utils.mjs @@ -104,7 +104,9 @@ function truncatePath(pathArr) { */ function buildFilePaths(files = [], folders = []) { const folderIdToFolder = folders.reduce((acc, cur) => { - acc[cur.id] = cur; + if (cur?.id) { + acc[cur.id] = cur; + } return acc; }, {}); const paths = {}; @@ -112,7 +114,7 @@ function buildFilePaths(files = [], folders = []) { // requisite parent folders are available (in `file.parents`) to the requesting user, or an array // containing the file ID otherwise const pathToFile = (file) => { - if (!file) { + if (!file?.id) { // unretrieved folder or root folder return []; } @@ -139,7 +141,9 @@ function buildFilePaths(files = [], folders = []) { ]; }; files.forEach((file) => { - paths[file.id] = pathToFile(file); + if (file?.id) { + paths[file.id] = pathToFile(file); + } }); return paths; } @@ -154,7 +158,9 @@ function buildFilePaths(files = [], folders = []) { */ function buildFileNamePaths(files = [], folders = []) { const fileIdToFile = files.concat(folders).reduce((acc, cur) => { - acc[cur.id] = cur; + if (cur?.id) { + acc[cur.id] = cur; + } return acc; }, {}); const fileIdToPath = buildFilePaths(files, folders); diff --git a/components/google_drive/google_drive.app.mjs b/components/google_drive/google_drive.app.mjs index e49f8922bee24..a39a84c514422 100644 --- a/components/google_drive/google_drive.app.mjs +++ b/components/google_drive/google_drive.app.mjs @@ -127,16 +127,18 @@ export default { return []; } let parentFolders = await Promise.all( - file.parents.map((parentId) => this.getFile(parentId, { + (file.parents || []).map((parentId) => this.getFile(parentId, { fields: "id,name", })), ); - return parentFolders.map(({ - id, name, - }) => ({ - value: id, - label: name, - })); + return parentFolders + .filter((folder) => folder?.id) + .map(({ + id, name, + }) => ({ + value: id, + label: name, + })); }, }, updateTypes: { @@ -475,7 +477,7 @@ export default { }, async _listDriveOptions(pageToken, myDrive = true) { const { - drives, + drives = [], nextPageToken, } = await this.listDrivesInPage(pageToken); @@ -493,10 +495,12 @@ export default { ] : []; for (const d of drives) { - options.push({ - label: d.name, - value: d.id, - }); + if (d?.id) { + options.push({ + label: d.name, + value: d.id, + }); + } } return { options, @@ -546,16 +550,18 @@ export default { */ async listFilesOptions(pageToken, extraOpts = {}) { const { - files, + files = [], nextPageToken, } = await this.listFilesInPage( pageToken, extraOpts, ); - const options = files.map((file) => ({ - label: file.name, - value: file.id, - })); + const options = files + .filter((file) => file?.id) + .map((file) => ({ + label: file.name, + value: file.id, + })); return { options, context: { @@ -611,19 +617,21 @@ export default { opts, ); const [ - { files: folders }, + { files: folders = [] }, { - files, nextPageToken, + files = [], nextPageToken, }, ] = await Promise.all([ foldersPromise, filesPromise, ]); const filePaths = this.getFilePaths(files, folders); - const options = files.map((file) => ({ - label: filePaths[file.id], - value: file.id, - })); + const options = files + .filter((file) => file?.id) + .map((file) => ({ + label: filePaths[file.id], + value: file.id, + })); return { options, context: { diff --git a/components/google_drive/package.json b/components/google_drive/package.json index 72bd05d0aa897..dbf9e0b6a89d6 100644 --- a/components/google_drive/package.json +++ b/components/google_drive/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/google_drive", - "version": "1.0.3", + "version": "1.0.5", "description": "Pipedream Google_drive Components", "main": "google_drive.app.mjs", "keywords": [ diff --git a/components/google_drive/sources/changes-to-specific-files-shared-drive/changes-to-specific-files-shared-drive.mjs b/components/google_drive/sources/changes-to-specific-files-shared-drive/changes-to-specific-files-shared-drive.mjs index 60abfecaa147d..6c2e283835678 100644 --- a/components/google_drive/sources/changes-to-specific-files-shared-drive/changes-to-specific-files-shared-drive.mjs +++ b/components/google_drive/sources/changes-to-specific-files-shared-drive/changes-to-specific-files-shared-drive.mjs @@ -11,8 +11,8 @@ import common from "../common-webhook.mjs"; import sampleEmit from "./test-event.mjs"; import { - GOOGLE_DRIVE_NOTIFICATION_CHANGE, GOOGLE_DRIVE_NOTIFICATION_ADD, + GOOGLE_DRIVE_NOTIFICATION_CHANGE, GOOGLE_DRIVE_NOTIFICATION_UPDATE, } from "../../common/constants.mjs"; import commonDedupeChanges from "../common-dedupe-changes.mjs"; @@ -27,7 +27,7 @@ export default { key: "google_drive-changes-to-specific-files-shared-drive", name: "Changes to Specific Files (Shared Drive)", description: "Watches for changes to specific files in a shared drive, emitting an event when a change is made to one of those files", - version: "0.2.6", + version: "0.2.8", type: "source", // Dedupe events based on the "x-goog-message-number" header for the target channel: // https://developers.google.com/drive/api/v3/push#making-watch-requests diff --git a/components/google_drive/sources/changes-to-specific-files/changes-to-specific-files.mjs b/components/google_drive/sources/changes-to-specific-files/changes-to-specific-files.mjs index 53600db35aed5..086d74be464ef 100644 --- a/components/google_drive/sources/changes-to-specific-files/changes-to-specific-files.mjs +++ b/components/google_drive/sources/changes-to-specific-files/changes-to-specific-files.mjs @@ -1,9 +1,9 @@ import cronParser from "cron-parser"; -import sampleEmit from "./test-event.mjs"; import includes from "lodash/includes.js"; import { v4 as uuid } from "uuid"; import { MY_DRIVE_VALUE } from "../../common/constants.mjs"; import changesToSpecificFiles from "../changes-to-specific-files-shared-drive/changes-to-specific-files-shared-drive.mjs"; +import sampleEmit from "./test-event.mjs"; /** * This source uses the Google Drive API's @@ -15,7 +15,7 @@ export default { key: "google_drive-changes-to-specific-files", name: "Changes to Specific Files", description: "Watches for changes to specific files, emitting an event when a change is made to one of those files. To watch for changes to [shared drive](https://support.google.com/a/users/answer/9310351) files, use the **Changes to Specific Files (Shared Drive)** source instead.", - version: "0.2.6", + version: "0.2.8", type: "source", // Dedupe events based on the "x-goog-message-number" header for the target channel: // https://developers.google.com/drive/api/v3/push#making-watch-requests diff --git a/components/google_drive/sources/new-access-proposal/new-access-proposal.mjs b/components/google_drive/sources/new-access-proposal/new-access-proposal.mjs index 62d68a8a7d5c2..fb8100f8068dd 100644 --- a/components/google_drive/sources/new-access-proposal/new-access-proposal.mjs +++ b/components/google_drive/sources/new-access-proposal/new-access-proposal.mjs @@ -1,12 +1,12 @@ -import googleDrive from "../../google_drive.app.mjs"; import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import googleDrive from "../../google_drive.app.mjs"; import sampleEmit from "./test-event.mjs"; export default { key: "google_drive-new-access-proposal", name: "New Access Proposal", description: "Emit new event when a new access proposal is requested in Google Drive", - version: "0.0.2", + version: "0.0.4", type: "source", dedupe: "unique", props: { diff --git a/components/google_drive/sources/new-files-instant/new-files-instant.mjs b/components/google_drive/sources/new-files-instant/new-files-instant.mjs index 62360e226c934..964b9d1d8871b 100644 --- a/components/google_drive/sources/new-files-instant/new-files-instant.mjs +++ b/components/google_drive/sources/new-files-instant/new-files-instant.mjs @@ -1,16 +1,16 @@ -import common from "../common-webhook.mjs"; -import sampleEmit from "./test-event.mjs"; import { GOOGLE_DRIVE_NOTIFICATION_ADD, GOOGLE_DRIVE_NOTIFICATION_CHANGE, } from "../../common/constants.mjs"; +import common from "../common-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; export default { ...common, key: "google_drive-new-files-instant", name: "New Files (Instant)", description: "Emit new event when a new file is added in your linked Google Drive", - version: "0.1.14", + version: "0.1.16", type: "source", dedupe: "unique", props: { diff --git a/components/google_drive/sources/new-files-shared-drive/new-files-shared-drive.mjs b/components/google_drive/sources/new-files-shared-drive/new-files-shared-drive.mjs index a151ac5f44c81..44a2e33af0da9 100644 --- a/components/google_drive/sources/new-files-shared-drive/new-files-shared-drive.mjs +++ b/components/google_drive/sources/new-files-shared-drive/new-files-shared-drive.mjs @@ -1,13 +1,13 @@ +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; import googleDrive from "../../google_drive.app.mjs"; import sourceComponent from "../new-files-instant/new-files-instant.mjs"; import sampleEmit from "../new-files-instant/test-event.mjs"; -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; export default { key: "google_drive-new-files-shared-drive", name: "New Files (Shared Drive)", description: "Emit new event when a new file is added in your shared Google Drive", - version: "0.0.3", + version: "0.0.5", type: "source", dedupe: "unique", props: { diff --git a/components/google_drive/sources/new-or-modified-comments/new-or-modified-comments.mjs b/components/google_drive/sources/new-or-modified-comments/new-or-modified-comments.mjs index 76459c9ca8d16..eb52944f363ee 100644 --- a/components/google_drive/sources/new-or-modified-comments/new-or-modified-comments.mjs +++ b/components/google_drive/sources/new-or-modified-comments/new-or-modified-comments.mjs @@ -8,8 +8,8 @@ // 1) The HTTP requests tied to changes in the user's Google Drive // 2) A timer that runs on regular intervals, renewing the notification channel as needed -import common from "../common-webhook.mjs"; import { GOOGLE_DRIVE_NOTIFICATION_CHANGE } from "../../common/constants.mjs"; +import common from "../common-webhook.mjs"; export default { ...common, @@ -17,7 +17,7 @@ export default { name: "New or Modified Comments (Instant)", description: "Emit new event when a comment is created or modified in the selected file", - version: "1.0.5", + version: "1.0.7", type: "source", // Dedupe events based on the "x-goog-message-number" header for the target channel: // https://developers.google.com/drive/api/v3/push#making-watch-requests diff --git a/components/google_drive/sources/new-or-modified-files/new-or-modified-files.mjs b/components/google_drive/sources/new-or-modified-files/new-or-modified-files.mjs index 6ff26eedea945..237738a3c97a0 100644 --- a/components/google_drive/sources/new-or-modified-files/new-or-modified-files.mjs +++ b/components/google_drive/sources/new-or-modified-files/new-or-modified-files.mjs @@ -8,14 +8,14 @@ // 1) The HTTP requests tied to changes in the user's Google Drive // 2) A timer that runs on regular intervals, renewing the notification channel as needed -import common from "../common-webhook.mjs"; -import sampleEmit from "./test-event.mjs"; import { GOOGLE_DRIVE_NOTIFICATION_ADD, GOOGLE_DRIVE_NOTIFICATION_CHANGE, GOOGLE_DRIVE_NOTIFICATION_UPDATE, } from "../../common/constants.mjs"; import commonDedupeChanges from "../common-dedupe-changes.mjs"; +import common from "../common-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; const { googleDrive } = common.props; @@ -24,7 +24,7 @@ export default { key: "google_drive-new-or-modified-files", name: "New or Modified Files (Instant)", description: "Emit new event when a file in the selected Drive is created, modified or trashed.", - version: "0.3.6", + version: "0.3.8", type: "source", // Dedupe events based on the "x-goog-message-number" header for the target channel: // https://developers.google.com/drive/api/v3/push#making-watch-requests diff --git a/components/google_drive/sources/new-or-modified-folders/new-or-modified-folders.mjs b/components/google_drive/sources/new-or-modified-folders/new-or-modified-folders.mjs index 81f2bf074e634..38f7990780b13 100644 --- a/components/google_drive/sources/new-or-modified-folders/new-or-modified-folders.mjs +++ b/components/google_drive/sources/new-or-modified-folders/new-or-modified-folders.mjs @@ -8,23 +8,44 @@ // 1) The HTTP requests tied to changes in the user's Google Drive // 2) A timer that runs on regular intervals, renewing the notification channel as needed -import common from "../common-webhook.mjs"; import { GOOGLE_DRIVE_NOTIFICATION_ADD, GOOGLE_DRIVE_NOTIFICATION_CHANGE, GOOGLE_DRIVE_NOTIFICATION_UPDATE, } from "../../common/constants.mjs"; +import common from "../common-webhook.mjs"; export default { ...common, key: "google_drive-new-or-modified-folders", name: "New or Modified Folders (Instant)", description: "Emit new event when a folder is created or modified in the selected Drive", - version: "0.1.11", + version: "0.2.0", type: "source", // Dedupe events based on the "x-goog-message-number" header for the target channel: // https://developers.google.com/drive/api/v3/push#making-watch-requests dedupe: "unique", + props: { + ...common.props, + folderId: { + propDefinition: [ + common.props.googleDrive, + "folderId", + (c) => ({ + drive: c.drive, + }), + ], + label: "Parent Folder", + description: "The ID of the parent folder which contains the folders. If not specified, it will watch all folders from the drive's top-level folder.", + optional: true, + }, + includeSubfolders: { + type: "boolean", + label: "Include Subfolders", + description: "Whether to include subfolders of the parent folder in the changes.", + optional: true, + }, + }, hooks: { async deploy() { const daysAgo = new Date(); @@ -34,12 +55,11 @@ export default { const args = this.getListFilesOpts({ q: `mimeType = "application/vnd.google-apps.folder" and modifiedTime > "${timeString}" and trashed = false`, fields: "files(id, mimeType)", - pageSize: 5, }); const { files } = await this.googleDrive.listFilesInPage(null, args); - await this.processChanges(files); + await this.processChanges(files, null, 5); }, ...common.hooks, }, @@ -58,6 +78,24 @@ export default { GOOGLE_DRIVE_NOTIFICATION_UPDATE, ]; }, + async getAllParents(folderId) { + const allParents = []; + let currentId = folderId; + + while (currentId) { + const folder = await this.googleDrive.getFile(currentId, { + fields: "parents", + }); + const parents = folder.parents; + + if (parents && parents.length > 0) { + allParents.push(parents[0]); + } + currentId = parents?.[0]; + } + + return allParents; + }, generateMeta(data, ts) { const { id: fileId, @@ -86,29 +124,51 @@ export default { }, }; }, - async processChanges(changedFiles, headers) { + async processChanges(changedFiles, headers, maxResults) { const files = changedFiles.filter( // API docs that define Google Drive folders: // https://developers.google.com/drive/api/v3/folder (file) => file.mimeType === "application/vnd.google-apps.folder", ); + const filteredFiles = []; for (const file of files) { // The changelog is updated each time a folder is opened. Check the // folder's `modifiedTime` to see if the folder has been modified. const fileInfo = await this.googleDrive.getFile(file.id); + const root = await this.googleDrive.getFile(this.drive === "My Drive" + ? "root" + : this.drive); + + const allParents = []; + if (this.includeSubfolders) { + allParents.push(...(await this.getAllParents(file.id))); + } else { + allParents.push(fileInfo.parents[0]); + } + + if (!allParents.includes(this.folderId || root.id)) { + continue; + } + filteredFiles.push(fileInfo); + } + + if (maxResults && filteredFiles.length >= maxResults) { + filteredFiles.length = maxResults; + } + for (const file of filteredFiles) { const lastModifiedTimeForFile = this._getLastModifiedTimeForFile(file.id); - const modifiedTime = Date.parse(fileInfo.modifiedTime); + const modifiedTime = Date.parse(file.modifiedTime); if (lastModifiedTimeForFile == modifiedTime) continue; const changes = await this.getChanges(headers); const eventToEmit = { - file: fileInfo, + file, ...changes, }; - const meta = this.generateMeta(fileInfo, modifiedTime); + const meta = this.generateMeta(file, modifiedTime); this.$emit(eventToEmit, meta); diff --git a/components/google_drive/sources/new-shared-drive/new-shared-drive.mjs b/components/google_drive/sources/new-shared-drive/new-shared-drive.mjs index 66e3ec386980c..38d866d3ef1f6 100644 --- a/components/google_drive/sources/new-shared-drive/new-shared-drive.mjs +++ b/components/google_drive/sources/new-shared-drive/new-shared-drive.mjs @@ -1,11 +1,11 @@ -import googleDrive from "../../google_drive.app.mjs"; import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import googleDrive from "../../google_drive.app.mjs"; export default { key: "google_drive-new-shared-drive", name: "New Shared Drive", description: "Emits a new event any time a shared drive is created.", - version: "0.1.9", + version: "0.1.11", type: "source", dedupe: "unique", props: { diff --git a/components/google_drive/sources/new-spreadsheet/new-spreadsheet.mjs b/components/google_drive/sources/new-spreadsheet/new-spreadsheet.mjs index 23e69d223c27a..bfab64aebbfb9 100644 --- a/components/google_drive/sources/new-spreadsheet/new-spreadsheet.mjs +++ b/components/google_drive/sources/new-spreadsheet/new-spreadsheet.mjs @@ -6,7 +6,7 @@ export default { type: "source", name: "New Spreadsheet (Instant)", description: "Emit new event when a new spreadsheet is created in a drive.", - version: "0.1.11", + version: "0.1.13", props: { googleDrive: newFilesInstant.props.googleDrive, db: newFilesInstant.props.db, diff --git a/components/google_fit_developer_app/.gitignore b/components/google_fit_developer_app/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/google_fit_developer_app/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/google_fit_developer_app/app/google_fit_developer_app.app.ts b/components/google_fit_developer_app/app/google_fit_developer_app.app.ts deleted file mode 100644 index ef6397071f194..0000000000000 --- a/components/google_fit_developer_app/app/google_fit_developer_app.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "google_fit_developer_app", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/google_fit_developer_app/google_fit_developer_app.app.mjs b/components/google_fit_developer_app/google_fit_developer_app.app.mjs new file mode 100644 index 0000000000000..dd52c3d29056b --- /dev/null +++ b/components/google_fit_developer_app/google_fit_developer_app.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "google_fit_developer_app", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/google_fit_developer_app/package.json b/components/google_fit_developer_app/package.json index fd8d61449a7bb..79dc54000a6e4 100644 --- a/components/google_fit_developer_app/package.json +++ b/components/google_fit_developer_app/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/google_fit_developer_app", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Google Fit (Developer App) Components", - "main": "dist/app/google_fit_developer_app.app.mjs", + "main": "google_fit_developer_app.app.mjs", "keywords": [ "pipedream", "google_fit_developer_app" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/google_fit_developer_app", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/google_identity/google_identity.app.mjs b/components/google_identity/google_identity.app.mjs index b84e80554d561..a863abbb310f9 100644 --- a/components/google_identity/google_identity.app.mjs +++ b/components/google_identity/google_identity.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/google_marketplace/google_marketplace.app.mjs b/components/google_marketplace/google_marketplace.app.mjs index 15b4c1cb6536d..fcf6c22775482 100644 --- a/components/google_marketplace/google_marketplace.app.mjs +++ b/components/google_marketplace/google_marketplace.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/google_my_business/actions/create-post/create-post.ts b/components/google_my_business/actions/create-post/create-post.ts index f9293d754374b..1fe460b264379 100644 --- a/components/google_my_business/actions/create-post/create-post.ts +++ b/components/google_my_business/actions/create-post/create-post.ts @@ -12,7 +12,7 @@ export default defineAction({ key: "google_my_business-create-post", name: "Create Post", description: `Create a new local post associated with a location. [See the documentation](${DOCS_LINK})`, - version: "0.0.2", + version: "0.0.3", type: "action", props: { app, @@ -95,7 +95,8 @@ export default defineAction({ ? JSON.parse(obj) : obj; } catch (err) { - throw new ConfigurationError(`**Invalid JSON string** for object prop: "${obj}"`); + throw new ConfigurationError(`**Invalid JSON string** for object prop: "${obj}" + Error: ${err}`); } }, }, diff --git a/components/google_my_business/actions/create-update-reply-to-review/create-update-reply-to-review.ts b/components/google_my_business/actions/create-update-reply-to-review/create-update-reply-to-review.ts index 050fe49390854..cc7b7a4289988 100644 --- a/components/google_my_business/actions/create-update-reply-to-review/create-update-reply-to-review.ts +++ b/components/google_my_business/actions/create-update-reply-to-review/create-update-reply-to-review.ts @@ -8,7 +8,7 @@ export default defineAction({ key: "google_my_business-create-update-reply-to-review", name: "Create or Update Reply to Review", description: `Create or update a reply to the specified review. [See the documentation](${DOCS_LINK})`, - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/google_my_business/actions/get-reviews-multiple-locations/get-reviews-multiple-locations.ts b/components/google_my_business/actions/get-reviews-multiple-locations/get-reviews-multiple-locations.ts new file mode 100644 index 0000000000000..0b388f4aabdf3 --- /dev/null +++ b/components/google_my_business/actions/get-reviews-multiple-locations/get-reviews-multiple-locations.ts @@ -0,0 +1,84 @@ +import { defineAction } from "@pipedream/types"; +import app from "../../app/google_my_business.app"; +import { BatchGetReviewsParams } from "../../common/requestParams"; + +const DOCS_LINK = "https://developers.google.com/my-business/content/review-data#get_reviews_from_multiple_locations"; + +export default defineAction({ + key: "google_my_business-get-reviews-multiple-locations", + name: "Get Reviews from Multiple Locations", + description: `Get reviews from multiple locations at once. [See the documentation](${DOCS_LINK})`, + version: "0.0.1", + type: "action", + props: { + app, + account: { + propDefinition: [ + app, + "account", + ], + }, + locationNames: { + propDefinition: [ + app, + "location", + ({ account }: { account: string; }) => ({ + account, + }), + ], + type: "string[]", + label: "Location Names", + description: "One or more locations to get reviews from", + }, + pageSize: { + type: "integer", + label: "Page Size", + description: "The number of reviews to return per location (max 50)", + optional: true, + default: 50, + min: 1, + max: 50, + }, + orderBy: { + type: "string", + label: "Order By", + description: "How to order the reviews: by createTime or updateTime, and ascending or descending", + optional: true, + options: [ + "createTime desc", + "createTime asc", + "updateTime desc", + "updateTime asc", + ], + }, + ignoreRatingOnlyReviews: { + type: "boolean", + label: "Ignore Rating Only Reviews", + description: "If true, only return reviews that have textual content", + optional: true, + default: false, + }, + }, + async run({ $ }) { + const { + account, locationNames, pageSize, orderBy, ignoreRatingOnlyReviews, + } = this; + + const params: BatchGetReviewsParams = { + $, + account, + data: { + locationNames: locationNames?.map((locationName: string) => `accounts/${account}/locations/${locationName}`), + pageSize, + orderBy, + ignoreRatingOnlyReviews, + }, + }; + + const response = await this.app.batchGetReviews(params); + + $.export("$summary", `Successfully retrieved reviews from ${locationNames.length} locations`); + + return response; + }, +}); diff --git a/components/google_my_business/actions/get-specific-review/get-specific-review.ts b/components/google_my_business/actions/get-specific-review/get-specific-review.ts new file mode 100644 index 0000000000000..62e9c7f8a06eb --- /dev/null +++ b/components/google_my_business/actions/get-specific-review/get-specific-review.ts @@ -0,0 +1,61 @@ +import { defineAction } from "@pipedream/types"; +import app from "../../app/google_my_business.app"; +import { GetReviewParams } from "../../common/requestParams"; + +const DOCS_LINK = "https://developers.google.com/my-business/content/review-data#get_a_specific_review"; + +export default defineAction({ + key: "google_my_business-get-specific-review", + name: "Get a Specific Review", + description: `Return a specific review by name. [See the documentation](${DOCS_LINK})`, + version: "0.0.1", + type: "action", + props: { + app, + account: { + propDefinition: [ + app, + "account", + ], + }, + location: { + propDefinition: [ + app, + "location", + ({ account }: { account: string; }) => ({ + account, + }), + ], + }, + review: { + propDefinition: [ + app, + "review", + ({ + account, location, + }: Record) => ({ + account, + location, + }), + ], + }, + }, + async run({ $ }) { + const { + account, location, review, + } = this; + + const params: GetReviewParams = { + $, + account, + location, + review, + }; + + const response = await this.app.getReview(params); + + $.export("$summary", `Successfully retrieved review: ${review}`); + + return response; + }, +}); diff --git a/components/google_my_business/actions/list-all-reviews/list-all-reviews.ts b/components/google_my_business/actions/list-all-reviews/list-all-reviews.ts new file mode 100644 index 0000000000000..19133efb9f6e2 --- /dev/null +++ b/components/google_my_business/actions/list-all-reviews/list-all-reviews.ts @@ -0,0 +1,48 @@ +import { defineAction } from "@pipedream/types"; +import app from "../../app/google_my_business.app"; +import { ListReviewsParams } from "../../common/requestParams"; + +const DOCS_LINK = "https://developers.google.com/my-business/content/review-data#list_all_reviews"; + +export default defineAction({ + key: "google_my_business-list-all-reviews", + name: "List All Reviews", + description: `List all reviews of a location to audit reviews in bulk. [See the documentation](${DOCS_LINK})`, + version: "0.0.1", + type: "action", + props: { + app, + account: { + propDefinition: [ + app, + "account", + ], + }, + location: { + propDefinition: [ + app, + "location", + ({ account }: { account: string; }) => ({ + account, + }), + ], + }, + }, + async run({ $ }) { + const { + account, location, + } = this; + + const params: ListReviewsParams = { + $, + account, + location, + }; + + const response = await this.app.listReviews(params); + + $.export("$summary", `Successfully listed ${response.length} reviews`); + + return response; + }, +}); diff --git a/components/google_my_business/actions/list-posts/list-posts.ts b/components/google_my_business/actions/list-posts/list-posts.ts index 48a3077bc15ba..4515931cceb32 100644 --- a/components/google_my_business/actions/list-posts/list-posts.ts +++ b/components/google_my_business/actions/list-posts/list-posts.ts @@ -9,7 +9,7 @@ export default defineAction({ key: "google_my_business-list-posts", name: "List Posts", description: `List local posts associated with a location. [See the documentation](${DOCS_LINK})`, - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/google_my_business/app/google_my_business.app.ts b/components/google_my_business/app/google_my_business.app.ts index efeb3c1467bce..2b39fb87d3390 100644 --- a/components/google_my_business/app/google_my_business.app.ts +++ b/components/google_my_business/app/google_my_business.app.ts @@ -2,7 +2,7 @@ import { defineApp } from "@pipedream/types"; import { axios } from "@pipedream/platform"; import { CreatePostParams, - HttpRequestParams, ListPostsParams, ListReviewsParams, PaginatedRequestParams, UpdateReplyParams, + HttpRequestParams, ListPostsParams, ListReviewsParams, PaginatedRequestParams, UpdateReplyParams, GetReviewParams, BatchGetReviewsParams, } from "../common/requestParams"; import { Account, LocalPost, Location, Review, @@ -187,5 +187,22 @@ export default defineApp({ ...args, }); }, + async getReview({ + account, location, review, ...args + }: GetReviewParams): Promise { + return this._httpRequest({ + url: `https://mybusiness.googleapis.com/v4/accounts/${account}/locations/${location}/reviews/${review}`, + ...args, + }); + }, + async batchGetReviews({ + account, ...args + }: BatchGetReviewsParams): Promise { + return this._httpRequest({ + method: "POST", + url: `https://mybusiness.googleapis.com/v4/accounts/${account}/locations:batchGetReviews`, + ...args, + }); + }, }, }); diff --git a/components/google_my_business/common/requestParams.ts b/components/google_my_business/common/requestParams.ts index 45c8ccc7693d1..a0281fc51f69f 100644 --- a/components/google_my_business/common/requestParams.ts +++ b/components/google_my_business/common/requestParams.ts @@ -50,3 +50,18 @@ export interface UpdateReplyParams extends PdAxiosRequest, AccountLocation { comment: string; }; } + +export interface GetReviewParams extends PdAxiosRequest, AccountLocation { + review: string; +} + +export interface BatchGetReviewsParams extends PdAxiosRequest { + account: string; + data: { + locationNames: string[]; + pageSize?: number; + pageToken?: string; + orderBy?: string; + ignoreRatingOnlyReviews?: boolean; + }; +} diff --git a/components/google_my_business/common/responseSchemas.ts b/components/google_my_business/common/responseSchemas.ts index 3d0954d0b01a9..6d9d3e97c76b0 100644 --- a/components/google_my_business/common/responseSchemas.ts +++ b/components/google_my_business/common/responseSchemas.ts @@ -22,3 +22,9 @@ export interface Review extends EntityWithCreateTime { export interface LocalPost extends EntityWithCreateTime { summary: string; } + +export interface BatchGetReviewsResponse { + locationReviews: { + review: Review + }[]; +} diff --git a/components/google_my_business/package.json b/components/google_my_business/package.json index e21832ceb085e..b908cad8359c4 100644 --- a/components/google_my_business/package.json +++ b/components/google_my_business/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/google_my_business", - "version": "0.1.3", + "version": "0.2.0", "description": "Pipedream Google My Business Components", "main": "dist/app/google_my_business.app.mjs", "keywords": [ @@ -14,7 +14,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.6.0", - "@pipedream/types": "^0.1.6" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/google_my_business/sources/common.ts b/components/google_my_business/sources/common.ts index a547db8101bb9..0ab25a5f159ce 100644 --- a/components/google_my_business/sources/common.ts +++ b/components/google_my_business/sources/common.ts @@ -55,9 +55,9 @@ export default { const items: EntityWithCreateTime[] = await this.getItems(); this.setLastRun(currentRun); - const filteredItems = lastRun - ? items.filter(({ createTime }) => new Date(createTime) >= lastRun) - : items.slice(-10); + const filteredItems = (lastRun + ? items?.filter(({ createTime }) => new Date(createTime) >= lastRun) + : items?.slice(-10)) ?? []; filteredItems.reverse().forEach((item) => { this.$emit(item, { diff --git a/components/google_my_business/sources/new-post-created/new-post-created.ts b/components/google_my_business/sources/new-post-created/new-post-created.ts index 493e55e46102e..bfceee27b090d 100644 --- a/components/google_my_business/sources/new-post-created/new-post-created.ts +++ b/components/google_my_business/sources/new-post-created/new-post-created.ts @@ -10,7 +10,7 @@ export default defineSource({ key: "google_my_business-new-post-created", name: "New Post Created", description: `Emit new event for each new local post on a location [See the documentation](${DOCS_LINK})`, - version: "0.0.3", + version: "0.0.4", type: "source", dedupe: "unique", methods: { diff --git a/components/google_my_business/sources/new-review-created-multiple-locations/new-review-created-multiple-locations.ts b/components/google_my_business/sources/new-review-created-multiple-locations/new-review-created-multiple-locations.ts new file mode 100644 index 0000000000000..11ceeaa0a2e26 --- /dev/null +++ b/components/google_my_business/sources/new-review-created-multiple-locations/new-review-created-multiple-locations.ts @@ -0,0 +1,65 @@ +import { defineSource } from "@pipedream/types"; +import { BatchGetReviewsParams } from "../../common/requestParams"; +import { + BatchGetReviewsResponse, Review, +} from "../../common/responseSchemas"; +import app from "../../app/google_my_business.app"; +import common from "../common"; + +const DOCS_LINK = "https://developers.google.com/my-business/content/review-data#get_reviews_from_multiple_locations"; + +export default defineSource({ + ...common, + key: "google_my_business-new-review-created-multiple-locations", + name: "New Review Created (Multiple Locations)", + description: `Emit new event for each new review on any of the selected locations [See the documentation](${DOCS_LINK})`, + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + ...common.props, + location: { + propDefinition: [ + app, + "location", + ({ account }: { account: string; }) => ({ + account, + }), + ], + type: "string[]", + label: "Location Names", + description: "One or more locations to monitor for new reviews", + }, + }, + hooks: { + async deploy() { + await this.getAndProcessData(); + }, + }, + methods: { + ...common.methods, + async getItems(): Promise { + const { + account, location, + } = this; + + const params: BatchGetReviewsParams = { + account, + data: { + locationNames: location?.map((locationName: string) => `accounts/${account}/locations/${locationName}`), + }, + }; + + const response: BatchGetReviewsResponse = await this.app.batchGetReviews(params); + + return response?.locationReviews?.map((item) => item.review); + }, + getSummary({ comment }: Review) { + return `New Review${comment + ? `: "${comment.length > 50 + ? comment.slice(0, 45) + "[...]" + : comment}"` + : ""}`; + }, + }, +}); diff --git a/components/google_my_business/sources/new-review-created/new-review-created.ts b/components/google_my_business/sources/new-review-created/new-review-created.ts index d3ef0376156ec..e40fd6f8c5c26 100644 --- a/components/google_my_business/sources/new-review-created/new-review-created.ts +++ b/components/google_my_business/sources/new-review-created/new-review-created.ts @@ -10,7 +10,7 @@ export default defineSource({ key: "google_my_business-new-review-created", name: "New Review Created", description: `Emit new event for each new review on a location [See the documentation](${DOCS_LINK})`, - version: "0.0.3", + version: "0.0.4", type: "source", dedupe: "unique", methods: { diff --git a/components/google_my_business/tsconfig.json b/components/google_my_business/tsconfig.json index 0b82410677792..3a9389484d040 100644 --- a/components/google_my_business/tsconfig.json +++ b/components/google_my_business/tsconfig.json @@ -1,23 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/google_recaptcha/tsconfig.json b/components/google_recaptcha/tsconfig.json index 0eec7d2e5b109..3a9389484d040 100644 --- a/components/google_recaptcha/tsconfig.json +++ b/components/google_recaptcha/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/google_safebrowsing/package.json b/components/google_safebrowsing/package.json index eeb11be7c546e..2b66ff54f836c 100644 --- a/components/google_safebrowsing/package.json +++ b/components/google_safebrowsing/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/google_safebrowsing", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Google Safe Browsing Components", - "main": "dist/app/google_safebrowsing.app.mjs", + "main": "google_safebrowsing.app.mjs", "keywords": [ "pipedream", "google_safebrowsing" diff --git a/components/google_sheets/actions/add-column/add-column.mjs b/components/google_sheets/actions/add-column/add-column.mjs index 03d867904fa5d..67e581b61c0f4 100644 --- a/components/google_sheets/actions/add-column/add-column.mjs +++ b/components/google_sheets/actions/add-column/add-column.mjs @@ -4,7 +4,7 @@ export default { key: "google_sheets-add-column", name: "Create Column", description: "Create a new column in a spreadsheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdate)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/add-multiple-rows/add-multiple-rows.mjs b/components/google_sheets/actions/add-multiple-rows/add-multiple-rows.mjs index 5fe762a707951..2c2bbc43e1ced 100644 --- a/components/google_sheets/actions/add-multiple-rows/add-multiple-rows.mjs +++ b/components/google_sheets/actions/add-multiple-rows/add-multiple-rows.mjs @@ -11,7 +11,7 @@ export default { key: "google_sheets-add-multiple-rows", name: "Add Multiple Rows", description: "Add multiple rows of data to a Google Sheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append)", - version: "0.2.12", + version: "0.2.13", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/add-single-row/add-single-row.mjs b/components/google_sheets/actions/add-single-row/add-single-row.mjs index 84ca48b66bdb2..baeb265aa1cc9 100644 --- a/components/google_sheets/actions/add-single-row/add-single-row.mjs +++ b/components/google_sheets/actions/add-single-row/add-single-row.mjs @@ -10,7 +10,7 @@ export default { key: "google_sheets-add-single-row", name: "Add Single Row", description: "Add a single row of data to Google Sheets. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append)", - version: "2.1.14", + version: "2.1.15", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/clear-cell/clear-cell.mjs b/components/google_sheets/actions/clear-cell/clear-cell.mjs index eab087fa56a78..08878621c8e86 100644 --- a/components/google_sheets/actions/clear-cell/clear-cell.mjs +++ b/components/google_sheets/actions/clear-cell/clear-cell.mjs @@ -7,7 +7,7 @@ export default { key: "google_sheets-clear-cell", name: "Clear Cell", description: "Delete the content of a specific cell in a spreadsheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/clear)", - version: "0.1.13", + version: "0.1.14", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/clear-rows/clear-rows.mjs b/components/google_sheets/actions/clear-rows/clear-rows.mjs index e2a391b8dee6f..bdcbb7cd51cd8 100644 --- a/components/google_sheets/actions/clear-rows/clear-rows.mjs +++ b/components/google_sheets/actions/clear-rows/clear-rows.mjs @@ -7,7 +7,7 @@ export default { key: "google_sheets-clear-rows", name: "Clear Rows", description: "Delete the content of a row or rows in a spreadsheet. Deleted rows will appear as blank rows. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/clear)", - version: "0.1.11", + version: "0.1.12", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/copy-worksheet/copy-worksheet.mjs b/components/google_sheets/actions/copy-worksheet/copy-worksheet.mjs index 1e67983861184..ffa0a91d96414 100644 --- a/components/google_sheets/actions/copy-worksheet/copy-worksheet.mjs +++ b/components/google_sheets/actions/copy-worksheet/copy-worksheet.mjs @@ -4,7 +4,7 @@ export default { key: "google_sheets-copy-worksheet", name: "Copy Worksheet", description: "Copy an existing worksheet to another Google Sheets file. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.sheets/copyTo)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/create-spreadsheet/create-spreadsheet.mjs b/components/google_sheets/actions/create-spreadsheet/create-spreadsheet.mjs index 55a5e2178ec7b..95c53fdd70c81 100644 --- a/components/google_sheets/actions/create-spreadsheet/create-spreadsheet.mjs +++ b/components/google_sheets/actions/create-spreadsheet/create-spreadsheet.mjs @@ -4,7 +4,7 @@ export default { key: "google_sheets-create-spreadsheet", name: "Create Spreadsheet", description: "Create a blank spreadsheet or duplicate an existing spreadsheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/create)", - version: "0.1.11", + version: "0.1.12", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/create-worksheet/create-worksheet.mjs b/components/google_sheets/actions/create-worksheet/create-worksheet.mjs index 543e1e16c23ea..d6ff8ae250c07 100644 --- a/components/google_sheets/actions/create-worksheet/create-worksheet.mjs +++ b/components/google_sheets/actions/create-worksheet/create-worksheet.mjs @@ -4,7 +4,7 @@ export default { key: "google_sheets-create-worksheet", name: "Create Worksheet", description: "Create a blank worksheet with a title. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdate)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/delete-rows/delete-rows.mjs b/components/google_sheets/actions/delete-rows/delete-rows.mjs index 59ee93a0f7140..a1c22b8b63d3c 100644 --- a/components/google_sheets/actions/delete-rows/delete-rows.mjs +++ b/components/google_sheets/actions/delete-rows/delete-rows.mjs @@ -4,7 +4,7 @@ export default { key: "google_sheets-delete-rows", name: "Delete Rows", description: "Deletes the specified rows from a spreadsheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deletedimensionrequest)", - version: "0.0.9", + version: "0.0.10", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/delete-worksheet/delete-worksheet.mjs b/components/google_sheets/actions/delete-worksheet/delete-worksheet.mjs index 3b4b5f3fe7461..6aa1cd9d9a2cd 100644 --- a/components/google_sheets/actions/delete-worksheet/delete-worksheet.mjs +++ b/components/google_sheets/actions/delete-worksheet/delete-worksheet.mjs @@ -4,7 +4,7 @@ export default { key: "google_sheets-delete-worksheet", name: "Delete Worksheet", description: "Delete a specific worksheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdate)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/find-row/find-row.mjs b/components/google_sheets/actions/find-row/find-row.mjs index 15d7d7da25952..c0a433179d103 100644 --- a/components/google_sheets/actions/find-row/find-row.mjs +++ b/components/google_sheets/actions/find-row/find-row.mjs @@ -7,7 +7,7 @@ export default { key: "google_sheets-find-row", name: "Find Row", description: "Find one or more rows by a column and value. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get)", - version: "0.2.12", + version: "0.2.13", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/get-cell/get-cell.mjs b/components/google_sheets/actions/get-cell/get-cell.mjs index 4a00caf1ac7ab..47a70a50d97f6 100644 --- a/components/google_sheets/actions/get-cell/get-cell.mjs +++ b/components/google_sheets/actions/get-cell/get-cell.mjs @@ -7,7 +7,7 @@ export default { key: "google_sheets-get-cell", name: "Get Cell", description: "Fetch the contents of a specific cell in a spreadsheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get)", - version: "0.1.11", + version: "0.1.12", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/get-spreadsheet-by-id/get-spreadsheet-by-id.mjs b/components/google_sheets/actions/get-spreadsheet-by-id/get-spreadsheet-by-id.mjs index 478760eb16939..abec362f30593 100644 --- a/components/google_sheets/actions/get-spreadsheet-by-id/get-spreadsheet-by-id.mjs +++ b/components/google_sheets/actions/get-spreadsheet-by-id/get-spreadsheet-by-id.mjs @@ -4,7 +4,7 @@ export default { key: "google_sheets-get-spreadsheet-by-id", name: "Get Spreadsheet by ID", description: "Returns the spreadsheet at the given ID. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get) for more information", - version: "0.1.10", + version: "0.1.11", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/get-values-in-range/get-values-in-range.mjs b/components/google_sheets/actions/get-values-in-range/get-values-in-range.mjs index 721bf58a59cc6..dcfcce33eaf57 100644 --- a/components/google_sheets/actions/get-values-in-range/get-values-in-range.mjs +++ b/components/google_sheets/actions/get-values-in-range/get-values-in-range.mjs @@ -7,7 +7,7 @@ export default { key: "google_sheets-get-values-in-range", name: "Get Values in Range", description: "Get all values or values from a range of cells using A1 notation. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get)", - version: "0.1.11", + version: "0.1.12", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/insert-anchored-note/insert-anchored-note.mjs b/components/google_sheets/actions/insert-anchored-note/insert-anchored-note.mjs index 043fa65556a76..4ff04baebf68c 100644 --- a/components/google_sheets/actions/insert-anchored-note/insert-anchored-note.mjs +++ b/components/google_sheets/actions/insert-anchored-note/insert-anchored-note.mjs @@ -5,7 +5,7 @@ export default { key: "google_sheets-insert-anchored-note", name: "Insert an Anchored Note", description: "Insert a note on a spreadsheet cell. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/batchUpdate)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { app, diff --git a/components/google_sheets/actions/insert-comment/insert-comment.mjs b/components/google_sheets/actions/insert-comment/insert-comment.mjs index 1a60810c13800..25048e3f68db7 100644 --- a/components/google_sheets/actions/insert-comment/insert-comment.mjs +++ b/components/google_sheets/actions/insert-comment/insert-comment.mjs @@ -4,7 +4,7 @@ export default { key: "google_sheets-insert-comment", name: "Insert Comment", description: "Insert a comment into a spreadsheet. [See the documentation](https://developers.google.com/drive/api/v3/reference/comments/create)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { app, diff --git a/components/google_sheets/actions/list-worksheets/list-worksheets.mjs b/components/google_sheets/actions/list-worksheets/list-worksheets.mjs index 62d8eb3fce21f..6eb6e2e4750ef 100644 --- a/components/google_sheets/actions/list-worksheets/list-worksheets.mjs +++ b/components/google_sheets/actions/list-worksheets/list-worksheets.mjs @@ -4,7 +4,7 @@ export default { key: "google_sheets-list-worksheets", name: "List Worksheets", description: "Get a list of all worksheets in a spreadsheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/update-cell/update-cell.mjs b/components/google_sheets/actions/update-cell/update-cell.mjs index 9a8f706134fc9..2b8ab560726b3 100644 --- a/components/google_sheets/actions/update-cell/update-cell.mjs +++ b/components/google_sheets/actions/update-cell/update-cell.mjs @@ -7,7 +7,7 @@ export default { key: "google_sheets-update-cell", name: "Update Cell", description: "Update a cell in a spreadsheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update)", - version: "0.1.11", + version: "0.1.12", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/update-multiple-rows/update-multiple-rows.mjs b/components/google_sheets/actions/update-multiple-rows/update-multiple-rows.mjs index dc424aac85129..f332bd89cd9b5 100644 --- a/components/google_sheets/actions/update-multiple-rows/update-multiple-rows.mjs +++ b/components/google_sheets/actions/update-multiple-rows/update-multiple-rows.mjs @@ -9,7 +9,7 @@ export default { key: "google_sheets-update-multiple-rows", name: "Update Multiple Rows", description: "Update multiple rows in a spreadsheet defined by a range. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update)", - version: "0.1.11", + version: "0.1.12", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/update-row/update-row.mjs b/components/google_sheets/actions/update-row/update-row.mjs index 125b4aa56bab3..492bd3b9844e6 100644 --- a/components/google_sheets/actions/update-row/update-row.mjs +++ b/components/google_sheets/actions/update-row/update-row.mjs @@ -10,7 +10,7 @@ export default { key: "google_sheets-update-row", name: "Update Row", description: "Update a row in a spreadsheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update)", - version: "0.1.12", + version: "0.1.13", type: "action", props: { googleSheets, diff --git a/components/google_sheets/actions/upsert-row/upsert-row.mjs b/components/google_sheets/actions/upsert-row/upsert-row.mjs index 5c394836c1160..5477aef4e41e0 100644 --- a/components/google_sheets/actions/upsert-row/upsert-row.mjs +++ b/components/google_sheets/actions/upsert-row/upsert-row.mjs @@ -24,7 +24,7 @@ export default { key: "google_sheets-upsert-row", name: "Upsert Row", description: "Upsert a row of data in a Google Sheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append)", - version: "0.1.13", + version: "0.1.14", type: "action", props: { googleSheets, diff --git a/components/google_sheets/google_sheets.app.mjs b/components/google_sheets/google_sheets.app.mjs index 4a3e8d86d02fd..a9340b649eec8 100644 --- a/components/google_sheets/google_sheets.app.mjs +++ b/components/google_sheets/google_sheets.app.mjs @@ -64,9 +64,10 @@ export default { query, prevContext, driveId, + fetchOnlyOwned, }) { const { nextPageToken } = prevContext; - return this.listSheetsOptions(driveId, nextPageToken, query); + return this.listSheetsOptions(driveId, nextPageToken, query, fetchOnlyOwned); }, }, worksheetIDs: { @@ -252,11 +253,13 @@ export default { } return sum; }, - async listSheetsOptions(driveId, pageToken = null, query) { + async listSheetsOptions(driveId, pageToken = null, query, fetchOnlyOwned) { const searchQuery = query ? ` and name contains '${query}'` : ""; - const q = `mimeType='application/vnd.google-apps.spreadsheet'${searchQuery}`; + const q = fetchOnlyOwned + ? `mimeType='application/vnd.google-apps.spreadsheet'${searchQuery} and 'me' in owners` + : `mimeType='application/vnd.google-apps.spreadsheet'${searchQuery}`; let request = { q, }; diff --git a/components/google_sheets/package.json b/components/google_sheets/package.json index 1072deff04406..84fb89efdd197 100644 --- a/components/google_sheets/package.json +++ b/components/google_sheets/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/google_sheets", - "version": "0.8.5", + "version": "0.8.7", "description": "Pipedream Google_sheets Components", "main": "google_sheets.app.mjs", "keywords": [ @@ -11,7 +11,7 @@ "author": "Pipedream (https://pipedream.com/)", "dependencies": { "@googleapis/sheets": "^0.3.0", - "@pipedream/google_drive": "^1.0.2", + "@pipedream/google_drive": "^1.0.4", "@pipedream/platform": "^3.1.0", "lodash": "^4.17.21", "uuidv4": "^6.2.6", diff --git a/components/google_sheets/sources/new-comment/new-comment.mjs b/components/google_sheets/sources/new-comment/new-comment.mjs index b8810f0db372a..1f96c4b59de21 100644 --- a/components/google_sheets/sources/new-comment/new-comment.mjs +++ b/components/google_sheets/sources/new-comment/new-comment.mjs @@ -6,7 +6,7 @@ export default { key: "google_sheets-new-comment", name: "New Comment (Instant)", description: "Emit new event each time a comment is added to a spreadsheet.", - version: "0.0.8", + version: "0.0.9", dedupe: "unique", type: "source", methods: { diff --git a/components/google_sheets/sources/new-row-added-polling/new-row-added-polling.mjs b/components/google_sheets/sources/new-row-added-polling/new-row-added-polling.mjs index 627df7346faf2..7536bc1de8845 100644 --- a/components/google_sheets/sources/new-row-added-polling/new-row-added-polling.mjs +++ b/components/google_sheets/sources/new-row-added-polling/new-row-added-polling.mjs @@ -8,7 +8,7 @@ export default { key: "google_sheets-new-row-added-polling", name: "New Row Added", description: "Emit new event each time a row or rows are added to the bottom of a spreadsheet.", - version: "0.0.5", + version: "0.0.6", dedupe: "unique", type: "source", props: { diff --git a/components/google_sheets/sources/new-row-added/new-row-added.mjs b/components/google_sheets/sources/new-row-added/new-row-added.mjs index c545e7b38a645..a7d689b0d0421 100644 --- a/components/google_sheets/sources/new-row-added/new-row-added.mjs +++ b/components/google_sheets/sources/new-row-added/new-row-added.mjs @@ -8,7 +8,7 @@ export default { key: "google_sheets-new-row-added", name: "New Row Added (Instant)", description: "Emit new event each time a row or rows are added to the bottom of a spreadsheet.", - version: "0.1.13", + version: "0.1.14", dedupe: "unique", type: "source", props: { diff --git a/components/google_sheets/sources/new-updates/new-updates.mjs b/components/google_sheets/sources/new-updates/new-updates.mjs index adb84daccd53b..48c4c97dec37a 100644 --- a/components/google_sheets/sources/new-updates/new-updates.mjs +++ b/components/google_sheets/sources/new-updates/new-updates.mjs @@ -9,7 +9,7 @@ export default { type: "source", name: "New Updates (Instant)", description: "Emit new event each time a row or cell is updated in a spreadsheet.", - version: "0.2.10", + version: "0.2.11", dedupe: "unique", props: { ...httpBase.props, diff --git a/components/google_sheets/sources/new-worksheet/new-worksheet.mjs b/components/google_sheets/sources/new-worksheet/new-worksheet.mjs index 369b736ab481a..06609dc7f3e51 100644 --- a/components/google_sheets/sources/new-worksheet/new-worksheet.mjs +++ b/components/google_sheets/sources/new-worksheet/new-worksheet.mjs @@ -9,7 +9,7 @@ export default { type: "source", name: "New Worksheet (Instant)", description: "Emit new event each time a new worksheet is created in a spreadsheet.", - version: "0.1.13", + version: "0.1.14", dedupe: "unique", hooks: { ...httpBase.hooks, diff --git a/components/google_slides/actions/create-image/create-image.mjs b/components/google_slides/actions/create-image/create-image.mjs new file mode 100644 index 0000000000000..a9053c8ffd2d5 --- /dev/null +++ b/components/google_slides/actions/create-image/create-image.mjs @@ -0,0 +1,97 @@ +import googleSlides from "../../google_slides.app.mjs"; + +export default { + key: "google_slides-create-image", + name: "Create Image", + description: "Creates an image in a slide. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#CreateImageRequest)", + version: "0.0.2", + type: "action", + props: { + googleSlides, + presentationId: { + propDefinition: [ + googleSlides, + "presentationId", + ], + }, + slideId: { + propDefinition: [ + googleSlides, + "slideId", + (c) => ({ + presentationId: c.presentationId, + }), + ], + }, + url: { + type: "string", + label: "URL", + description: "The URL of the image to insert", + }, + height: { + type: "integer", + label: "Height", + description: "The height of the shape in points (1/72 of an inch)", + }, + width: { + type: "integer", + label: "Width", + description: "The width of the shape in points (1/72 of an inch)", + }, + scaleX: { + type: "integer", + label: "Scale X", + description: "The scale of the shape on the x-axis", + default: 1, + optional: true, + }, + scaleY: { + type: "integer", + label: "Scale Y", + description: "The scale of the shape on the y-axis", + default: 1, + optional: true, + }, + translateX: { + type: "integer", + label: "Translate X", + description: "The translation of the shape on the x-axis", + default: 0, + optional: true, + }, + translateY: { + type: "integer", + label: "Translate Y", + description: "The translation of the shape on the y-axis", + default: 0, + optional: true, + }, + }, + async run({ $ }) { + const response = await this.googleSlides.createImage(this.presentationId, { + url: this.url, + elementProperties: { + pageObjectId: this.slideId, + size: { + height: { + magnitude: this.height, + unit: "PT", + }, + width: { + magnitude: this.width, + unit: "PT", + }, + }, + transform: { + scaleX: this.scaleX, + scaleY: this.scaleY, + translateX: this.translateX, + translateY: this.translateY, + unit: "PT", + }, + }, + }); + $.export("$summary", `Successfully created image with ID: ${response.data.replies[0].createImage.objectId}`); + return response.data; + }, +}; diff --git a/components/google_slides/actions/create-page-element/create-page-element.mjs b/components/google_slides/actions/create-page-element/create-page-element.mjs new file mode 100644 index 0000000000000..ee0b828442da4 --- /dev/null +++ b/components/google_slides/actions/create-page-element/create-page-element.mjs @@ -0,0 +1,99 @@ +import googleSlides from "../../google_slides.app.mjs"; +import { SHAPE_TYPES } from "../../common/constants.mjs"; + +export default { + key: "google_slides-create-page-element", + name: "Create Page Element", + description: "Create a new page element in a slide. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#CreateShapeRequest)", + version: "0.0.2", + type: "action", + props: { + googleSlides, + presentationId: { + propDefinition: [ + googleSlides, + "presentationId", + ], + }, + slideId: { + propDefinition: [ + googleSlides, + "slideId", + (c) => ({ + presentationId: c.presentationId, + }), + ], + }, + type: { + type: "string", + label: "Type", + description: "The type of the shape", + options: SHAPE_TYPES, + }, + height: { + type: "integer", + label: "Height", + description: "The height of the shape in points (1/72 of an inch)", + }, + width: { + type: "integer", + label: "Width", + description: "The width of the shape in points (1/72 of an inch)", + }, + scaleX: { + type: "integer", + label: "Scale X", + description: "The scale of the shape on the x-axis", + default: 1, + optional: true, + }, + scaleY: { + type: "integer", + label: "Scale Y", + description: "The scale of the shape on the y-axis", + default: 1, + optional: true, + }, + translateX: { + type: "integer", + label: "Translate X", + description: "The translation of the shape on the x-axis", + default: 0, + optional: true, + }, + translateY: { + type: "integer", + label: "Translate Y", + description: "The translation of the shape on the y-axis", + default: 0, + optional: true, + }, + }, + async run({ $ }) { + const response = await this.googleSlides.createShape(this.presentationId, { + shapeType: this.type, + elementProperties: { + pageObjectId: this.slideId, + size: { + height: { + magnitude: this.height, + unit: "PT", + }, + width: { + magnitude: this.width, + unit: "PT", + }, + }, + transform: { + scaleX: this.scaleX, + scaleY: this.scaleY, + translateX: this.translateX, + translateY: this.translateY, + unit: "PT", + }, + }, + }); + $.export("$summary", `Successfully created shape with ID: ${response.data.replies[0].createShape.objectId}`); + return response.data; + }, +}; diff --git a/components/google_slides/actions/create-presentation/create-presentation.mjs b/components/google_slides/actions/create-presentation/create-presentation.mjs index e8f0cb6a07c5c..c6e4f26d8bfee 100644 --- a/components/google_slides/actions/create-presentation/create-presentation.mjs +++ b/components/google_slides/actions/create-presentation/create-presentation.mjs @@ -4,7 +4,7 @@ export default { key: "google_slides-create-presentation", name: "Create Presentation", description: "Create a blank presentation or duplicate an existing presentation. [See the docs here](https://developers.google.com/slides/api/guides/presentations#copy_an_existing_presentation)", - version: "0.0.2", + version: "0.0.5", type: "action", props: { app, diff --git a/components/google_slides/actions/create-slide/create-slide.mjs b/components/google_slides/actions/create-slide/create-slide.mjs new file mode 100644 index 0000000000000..ec105eb6c0cf9 --- /dev/null +++ b/components/google_slides/actions/create-slide/create-slide.mjs @@ -0,0 +1,48 @@ +import googleSlides from "../../google_slides.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "google_slides-create-slide", + name: "Create Slide", + description: "Create a new slide in a presentation. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#CreateSlideRequest)", + version: "0.0.2", + type: "action", + props: { + googleSlides, + presentationId: { + propDefinition: [ + googleSlides, + "presentationId", + ], + }, + layoutId: { + propDefinition: [ + googleSlides, + "layoutId", + (c) => ({ + presentationId: c.presentationId, + }), + ], + }, + insertionIndex: { + type: "integer", + label: "Insertion Index", + description: "The optional zero-based index indicating where to insert the slides. If you don't specify an index, the slide is created at the end.", + optional: true, + }, + }, + async run({ $ }) { + try { + const response = await this.googleSlides.createSlide(this.presentationId, { + insertionIndex: this.insertionIndex, + slideLayoutReference: { + layoutId: this.layoutId, + }, + }); + $.export("$summary", `Successfully created slide with ID: ${response.data.replies[0].createSlide.objectId}`); + return response.data; + } catch (error) { + throw new ConfigurationError(`Failed to create slide: ${error.message}. Make sure you have permission to edit the presentation.`); + } + }, +}; diff --git a/components/google_slides/actions/create-table/create-table.mjs b/components/google_slides/actions/create-table/create-table.mjs new file mode 100644 index 0000000000000..b3a88ff537cbf --- /dev/null +++ b/components/google_slides/actions/create-table/create-table.mjs @@ -0,0 +1,88 @@ +import googleSlides from "../../google_slides.app.mjs"; + +export default { + key: "google_slides-create-table", + name: "Create Table", + description: "Create a new table in a slide. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#CreateTableRequest)", + version: "0.0.1", + type: "action", + props: { + googleSlides, + presentationId: { + propDefinition: [ + googleSlides, + "presentationId", + ], + }, + slideId: { + propDefinition: [ + googleSlides, + "slideId", + (c) => ({ + presentationId: c.presentationId, + }), + ], + }, + rows: { + type: "integer", + label: "Rows", + description: "The number of rows in the table", + }, + columns: { + type: "integer", + label: "Columns", + description: "The number of columns in the table", + }, + height: { + type: "integer", + label: "Height", + description: "The height of the shape in points (1/72 of an inch)", + }, + width: { + type: "integer", + label: "Width", + description: "The width of the shape in points (1/72 of an inch)", + }, + translateX: { + type: "integer", + label: "Translate X", + description: "The translation of the table on the x-axis", + optional: true, + }, + translateY: { + type: "integer", + label: "Translate Y", + description: "The translation of the table on the y-axis", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.googleSlides.createTable(this.presentationId, { + elementProperties: { + pageObjectId: this.slideId, + size: { + height: { + magnitude: this.height, + unit: "PT", + }, + width: { + magnitude: this.width, + unit: "PT", + }, + }, + transform: { + scaleX: 1, + scaleY: 1, + translateX: this.translateX, + translateY: this.translateY, + unit: "PT", + }, + }, + rows: this.rows, + columns: this.columns, + }); + + $.export("$summary", "Successfully created table in the slide"); + return response.data; + }, +}; diff --git a/components/google_slides/actions/delete-page-element/delete-page-element.mjs b/components/google_slides/actions/delete-page-element/delete-page-element.mjs new file mode 100644 index 0000000000000..335978c04c2b9 --- /dev/null +++ b/components/google_slides/actions/delete-page-element/delete-page-element.mjs @@ -0,0 +1,42 @@ +import googleSlides from "../../google_slides.app.mjs"; + +export default { + key: "google_slides-delete-page-element", + name: "Delete Page Element", + description: "Deletes a page element from a slide. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#DeleteObjectRequest)", + version: "0.0.2", + type: "action", + props: { + googleSlides, + presentationId: { + propDefinition: [ + googleSlides, + "presentationId", + ], + }, + slideId: { + propDefinition: [ + googleSlides, + "slideId", + (c) => ({ + presentationId: c.presentationId, + }), + ], + }, + pageElementId: { + propDefinition: [ + googleSlides, + "shapeId", + (c) => ({ + presentationId: c.presentationId, + slideId: c.slideId, + }), + ], + }, + }, + async run({ $ }) { + const response = await this.googleSlides.deleteObject(this.presentationId, this.pageElementId); + $.export("$summary", `Successfully deleted page element with ID: ${this.pageElementId}`); + return response.data; + }, +}; diff --git a/components/google_slides/actions/delete-slide/delete-slide.mjs b/components/google_slides/actions/delete-slide/delete-slide.mjs new file mode 100644 index 0000000000000..35ec17f781194 --- /dev/null +++ b/components/google_slides/actions/delete-slide/delete-slide.mjs @@ -0,0 +1,32 @@ +import googleSlides from "../../google_slides.app.mjs"; + +export default { + key: "google_slides-delete-slide", + name: "Delete Slide", + description: "Deletes a slide from a presentation. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#DeleteObjectRequest)", + version: "0.0.2", + type: "action", + props: { + googleSlides, + presentationId: { + propDefinition: [ + googleSlides, + "presentationId", + ], + }, + slideId: { + propDefinition: [ + googleSlides, + "slideId", + (c) => ({ + presentationId: c.presentationId, + }), + ], + }, + }, + async run({ $ }) { + const response = await this.googleSlides.deleteObject(this.presentationId, this.slideId); + $.export("$summary", `Successfully deleted slide with ID: ${this.slideId}`); + return response.data; + }, +}; diff --git a/components/google_slides/actions/delete-table-column/delete-table-column.mjs b/components/google_slides/actions/delete-table-column/delete-table-column.mjs new file mode 100644 index 0000000000000..8510d8b7fab05 --- /dev/null +++ b/components/google_slides/actions/delete-table-column/delete-table-column.mjs @@ -0,0 +1,52 @@ +import googleSlides from "../../google_slides.app.mjs"; + +export default { + key: "google_slides-delete-table-column", + name: "Delete Table Column", + description: "Delete column from a table. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#DeleteTableColumnRequest)", + version: "0.0.1", + type: "action", + props: { + googleSlides, + presentationId: { + propDefinition: [ + googleSlides, + "presentationId", + ], + }, + slideId: { + propDefinition: [ + googleSlides, + "slideId", + (c) => ({ + presentationId: c.presentationId, + }), + ], + }, + tableId: { + propDefinition: [ + googleSlides, + "tableId", + (c) => ({ + presentationId: c.presentationId, + slideId: c.slideId, + }), + ], + }, + columnIndex: { + type: "integer", + label: "Column Index", + description: "The index of the column to delete", + }, + }, + async run({ $ }) { + const response = await this.googleSlides.deleteTableColumn(this.presentationId, { + tableObjectId: this.tableId, + cellLocation: { + columnIndex: this.columnIndex, + }, + }); + $.export("$summary", "Successfully deleted table column"); + return response.data; + }, +}; diff --git a/components/google_slides/actions/delete-table-row/delete-table-row.mjs b/components/google_slides/actions/delete-table-row/delete-table-row.mjs new file mode 100644 index 0000000000000..817e74683983c --- /dev/null +++ b/components/google_slides/actions/delete-table-row/delete-table-row.mjs @@ -0,0 +1,52 @@ +import googleSlides from "../../google_slides.app.mjs"; + +export default { + key: "google_slides-delete-table-row", + name: "Delete Table Row", + description: "Delete row from a table. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#DeleteTableRowRequest)", + version: "0.0.1", + type: "action", + props: { + googleSlides, + presentationId: { + propDefinition: [ + googleSlides, + "presentationId", + ], + }, + slideId: { + propDefinition: [ + googleSlides, + "slideId", + (c) => ({ + presentationId: c.presentationId, + }), + ], + }, + tableId: { + propDefinition: [ + googleSlides, + "tableId", + (c) => ({ + presentationId: c.presentationId, + slideId: c.slideId, + }), + ], + }, + rowIndex: { + type: "integer", + label: "Row Index", + description: "The index of the row to delete", + }, + }, + async run({ $ }) { + const response = await this.googleSlides.deleteTableRow(this.presentationId, { + tableObjectId: this.tableId, + cellLocation: { + rowIndex: this.rowIndex, + }, + }); + $.export("$summary", "Successfully deleted table row"); + return response.data; + }, +}; diff --git a/components/google_slides/actions/find-presentation/find-presentation.mjs b/components/google_slides/actions/find-presentation/find-presentation.mjs index d6b4ba6c073d7..4abd47563fdb3 100644 --- a/components/google_slides/actions/find-presentation/find-presentation.mjs +++ b/components/google_slides/actions/find-presentation/find-presentation.mjs @@ -4,7 +4,7 @@ export default { key: "google_slides-find-presentation", name: "Find a Presentation", description: "Find a presentation on Google Drive. [See the docs here](https://developers.google.com/slides/api/samples/presentation#list_existing_presentation_files)", - version: "0.0.2", + version: "0.0.5", type: "action", props: { app, diff --git a/components/google_slides/actions/insert-table-columns/insert-table-columns.mjs b/components/google_slides/actions/insert-table-columns/insert-table-columns.mjs new file mode 100644 index 0000000000000..29186363c062f --- /dev/null +++ b/components/google_slides/actions/insert-table-columns/insert-table-columns.mjs @@ -0,0 +1,68 @@ +import googleSlides from "../../google_slides.app.mjs"; + +export default { + key: "google_slides-insert-table-columns", + name: "Insert Table Columns", + description: "Insert new columns into a table. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#InsertTableColumnsRequest)", + version: "0.0.1", + type: "action", + props: { + googleSlides, + presentationId: { + propDefinition: [ + googleSlides, + "presentationId", + ], + }, + slideId: { + propDefinition: [ + googleSlides, + "slideId", + (c) => ({ + presentationId: c.presentationId, + }), + ], + }, + tableId: { + propDefinition: [ + googleSlides, + "tableId", + (c) => ({ + presentationId: c.presentationId, + slideId: c.slideId, + }), + ], + }, + columnIndex: { + type: "integer", + label: "Column Index", + description: "The column index of an existing cell used as the insertion reference point", + optional: true, + }, + insertRight: { + type: "boolean", + label: "Insert Right", + description: "Whether to insert the column to the right of the specified cell location", + optional: true, + }, + number: { + type: "integer", + label: "Number", + description: "The number of columns to be inserted. Maximum 20 per request.", + default: 1, + optional: true, + }, + }, + async run({ $ }) { + const response = await this.googleSlides.insertTableColumns(this.presentationId, { + tableObjectId: this.tableId, + cellLocation: { + columnIndex: this.columnIndex, + }, + insertRight: this.insertRight, + number: this.number, + }); + $.export("$summary", "Successfully inserted table column"); + return response.data; + }, +}; diff --git a/components/google_slides/actions/insert-table-rows/insert-table-rows.mjs b/components/google_slides/actions/insert-table-rows/insert-table-rows.mjs new file mode 100644 index 0000000000000..c30ba83cafb7f --- /dev/null +++ b/components/google_slides/actions/insert-table-rows/insert-table-rows.mjs @@ -0,0 +1,68 @@ +import googleSlides from "../../google_slides.app.mjs"; + +export default { + key: "google_slides-insert-table-rows", + name: "Insert Table Rows", + description: "Insert new rows into a table. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#InsertTableRowsRequest)", + version: "0.0.1", + type: "action", + props: { + googleSlides, + presentationId: { + propDefinition: [ + googleSlides, + "presentationId", + ], + }, + slideId: { + propDefinition: [ + googleSlides, + "slideId", + (c) => ({ + presentationId: c.presentationId, + }), + ], + }, + tableId: { + propDefinition: [ + googleSlides, + "tableId", + (c) => ({ + presentationId: c.presentationId, + slideId: c.slideId, + }), + ], + }, + rowIndex: { + type: "integer", + label: "Row Index", + description: "The row index of an existing cell used as the insertion reference point", + optional: true, + }, + insertBelow: { + type: "boolean", + label: "Insert Below", + description: "Whether to insert the row below the specified cell location", + optional: true, + }, + number: { + type: "integer", + label: "Number", + description: "The number of rows to be inserted. Maximum 20 per request.", + default: 1, + optional: true, + }, + }, + async run({ $ }) { + const response = await this.googleSlides.insertTableRows(this.presentationId, { + tableObjectId: this.tableId, + cellLocation: { + rowIndex: this.rowIndex, + }, + insertBelow: this.insertBelow, + number: this.number, + }); + $.export("$summary", "Successfully inserted table row"); + return response.data; + }, +}; diff --git a/components/google_slides/actions/insert-text-into-table/insert-text-into-table.mjs b/components/google_slides/actions/insert-text-into-table/insert-text-into-table.mjs new file mode 100644 index 0000000000000..e2e839790375b --- /dev/null +++ b/components/google_slides/actions/insert-text-into-table/insert-text-into-table.mjs @@ -0,0 +1,73 @@ +import googleSlides from "../../google_slides.app.mjs"; + +export default { + key: "google_slides-insert-text-into-table", + name: "Insert Text into Table", + description: "Insert text into a table cell. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#InsertTextRequest)", + version: "0.0.1", + type: "action", + props: { + googleSlides, + presentationId: { + propDefinition: [ + googleSlides, + "presentationId", + ], + }, + slideId: { + propDefinition: [ + googleSlides, + "slideId", + (c) => ({ + presentationId: c.presentationId, + }), + ], + }, + tableId: { + propDefinition: [ + googleSlides, + "tableId", + (c) => ({ + presentationId: c.presentationId, + slideId: c.slideId, + }), + ], + }, + rowIndex: { + type: "integer", + label: "Row Index", + description: "The 0-based table row index of the target cell", + optional: true, + }, + columnIndex: { + type: "integer", + label: "Column Index", + description: "The 0-based table column index of the target cell", + optional: true, + }, + text: { + type: "string", + label: "Text", + description: "The text to insert", + }, + insertionIndex: { + type: "integer", + label: "Insertion Index", + description: "The index where the text will be inserted", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.googleSlides.insertText(this.presentationId, { + objectId: this.tableId, + cellLocation: { + rowIndex: this.rowIndex, + columnIndex: this.columnIndex, + }, + text: this.text, + insertionIndex: this.insertionIndex, + }); + $.export("$summary", "Successfully inserted text into table cell"); + return response.data; + }, +}; diff --git a/components/google_slides/actions/insert-text/insert-text.mjs b/components/google_slides/actions/insert-text/insert-text.mjs new file mode 100644 index 0000000000000..fd2ce6e50fcf9 --- /dev/null +++ b/components/google_slides/actions/insert-text/insert-text.mjs @@ -0,0 +1,58 @@ +import googleSlides from "../../google_slides.app.mjs"; + +export default { + key: "google_slides-insert-text", + name: "Insert Text", + description: "Insert text into a shape. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#InsertTextRequest)", + version: "0.0.2", + type: "action", + props: { + googleSlides, + presentationId: { + propDefinition: [ + googleSlides, + "presentationId", + ], + }, + slideId: { + propDefinition: [ + googleSlides, + "slideId", + (c) => ({ + presentationId: c.presentationId, + }), + ], + }, + shapeId: { + propDefinition: [ + googleSlides, + "shapeId", + (c) => ({ + presentationId: c.presentationId, + slideId: c.slideId, + textOnly: true, + }), + ], + }, + text: { + type: "string", + label: "Text", + description: "The text to insert", + }, + insertionIndex: { + type: "integer", + label: "Insertion Index", + description: "The index where the text will be inserted", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.googleSlides.insertText(this.presentationId, { + objectId: this.shapeId, + text: this.text, + insertionIndex: this.insertionIndex, + }); + $.export("$summary", `Successfully inserted text into shape with ID: ${this.shapeId}`); + return response.data; + }, +}; diff --git a/components/google_slides/actions/merge-data/merge-data.mjs b/components/google_slides/actions/merge-data/merge-data.mjs index d585f769ef2a0..fccd73d59b189 100644 --- a/components/google_slides/actions/merge-data/merge-data.mjs +++ b/components/google_slides/actions/merge-data/merge-data.mjs @@ -4,7 +4,7 @@ export default { key: "google_slides-merge-data", name: "Merge Data", description: "Merge data into a presentation. [See the docs here](https://developers.google.com/slides/api/guides/merge)", - version: "0.0.1", + version: "0.0.4", type: "action", props: { app, diff --git a/components/google_slides/actions/refresh-chart/refresh-chart.mjs b/components/google_slides/actions/refresh-chart/refresh-chart.mjs index 3f74f4466b246..55c76965403ce 100644 --- a/components/google_slides/actions/refresh-chart/refresh-chart.mjs +++ b/components/google_slides/actions/refresh-chart/refresh-chart.mjs @@ -4,7 +4,7 @@ export default { key: "google_slides-refresh-chart", name: "Refresh a chart", description: "Refresh a chart from Sheets. [See the docs here](https://developers.google.com/slides/api/samples/elements#refresh_a_chart_from_sheets)", - version: "0.0.2", + version: "0.0.5", type: "action", props: { app, diff --git a/components/google_slides/actions/replace-all-text/replace-all-text.mjs b/components/google_slides/actions/replace-all-text/replace-all-text.mjs new file mode 100644 index 0000000000000..67df22629a985 --- /dev/null +++ b/components/google_slides/actions/replace-all-text/replace-all-text.mjs @@ -0,0 +1,59 @@ +import googleSlides from "../../google_slides.app.mjs"; + +export default { + key: "google_slides-replace-all-text", + name: "Replace All Text", + description: "Replace all text in a presentation. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#ReplaceAllTextRequest)", + version: "0.0.1", + type: "action", + props: { + googleSlides, + presentationId: { + propDefinition: [ + googleSlides, + "presentationId", + ], + }, + text: { + type: "string", + label: "Text", + description: "The text to replace", + }, + replaceText: { + type: "string", + label: "Replace Text", + description: "The text that will replace the matched text", + }, + slideIds: { + propDefinition: [ + googleSlides, + "slideId", + (c) => ({ + presentationId: c.presentationId, + }), + ], + type: "string[]", + label: "Slide IDs", + description: "Limits the matches to page elements only on the given pages", + optional: true, + }, + matchCase: { + type: "boolean", + label: "Match Case", + description: "Whether to match case", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.googleSlides.replaceAllText(this.presentationId, { + replaceText: this.replaceText, + pageObjectIds: this.slideIds, + containsText: { + text: this.text, + matchCase: this.matchCase, + }, + }); + $.export("$summary", "Successfully replaced text in the presentation"); + return response.data; + }, +}; diff --git a/components/google_slides/common/constants.mjs b/components/google_slides/common/constants.mjs new file mode 100644 index 0000000000000..bcc0281c23800 --- /dev/null +++ b/components/google_slides/common/constants.mjs @@ -0,0 +1,143 @@ +export const SHAPE_TYPES = [ + "TEXT_BOX", + "RECTANGLE", + "ROUND_RECTANGLE", + "ELLIPSE", + "ARC", + "BENT_ARROW", + "BENT_UP_ARROW", + "BEVEL", + "BLOCK_ARC", + "BRACE_PAIR", + "BRACKET_PAIR", + "CAN", + "CHEVRON", + "CHORD", + "CLOUD", + "CORNER", + "CUBE", + "CURVED_DOWN_ARROW", + "CURVED_LEFT_ARROW", + "CURVED_RIGHT_ARROW", + "CURVED_UP_ARROW", + "DECAGON", + "DIAGONAL_STRIPE", + "DIAMOND", + "DODECAGON", + "DONUT", + "DOUBLE_WAVE", + "DOWN_ARROW", + "DOWN_ARROW_CALLOUT", + "FOLDED_CORNER", + "FRAME", + "HALF_FRAME", + "HEART", + "HEPTAGON", + "HEXAGON", + "HOME_PLATE", + "HORIZONTAL_SCROLL", + "IRREGULAR_SEAL_1", + "IRREGULAR_SEAL_2", + "LEFT_ARROW", + "LEFT_ARROW_CALLOUT", + "LEFT_BRACE", + "LEFT_BRACKET", + "LEFT_RIGHT_ARROW", + "LEFT_RIGHT_ARROW_CALLOUT", + "LEFT_RIGHT_UP_ARROW", + "LEFT_UP_ARROW", + "LIGHTNING_BOLT", + "MATH_DIVIDE", + "MATH_EQUAL", + "MATH_MINUS", + "MATH_MULTIPLY", + "MATH_NOT_EQUAL", + "MATH_PLUS", + "MOON", + "NO_SMOKING", + "NOTCHED_RIGHT_ARROW", + "OCTAGON", + "PARALLELOGRAM", + "PENTAGON", + "PIE", + "PLAQUE", + "PLUS", + "QUAD_ARROW", + "QUAD_ARROW_CALLOUT", + "RIBBON", + "RIBBON_2", + "RIGHT_ARROW", + "RIGHT_ARROW_CALLOUT", + "RIGHT_BRACE", + "RIGHT_BRACKET", + "ROUND_1_RECTANGLE", + "ROUND_2_DIAGONAL_RECTANGLE", + "ROUND_2_SAME_RECTANGLE", + "RIGHT_TRIANGLE", + "SMILEY_FACE", + "SNIP_1_RECTANGLE", + "SNIP_2_DIAGONAL_RECTANGLE", + "SNIP_2_SAME_RECTANGLE", + "SNIP_ROUND_RECTANGLE", + "STAR_10", + "STAR_12", + "STAR_16", + "STAR_24", + "STAR_32", + "STAR_4", + "STAR_5", + "STAR_6", + "STAR_7", + "STAR_8", + "STRIPED_RIGHT_ARROW", + "SUN", + "TRAPEZOID", + "TRIANGLE", + "UP_ARROW", + "UP_ARROW_CALLOUT", + "UP_DOWN_ARROW", + "UTURN_ARROW", + "VERTICAL_SCROLL", + "WAVE", + "WEDGE_ELLIPSE_CALLOUT", + "WEDGE_RECTANGLE_CALLOUT", + "WEDGE_ROUND_RECTANGLE_CALLOUT", + "FLOW_CHART_ALTERNATE_PROCESS", + "FLOW_CHART_COLLATE", + "FLOW_CHART_CONNECTOR", + "FLOW_CHART_DECISION", + "FLOW_CHART_DELAY", + "FLOW_CHART_DISPLAY", + "FLOW_CHART_DOCUMENT", + "FLOW_CHART_EXTRACT", + "FLOW_CHART_INPUT_OUTPUT", + "FLOW_CHART_INTERNAL_STORAGE", + "FLOW_CHART_MAGNETIC_DISK", + "FLOW_CHART_MAGNETIC_DRUM", + "FLOW_CHART_MAGNETIC_TAPE", + "FLOW_CHART_MANUAL_INPUT", + "FLOW_CHART_MANUAL_OPERATION", + "FLOW_CHART_MERGE", + "FLOW_CHART_MULTIDOCUMENT", + "FLOW_CHART_OFFLINE_STORAGE", + "FLOW_CHART_OFFPAGE_CONNECTOR", + "FLOW_CHART_ONLINE_STORAGE", + "FLOW_CHART_OR", + "FLOW_CHART_PREDEFINED_PROCESS", + "FLOW_CHART_PREPARATION", + "FLOW_CHART_PROCESS", + "FLOW_CHART_PUNCHED_CARD", + "FLOW_CHART_PUNCHED_TAPE", + "FLOW_CHART_SORT", + "FLOW_CHART_SUMMING_JUNCTION", + "FLOW_CHART_TERMINATOR", + "ARROW_EAST", + "ARROW_NORTH_EAST", + "ARROW_NORTH", + "SPEECH", + "STARBURST", + "TEARDROP", + "ELLIPSE_RIBBON", + "ELLIPSE_RIBBON_2", + "CLOUD_CALLOUT", +]; diff --git a/components/google_slides/google_slides.app.mjs b/components/google_slides/google_slides.app.mjs index 6d36c69dddb9a..326fa6ff96daa 100644 --- a/components/google_slides/google_slides.app.mjs +++ b/components/google_slides/google_slides.app.mjs @@ -1,5 +1,5 @@ import slides from "@googleapis/slides"; -import googleDrive from "../google_drive/google_drive.app.mjs"; +import googleDrive from "@pipedream/google_drive"; export default { ...googleDrive, @@ -19,6 +19,64 @@ export default { return this.listPresentationsOptions(driveId, nextPageToken); }, }, + layoutId: { + type: "string", + label: "Layout ID", + description: "The ID of a slide layout", + optional: true, + async options({ presentationId }) { + const { layouts } = await this.getPresentation(presentationId); + return layouts.map((layout) => ({ + label: layout.layoutProperties.name, + value: layout.objectId, + })); + }, + }, + slideId: { + type: "string", + label: "Slide ID", + description: "The ID of a slide", + async options({ presentationId }) { + const { slides } = await this.getPresentation(presentationId); + return slides.map((slide) => ({ + label: slide.slideProperties.layoutObjectId, + value: slide.objectId, + })); + }, + }, + shapeId: { + type: "string", + label: "Shape ID", + description: "The ID of a shape", + async options({ + presentationId, slideId, textOnly = false, + }) { + const { pageElements } = await this.getSlide(presentationId, slideId); + let shapes = pageElements; + if (textOnly) { + shapes = shapes.filter((element) => element?.shape?.shapeType === "TEXT_BOX"); + } + return shapes.map((element) => ({ + label: element.shape?.placeholder?.type || element?.shape?.shapeType || element.objectId, + value: element.objectId, + })); + }, + }, + tableId: { + type: "string", + label: "Table ID", + description: "The ID of a table", + async options({ + presentationId, slideId, + }) { + const { pageElements } = await this.getSlide(presentationId, slideId); + let tables = pageElements.filter((element) => element?.table); + return tables.map((element) => ({ + label: `${element.table.rows} x ${element.table.columns} Table`, + value: element.objectId, + })); + }, + }, }, methods: { ...googleDrive.methods, @@ -32,8 +90,16 @@ export default { auth, }); }, - refreshChart(presentationId, chartId) { + batchUpdate(presentationId, requests) { const slides = this.slides(); + return slides.presentations.batchUpdate({ + presentationId, + requestBody: { + requests, + }, + }); + }, + refreshChart(presentationId, chartId) { const requests = [ { refreshSheetsChart: { @@ -41,12 +107,117 @@ export default { }, }, ]; - return slides.presentations.batchUpdate({ - presentationId, - requestBody: { - requests, + return this.batchUpdate(presentationId, requests); + }, + createSlide(presentationId, data) { + const requests = [ + { + createSlide: { + ...data, + }, }, - }); + ]; + return this.batchUpdate(presentationId, requests); + }, + createShape(presentationId, data) { + const requests = [ + { + createShape: { + ...data, + }, + }, + ]; + return this.batchUpdate(presentationId, requests); + }, + insertText(presentationId, data) { + const requests = [ + { + insertText: { + ...data, + }, + }, + ]; + return this.batchUpdate(presentationId, requests); + }, + replaceAllText(presentationId, data) { + const requests = [ + { + replaceAllText: { + ...data, + }, + }, + ]; + return this.batchUpdate(presentationId, requests); + }, + createTable(presentationId, data) { + const requests = [ + { + createTable: { + ...data, + }, + }, + ]; + return this.batchUpdate(presentationId, requests); + }, + insertTableRows(presentationId, data) { + const requests = [ + { + insertTableRows: { + ...data, + }, + }, + ]; + return this.batchUpdate(presentationId, requests); + }, + insertTableColumns(presentationId, data) { + const requests = [ + { + insertTableColumns: { + ...data, + }, + }, + ]; + return this.batchUpdate(presentationId, requests); + }, + deleteTableRow(presentationId, data) { + const requests = [ + { + deleteTableRow: { + ...data, + }, + }, + ]; + return this.batchUpdate(presentationId, requests); + }, + deleteTableColumn(presentationId, data) { + const requests = [ + { + deleteTableColumn: { + ...data, + }, + }, + ]; + return this.batchUpdate(presentationId, requests); + }, + createImage(presentationId, data) { + const requests = [ + { + createImage: { + ...data, + }, + }, + ]; + return this.batchUpdate(presentationId, requests); + }, + deleteObject(presentationId, objectId) { + const requests = [ + { + deleteObject: { + objectId, + }, + }, + ]; + return this.batchUpdate(presentationId, requests); }, async createPresentation(title) { const slides = this.slides(); @@ -79,6 +250,14 @@ export default { }; return (await slides.presentations.get(request)).data; }, + async getSlide(presentationId, slideId) { + const slides = this.slides(); + const request = { + presentationId, + pageObjectId: slideId, + }; + return (await slides.presentations.pages.get(request)).data; + }, async copyPresentation(fileId, name) { const drive = this.drive(); const resource = { diff --git a/components/google_slides/package.json b/components/google_slides/package.json index c25733a48f2fc..ad4900016d131 100644 --- a/components/google_slides/package.json +++ b/components/google_slides/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/google_slides", - "version": "0.1.1", + "version": "0.3.0", "description": "Pipedream Google Slides Components", "main": "google_slides.app.mjs", "keywords": [ @@ -10,9 +10,10 @@ "homepage": "https://pipedream.com/apps/google_slides", "author": "Pipedream (https://pipedream.com/)", "dependencies": { - "@googleapis/slides": "^0.7.1", "@googleapis/drive": "^2.3.0", - "@pipedream/platform": "^0.9.0", + "@googleapis/slides": "^0.7.1", + "@pipedream/google_drive": "^1.0.3", + "@pipedream/platform": "^3.1.0", "mime-db": "^1.51.0", "uuid": "^8.3.2" }, diff --git a/components/google_slides/sources/new-presentation/new-presentation.mjs b/components/google_slides/sources/new-presentation/new-presentation.mjs index 03f67a74017f2..381059a329a68 100644 --- a/components/google_slides/sources/new-presentation/new-presentation.mjs +++ b/components/google_slides/sources/new-presentation/new-presentation.mjs @@ -6,7 +6,7 @@ export default { type: "source", name: "New Presentation (Instant)", description: "Emit new event each time a new presentation is created in a drive.", - version: "0.0.3", + version: "0.0.4", hooks: { ...newFilesInstant.hooks, async deploy() { diff --git a/components/google_tag_manager/package.json b/components/google_tag_manager/package.json index 42789cb91f57e..5ae6400d7f7a8 100644 --- a/components/google_tag_manager/package.json +++ b/components/google_tag_manager/package.json @@ -1,7 +1,8 @@ { "name": "@pipedream/google_tag_manager", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Google Tag Manager Components", + "main": "google_tag_manager.app.mjs", "keywords": [ "pipedream", "google_tag_manager" @@ -12,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.5.1" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/google_vertex_ai/actions/analyze-image-video/analyze-image-video.mjs b/components/google_vertex_ai/actions/analyze-image-video/analyze-image-video.mjs index 0e125e97e7d9a..aa76afc695875 100644 --- a/components/google_vertex_ai/actions/analyze-image-video/analyze-image-video.mjs +++ b/components/google_vertex_ai/actions/analyze-image-video/analyze-image-video.mjs @@ -4,7 +4,7 @@ export default { key: "google_vertex_ai-analyze-image-video", name: "Analyze Image/Video", description: "Examines an image or video following given instructions. Results will contain the analysis findings. [See the documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.publishers.models/generateContent)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { vertexAi, diff --git a/components/google_vertex_ai/actions/analyze-text-sentiment/analyze-text-sentiment.mjs b/components/google_vertex_ai/actions/analyze-text-sentiment/analyze-text-sentiment.mjs index ff9560cd4bded..1dd8b981516d0 100644 --- a/components/google_vertex_ai/actions/analyze-text-sentiment/analyze-text-sentiment.mjs +++ b/components/google_vertex_ai/actions/analyze-text-sentiment/analyze-text-sentiment.mjs @@ -4,7 +4,7 @@ export default { key: "google_vertex_ai-analyze-text-sentiment", name: "Analyze Text Sentiment", description: "Analyzes a specified text for its underlying sentiment. [See the documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.publishers.models/generateContent)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { vertexAi, diff --git a/components/google_vertex_ai/actions/classify-text/classify-text.mjs b/components/google_vertex_ai/actions/classify-text/classify-text.mjs index 7f2657650701f..50bc70c488a96 100644 --- a/components/google_vertex_ai/actions/classify-text/classify-text.mjs +++ b/components/google_vertex_ai/actions/classify-text/classify-text.mjs @@ -4,7 +4,7 @@ export default { key: "google_vertex_ai-classify-text", name: "Classify Text", description: "Groups a provided text into predefined categories. [See the documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.publishers.models/generateContent)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { vertexAi, diff --git a/components/google_vertex_ai/actions/common/generate-video.mjs b/components/google_vertex_ai/actions/common/generate-video.mjs new file mode 100644 index 0000000000000..02f48c3a8fd8b --- /dev/null +++ b/components/google_vertex_ai/actions/common/generate-video.mjs @@ -0,0 +1,160 @@ +import app from "../../google_vertex_ai.app.mjs"; + +export default { + props: { + app, + projectId: { + propDefinition: [ + app, + "projectId", + ], + }, + model: { + propDefinition: [ + app, + "model", + ], + }, + prompt: { + type: "string", + label: "Prompt", + description: "The text prompt to guide video generation. For Veo 3, you can include audio cues like dialogue in quotes, sound effects, and ambient noise descriptions.", + }, + aspectRatio: { + type: "string", + label: "Aspect Ratio", + description: "The aspect ratio of the generated video", + options: [ + { + label: "16:9 (Landscape)", + value: "16:9", + }, + { + label: "9:16 (Portrait) - Veo 2 only", + value: "9:16", + }, + ], + default: "16:9", + }, + durationSeconds: { + type: "integer", + label: "Duration (seconds)", + description: "The length of the video in seconds. Veo 2: 5-8 seconds, Veo 3: 8 seconds", + default: 8, + min: 5, + max: 8, + }, + enhancePrompt: { + type: "boolean", + label: "Enhance Prompt", + description: "Use Gemini to enhance your prompts", + default: true, + }, + generateAudio: { + type: "boolean", + label: "Generate Audio", + description: "Generate audio for the video (Veo 3 only)", + default: true, + }, + negativePrompt: { + type: "string", + label: "Negative Prompt", + description: "A text string that describes anything you want to discourage the model from generating", + optional: true, + }, + personGeneration: { + type: "string", + label: "Person Generation", + description: "The safety setting that controls whether people or face generation is allowed", + options: [ + { + label: "Allow Adult", + value: "allow_adult", + }, + { + label: "Don't Allow", + value: "dont_allow", + }, + ], + default: "allow_adult", + optional: true, + }, + resolution: { + type: "string", + label: "Resolution", + description: "The resolution of the generated video (Veo 3 models only)", + options: [ + { + label: "720p", + value: "720p", + }, + { + label: "1080p", + value: "1080p", + }, + ], + default: "720p", + optional: true, + }, + sampleCount: { + type: "integer", + label: "Sample Count", + description: "The number of output videos requested", + default: 1, + min: 1, + max: 4, + }, + storageUri: { + type: "string", + label: "Storage URI", + description: "A Cloud Storage bucket URI to store the output video, in the format `gs://BUCKET_NAME/SUBDIRECTORY`. If a Cloud Storage bucket isn't provided, base64-encoded video bytes are returned in the response.", + optional: true, + }, + }, + methods: { + async pollOperation({ + $, projectId, model, operationName, + }) { + const pollInterval = 45000; // 45 seconds + const maxAttempts = 6; + + for (let attempt = 1; attempt <= maxAttempts; attempt++) { + try { + const response = await this.app.fetchOperation({ + $, + projectId, + model, + data: { + operationName, + }, + }); + + if (response.done) { + return response; + } + + console.log(`Video generation in progress... (attempt ${attempt}/${maxAttempts})`); + + if (attempt < maxAttempts) { + await new Promise((resolve) => setTimeout(resolve, pollInterval)); + } + } catch (error) { + throw new Error(`Error polling operation: ${error.message}`); + } + } + + throw new Error(`Video generation not completed after ${maxAttempts} polling attempts`); + }, + async streamToBase64(stream) { + return new Promise((resolve, reject) => { + const chunks = []; + stream.on("data", (chunk) => chunks.push(chunk)); + stream.on("end", () => { + const buffer = Buffer.concat(chunks); + resolve(buffer.toString("base64")); + }); + stream.on("error", reject); + }); + }, + }, +}; diff --git a/components/google_vertex_ai/actions/generate-video-from-image/generate-video-from-image.mjs b/components/google_vertex_ai/actions/generate-video-from-image/generate-video-from-image.mjs new file mode 100644 index 0000000000000..2b3a4f9c033a7 --- /dev/null +++ b/components/google_vertex_ai/actions/generate-video-from-image/generate-video-from-image.mjs @@ -0,0 +1,95 @@ +import { getFileStreamAndMetadata } from "@pipedream/platform"; +import common from "../common/generate-video.mjs"; + +export default { + ...common, + key: "google_vertex_ai-generate-video-from-image", + name: "Generate Video from Image", + description: "Generate a video from an image with optional text prompt using Google Vertex AI Veo models. [See the documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/veo-video-generation)", + version: "0.0.1", + type: "action", + props: { + ...common.props, + image: { + type: "string", + label: "Image Path Or URL", + description: "Provide either a file URL or a path to a file in the `/tmp` directory (for example, `/tmp/image.jpg`). Supported formats: JPEG, PNG. For best quality, use 720p or higher (1280 x 720 pixels) with 16:9 or 9:16 aspect ratio.", + }, + }, + async run({ $ }) { + const { + projectId, + model, + image, + prompt, + aspectRatio, + durationSeconds, + enhancePrompt, + generateAudio, + negativePrompt, + personGeneration, + resolution, + sampleCount, + storageUri, + } = this; + + const { + stream, metadata, + } = await getFileStreamAndMetadata(image); + const imageBase64 = await this.streamToBase64(stream); + + const operationResponse = await this.app.generateVideosLongRunning({ + $, + projectId, + model, + data: { + instances: [ + { + prompt, + image: { + bytesBase64Encoded: imageBase64, + mimeType: metadata.contentType, + }, + }, + ], + parameters: { + aspectRatio, + durationSeconds, + enhancePrompt, + sampleCount, + negativePrompt, + personGeneration, + generateAudio, + resolution, + storageUri, + }, + }, + }); + + if (!operationResponse.name) { + throw new Error("Failed to start video generation operation"); + } + + // Poll the operation until completion + const completedOperation = await this.pollOperation({ + $, + projectId, + model, + operationName: operationResponse.name, + }); + + if (completedOperation.error) { + throw new Error(`Video generation failed: ${JSON.stringify(completedOperation.error)}`); + } + + if (!completedOperation.response) { + throw new Error("No response received from completed operation"); + } + + const videoCount = completedOperation.response?.videos?.length || 0; + + $.export("$summary", `Successfully generated ${videoCount} video(s) from image`); + + return completedOperation; + }, +}; diff --git a/components/google_vertex_ai/actions/generate-video-from-text/generate-video-from-text.mjs b/components/google_vertex_ai/actions/generate-video-from-text/generate-video-from-text.mjs new file mode 100644 index 0000000000000..5927027a64e23 --- /dev/null +++ b/components/google_vertex_ai/actions/generate-video-from-text/generate-video-from-text.mjs @@ -0,0 +1,76 @@ +import common from "../common/generate-video.mjs"; + +export default { + ...common, + key: "google_vertex_ai-generate-video-from-text", + name: "Generate Video from Text", + description: "Generate a video from a text prompt using Google Vertex AI Veo models. [See the documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/veo-video-generation)", + version: "0.0.1", + type: "action", + async run({ $ }) { + const { + projectId, + model, + prompt, + aspectRatio, + durationSeconds, + enhancePrompt, + generateAudio, + negativePrompt, + personGeneration, + resolution, + sampleCount, + storageUri, + } = this; + + const operationResponse = await this.app.generateVideosLongRunning({ + $, + projectId, + model, + data: { + instances: [ + { + prompt, + }, + ], + parameters: { + aspectRatio, + durationSeconds, + enhancePrompt, + sampleCount, + negativePrompt, + personGeneration, + generateAudio, + resolution, + storageUri, + }, + }, + }); + + if (!operationResponse.name) { + throw new Error("Failed to start video generation operation"); + } + + // Poll the operation until completion + const completedOperation = await this.pollOperation({ + $, + projectId, + model, + operationName: operationResponse.name, + }); + + if (completedOperation.error) { + throw new Error(`Video generation failed: ${JSON.stringify(completedOperation.error)}`); + } + + if (!completedOperation.response) { + throw new Error("No response received from completed operation"); + } + + const videoCount = completedOperation.response?.videos?.length || 0; + + $.export("$summary", `Successfully generated ${videoCount} video(s)`); + + return completedOperation; + }, +}; diff --git a/components/google_vertex_ai/google_vertex_ai.app.mjs b/components/google_vertex_ai/google_vertex_ai.app.mjs index b85d7c3109141..64c6ace702ad3 100644 --- a/components/google_vertex_ai/google_vertex_ai.app.mjs +++ b/components/google_vertex_ai/google_vertex_ai.app.mjs @@ -33,6 +33,26 @@ export default { }; }, }, + model: { + type: "string", + label: "Model", + description: "The model to use for video generation", + options: [ + { + label: "Veo 2.0 Generate 001 (Stable)", + value: "veo-2.0-generate-001", + }, + { + label: "Veo 3.0 Generate Preview (Preview)", + value: "veo-3.0-generate-preview", + }, + { + label: "Veo 3.0 Fast Generate Preview (Preview)", + value: "veo-3.0-fast-generate-preview", + }, + ], + default: "veo-3.0-generate-preview", + }, }, methods: { _baseUrl() { @@ -67,5 +87,23 @@ export default { ...opts, }); }, + generateVideosLongRunning({ + projectId, model, ...opts + }) { + return this._makeRequest({ + method: "POST", + path: `/projects/${projectId}/locations/us-central1/publishers/google/models/${model}:predictLongRunning`, + ...opts, + }); + }, + fetchOperation({ + projectId, model, ...opts + }) { + return this._makeRequest({ + method: "POST", + path: `/projects/${projectId}/locations/us-central1/publishers/google/models/${model}:fetchPredictOperation`, + ...opts, + }); + }, }, }; diff --git a/components/google_vertex_ai/package.json b/components/google_vertex_ai/package.json index a7641148f313d..b14dbaf5c34f7 100644 --- a/components/google_vertex_ai/package.json +++ b/components/google_vertex_ai/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/google_vertex_ai", - "version": "0.1.0", + "version": "0.2.0", "description": "Pipedream Google Vertex AI Components", "main": "google_vertex_ai.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.6.4" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/google_workspace/tsconfig.json b/components/google_workspace/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/google_workspace/tsconfig.json +++ b/components/google_workspace/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/goqr_me/goqr_me.app.mjs b/components/goqr_me/goqr_me.app.mjs index 41ad8de7fd42d..8818cbf1af8e8 100644 --- a/components/goqr_me/goqr_me.app.mjs +++ b/components/goqr_me/goqr_me.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/gorgias_oauth/actions/create-customer/create-customer.mjs b/components/gorgias_oauth/actions/create-customer/create-customer.mjs index 5ebf75f3e9189..be15421d20a6c 100644 --- a/components/gorgias_oauth/actions/create-customer/create-customer.mjs +++ b/components/gorgias_oauth/actions/create-customer/create-customer.mjs @@ -5,7 +5,7 @@ export default { key: "gorgias_oauth-create-customer", name: "Create Customer", description: "Create a new customer. [See the docs](https://developers.gorgias.com/reference/post_api-customers)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { gorgias_oauth, diff --git a/components/gorgias_oauth/actions/create-macro/create-macro.mjs b/components/gorgias_oauth/actions/create-macro/create-macro.mjs new file mode 100644 index 0000000000000..67c60c7e4c542 --- /dev/null +++ b/components/gorgias_oauth/actions/create-macro/create-macro.mjs @@ -0,0 +1,61 @@ +import gorgias_oauth from "../../gorgias_oauth.app.mjs"; +import { parseObject } from "../../common/utils.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "gorgias_oauth-create-macro", + name: "Create Macro", + description: "Create a macro. [See the documentation](https://developers.gorgias.com/reference/create-macro)", + version: "0.0.1", + type: "action", + props: { + gorgias_oauth, + name: { + type: "string", + label: "Name", + description: "The name of the Macro. Tips: choose a name that can be easily searched.", + }, + intent: { + type: "string", + label: "Intent", + description: "The intention of the macro should be used for", + optional: true, + options: constants.macroIntents, + }, + language: { + propDefinition: [ + gorgias_oauth, + "language", + ], + description: "The language of the macro", + }, + actions: { + type: "string[]", + label: "Actions", + description: `A list of actions to be applied on tickets. [See the documentation](https://developers.gorgias.com/reference/create-macro) for more info. + \nExample: [{ + "arguments": { + "tags": "question, order-status" + }, + "name": "addTags", + "title": "add tags", + "type": "user" + }]`, + optional: true, + }, + }, + async run({ $ }) { + const data = { + name: this.name, + intent: this.intent, + language: this.language, + actions: parseObject(this.actions), + }; + const response = await this.gorgias_oauth.createMacro({ + $, + data, + }); + $.export("$summary", `Successfully created macro ${response.id}`); + return response; + }, +}; diff --git a/components/gorgias_oauth/actions/create-ticket-message/create-ticket-message.mjs b/components/gorgias_oauth/actions/create-ticket-message/create-ticket-message.mjs index faaa171588977..659f0dd673359 100644 --- a/components/gorgias_oauth/actions/create-ticket-message/create-ticket-message.mjs +++ b/components/gorgias_oauth/actions/create-ticket-message/create-ticket-message.mjs @@ -7,7 +7,7 @@ export default { key: "gorgias_oauth-create-ticket-message", name: "Create Ticket Message", description: "Create a message for a ticket in the Gorgias system. [See the documentation](https://developers.gorgias.com/reference/create-ticket-message)", - version: "0.0.2", + version: "0.0.4", type: "action", props: { gorgiasOauth, @@ -67,6 +67,15 @@ export default { label: "Message", description: "Message of the ticket. Accepts HTML", }, + channel: { + propDefinition: [ + gorgiasOauth, + "channel", + ], + optional: false, + default: "email", + reloadProps: true, + }, via: { propDefinition: [ gorgiasOauth, @@ -101,13 +110,20 @@ export default { }, }, additionalProps(props) { - props.toUser.hidden = this.fromAgent; - props.fromCustomer.hidden = this.fromAgent; - props.toCustomer.hidden = !this.fromAgent; + const isInternalNote = this.channel === "internal-note"; + props.toUser.hidden = this.fromAgent || isInternalNote; + props.fromCustomer.hidden = this.fromAgent || isInternalNote; + props.toCustomer.hidden = !this.fromAgent || isInternalNote; props.fromUser.hidden = !this.fromAgent; return {}; }, methods: { + /** + * Get attachment information from URL + * @param {object} $ - Step object + * @param {string} url - Attachment URL + * @returns {object} Content type and size information + */ async getAttachmentInfo($, url) { const { headers } = await axios($, { method: "HEAD", @@ -119,6 +135,13 @@ export default { size: headers["content-length"], }; }, + /** + * Get email address for user or customer + * @param {object} $ - Step object + * @param {string} id - User or customer ID + * @param {string} type - Type of email to get (from/to) + * @returns {string} Email address + */ async getEmail($, id, type = "from") { const { gorgiasOauth: { @@ -147,6 +170,12 @@ export default { throw new ConfigurationError("Must enter both Attachment URL and Attachment File Name"); } + const isInternalNote = this.channel === "internal-note"; + + if (isInternalNote && this.fromAgent === false) { + throw new ConfigurationError("From Agent must be set to `true` when creating an internal note"); + } + let contentType, size; if (this.attachmentUrl) { ({ @@ -167,50 +196,61 @@ export default { ? "From User" : "From Customer"}" is required when "From Agent" is set to \`${this.fromAgent}\``); } - if (!toId) { - throw new ConfigurationError(`"${this.fromAgent - ? "To Customer" - : "To User"}" is required when "From Agent" is set to \`${this.fromAgent}\``); + // For internal notes, we don't need to validation + if (!isInternalNote) { + if (!toId) { + throw new ConfigurationError(`"${this.fromAgent + ? "To Customer" + : "To User"}" is required when "From Agent" is set to \`${this.fromAgent}\``); + } } - const response = await this.gorgiasOauth.createMessage({ - $, - ticketId: this.ticketId, - data: { - channel: "email", - source: { - from: { - address: await this.getEmail($, fromId, "from"), - }, - to: [ - { - address: await this.getEmail($, toId, "to"), - }, - ], + const messageData = { + channel: this.channel, + body_html: this.message, + via: this.via, + subject: this.subject, + from_agent: this.fromAgent, + sent_datetime: this.sentDatetime, + attachments: this.attachmentUrl && [ + { + url: this.attachmentUrl, + name: this.attachmentName, + content_type: contentType, + size, }, - body_html: this.message, - via: this.via, - subject: this.subject, - from_agent: this.fromAgent, - sent_datetime: this.sentDatetime, - attachments: this.attachmentUrl && [ + ], + sender: { + id: fromId, + }, + }; + + // Only add source and receiver for non-internal notes + if (!isInternalNote) { + messageData.source = { + from: { + address: await this.getEmail($, fromId, "from"), + }, + to: [ { - url: this.attachmentUrl, - name: this.attachmentName, - content_type: contentType, - size, + address: await this.getEmail($, toId, "to"), }, ], - sender: { - id: fromId, - }, - receiver: { - id: toId, - }, - }, + }; + messageData.receiver = { + id: toId, + }; + } + + const response = await this.gorgiasOauth.createMessage({ + $, + ticketId: this.ticketId, + data: messageData, }); - $.export("$summary", `Succesfully created ticket message with ID: ${response.id}`); + $.export("$summary", `Successfully created ${isInternalNote + ? "internal note" + : "ticket message"} with ID: ${response.id}`); return response; }, diff --git a/components/gorgias_oauth/actions/create-ticket/create-ticket.mjs b/components/gorgias_oauth/actions/create-ticket/create-ticket.mjs index 2ce3fddb9fd33..d9d1217d0badb 100644 --- a/components/gorgias_oauth/actions/create-ticket/create-ticket.mjs +++ b/components/gorgias_oauth/actions/create-ticket/create-ticket.mjs @@ -4,7 +4,7 @@ export default { key: "gorgias_oauth-create-ticket", name: "Create Ticket", description: "Create a new ticket. [See the docs](https://developers.gorgias.com/reference/post_api-tickets)", - version: "0.0.7", + version: "0.0.8", type: "action", props: { gorgias_oauth, diff --git a/components/gorgias_oauth/actions/delete-macro/delete-macro.mjs b/components/gorgias_oauth/actions/delete-macro/delete-macro.mjs new file mode 100644 index 0000000000000..f0a0eaa510ba6 --- /dev/null +++ b/components/gorgias_oauth/actions/delete-macro/delete-macro.mjs @@ -0,0 +1,26 @@ +import gorgias_oauth from "../../gorgias_oauth.app.mjs"; + +export default { + key: "gorgias_oauth-delete-macro", + name: "Delete Macro", + description: "Delete a macro. [See the documentation](https://developers.gorgias.com/reference/delete-macro)", + version: "0.0.1", + type: "action", + props: { + gorgias_oauth, + macroId: { + propDefinition: [ + gorgias_oauth, + "macroId", + ], + }, + }, + async run({ $ }) { + const response = await this.gorgias_oauth.deleteMacro({ + $, + id: this.macroId, + }); + $.export("$summary", `Successfully deleted macro ${this.macroId}`); + return response; + }, +}; diff --git a/components/gorgias_oauth/actions/get-ticket/get-ticket.mjs b/components/gorgias_oauth/actions/get-ticket/get-ticket.mjs new file mode 100644 index 0000000000000..c23abb750e9c9 --- /dev/null +++ b/components/gorgias_oauth/actions/get-ticket/get-ticket.mjs @@ -0,0 +1,27 @@ +import gorgias_oauth from "../../gorgias_oauth.app.mjs"; + +export default { + key: "gorgias_oauth-get-ticket", + name: "Get Ticket", + description: "Get a ticket. [See the documentation](https://developers.gorgias.com/reference/get-ticket)", + version: "0.0.1", + type: "action", + props: { + gorgias_oauth, + ticketId: { + propDefinition: [ + gorgias_oauth, + "ticketId", + ], + description: "The ID of a ticket to get", + }, + }, + async run({ $ }) { + const response = await this.gorgias_oauth.retrieveTicket({ + $, + id: this.ticketId, + }); + $.export("$summary", `Successfully retrieved ticket with ID: ${this.ticketId}`); + return response; + }, +}; diff --git a/components/gorgias_oauth/actions/list-macros/list-macros.mjs b/components/gorgias_oauth/actions/list-macros/list-macros.mjs new file mode 100644 index 0000000000000..54bf3e0f7321c --- /dev/null +++ b/components/gorgias_oauth/actions/list-macros/list-macros.mjs @@ -0,0 +1,46 @@ +import gorgias_oauth from "../../gorgias_oauth.app.mjs"; + +export default { + key: "gorgias_oauth-list-macros", + name: "List Macros", + description: "List all macros. [See the documentation](https://developers.gorgias.com/reference/list-macros)", + version: "0.0.1", + type: "action", + props: { + gorgias_oauth, + search: { + type: "string", + label: "Search", + description: "Filter macros containing the given search query", + optional: true, + }, + limit: { + propDefinition: [ + gorgias_oauth, + "limit", + ], + }, + }, + async run({ $ }) { + const params = { + search: this.search, + limit: this.limit, + }; + + const macros = []; + const paginator = this.gorgias_oauth.paginate({ + $, + fn: this.gorgias_oauth.listMacros, + params, + }); + for await (const macro of paginator) { + macros.push(macro); + } + + const suffix = macros.length === 1 + ? "" + : "s"; + $.export("$summary", `Returned ${macros.length} macro${suffix}`); + return macros; + }, +}; diff --git a/components/gorgias_oauth/actions/list-tickets/list-tickets.mjs b/components/gorgias_oauth/actions/list-tickets/list-tickets.mjs index 0684b34552830..f8e47d0e72e80 100644 --- a/components/gorgias_oauth/actions/list-tickets/list-tickets.mjs +++ b/components/gorgias_oauth/actions/list-tickets/list-tickets.mjs @@ -4,7 +4,7 @@ export default { key: "gorgias_oauth-list-tickets", name: "List Tickets", description: "List all tickets. [See the docs](https://developers.gorgias.com/reference/get_api-tickets)", - version: "0.0.7", + version: "0.0.8", type: "action", props: { gorgias_oauth, diff --git a/components/gorgias_oauth/actions/retrieve-customer/retrieve-customer.mjs b/components/gorgias_oauth/actions/retrieve-customer/retrieve-customer.mjs index 5638146b8e8fb..10f4106a1fcbc 100644 --- a/components/gorgias_oauth/actions/retrieve-customer/retrieve-customer.mjs +++ b/components/gorgias_oauth/actions/retrieve-customer/retrieve-customer.mjs @@ -4,7 +4,7 @@ export default { key: "gorgias_oauth-retrieve-customer", name: "Retrieve a Customer", description: "Retrieve a customer. [See the docs](https://developers.gorgias.com/reference/get_api-customers-id-)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { gorgias_oauth, diff --git a/components/gorgias_oauth/actions/update-customer/update-customer.mjs b/components/gorgias_oauth/actions/update-customer/update-customer.mjs index 2876bd520ccea..3a2b4376788ff 100644 --- a/components/gorgias_oauth/actions/update-customer/update-customer.mjs +++ b/components/gorgias_oauth/actions/update-customer/update-customer.mjs @@ -10,7 +10,7 @@ export default { key: "gorgias_oauth-update-customer", name: "Update Customer", description: "Update a customer. [See the docs](https://developers.gorgias.com/reference/put_api-customers-id-)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { gorgias_oauth, diff --git a/components/gorgias_oauth/actions/update-macro/update-macro.mjs b/components/gorgias_oauth/actions/update-macro/update-macro.mjs new file mode 100644 index 0000000000000..1df43cb6fd35d --- /dev/null +++ b/components/gorgias_oauth/actions/update-macro/update-macro.mjs @@ -0,0 +1,73 @@ +import gorgias_oauth from "../../gorgias_oauth.app.mjs"; +import constants from "../../common/constants.mjs"; +import { parseObject } from "../../common/utils.mjs"; + +export default { + key: "gorgias_oauth-update-macro", + name: "Update Macro", + description: "Update a macro. [See the documentation](https://developers.gorgias.com/reference/update-macro)", + version: "0.0.1", + type: "action", + props: { + gorgias_oauth, + macroId: { + propDefinition: [ + gorgias_oauth, + "macroId", + ], + }, + name: { + type: "string", + label: "Name", + description: "The name of the Macro. Tips: choose a name that can be easily searched.", + optional: true, + }, + intent: { + type: "string", + label: "Intent", + description: "The intention of the macro should be used for", + optional: true, + options: constants.macroIntents, + }, + language: { + propDefinition: [ + gorgias_oauth, + "language", + ], + description: "The language of the macro", + }, + actions: { + type: "string[]", + label: "Actions", + description: `A list of actions to be applied on tickets. [See the documentation](https://developers.gorgias.com/reference/create-macro) for more info. + \nExample: [{ + "arguments": { + "tags": "question, order-status" + }, + "name": "addTags", + "title": "add tags", + "type": "user" + }]`, + optional: true, + }, + }, + async run({ $ }) { + const macro = await this.gorgias_oauth.getMacro({ + $, + id: this.macroId, + }); + const data = { + name: this.name || macro.name, + intent: this.intent, + language: this.language, + actions: parseObject(this.actions), + }; + const response = await this.gorgias_oauth.updateMacro({ + $, + id: this.macroId, + data, + }); + $.export("$summary", `Successfully updated macro ${response.id}`); + return response; + }, +}; diff --git a/components/gorgias_oauth/actions/update-ticket/update-ticket.mjs b/components/gorgias_oauth/actions/update-ticket/update-ticket.mjs index 6a1a6976cf482..6110dc5040070 100644 --- a/components/gorgias_oauth/actions/update-ticket/update-ticket.mjs +++ b/components/gorgias_oauth/actions/update-ticket/update-ticket.mjs @@ -5,7 +5,7 @@ export default { key: "gorgias_oauth-update-ticket", name: "Update Ticket", description: "Updates a predefined ticket in the Gorgias system. [See the documentation](https://developers.gorgias.com/reference/update-ticket)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { gorgiasOauth, diff --git a/components/gorgias_oauth/common/constants.mjs b/components/gorgias_oauth/common/constants.mjs index 5bf1c1ab496dc..e5617bd828ea2 100644 --- a/components/gorgias_oauth/common/constants.mjs +++ b/components/gorgias_oauth/common/constants.mjs @@ -100,8 +100,36 @@ const sourceTypes = [ "whatsapp-message", ]; +const macroIntents = [ + "discount/request", + "exchange/request", + "exchange/status", + "feedback", + "order/damaged", + "order/cancel", + "order/change", + "order/wrong", + "other/no_reply", + "other/question", + "other/thanks", + "product/recommendation", + "product/question", + "refund/request", + "refund/status", + "return/request", + "return/status", + "shipping/change", + "shipping/delivery-issue", + "shipping/policy", + "shipping/status", + "stock/request", + "subscription/cancel", + "subscription/change", +]; + export default { channels, vias, sourceTypes, + macroIntents, }; diff --git a/components/gorgias_oauth/gorgias_oauth.app.mjs b/components/gorgias_oauth/gorgias_oauth.app.mjs index ccb76f930d129..d5b36b22a9d32 100644 --- a/components/gorgias_oauth/gorgias_oauth.app.mjs +++ b/components/gorgias_oauth/gorgias_oauth.app.mjs @@ -80,6 +80,30 @@ export default { }; }, }, + macroId: { + type: "integer", + label: "Macro ID", + description: "The ID of a macro", + async options({ prevContext }) { + const { + data: macros, + meta, + } = await this.listMacros({ + params: { + cursor: prevContext.nextCursor, + }, + }); + return { + options: macros.map((macro) => ({ + label: macro.name, + value: macro.id, + })), + context: { + nextCursor: meta.next_cursor, + }, + }; + }, + }, address: { type: "string", label: "Address", @@ -410,5 +434,48 @@ export default { ...opts, }); }, + getMacro({ + $, id, + }) { + return this._makeRequest({ + $, + path: `/macros/${id}`, + }); + }, + listMacros(opts = {}) { + return this._makeRequest({ + path: "/macros", + ...opts, + }); + }, + createMacro({ + $, data, + }) { + return this._makeRequest({ + $, + path: "/macros", + method: "POST", + data, + }); + }, + updateMacro({ + $, id, data, + }) { + return this._makeRequest({ + $, + path: `/macros/${id}`, + method: "PUT", + data, + }); + }, + deleteMacro({ + $, id, + }) { + return this._makeRequest({ + $, + path: `/macros/${id}`, + method: "DELETE", + }); + }, }, }; diff --git a/components/gorgias_oauth/package.json b/components/gorgias_oauth/package.json index ad3a6cef51a8a..b75510b87a5f8 100644 --- a/components/gorgias_oauth/package.json +++ b/components/gorgias_oauth/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/gorgias_oauth", - "version": "0.5.1", + "version": "0.6.2", "description": "Pipedream Gorgias OAuth Components", "main": "gorgias_oauth.app.mjs", "keywords": [ @@ -15,7 +15,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^2.0.0", + "@pipedream/platform": "^3.1.0", "lodash-es": "^4.17.21" } } diff --git a/components/gorgias_oauth/sources/common/base-polling.mjs b/components/gorgias_oauth/sources/common/base-polling.mjs new file mode 100644 index 0000000000000..c1b21feee9198 --- /dev/null +++ b/components/gorgias_oauth/sources/common/base-polling.mjs @@ -0,0 +1,62 @@ +import gorgias_oauth from "../../gorgias_oauth.app.mjs"; +import { + DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, ConfigurationError, +} from "@pipedream/platform"; +import constants from "../../common/constants.mjs"; + +export default { + props: { + gorgias_oauth, + db: "$.service.db", + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + methods: { + async processEvent(limit) { + const { data } = await this.gorgias_oauth.getEvents({ + params: { + order_by: "created_datetime:desc", + limit, + types: this.getEventType(), + }, + }); + + const events = (await Promise.all( + data.map((event) => this.getEventData(event)), + )).filter((event) => event !== null); + + for (const event of events.reverse()) { + this.emitEvent(event); + } + }, + emitEvent(event) { + const ts = Date.parse(event[this.getTsKey()]); + this.$emit(event, { + id: `${event.id}_${ts}`, + ts, + summary: `New ${this.getEventType()}: ${event.id}`, + }); + }, + getTsKey() { + throw new ConfigurationError("getTsKey is not implemented"); + }, + getEventType() { + throw new ConfigurationError("getEventType is not implemented"); + }, + getEventData() { + throw new ConfigurationError("getEventData is not implemented"); + }, + }, + hooks: { + async deploy() { + await this.processEvent(constants.HISTORICAL_EVENTS_LIMIT); + }, + }, + async run() { + await this.processEvent(); + }, +}; diff --git a/components/gorgias_oauth/sources/common/event-types.mjs b/components/gorgias_oauth/sources/common/event-types.mjs index 21cfbcec6a196..873ef47608fe7 100644 --- a/components/gorgias_oauth/sources/common/event-types.mjs +++ b/components/gorgias_oauth/sources/common/event-types.mjs @@ -6,4 +6,7 @@ export default { TICKET_UPDATED: "ticket-updated", TICKET_MESSAGE_CREATED: "ticket-message-created", TICKET_MESSAGE_FAILED: "ticket-message-failed", + MACRO_CREATED: "macro-created", + MACRO_UPDATED: "macro-updated", + MACRO_DELETED: "macro-deleted", }; diff --git a/components/gorgias_oauth/sources/internal-note-created/internal-note-created.mjs b/components/gorgias_oauth/sources/internal-note-created/internal-note-created.mjs new file mode 100644 index 0000000000000..8d7bd7c9e832b --- /dev/null +++ b/components/gorgias_oauth/sources/internal-note-created/internal-note-created.mjs @@ -0,0 +1,63 @@ +import base from "../common/base.mjs"; +import eventTypes from "../common/event-types.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...base, + key: "gorgias_oauth-internal-note-created", + name: "New Internal Note", + description: "Emit new event when an internal note is created on a ticket. [See the documentation](https://developers.gorgias.com/reference/the-event-object)", + version: "0.0.2", + type: "source", + props: { + ...base.props, + ticketId: { + propDefinition: [ + base.props.gorgias_oauth, + "ticketId", + ], + optional: true, + }, + sender: { + type: "string", + label: "Sender Email", + description: "Email address of the sender", + optional: true, + }, + }, + hooks: { + ...base.hooks, + deploy() {}, + }, + methods: { + ...base.methods, + /** + * Get the event type for internal notes + * @returns {string} The event type + */ + getEventType() { + return eventTypes.TICKET_MESSAGE_CREATED; + }, + /** + * Check if a message is relevant for this source + * @param {object} message - The message object + * @returns {boolean} Whether the message is relevant + */ + isRelevant(message) { + return message.source.type === "internal-note" + && (!this.ticketId || message.ticket_id === this.ticketId) + && (!this.sender || message.sender?.email === this.sender); + }, + /** + * Process and emit relevant events + * @param {object} event - The incoming event + */ + async processEvent(event) { + const { message } = event; + if (this.isRelevant(message)) { + this.emitEvent(message); + } + }, + }, + sampleEmit, +}; diff --git a/components/gorgias_oauth/sources/internal-note-created/test-event.mjs b/components/gorgias_oauth/sources/internal-note-created/test-event.mjs new file mode 100644 index 0000000000000..b6c243f2b4cf3 --- /dev/null +++ b/components/gorgias_oauth/sources/internal-note-created/test-event.mjs @@ -0,0 +1,43 @@ +export default { + id: 123456789, + created_datetime: "2024-01-15T10:30:00Z", + updated_datetime: "2024-01-15T10:30:00Z", + ticket_id: 98765, + channel: "internal-note", + via: "internal-note", + source: { + type: "internal-note", + from: { + address: "agent@company.com", + name: "Support Agent" + }, + to: [] + }, + sender: { + id: 456, + email: "agent@company.com", + name: "Support Agent" + }, + receiver: null, + body_html: "

This is an internal note about the customer's issue.

", + body_text: "This is an internal note about the customer's issue.", + subject: "Internal Note", + from_agent: true, + sent_datetime: "2024-01-15T10:30:00Z", + attachments: [], + public: false, + stripped_html: "

This is an internal note about the customer's issue.

", + stripped_text: "This is an internal note about the customer's issue.", + stripped_signature: "", + message_id: "internal-note-123456789", + actions: [], + rule_id: null, + external_id: null, + tags: [], + integration_id: null, + last_sending_error: null, + opened_datetime: null, + clicked_datetime: null, + failed_datetime: null, + errors: [] +}; \ No newline at end of file diff --git a/components/gorgias_oauth/sources/macro-updated/macro-updated.mjs b/components/gorgias_oauth/sources/macro-updated/macro-updated.mjs new file mode 100644 index 0000000000000..1b66c9268ff62 --- /dev/null +++ b/components/gorgias_oauth/sources/macro-updated/macro-updated.mjs @@ -0,0 +1,35 @@ +import base from "../common/base-polling.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...base, + key: "gorgias_oauth-macro-updated", + name: "Macro Updated", + description: "Emit new event when a macro is updated. [See the documentation](https://developers.gorgias.com/reference/the-event-object)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...base.methods, + getEventType() { + return "macro-updated"; + }, + getTsKey() { + return "updated_datetime"; + }, + async getEventData(event) { + if (event.created_datetime === event.updated_datetime) { + return null; + } + try { + return await this.gorgias_oauth.getMacro({ + id: event.object_id, + }); + } catch (e) { + console.log(`Macro ${event.object_id} not found`); + return null; + } + }, + }, + sampleEmit, +}; diff --git a/components/gorgias_oauth/sources/macro-updated/test-event.mjs b/components/gorgias_oauth/sources/macro-updated/test-event.mjs new file mode 100644 index 0000000000000..9583ac3a36658 --- /dev/null +++ b/components/gorgias_oauth/sources/macro-updated/test-event.mjs @@ -0,0 +1,22 @@ +export default { + "id": 118371, + "external_id": null, + "name": "new macro updated", + "intent": "exchange/request", + "language": "en", + "usage": 0, + "actions": [ + { + "arguments": { + "tags": "question, order-status" + }, + "name": "addTags", + "title": "add tags", + "type": "user" + } + ], + "created_datetime": "2025-07-28T18:59:46.464679+00:00", + "updated_datetime": "2025-07-28T19:06:28.727401+00:00", + "archived_datetime": null, + "uri": "/api/macros/118371/" +} \ No newline at end of file diff --git a/components/gorgias_oauth/sources/new-macro-created/new-macro-created.mjs b/components/gorgias_oauth/sources/new-macro-created/new-macro-created.mjs new file mode 100644 index 0000000000000..ac8678dc79a8b --- /dev/null +++ b/components/gorgias_oauth/sources/new-macro-created/new-macro-created.mjs @@ -0,0 +1,32 @@ +import base from "../common/base-polling.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...base, + key: "gorgias_oauth-new-macro-created", + name: "New Macro Created", + description: "Emit new event when a macro is created. [See the documentation](https://developers.gorgias.com/reference/the-event-object)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...base.methods, + getEventType() { + return "macro-created"; + }, + getTsKey() { + return "created_datetime"; + }, + async getEventData(event) { + try { + return await this.gorgias_oauth.getMacro({ + id: event.object_id, + }); + } catch (e) { + console.log(`Macro ${event.object_id} not found`); + return null; + } + }, + }, + sampleEmit, +}; diff --git a/components/gorgias_oauth/sources/new-macro-created/test-event.mjs b/components/gorgias_oauth/sources/new-macro-created/test-event.mjs new file mode 100644 index 0000000000000..0740abaccbbf8 --- /dev/null +++ b/components/gorgias_oauth/sources/new-macro-created/test-event.mjs @@ -0,0 +1,13 @@ +export default { + "id": 118419, + "external_id": null, + "name": "new macro", + "intent": null, + "language": null, + "usage": 0, + "actions": [], + "created_datetime": "2025-07-28T20:04:50.816316+00:00", + "updated_datetime": null, + "archived_datetime": null, + "uri": "/api/macros/118419/" +} \ No newline at end of file diff --git a/components/gorgias_oauth/sources/ticket-created/ticket-created.mjs b/components/gorgias_oauth/sources/ticket-created/ticket-created.mjs index 4e2d69d7d6c80..8cd2bce3ee69c 100644 --- a/components/gorgias_oauth/sources/ticket-created/ticket-created.mjs +++ b/components/gorgias_oauth/sources/ticket-created/ticket-created.mjs @@ -7,7 +7,7 @@ export default { key: "gorgias_oauth-ticket-created", name: "New Ticket", description: "Emit new event when a ticket is created. [See the documentation](https://developers.gorgias.com/reference/the-event-object)", - version: "0.1.7", + version: "0.1.8", type: "source", props: { ...base.props, diff --git a/components/gorgias_oauth/sources/ticket-message-created/ticket-message-created.mjs b/components/gorgias_oauth/sources/ticket-message-created/ticket-message-created.mjs index e8fb51f71b901..504daa74a67ea 100644 --- a/components/gorgias_oauth/sources/ticket-message-created/ticket-message-created.mjs +++ b/components/gorgias_oauth/sources/ticket-message-created/ticket-message-created.mjs @@ -8,7 +8,7 @@ export default { key: "gorgias_oauth-ticket-message-created", name: "New Ticket Message", description: "Emit new event when a ticket message is created. [See the documentation](https://developers.gorgias.com/reference/the-event-object)", - version: "0.1.7", + version: "0.1.8", type: "source", props: { ...base.props, diff --git a/components/gorgias_oauth/sources/ticket-updated/ticket-updated.mjs b/components/gorgias_oauth/sources/ticket-updated/ticket-updated.mjs index f5698e179b4f3..3259ed9e02c37 100644 --- a/components/gorgias_oauth/sources/ticket-updated/ticket-updated.mjs +++ b/components/gorgias_oauth/sources/ticket-updated/ticket-updated.mjs @@ -7,7 +7,7 @@ export default { key: "gorgias_oauth-ticket-updated", name: "New Updated Ticket", description: "Emit new event when a ticket is updated. [See the documentation](https://developers.gorgias.com/reference/the-event-object)", - version: "0.1.7", + version: "0.1.8", type: "source", props: { ...base.props, diff --git a/components/gotify/gotify.app.mjs b/components/gotify/gotify.app.mjs new file mode 100644 index 0000000000000..98b7af059e1dd --- /dev/null +++ b/components/gotify/gotify.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "gotify", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/gotify/package.json b/components/gotify/package.json new file mode 100644 index 0000000000000..78a739c1661e7 --- /dev/null +++ b/components/gotify/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/gotify", + "version": "0.0.1", + "description": "Pipedream Gotify Components", + "main": "gotify.app.mjs", + "keywords": [ + "pipedream", + "gotify" + ], + "homepage": "https://pipedream.com/apps/gotify", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/grab_your_reviews/.gitignore b/components/grab_your_reviews/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/grab_your_reviews/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/grab_your_reviews/app/grab_your_reviews.app.ts b/components/grab_your_reviews/app/grab_your_reviews.app.ts deleted file mode 100644 index 0197bd3a5c886..0000000000000 --- a/components/grab_your_reviews/app/grab_your_reviews.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "grab_your_reviews", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/grab_your_reviews/grab_your_reviews.app.mjs b/components/grab_your_reviews/grab_your_reviews.app.mjs new file mode 100644 index 0000000000000..f171fed966c39 --- /dev/null +++ b/components/grab_your_reviews/grab_your_reviews.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "grab_your_reviews", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/grab_your_reviews/package.json b/components/grab_your_reviews/package.json index b2492df8e13e0..b15a27866bca7 100644 --- a/components/grab_your_reviews/package.json +++ b/components/grab_your_reviews/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/grab_your_reviews", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Grab Your Reviews Components", - "main": "dist/app/grab_your_reviews.app.mjs", + "main": "grab_your_reviews.app.mjs", "keywords": [ "pipedream", "grab_your_reviews" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/grab_your_reviews", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/grabpenny/grabpenny.app.mjs b/components/grabpenny/grabpenny.app.mjs new file mode 100644 index 0000000000000..3d3ce73e8a427 --- /dev/null +++ b/components/grabpenny/grabpenny.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "grabpenny", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/grabpenny/package.json b/components/grabpenny/package.json new file mode 100644 index 0000000000000..0ec7ef79abac5 --- /dev/null +++ b/components/grabpenny/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/grabpenny", + "version": "0.0.1", + "description": "Pipedream GrabPenny Components", + "main": "grabpenny.app.mjs", + "keywords": [ + "pipedream", + "grabpenny" + ], + "homepage": "https://pipedream.com/apps/grabpenny", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/grade_us/.gitignore b/components/grade_us/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/grade_us/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/grade_us/app/grade_us.app.ts b/components/grade_us/app/grade_us.app.ts deleted file mode 100644 index 9238b09faa3e5..0000000000000 --- a/components/grade_us/app/grade_us.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "grade_us", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/grade_us/grade_us.app.mjs b/components/grade_us/grade_us.app.mjs new file mode 100644 index 0000000000000..e0facf5ca4487 --- /dev/null +++ b/components/grade_us/grade_us.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "grade_us", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/grade_us/package.json b/components/grade_us/package.json index e52ed84c5fffb..fb60f151933c1 100644 --- a/components/grade_us/package.json +++ b/components/grade_us/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/grade_us", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Grade.us Components", - "main": "dist/app/grade_us.app.mjs", + "main": "grade_us.app.mjs", "keywords": [ "pipedream", "grade_us" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/grade_us", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/grafbase/.gitignore b/components/grafbase/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/grafbase/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/grafbase/app/grafbase.app.ts b/components/grafbase/app/grafbase.app.ts deleted file mode 100644 index f6c3d1041d219..0000000000000 --- a/components/grafbase/app/grafbase.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "grafbase", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/grafbase/grafbase.app.mjs b/components/grafbase/grafbase.app.mjs new file mode 100644 index 0000000000000..259bbba3d31ec --- /dev/null +++ b/components/grafbase/grafbase.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "grafbase", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/grafbase/package.json b/components/grafbase/package.json index 015e704d1aa82..903a3ab9f8ece 100644 --- a/components/grafbase/package.json +++ b/components/grafbase/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/grafbase", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Grafbase Components", - "main": "dist/app/grafbase.app.mjs", + "main": "grafbase.app.mjs", "keywords": [ "pipedream", "grafbase" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/grafbase", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/graphhopper/.gitignore b/components/graphhopper/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/graphhopper/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/graphhopper/app/graphhopper.app.ts b/components/graphhopper/app/graphhopper.app.ts deleted file mode 100644 index cbe14e27a0e75..0000000000000 --- a/components/graphhopper/app/graphhopper.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "graphhopper", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/graphhopper/graphhopper.app.mjs b/components/graphhopper/graphhopper.app.mjs new file mode 100644 index 0000000000000..3dd011dec9692 --- /dev/null +++ b/components/graphhopper/graphhopper.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "graphhopper", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/graphhopper/package.json b/components/graphhopper/package.json index 713f85ffa5a54..3fa316eb67cb7 100644 --- a/components/graphhopper/package.json +++ b/components/graphhopper/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/graphhopper", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream GraphHopper Components", - "main": "dist/app/graphhopper.app.mjs", + "main": "graphhopper.app.mjs", "keywords": [ "pipedream", "graphhopper" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/graphhopper", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/greenhouse_job_board_api/greenhouse_job_board_api.app.mjs b/components/greenhouse_job_board_api/greenhouse_job_board_api.app.mjs index c5fed482a2148..3f63eba80c5a5 100644 --- a/components/greenhouse_job_board_api/greenhouse_job_board_api.app.mjs +++ b/components/greenhouse_job_board_api/greenhouse_job_board_api.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/groundhogg/.gitignore b/components/groundhogg/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/groundhogg/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/groundhogg/app/groundhogg.app.ts b/components/groundhogg/app/groundhogg.app.ts deleted file mode 100644 index 2074e0e4fb82c..0000000000000 --- a/components/groundhogg/app/groundhogg.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "groundhogg", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/groundhogg/groundhogg.app.mjs b/components/groundhogg/groundhogg.app.mjs new file mode 100644 index 0000000000000..baf12bd2465f0 --- /dev/null +++ b/components/groundhogg/groundhogg.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "groundhogg", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/groundhogg/package.json b/components/groundhogg/package.json index 4207dafa22213..1a525c5c8fd6c 100644 --- a/components/groundhogg/package.json +++ b/components/groundhogg/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/groundhogg", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream GroundHogg Components", - "main": "dist/app/groundhogg.app.mjs", + "main": "groundhogg.app.mjs", "keywords": [ "pipedream", "groundhogg" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/groundhogg", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/growsurf/.gitignore b/components/growsurf/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/growsurf/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/growsurf/app/growsurf.app.ts b/components/growsurf/app/growsurf.app.ts deleted file mode 100644 index 4ab79a94ffc37..0000000000000 --- a/components/growsurf/app/growsurf.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "growsurf", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/growsurf/growsurf.app.mjs b/components/growsurf/growsurf.app.mjs new file mode 100644 index 0000000000000..6e22d5edc8535 --- /dev/null +++ b/components/growsurf/growsurf.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "growsurf", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/growsurf/package.json b/components/growsurf/package.json index a4564d30b8469..48ea78cea06ae 100644 --- a/components/growsurf/package.json +++ b/components/growsurf/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/growsurf", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Growsurf Components", - "main": "dist/app/growsurf.app.mjs", + "main": "growsurf.app.mjs", "keywords": [ "pipedream", "growsurf" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/growsurf", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/gupshup/.gitignore b/components/gupshup/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/gupshup/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/gupshup/app/gupshup.app.ts b/components/gupshup/app/gupshup.app.ts deleted file mode 100644 index c06e851ede904..0000000000000 --- a/components/gupshup/app/gupshup.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "gupshup", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/gupshup/gupshup.app.mjs b/components/gupshup/gupshup.app.mjs new file mode 100644 index 0000000000000..1bc8b6c25ffd0 --- /dev/null +++ b/components/gupshup/gupshup.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "gupshup", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/gupshup/package.json b/components/gupshup/package.json index 8501aecbf22a8..055f42240f31b 100644 --- a/components/gupshup/package.json +++ b/components/gupshup/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/gupshup", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Gupshup Components", - "main": "dist/app/gupshup.app.mjs", + "main": "gupshup.app.mjs", "keywords": [ "pipedream", "gupshup" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/gupshup", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/h_supertools_analytics_tool/package.json b/components/h_supertools_analytics_tool/package.json index 2e0caa9406600..db44105fa04cb 100644 --- a/components/h_supertools_analytics_tool/package.json +++ b/components/h_supertools_analytics_tool/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/h_supertools_analytics_tool", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream H-supertools Analytics Tool Components", "main": "h_supertools_analytics_tool.app.mjs", "keywords": [ @@ -13,6 +13,7 @@ "access": "public" }, "dependencies": { - "moment": "^2.29.4" + "moment": "^2.29.4", + "@pipedream/platform": "^3.1.0" } } diff --git a/components/handwrytten/.gitignore b/components/handwrytten/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/handwrytten/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/handwrytten/app/handwrytten.app.ts b/components/handwrytten/app/handwrytten.app.ts deleted file mode 100644 index 05583e0a79af5..0000000000000 --- a/components/handwrytten/app/handwrytten.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "handwrytten", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/handwrytten/handwrytten.app.mjs b/components/handwrytten/handwrytten.app.mjs new file mode 100644 index 0000000000000..31a34b5fb8cb1 --- /dev/null +++ b/components/handwrytten/handwrytten.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "handwrytten", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/handwrytten/package.json b/components/handwrytten/package.json index 101444255362f..7141da25e8c60 100644 --- a/components/handwrytten/package.json +++ b/components/handwrytten/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/handwrytten", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Handwrytten Components", - "main": "dist/app/handwrytten.app.mjs", + "main": "handwrytten.app.mjs", "keywords": [ "pipedream", "handwrytten" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/handwrytten", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/heartbeat/.gitignore b/components/heartbeat/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/heartbeat/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/heartbeat/app/heartbeat.app.ts b/components/heartbeat/app/heartbeat.app.ts deleted file mode 100644 index 2949d951737b5..0000000000000 --- a/components/heartbeat/app/heartbeat.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "heartbeat", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/heartbeat/heartbeat.app.mjs b/components/heartbeat/heartbeat.app.mjs new file mode 100644 index 0000000000000..0feef61cc5c5c --- /dev/null +++ b/components/heartbeat/heartbeat.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "heartbeat", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/heartbeat/package.json b/components/heartbeat/package.json index f0b19f2d076fa..9a27d8842c9ec 100644 --- a/components/heartbeat/package.json +++ b/components/heartbeat/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/heartbeat", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Heartbeat Components", - "main": "dist/app/heartbeat.app.mjs", + "main": "heartbeat.app.mjs", "keywords": [ "pipedream", "heartbeat" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/heartbeat", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/helcim/.gitignore b/components/helcim/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/helcim/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/helcim/app/helcim.app.ts b/components/helcim/app/helcim.app.ts deleted file mode 100644 index 6d9efdf8c4077..0000000000000 --- a/components/helcim/app/helcim.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "helcim", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/helcim/helcim.app.mjs b/components/helcim/helcim.app.mjs new file mode 100644 index 0000000000000..f4468f7f38eab --- /dev/null +++ b/components/helcim/helcim.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "helcim", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/helcim/package.json b/components/helcim/package.json index b979a7b412d3a..1553020dc6820 100644 --- a/components/helcim/package.json +++ b/components/helcim/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/helcim", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Helcim Components", - "main": "dist/app/helcim.app.mjs", + "main": "helcim.app.mjs", "keywords": [ "pipedream", "helcim" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/helcim", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/helpdesk/helpdesk.app.mjs b/components/helpdesk/helpdesk.app.mjs index b59f90da55868..e05a00fb174f1 100644 --- a/components/helpdesk/helpdesk.app.mjs +++ b/components/helpdesk/helpdesk.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/helpdocs/actions/create-article/create-article.mjs b/components/helpdocs/actions/create-article/create-article.mjs new file mode 100644 index 0000000000000..bc71b2e52734c --- /dev/null +++ b/components/helpdocs/actions/create-article/create-article.mjs @@ -0,0 +1,92 @@ +import helpdocs from "../../helpdocs.app.mjs"; + +export default { + key: "helpdocs-create-article", + name: "Create Article", + description: "Create a new article in your HelpDocs knowledge base. [See the documentation](https://apidocs.helpdocs.io/article/8Y2t6NVxeU-creating-an-article)", + version: "0.0.1", + type: "action", + props: { + helpdocs, + title: { + type: "string", + label: "Title", + description: "The title of the article", + }, + categoryId: { + propDefinition: [ + helpdocs, + "categoryId", + ], + optional: true, + }, + body: { + type: "string", + label: "Body", + description: "The body of the article", + optional: true, + }, + isPrivate: { + type: "boolean", + label: "Is Private", + description: "Whether the article is private", + optional: true, + }, + isPublished: { + type: "boolean", + label: "Is Published", + description: "Whether the article is published", + optional: true, + }, + description: { + type: "string", + label: "Description", + description: "The description of the article", + optional: true, + }, + shortVersion: { + type: "string", + label: "Short Version", + description: "The short version of the article", + optional: true, + }, + slug: { + type: "string", + label: "Slug", + description: "The slug of the article", + optional: true, + }, + tags: { + type: "string[]", + label: "Tags", + description: "The tags of the article", + optional: true, + }, + multilingual: { + type: "string[]", + label: "Multilingual", + description: "The language code(s) of the article (e.g. `en`, `fr`, etc.)", + optional: true, + }, + }, + async run({ $ }) { + const { article } = await this.helpdocs.createArticle({ + $, + data: { + title: this.title, + category_id: this.categoryId, + body: this.body, + is_private: this.isPrivate, + is_published: this.isPublished, + description: this.description, + short_version: this.shortVersion, + slug: this.slug, + tags: this.tags, + multilingual: this.multilingual, + }, + }); + + $.export("$summary", `Created article ${this.title}`); + return article; + }, +}; diff --git a/components/helpdocs/actions/create-category/create-category.mjs b/components/helpdocs/actions/create-category/create-category.mjs new file mode 100644 index 0000000000000..12f59b5143547 --- /dev/null +++ b/components/helpdocs/actions/create-category/create-category.mjs @@ -0,0 +1,35 @@ +import helpdocs from "../../helpdocs.app.mjs"; + +export default { + key: "helpdocs-create-category", + name: "Create Category", + description: "Create a new category in your HelpDocs knowledge base to organize articles. [See the documentation](https://apidocs.helpdocs.io/article/i5gdcZ7b9s-creating-a-category)", + version: "0.0.1", + type: "action", + props: { + helpdocs, + title: { + type: "string", + label: "Title", + description: "The title of the category", + }, + description: { + type: "string", + label: "Description", + description: "The description of the category", + optional: true, + }, + }, + async run({ $ }) { + const { category } = await this.helpdocs.createCategory({ + $, + data: { + title: this.title, + description: this.description, + }, + }); + + $.export("$summary", `Created category ${this.title}`); + return category; + }, +}; diff --git a/components/helpdocs/actions/delete-article/delete-article.mjs b/components/helpdocs/actions/delete-article/delete-article.mjs new file mode 100644 index 0000000000000..82ddb2345c1bf --- /dev/null +++ b/components/helpdocs/actions/delete-article/delete-article.mjs @@ -0,0 +1,27 @@ +import helpdocs from "../../helpdocs.app.mjs"; + +export default { + key: "helpdocs-delete-article", + name: "Delete Article", + description: "Delete an article from your HelpDocs knowledge base. [See the documentation](https://apidocs.helpdocs.io/article/0iyvUUh7py-deleting-an-article)", + version: "0.0.1", + type: "action", + props: { + helpdocs, + articleId: { + propDefinition: [ + helpdocs, + "articleId", + ], + }, + }, + async run({ $ }) { + const response = await this.helpdocs.deleteArticle({ + $, + articleId: this.articleId, + }); + + $.export("$summary", `Deleted article ${this.articleId}`); + return response; + }, +}; diff --git a/components/helpdocs/actions/delete-category/delete-category.mjs b/components/helpdocs/actions/delete-category/delete-category.mjs new file mode 100644 index 0000000000000..fc1a53276da0d --- /dev/null +++ b/components/helpdocs/actions/delete-category/delete-category.mjs @@ -0,0 +1,27 @@ +import helpdocs from "../../helpdocs.app.mjs"; + +export default { + key: "helpdocs-delete-category", + name: "Delete Category", + description: "Delete a category from your HelpDocs knowledge base. [See the documentation](https://apidocs.helpdocs.io/article/Hw8fVbXt1V-deleting-a-category)", + version: "0.0.1", + type: "action", + props: { + helpdocs, + categoryId: { + propDefinition: [ + helpdocs, + "categoryId", + ], + }, + }, + async run({ $ }) { + const response = await this.helpdocs.deleteCategory({ + $, + categoryId: this.categoryId, + }); + + $.export("$summary", `Deleted category ${this.categoryId}`); + return response; + }, +}; diff --git a/components/helpdocs/actions/generate-chatbot-source-page/generate-chatbot-source-page.mjs b/components/helpdocs/actions/generate-chatbot-source-page/generate-chatbot-source-page.mjs new file mode 100644 index 0000000000000..cab1c62908825 --- /dev/null +++ b/components/helpdocs/actions/generate-chatbot-source-page/generate-chatbot-source-page.mjs @@ -0,0 +1,23 @@ +import helpdocs from "../../helpdocs.app.mjs"; + +export default { + key: "helpdocs-generate-chatbot-source-page", + name: "Generate Chatbot Source Page", + description: "The chatbot source page feature allows you to generate a comprehensive list of all your Knowledge Base articles that can be fed directly to your chatbot. This makes it easy to leverage your existing documentation to power AI assistants and help your customers find answers quickly. [See the documentation](https://apidocs.helpdocs.io/article/4xha228dwf-generating-a-chatbot-source-page)", + version: "0.0.1", + type: "action", + props: { + helpdocs, + }, + async run({ $ }) { + const response = await this.helpdocs.listArticles({ + $, + params: { + format: "list", + }, + }); + + $.export("$summary", "Generated chatbot source page"); + return response; + }, +}; diff --git a/components/helpdocs/actions/get-article-versions/get-article-versions.mjs b/components/helpdocs/actions/get-article-versions/get-article-versions.mjs new file mode 100644 index 0000000000000..f581394196b9e --- /dev/null +++ b/components/helpdocs/actions/get-article-versions/get-article-versions.mjs @@ -0,0 +1,36 @@ +import helpdocs from "../../helpdocs.app.mjs"; + +export default { + key: "helpdocs-get-article-versions", + name: "Get Article Versions", + description: "Retrieve version history and details for a specific article in your knowledge base. [See the documentation](https://apidocs.helpdocs.io/article/c3svl5hvb2-getting-article-versions)", + version: "0.0.1", + type: "action", + props: { + helpdocs, + articleId: { + propDefinition: [ + helpdocs, + "articleId", + ], + }, + languageCode: { + type: "string", + label: "Language Code", + description: "Restrict returned articles to a language (e.g. `en`, `fr`, etc.)", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.helpdocs.getArticleVersions({ + $, + articleId: this.articleId, + params: { + language_code: this.languageCode, + }, + }); + + $.export("$summary", `Retrieved article versions for ${this.articleId}`); + return response; + }, +}; diff --git a/components/helpdocs/actions/get-article/get-article.mjs b/components/helpdocs/actions/get-article/get-article.mjs new file mode 100644 index 0000000000000..4485517c78530 --- /dev/null +++ b/components/helpdocs/actions/get-article/get-article.mjs @@ -0,0 +1,27 @@ +import helpdocs from "../../helpdocs.app.mjs"; + +export default { + key: "helpdocs-get-article", + name: "Get Article", + description: "Retrieve a specific article from your HelpDocs knowledge base. [See the documentation](https://apidocs.helpdocs.io/article/lc6AVtLvrv-getting-a-single-article)", + version: "0.0.1", + type: "action", + props: { + helpdocs, + articleId: { + propDefinition: [ + helpdocs, + "articleId", + ], + }, + }, + async run({ $ }) { + const { article } = await this.helpdocs.getArticle({ + $, + articleId: this.articleId, + }); + + $.export("$summary", `Found article ${this.articleId}`); + return article; + }, +}; diff --git a/components/helpdocs/actions/get-category/get-category.mjs b/components/helpdocs/actions/get-category/get-category.mjs new file mode 100644 index 0000000000000..a69c84fc002c3 --- /dev/null +++ b/components/helpdocs/actions/get-category/get-category.mjs @@ -0,0 +1,27 @@ +import helpdocs from "../../helpdocs.app.mjs"; + +export default { + key: "helpdocs-get-category", + name: "Get Category", + description: "Retrieve a category from your HelpDocs knowledge base. [See the documentation](https://apidocs.helpdocs.io/article/FCRNPUXm3i-getting-a-single-category)", + version: "0.0.1", + type: "action", + props: { + helpdocs, + categoryId: { + propDefinition: [ + helpdocs, + "categoryId", + ], + }, + }, + async run({ $ }) { + const { category } = await this.helpdocs.getCategory({ + $, + categoryId: this.categoryId, + }); + + $.export("$summary", `Retrieved category ${this.categoryId}`); + return category; + }, +}; diff --git a/components/helpdocs/actions/list-articles/list-articles.mjs b/components/helpdocs/actions/list-articles/list-articles.mjs new file mode 100644 index 0000000000000..31ad01d632e9f --- /dev/null +++ b/components/helpdocs/actions/list-articles/list-articles.mjs @@ -0,0 +1,120 @@ +import helpdocs from "../../helpdocs.app.mjs"; + +export default { + key: "helpdocs-list-articles", + name: "List Articles", + description: "Retrieve a list of articles from your HelpDocs knowledge base. [See the documentation](https://apidocs.helpdocs.io/article/OqvaxRMHgN-getting-articles)", + version: "0.0.1", + type: "action", + props: { + helpdocs, + categoryId: { + propDefinition: [ + helpdocs, + "categoryId", + ], + optional: true, + }, + tag: { + type: "string", + label: "Tag", + description: "Filter articles by tag", + optional: true, + }, + includeBody: { + type: "boolean", + label: "Include Body", + description: "Include the HTML `body` field of each article", + optional: true, + }, + permissionGroupId: { + propDefinition: [ + helpdocs, + "groupId", + ], + optional: true, + }, + status: { + type: "string", + label: "Status", + description: "Filter articles by status", + options: [ + "published", + "draft", + "private", + ], + optional: true, + }, + isStale: { + type: "boolean", + label: "Is Stale", + description: "Restrict returned articles based on whether they are set as Stale or not", + optional: true, + }, + needsTranslation: { + type: "boolean", + label: "Needs Translation", + description: "Restrict returned articles base on whether it's marked as Needs Translation", + optional: true, + }, + languageCode: { + type: "string", + label: "Language Code", + description: "Restrict returned articles based on language code (e.g. `en`, `fr`, etc.)", + optional: true, + }, + updatedAtBefore: { + type: "string", + label: "Updated At Before", + description: "Restrict returned articles based on whether they were published before a certain date. E.g. `2025-01-01`", + optional: true, + }, + updatedAtAfter: { + type: "string", + label: "Updated At After", + description: "Restrict returned articles based on whether they were published after a certain date. E.g. `2025-01-01`", + optional: true, + }, + workingCopy: { + type: "boolean", + label: "Working Copy", + description: "Returns the latest rather than currently published versions", + optional: true, + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of articles to return", + default: 100, + optional: true, + }, + }, + async run({ $ }) { + const results = this.helpdocs.paginate({ + fn: this.helpdocs.listArticles, + params: { + category_id: this.categoryId, + tag: this.tag, + include_body: this.includeBody, + permission_group_id: this.permissionGroupId, + status: this.status, + is_stale: this.isStale, + needs_translation: this.needsTranslation, + language_code: this.languageCode, + updated_at_before: this.updatedAtBefore, + updated_at_after: this.updatedAtAfter, + working_copy: this.workingCopy, + }, + resourceKey: "articles", + max: this.maxResults, + }); + + const articles = []; + for await (const article of results) { + articles.push(article); + } + + $.export("$summary", `Found ${articles.length} articles`); + return articles; + }, +}; diff --git a/components/helpdocs/actions/list-categories/list-categories.mjs b/components/helpdocs/actions/list-categories/list-categories.mjs new file mode 100644 index 0000000000000..d62a4d1072a94 --- /dev/null +++ b/components/helpdocs/actions/list-categories/list-categories.mjs @@ -0,0 +1,20 @@ +import helpdocs from "../../helpdocs.app.mjs"; + +export default { + key: "helpdocs-list-categories", + name: "List Categories", + description: "Retrieve a list of all categories in your HelpDocs knowledge base. [See the documentation](https://apidocs.helpdocs.io/article/hKlKgQuQgs-getting-categories)", + version: "0.0.1", + type: "action", + props: { + helpdocs, + }, + async run({ $ }) { + const { categories } = await this.helpdocs.listCategories({ + $, + }); + + $.export("$summary", `Found ${categories.length} categories`); + return categories; + }, +}; diff --git a/components/helpdocs/actions/search-articles/search-articles.mjs b/components/helpdocs/actions/search-articles/search-articles.mjs new file mode 100644 index 0000000000000..ea47f20de4080 --- /dev/null +++ b/components/helpdocs/actions/search-articles/search-articles.mjs @@ -0,0 +1,58 @@ +import helpdocs from "../../helpdocs.app.mjs"; + +export default { + key: "helpdocs-search-articles", + name: "Search Articles", + description: "Search for articles in your HelpDocs knowledge base. [See the documentation](https://apidocs.helpdocs.io/article/If1U9NNUpT-searching-for-articles)", + version: "0.0.1", + type: "action", + props: { + helpdocs, + query: { + type: "string", + label: "Query", + description: "The search term string you'd like results for", + }, + includePrivate: { + type: "boolean", + label: "Include Private", + description: "Include articles with a private status in the results", + optional: true, + }, + includeDraft: { + type: "boolean", + label: "Include Draft", + description: "Include articles with a draft status in the results", + optional: true, + }, + languageCode: { + type: "string", + label: "Language Code", + description: "If you have multilingual enabled, this will be the ISO language code you're trying to search in (e.g. `fr`, `en`, etc.). If you don't send this we'll search in your account's default language.", + optional: true, + }, + limit: { + type: "integer", + label: "Limit", + description: "How many results you'd like to receive", + max: 100, + default: 100, + optional: true, + }, + }, + async run({ $ }) { + const { articles } = await this.helpdocs.searchArticles({ + $, + data: { + query: this.query, + include_private: this.includePrivate, + include_draft: this.includeDraft, + language_code: this.languageCode, + limit: this.limit, + }, + }); + + $.export("$summary", `Found ${articles.length} articles`); + return articles; + }, +}; diff --git a/components/helpdocs/helpdocs.app.mjs b/components/helpdocs/helpdocs.app.mjs index dac27e966702b..c88a5b1e8716e 100644 --- a/components/helpdocs/helpdocs.app.mjs +++ b/components/helpdocs/helpdocs.app.mjs @@ -1,11 +1,172 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "helpdocs", - propDefinitions: {}, + propDefinitions: { + categoryId: { + type: "string", + label: "Category ID", + description: "The ID of a category", + async options() { + const { categories } = await this.listCategories(); + return categories.map((category) => ({ + label: category.title, + value: category.category_id, + })); + }, + }, + articleId: { + type: "string", + label: "Article ID", + description: "The ID of an article", + async options({ page }) { + const { articles } = await this.listArticles({ + params: { + limit: 20, + skip: page * 20, + }, + }); + return articles.map((article) => ({ + label: article.title, + value: article.article_id, + })); + }, + }, + groupId: { + type: "string", + label: "Group ID", + description: "The ID of a permission group", + async options() { + const { user_groups: groups } = await this.listGroups(); + return groups.map((group) => ({ + label: group.name, + value: group.group_id, + })); + }, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://api.helpdocs.io/v1"; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: { + Authorization: `Bearer ${this.$auth.api_key}`, + }, + ...opts, + }); + }, + getCategory({ + categoryId, ...opts + }) { + return this._makeRequest({ + path: `/category/${categoryId}`, + ...opts, + }); + }, + getArticle({ + articleId, ...opts + }) { + return this._makeRequest({ + path: `/article/${articleId}`, + ...opts, + }); + }, + getArticleVersions({ + articleId, ...opts + }) { + return this._makeRequest({ + path: `/article/${articleId}/versions`, + ...opts, + }); + }, + listCategories(opts = {}) { + return this._makeRequest({ + path: "/category", + ...opts, + }); + }, + listArticles(opts = {}) { + return this._makeRequest({ + path: "/article", + ...opts, + }); + }, + listGroups(opts = {}) { + return this._makeRequest({ + path: "/account/group", + ...opts, + }); + }, + searchArticles(opts = {}) { + return this._makeRequest({ + path: "/search", + ...opts, + }); + }, + createCategory(opts = {}) { + return this._makeRequest({ + path: "/category", + method: "POST", + ...opts, + }); + }, + createArticle(opts = {}) { + return this._makeRequest({ + path: "/article", + method: "POST", + ...opts, + }); + }, + deleteCategory({ + categoryId, ...opts + }) { + return this._makeRequest({ + path: `/category/${categoryId}`, + method: "DELETE", + ...opts, + }); + }, + deleteArticle({ + articleId, ...opts + }) { + return this._makeRequest({ + path: `/article/${articleId}`, + method: "DELETE", + ...opts, + }); + }, + async *paginate({ + fn, params = {}, resourceKey, max, + }) { + params = { + ...params, + limit: 100, + skip: 0, + }; + let total, count = 0; + do { + const response = await fn({ + params, + }); + const items = response[resourceKey]; + total = items?.length; + if (!total) { + return; + } + for (const item of items) { + yield item; + if (max && ++count >= max) { + return; + } + } + params.skip += params.limit; + } while (total === params.limit); }, }, -}; \ No newline at end of file +}; diff --git a/components/helpdocs/package.json b/components/helpdocs/package.json index 1f72aecede2ed..122054fc27475 100644 --- a/components/helpdocs/package.json +++ b/components/helpdocs/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/helpdocs", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream HelpDocs Components", "main": "helpdocs.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } -} \ No newline at end of file +} diff --git a/components/helpwise/.gitignore b/components/helpwise/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/helpwise/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/helpwise/app/helpwise.app.ts b/components/helpwise/app/helpwise.app.ts deleted file mode 100644 index 9c5affc267bde..0000000000000 --- a/components/helpwise/app/helpwise.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "helpwise", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/helpwise/helpwise.app.mjs b/components/helpwise/helpwise.app.mjs new file mode 100644 index 0000000000000..09a0c267fd9cb --- /dev/null +++ b/components/helpwise/helpwise.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "helpwise", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/helpwise/package.json b/components/helpwise/package.json index 382ebdeca247f..9e443a04f5cae 100644 --- a/components/helpwise/package.json +++ b/components/helpwise/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/helpwise", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Helpwise Components", - "main": "dist/app/helpwise.app.mjs", + "main": "helpwise.app.mjs", "keywords": [ "pipedream", "helpwise" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/helpwise", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/hootsuite/actions/create-media-upload-job/create-media-upload-job.mjs b/components/hootsuite/actions/create-media-upload-job/create-media-upload-job.mjs new file mode 100644 index 0000000000000..1b2d40f580455 --- /dev/null +++ b/components/hootsuite/actions/create-media-upload-job/create-media-upload-job.mjs @@ -0,0 +1,77 @@ +import { getFileStreamAndMetadata } from "@pipedream/platform"; +import hootsuite from "../../hootsuite.app.mjs"; + +export default { + key: "hootsuite-create-media-upload-job", + name: "Create Media Upload Job", + description: "Creates a new Media Upload Job on your Hootsuite account. [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/createMedia)", + version: "0.0.1", + type: "action", + props: { + hootsuite, + file: { + type: "string", + label: "File Path or URL", + description: "The path or URL to the image file.", + }, + syncDir: { + type: "dir", + accessMode: "read", + sync: true, + }, + }, + methods: { + initializeUpload(opts = {}) { + return this.hootsuite._makeRequest({ + method: "POST", + path: "/media", + ...opts, + }); + }, + streamToBuffer(stream) { + return new Promise((resolve, reject) => { + const chunks = []; + stream.on("data", (chunk) => chunks.push(chunk)); + stream.on("end", () => resolve(Buffer.concat(chunks))); + stream.on("error", reject); + }); + }, + uploadImage(url, fileBinary, headers) { + return this.hootsuite._makeRequest({ + url, + method: "PUT", + maxBodyLength: Infinity, + data: Buffer.from(fileBinary, "binary"), + noHeaders: true, + headers, + }); + }, + }, + async run({ $ }) { + const { + stream, metadata, + } = await getFileStreamAndMetadata(this.file); + + const { + data: { + uploadUrl, id, + }, + } = await this.initializeUpload({ + data: { + sizeBytes: metadata.size, + mimeType: metadata.contentType, + }, + }); + + const fileBinary = await this.streamToBuffer(stream); + + await this.uploadImage(uploadUrl, fileBinary, { + "Content-Type": metadata.contentType, + }); + + $.export("$summary", `Successfully created media upload job with ID: ${id}`); + return { + fileId: id, + }; + }, +}; diff --git a/components/hootsuite/actions/get-media-upload-status/get-media-upload-status.mjs b/components/hootsuite/actions/get-media-upload-status/get-media-upload-status.mjs new file mode 100644 index 0000000000000..a4913f48c9d7c --- /dev/null +++ b/components/hootsuite/actions/get-media-upload-status/get-media-upload-status.mjs @@ -0,0 +1,26 @@ +import hootsuite from "../../hootsuite.app.mjs"; + +export default { + key: "hootsuite-get-media-upload-status", + name: "Get Media Upload Status", + description: "Gets the status of a Media Upload Job on your Hootsuite account. [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/getMedia)", + version: "0.0.1", + type: "action", + props: { + hootsuite, + fileId: { + type: "string", + label: "File ID", + description: "The ID of the file to get the status of.", + }, + }, + async run({ $ }) { + const response = await this.hootsuite.getMediaUploadStatus({ + $, + fileId: this.fileId, + }); + + $.export("$summary", `Successfully got media upload status for file ID: ${this.fileId}`); + return response; + }, +}; diff --git a/components/hootsuite/actions/schedule-message/schedule-message.mjs b/components/hootsuite/actions/schedule-message/schedule-message.mjs new file mode 100644 index 0000000000000..11d2eb5da8c09 --- /dev/null +++ b/components/hootsuite/actions/schedule-message/schedule-message.mjs @@ -0,0 +1,363 @@ +import { + COMPANY_SIZE_OPTIONS, + GEOGRAPHY_OPTIONS, + INDUSTRY_OPTIONS, + JOB_FUNCTION_OPTIONS, + SENIORITY_OPTIONS, + STAFF_COUNT_RANGE_OPTIONS, +} from "../../common/constants.mjs"; +import { parseObject } from "../../common/utils.mjs"; +import hootsuite from "../../hootsuite.app.mjs"; + +export default { + key: "hootsuite-schedule-message", + name: "Schedule Message", + description: "Schedules a message on your Hootsuite account. [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/scheduleMessage)", + version: "0.0.1", + type: "action", + props: { + hootsuite, + text: { + type: "string", + label: "Text", + description: "The message text to publish.", + }, + socialProfileIds: { + propDefinition: [ + hootsuite, + "socialProfileIds", + ], + }, + scheduledSendTime: { + type: "string", + label: "Scheduled Send Time", + description: "The time the message is scheduled to be sent in UTC time, [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. Missing or different timezones will not be accepted, to ensure there is no ambiguity about scheduled time. Dates must end with 'Z' to be accepted.", + optional: true, + }, + webhookUrls: { + type: "string[]", + label: "Webhook URLs", + description: "The webhook URL(s) to call to when the message's state changes.", + optional: true, + }, + tags: { + type: "string[]", + label: "Tags", + description: "The Hootsuite message tags to apply to the message. To set tags the social profile must belong to an organization. Tags are case sensitive. Limited permission members can only use the existing tags for organization and cannot create new ones. See more about message tags at the Hootsuite Help Center. Not supported by Pinterest.", + optional: true, + }, + targetingFacebookPageAgeMin: { + type: "string", + label: "Targeting Facebook Page - Age Min", + description: "Minimum age to target the message at.", + options: [ + "13", + "17", + "18", + "19", + "21", + ], + optional: true, + }, + targetingFacebookPageEducation: { + type: "string[]", + label: "Targeting Facebook Page - Education", + description: "The education level of the Facebook page to target.", + options: [ + "highSchool", + "college", + "collegeGrad", + ], + optional: true, + }, + targetingFacebookPageInterestIn: { + type: "string[]", + label: "Targeting Facebook Page - Interests", + description: "Interested in preferences to target the message at.", + options: [ + "male", + "female", + ], + optional: true, + }, + targetingFacebookPageRelationshipStatus: { + type: "string[]", + label: "Targeting Facebook Page - Relationship Status", + description: "Relationship status to target the message at.", + options: [ + "single", + "relationship", + "married", + "engaged", + ], + optional: true, + }, + targetingFacebookPageCountry: { + type: "string[]", + label: "Targeting Facebook Page - Country", + description: "Country to target the message at. 2-digit ISO 3166 format code as provided by Facebook. **Format: [{\"k\": \"Canada\", \"v\": \"CA\"}]** [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/scheduleMessage) for more information.", + optional: true, + }, + targetingFacebookPageRegions: { + type: "string[]", + label: "Targeting Facebook Page - Regions", + description: "Region to target the message at. Note that regions can only be specified when there is exactly one country targeted. Limit 200. **Format: [{\"k\": \"British Columbia\", \"v\": \"2\"}]** [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/scheduleMessage) for more information.", + optional: true, + }, + targetingFacebookPageCities: { + type: "string[]", + label: "Targeting Facebook Page - Cities", + description: "City to target the message at. Note that cities can only be specified when there is exactly one country targeted. Limit 250. **Format: [{\"k\": \"Burnaby, BC\", \"v\": \"292466\"}]** [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/scheduleMessage) for more information.", + optional: true, + }, + targetingFacebookPageZips: { + type: "string[]", + label: "Targeting Facebook Page - Zip", + description: "Zip/Postal Code to target the message at. Limit 50,000. **Format: [{\"k\": \"K1S\", \"v\": \"CA:K1S\"}]** [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/scheduleMessage) for more information.", + optional: true, + }, + targetingLinkedInCompanySize: { + type: "string[]", + label: "Targeting LinkedIn Company - Size", + description: "Company size to target the message at.", + options: COMPANY_SIZE_OPTIONS, + optional: true, + }, + targetingLinkedInCompanyGeography: { + type: "string[]", + label: "Targeting LinkedIn Company - Geography", + description: "Geography to target the message at.", + options: GEOGRAPHY_OPTIONS, + optional: true, + }, + targetingLinkedInCompanyIndustry: { + type: "string[]", + label: "Targeting LinkedIn Company - Industry", + description: "Industry to target the message at.", + options: INDUSTRY_OPTIONS, + optional: true, + }, + targetingLinkedInCompanyJobFunction: { + type: "string[]", + label: "Targeting LinkedIn Company - Job Function", + description: "Job function to target the message at.", + options: JOB_FUNCTION_OPTIONS, + optional: true, + }, + targetingLinkedInCompanySeniority: { + type: "string[]", + label: "Targeting LinkedIn Company - Seniority", + description: "Seniority to target the message at.", + options: SENIORITY_OPTIONS, + optional: true, + }, + targetingLinkedInV2CompanyLocations: { + type: "string[]", + label: "Targeting LinkedIn V2 Company - Locations", + description: "Locations to target the message at, expected format of `urn:li:geo:{CODE}`. [Geo Locations reference](https://learn.microsoft.com/en-us/linkedin/shared/references/v2/standardized-data/locations/geo), [Geo Typeahead Locations reference](https://learn.microsoft.com/en-us/linkedin/shared/references/v2/standardized-data/locations/geo-typeahead?tabs=http)", + optional: true, + }, + targetingLinkedInV2CompanyStaffCountRange: { + type: "string[]", + label: "Targeting LinkedIn V2 Company - Staff Count Range", + description: "Staff count to target the message at, expected format of `SIZE_{VALUES}`. [Staff count codes reference](https://learn.microsoft.com/en-us/linkedin/shared/references/reference-tables/company-size-codes)", + options: STAFF_COUNT_RANGE_OPTIONS, + optional: true, + }, + targetingLinkedInV2CompanySeniorities: { + type: "string[]", + label: "Targeting LinkedIn V2 Company - Seniorities", + description: "Seniorities to target the message at, expected format of `urn:li:seniority:{CODE}`. [Seniorities codes reference](https://learn.microsoft.com/en-us/linkedin/shared/references/reference-tables/seniority-codes)", + optional: true, + }, + targetingLinkedInV2CompanyIndustries: { + type: "string[]", + label: "Targeting LinkedIn V2 Company - Industries", + description: "Industries to target the message at, expected format of `urn:li:industry:{CODE}`. [Industries codes reference](https://learn.microsoft.com/en-us/linkedin/shared/references/reference-tables/industry-codes-v2)", + optional: true, + }, + targetingLinkedInV2CompanyInterfaceLocations: { + type: "string[]", + label: "Targeting LinkedIn V2 Company - Interface Locations", + description: "Languages to target the message at, expected format of `{\"country\":\"COUNTRY\",\"language\":\"language\"}`. [Language codes reference](https://learn.microsoft.com/en-us/linkedin/shared/references/reference-tables/language-codes) Languages can be interpreted as this format: language_COUNTRY, replace in request as necessary.", + optional: true, + }, + privacyFacebookVisibility: { + type: "string", + label: "Privacy Facebook Visibility", + description: "Facebook visibility rule.", + options: [ + "everyone", + "friends", + "friendsOfFriends", + ], + optional: true, + }, + privacyLinkedInVisibility: { + type: "string", + label: "Privacy LinkedIn Visibility", + description: "LinkedIn visibility rule.", + options: [ + "anyone", + "connectionsOnly", + ], + optional: true, + }, + latitude: { + type: "string", + label: "Latitude", + description: "The latitude in decimal degrees. Must be between -90 to 90.", + optional: true, + }, + longitude: { + type: "string", + label: "Longitude", + description: "The longitude in decimal degrees. Must be between -180 to 180.", + optional: true, + }, + emailNotification: { + type: "boolean", + label: "Email Notification", + description: "A flag to determine whether email notifications are sent when the message is published.", + optional: true, + }, + mediaUrls: { + type: "string[]", + label: "Media URLs", + description: "The ow.ly media to attach to the message", + optional: true, + }, + media: { + type: "string[]", + label: "Media", + description: "The media id(s) returned at `Create Media Upload Job` action to attach to the message", + optional: true, + }, + }, + async run({ $ }) { + const facebookPage = {}; + + if (this.targetingFacebookPageAgeMin) { + facebookPage.ageMin = parseInt(this.targetingFacebookPageAgeMin); + } + if (this.targetingFacebookPageEducation) { + facebookPage.education = parseObject(this.targetingFacebookPageEducation); + } + if (this.targetingFacebookPageInterestIn) { + facebookPage.interestIn = parseObject(this.targetingFacebookPageInterestIn); + } + if (this.targetingFacebookPageRelationshipStatus) { + facebookPage.relationshipStatus = parseObject(this.targetingFacebookPageRelationshipStatus); + } + if (this.targetingFacebookPageCountry) { + facebookPage.countries = parseObject(this.targetingFacebookPageCountry); + } + if (this.targetingFacebookPageRegions) { + facebookPage.regions = parseObject(this.targetingFacebookPageRegions); + } + if (this.targetingFacebookPageCities) { + facebookPage.cities = parseObject(this.targetingFacebookPageCities); + } + if (this.targetingFacebookPageZips) { + facebookPage.zips = parseObject(this.targetingFacebookPageZips); + } + const linkedInCompany = {}; + if (this.targetingLinkedInCompanySize) { + linkedInCompany.companySize = parseObject(this.targetingLinkedInCompanySize); + } + if (this.targetingLinkedInCompanyGeography) { + linkedInCompany.geography = parseObject(this.targetingLinkedInCompanyGeography); + } + if (this.targetingLinkedInCompanyIndustry) { + linkedInCompany.industry = + parseObject(this.targetingLinkedInCompanyIndustry)?.map((item) => String(item)); + } + if (this.targetingLinkedInCompanyJobFunction) { + linkedInCompany.jobFunction = parseObject(this.targetingLinkedInCompanyJobFunction); + } + if (this.targetingLinkedInCompanySeniority) { + linkedInCompany.seniority = parseObject(this.targetingLinkedInCompanySeniority); + } + + const linkedInV2Company = {}; + if (this.targetingLinkedInV2CompanyLocations) { + linkedInV2Company.locations = parseObject(this.targetingLinkedInV2CompanyLocations); + } + if (this.targetingLinkedInV2CompanyStaffCountRange) { + linkedInV2Company.staffCountRange = + parseObject(this.targetingLinkedInV2CompanyStaffCountRange); + } + if (this.targetingLinkedInV2CompanySeniorities) { + linkedInV2Company.seniorities = parseObject(this.targetingLinkedInV2CompanySeniorities); + } + if (this.targetingLinkedInV2CompanyIndustries) { + linkedInV2Company.industries = parseObject(this.targetingLinkedInV2CompanyIndustries); + } + if (this.targetingLinkedInV2CompanyInterfaceLocations) { + linkedInV2Company.interfaceLocations = + parseObject(this.targetingLinkedInV2CompanyInterfaceLocations); + } + + const response = await this.hootsuite.scheduleMessage({ + $, + data: { + text: this.text, + socialProfileIds: parseObject(this.socialProfileIds), + scheduledSendTime: this.scheduledSendTime, + webhookUrls: parseObject(this.webhookUrls), + tags: parseObject(this.tags), + targeting: { + ...(Object.keys(facebookPage).length > 0 + ? { + facebookPage, + } + : {}), + ...(Object.keys(linkedInCompany).length > 0 + ? { + linkedInCompany, + } + : {}), + ...(Object.keys(linkedInV2Company).length > 0 + ? { + linkedInV2Company, + } + : {}), + }, + privacy: (this.privacyFacebookVisibility || this.privacyLinkedInVisibility) && { + ...(this.privacyFacebookVisibility + ? { + facebook: { + visibility: [ + this.privacyFacebookVisibility, + ], + }, + } + : {}), + ...(this.privacyLinkedInVisibility + ? { + linkedIn: { + visibility: [ + this.privacyLinkedInVisibility, + ], + }, + } + : {}), + }, + location: { + latitude: parseFloat(this.latitude), + longitude: parseFloat(this.longitude), + }, + emailNotification: this.emailNotification, + mediaUrls: parseObject(this.mediaUrls)?.map((mediaUrl) => ({ + url: mediaUrl, + })), + media: parseObject(this.media)?.map((media) => ({ + id: media, + })), + }, + }); + + $.export("$summary", `Successfully scheduled message with ID: ${response.data[0].id}`); + return response; + }, +}; diff --git a/components/hootsuite/common/constants.mjs b/components/hootsuite/common/constants.mjs new file mode 100644 index 0000000000000..19a2dbb104e5f --- /dev/null +++ b/components/hootsuite/common/constants.mjs @@ -0,0 +1,2666 @@ +export const COMPANY_SIZE_OPTIONS = [ + { + label: "self", + value: "self", + }, + { + label: "1 to 10 employees", + value: "1-10", + }, + { + label: "11 to 50 employees", + value: "11-50", + }, + { + label: "51 to 200 employees", + value: "51-200", + }, + { + label: "201 to 500 employees", + value: "201-500", + }, + { + label: "501 to 1000 employees", + value: "501-1000", + }, + { + label: "1001 to 5000 employees", + value: "1001-5000", + }, + { + label: "5001 to 10000 employees", + value: "5001-10000", + }, + { + label: "10001+ employees", + value: "10001", + }, +]; + +export const GEOGRAPHY_OPTIONS = [ + { + label: "Africa", + value: "af", + }, + { + label: "Cameroon", + value: "af.cm", + }, + { + label: "Algeria", + value: "af.dz", + }, + { + label: "Egypt", + value: "af.eg", + }, + { + label: "Ghana", + value: "af.gh", + }, + { + label: "Kenya", + value: "af.ke", + }, + { + label: "Morocco", + value: "af.ma", + }, + { + label: "Nigeria", + value: "af.ng", + }, + { + label: "Tunisia", + value: "af.tn", + }, + { + label: "Tanzania", + value: "af.tz", + }, + { + label: "Uganda", + value: "af.ug", + }, + { + label: "South Africa", + value: "af.za", + }, + { + label: "Zimbabwe", + value: "af.zw", + }, + { + label: "Antarctica", + value: "aq", + }, + { + label: "Asia", + value: "as", + }, + { + label: "Bangladesh", + value: "as.bd", + }, + { + label: "China", + value: "as.cn", + }, + { + label: "Shanghai City, China", + value: "as.cn.*.8909", + }, + { + label: "Shenzhen, Guangdong, China", + value: "as.cn.*.8910", + }, + { + label: "Beijing City, China", + value: "as.cn.*.8911", + }, + { + label: "Guangzhou, Guangdong, China", + value: "as.cn.*.8919", + }, + { + label: "Hong Kong", + value: "as.hk", + }, + { + label: "Indonesia", + value: "as.id", + }, + { + label: "Greater Jakarta Area, Indonesia", + value: "as.id.*.8594", + }, + { + label: "India", + value: "as.in", + }, + { + label: "Andaman & Nicobar Islands", + value: "as.in.an", + }, + { + label: "Andhra Pradesh", + value: "as.in.ap", + }, + { + label: "Hyderabad Area, India", + value: "as.in.ap.6508", + }, + { + label: "Arunachal Pradesh", + value: "as.in.ar", + }, + { + label: "Assam", + value: "as.in.as", + }, + { + label: "Bihar", + value: "as.in.br", + }, + { + label: "Chattisgarh", + value: "as.in.cg", + }, + { + label: "Chandigarh", + value: "as.in.ch", + }, + { + label: "Daman & Diu", + value: "as.in.dd", + }, + { + label: "Delhi", + value: "as.in.dl", + }, + { + label: "New Delhi Area, India", + value: "as.in.dl.7151", + }, + { + label: "Dadra & Nagar Haveli", + value: "as.in.dn", + }, + { + label: "Goa", + value: "as.in.ga", + }, + { + label: "Vadodara Area, India", + value: "as.in.gj.6552", + }, + { + label: "Ahmedabad Area, India", + value: "as.in.gj.7065", + }, + { + label: "Himachal Pradesh", + value: "as.in.hp", + }, + { + label: "Haryana", + value: "as.in.hr", + }, + { + label: "Gujarat", + value: "as.in.gj", + }, + { + label: "Gurgaon, India", + value: "as.in.hr.7391", + }, + { + label: "Jharkhand", + value: "as.in.jh", + }, + { + label: "Jammu & Kashmir", + value: "as.in.jk", + }, + { + label: "Karnataka", + value: "as.in.ka", + }, + { + label: "Bengaluru Area, India", + value: "as.in.ka.7127", + }, + { + label: "Kerala", + value: "as.in.kl", + }, + { + label: "Cochin Area, India", + value: "as.in.kl.6477", + }, + { + label: "Lakshadweep", + value: "as.in.ld", + }, + { + label: "Maharashtra", + value: "as.in.mh", + }, + { + label: "Nagpur Area, India", + value: "as.in.mh.6751", + }, + { + label: "Mumbai Area, India", + value: "as.in.mh.7150", + }, + { + label: "Pune Area, India", + value: "as.in.mh.7350", + }, + { + label: "Meghalaya", + value: "as.in.mn", + }, + { + label: "Madhya Pradesh", + value: "as.in.mp", + }, + { + label: "Indore Area, India", + value: "as.in.mp.7382", + }, + { + label: "Mizoram", + value: "as.in.mz", + }, + { + label: "Nagaland", + value: "as.in.nl", + }, + { + label: "Orissa", + value: "as.in.or", + }, + { + label: "Punjab", + value: "as.in.pb", + }, + { + label: "Chandigarh Area, India", + value: "as.in.pb.6879", + }, + { + label: "Pondicherry", + value: "as.in.py", + }, + { + label: "Rajasthan", + value: "as.in.rj", + }, + { + label: "Jaipur Area, India", + value: "as.in.rj.7287", + }, + { + label: "Sikkim", + value: "as.in.sk", + }, + { + label: "Tamil Nadu", + value: "as.in.tn", + }, + { + label: "Coimbatore Area, India", + value: "as.in.tn.6472", + }, + { + label: "Chennai Area, India", + value: "as.in.tn.6891", + }, + { + label: "Tripura", + value: "as.in.tr", + }, + { + label: "Uttarakhand", + value: "as.in.ul", + }, + { + label: "Uttar Pradesh", + value: "as.in.up", + }, + { + label: "Lucknow Area, India", + value: "as.in.up.7093", + }, + { + label: "Noida Area, India", + value: "as.in.up.7392", + }, + { + label: "West Bengal", + value: "as.in.wb", + }, + { + label: "Kolkata Area, India", + value: "as.in.wb.7003", + }, + { + label: "Japan", + value: "as.jp", + }, + { + label: "Korea", + value: "as.kr", + }, + { + label: "Gangnam-gu, Seoul, Korea", + value: "as.kr.*.7700", + }, + { + label: "Sri Lanka", + value: "as.lk", + }, + { + label: "Malaysia", + value: "as.my", + }, + { + label: "Selangor, Malaysia", + value: "as.my.*.7945", + }, + { + label: "Kuala Lumpur, Malaysia", + value: "as.my.*.7960", + }, + { + label: "Nepal", + value: "as.np", + }, + { + label: "Philippines", + value: "as.ph", + }, + { + label: "Singapore", + value: "as.sg", + }, + { + label: "Thailand", + value: "as.th", + }, + { + label: "Taiwan", + value: "as.tw", + }, + { + label: "Vietnam", + value: "as.vn", + }, + { + label: "Europe", + value: "eu", + }, + { + label: "Austria", + value: "eu.at", + }, + { + label: "Belgium", + value: "eu.be", + }, + { + label: "Antwerp Area, Belgium", + value: "eu.be.*.4918", + }, + { + label: "Brussels Area, Belgium", + value: "eu.be.*.4920", + }, + { + label: "Bulgaria", + value: "eu.bg", + }, + { + label: "Switzerland", + value: "eu.ch", + }, + { + label: "Geneva Area, Switzerland", + value: "eu.ch.*.4930", + }, + { + label: "Zรผrich Area, Switzerland", + value: "eu.ch.*.4938", + }, + { + label: "Czech Republic", + value: "eu.cz", + }, + { + label: "Germany", + value: "eu.de", + }, + { + label: "Cologne Area, Germany", + value: "eu.de.*.4953", + }, + { + label: "Frankfurt Am Main Area, Germany", + value: "eu.de.*.4966", + }, + { + label: "Munich Area, Germany", + value: "eu.de.*.5000", + }, + { + label: "Denmark", + value: "eu.dk", + }, + { + label: "Copenhagen Area, Denmark", + value: "eu.dk.*.5038", + }, + { + label: "Odense Area, Denmark", + value: "eu.dk.*.5041", + }, + { + label: "ร…lborg Area, Denmark", + value: "eu.dk.*.5044", + }, + { + label: "ร…rhus Area, Denmark", + value: "eu.dk.*.5045", + }, + { + label: "Spain", + value: "eu.es", + }, + { + label: "Barcelona Area, Spain", + value: "eu.es.*.5064", + }, + { + label: "Madrid Area, Spain", + value: "eu.es.*.5113", + }, + { + label: "Finland", + value: "eu.fi", + }, + { + label: "France", + value: "eu.fr", + }, + { + label: "Lille Area, France", + value: "eu.fr.*.5205", + }, + { + label: "Lyon Area, France", + value: "eu.fr.*.5210", + }, + { + label: "Marseille Area, France", + value: "eu.fr.*.5211", + }, + { + label: "Nice Area, France", + value: "eu.fr.*.5221", + }, + { + label: "Paris Area, France", + value: "eu.fr.*.5227", + }, + { + label: "Toulouse Area, France", + value: "eu.fr.*.5249", + }, + { + label: "United Kingdom", + value: "eu.gb", + }, + { + label: "Birmingham, United Kingdom", + value: "eu.gb.*.4544", + }, + { + label: "Brighton, United Kingdom", + value: "eu.gb.*.4550", + }, + { + label: "Bristol, United Kingdom", + value: "eu.gb.*.4552", + }, + { + label: "Cambridge, United Kingdom", + value: "eu.gb.*.4555", + }, + { + label: "Chelmsford, United Kingdom", + value: "eu.gb.*.4558", + }, + { + label: "Coventry, United Kingdom", + value: "eu.gb.*.4562", + }, + { + label: "London, United Kingdom", + value: "eu.gb.*.4573", + }, + { + label: "Edinburgh, United Kingdom", + value: "eu.gb.*.4574", + }, + { + label: "Edinburgh, United Kingdom", + value: "eu.gb.*.4579", + }, + { + label: "Glasgow, United Kingdom", + value: "eu.gb.*.4580", + }, + { + label: "Gloucester, United Kingdom", + value: "eu.gb.*.4582", + }, + { + label: "Guildford, United Kingdom", + value: "eu.gb.*.4582", + }, + { + label: "Harrow, United Kingdom", + value: "eu.gb.*.4583", + }, + { + label: "Hemel Hempstead, United Kingdom", + value: "eu.gb.*.4586", + }, + { + label: "Hemel Hempstead, United Kingdom", + value: "eu.gb.*.4586", + }, + { + label: "Kingston upon Thames, United Kingdom", + value: "eu.gb.*.4597", + }, + { + label: "Kingston upon Thames, United Kingdom", + value: "eu.gb.*.4603", + }, + { + label: "Leicester, United Kingdom", + value: "eu.gb.*.4606", + }, + { + label: "Leeds, United Kingdom", + value: "eu.gb.*.4608", + }, + { + label: "Manchester, United Kingdom", + value: "eu.gb.*.4610", + }, + { + label: "Milton Keynes, United Kingdom", + value: "eu.gb.*.4612", + }, + { + label: "Newcastle upon Tyne, United Kingdom", + value: "eu.gb.*.4613", + }, + { + label: "Nottingham, United Kingdom", + value: "eu.gb.*.4614", + }, + { + label: "Northampton, United Kingdom", + value: "eu.gb.*.4618", + }, + { + label: "Portsmouth, United Kingdom", + value: "eu.gb.*.4623", + }, + { + label: "Reading, United Kingdom", + value: "eu.gb.*.4625", + }, + { + label: "Redhill, United Kingdom", + value: "eu.gb.*.4626", + }, + { + label: "Sheffield, United Kingdom", + value: "eu.gb.*.4628", + }, + { + label: "Slough, United Kingdom", + value: "eu.gb.*.4632", + }, + { + label: "Southampton, United Kingdom", + value: "eu.gb.*.4635", + }, + { + label: "Tonbridge, United Kingdom", + value: "eu.gb.*.4644", + }, + { + label: "Twickenham, United Kingdom", + value: "eu.gb.*.4648", + }, + { + label: "Greece", + value: "eu.gr", + }, + { + label: "Croatia", + value: "eu.hr", + }, + { + label: "Hungary", + value: "eu.hu", + }, + { + label: "Ireland", + value: "eu.ie", + }, + { + label: "Italy", + value: "eu.it", + }, + { + label: "Bologna Area, Italy", + value: "eu.it.*.5587", + }, + { + label: "Milan Area, Italy", + value: "eu.it.*.5616", + }, + { + label: "Rome Area, Italy", + value: "eu.it.*.5636", + }, + { + label: "Turin Area, Italy", + value: "eu.it.*.5652", + }, + { + label: "Venice Area, Italy", + value: "eu.it.*.5657", + }, + { + label: "Lithuania", + value: "eu.lt", + }, + { + label: "Netherlands", + value: "eu.nl", + }, + { + label: "Almere Stad Area, Netherlands", + value: "eu.nl.*.5663", + }, + { + label: "Amsterdam Area, Netherlands", + value: "eu.nl.*.5664", + }, + { + label: "Apeldoorn Area, Netherlands", + value: "eu.nl.*.5665", + }, + { + label: "Eindhoven Area, Netherlands", + value: "eu.nl.*.5668", + }, + { + label: "Enschede Area, Netherlands", + value: "eu.nl.*.5669", + }, + { + label: "Groningen Area, Netherlands", + value: "eu.nl.*.5673", + }, + { + label: "Nijmegen Area, Netherlands", + value: "eu.nl.*.5681", + }, + { + label: "The Hague Area, Netherlands", + value: "eu.nl.*.5688", + }, + { + label: "Utrecht Area, Netherlands", + value: "eu.nl.*.5690", + }, + { + label: "Breda Area, Netherlands", + value: "eu.nl.*.5906", + }, + { + label: "Tilburg Area, Netherlands", + value: "eu.nl.*.5907", + }, + { + label: "Rotterdam Area, Netherlands", + value: "eu.nl.*.5908", + }, + { + label: "Maastricht Area, Netherlands", + value: "eu.nl.*.7417", + }, + { + label: "Norway", + value: "eu.no", + }, + { + label: "Poland", + value: "eu.pl", + }, + { + label: "Portugal", + value: "eu.pt", + }, + { + label: "Romania", + value: "eu.ro", + }, + { + label: "Serbia", + value: "eu.rs", + }, + { + label: "Russian Federation", + value: "eu.ru", + }, + { + label: "Sweden", + value: "eu.se", + }, + { + label: "Slovak Republic", + value: "eu.sk", + }, + { + label: "Turkey", + value: "eu.tr", + }, + { + label: "Istanbul, Turkey", + value: "eu.tr.*.7585", + }, + { + label: "Ukraine", + value: "eu.ua", + }, + { + label: "Latin America", + value: "la", + }, + { + label: "Argentina", + value: "la.ar", + }, + { + label: "Bolivia", + value: "la.bo", + }, + { + label: "Brazil", + value: "la.br", + }, + { + label: "Acre", + value: "la.br.ac", + }, + { + label: "Alagoas", + value: "la.br.al", + }, + { + label: "Amazonas", + value: "la.br.am", + }, + { + label: "Amapรก", + value: "la.br.ap", + }, + { + label: "Bahia", + value: "la.br.ba", + }, + { + label: "Cearรก", + value: "la.br.ce", + }, + { + label: "Distrito Federal", + value: "la.br.df", + }, + { + label: "Espรญrito Santo", + value: "la.br.es", + }, + { + label: "Goiรกs", + value: "la.br.go", + }, + { + label: "Maranhรฃo", + value: "la.br.ma", + }, + { + label: "Minas Gerais", + value: "la.br.mg", + }, + { + label: "Belo Horizonte Area, Brazil", + value: "la.br.mg.6156", + }, + { + label: "Mato Grosso do Sul", + value: "la.br.ms", + }, + { + label: "Mato Grosso", + value: "la.br.mt", + }, + { + label: "Parรก", + value: "la.br.pa", + }, + { + label: "Paraรญba", + value: "la.br.pb", + }, + { + label: "Pernambuco", + value: "la.br.pe", + }, + { + label: "Piauรญ", + value: "la.br.pi", + }, + { + label: "Paranรก", + value: "la.br.pr", + }, + { + label: "Curitiba Area, Brazil", + value: "la.br.pr.6399", + }, + { + label: "Rio de Janeiro", + value: "la.br.rj", + }, + { + label: "Rio de Janeiro Area, Brazil", + value: "la.br.rj.6034", + }, + { + label: "Rio Grande do Norte", + value: "la.br.rn", + }, + { + label: "Rondรดnia", + value: "la.br.ro", + }, + { + label: "Roraima", + value: "la.br.rr", + }, + { + label: "Rio Grande do Sul", + value: "la.br.rs", + }, + { + label: "Porto Alegre Area, Brazil", + value: "la.br.rs.6467", + }, + { + label: "Santa Catarina", + value: "la.br.sc", + }, + { + label: "Sergipe", + value: "la.br.se", + }, + { + label: "Sรฃo Paulo", + value: "la.br.sp", + }, + { + label: "Campinas Area, Brazil", + value: "la.br.sp.6104", + }, + { + label: "Sรฃo Paulo Area, Brazil", + value: "la.br.sp.6368", + }, + { + label: "Tocantins", + value: "la.br.to", + }, + { + label: "Chile", + value: "la.cl", + }, + { + label: "Colombia", + value: "la.co", + }, + { + label: "Costa Rica", + value: "la.cr", + }, + { + label: "Dominican Republic", + value: "la.do", + }, + { + label: "Ecuador", + value: "la.ec", + }, + { + label: "Guatemala", + value: "la.gt", + }, + { + label: "Mexico", + value: "la.mx", + }, + { + label: "Mexico City Area, Mexico", + value: "la.mx.*.5921", + }, + { + label: "Naucalpan de Juรกrez Area, Mexico", + value: "la.mx.*.5955", + }, + { + label: "Panama", + value: "la.pa", + }, + { + label: "Peru", + value: "la.pe", + }, + { + label: "Puerto Rico", + value: "la.pr", + }, + { + label: "Trinidad and Tobago", + value: "la.tt", + }, + { + label: "Uruguay", + value: "la.uy", + }, + { + label: "Venezuela", + value: "la.ve", + }, + { + label: "Middle East", + value: "me", + }, + { + label: "United Arab Emirates", + value: "me.ae", + }, + { + label: "Bahrain", + value: "me.bh", + }, + { + label: "Israel", + value: "me.il", + }, + { + label: "Jordan", + value: "me.jo", + }, + { + label: "Kuwait", + value: "me.kw", + }, + { + label: "Pakistan", + value: "me.pk", + }, + { + label: "Qatar", + value: "me.qa", + }, + { + label: "Saudi Arabia", + value: "me.sa", + }, + { + label: "North America", + value: "na", + }, + { + label: "Canada", + value: "na.ca", + }, + { + label: "Alberta", + value: "na.ca.ab", + }, + { + label: "Edmonton, Canada Area", + value: "na.ca.ab.4872", + }, + { + label: "Calgary, Canada Area", + value: "na.ca.ab.4882", + }, + { + label: "British Columbia", + value: "na.ca.bc", + }, + { + label: "British Columbia, Canada", + value: "na.ca.bc.4873", + }, + { + label: "Vancouver, Canada Area", + value: "na.ca.bc.4880", + }, + { + label: "Manitoba", + value: "na.ca.mb", + }, + { + label: "New Brunswick", + value: "na.ca.nb", + }, + { + label: "Newfoundland And Labrador", + value: "na.ca.nl", + }, + { + label: "Nova Scotia", + value: "na.ca.ns", + }, + { + label: "Halifax, Canada Area", + value: "na.ca.ns.4874", + }, + { + label: "Northwest Territories", + value: "na.ca.nt", + }, + { + label: "Nunavut", + value: "na.ca.nu", + }, + { + label: "Ontario", + value: "na.ca.on", + }, + { + label: "Ontario, Canada", + value: "na.ca.on.4864", + }, + { + label: "Kitchener, Canada Area", + value: "na.ca.on.4865", + }, + { + label: "London, Canada Area", + value: "na.ca.on.4869", + }, + { + label: "Toronto, Canada Area", + value: "na.ca.on.4876", + }, + { + label: "Ottawa, Canada Area", + value: "na.ca.on.4884", + }, + { + label: "Prince Edward Island", + value: "na.ca.pe", + }, + { + label: "Quebec", + value: "na.ca.qc", + }, + { + label: "Montreal, Canada Area", + value: "na.ca.qc.4863", + }, + { + label: "Winnipeg, Canada Area", + value: "na.ca.qc.4866", + }, + { + label: "Quebec, Canada", + value: "na.ca.qc.4875", + }, + { + label: "Saskatchewan", + value: "na.ca.sk", + }, + { + label: "Yukon", + value: "na.ca.yt", + }, + { + label: "United States", + value: "na.us", + }, + { + label: "Alaska", + value: "na.us.ak", + }, + { + label: "Anchorage, Alaska Area", + value: "na.us.ak.38", + }, + { + label: "Alabama", + value: "na.us.al", + }, + { + label: "Birmingham, Alabama Area", + value: "na.us.al.100", + }, + { + label: "Huntsville, Alabama Area", + value: "na.us.al.344", + }, + { + label: "Mobile, Alabama Area", + value: "na.us.al.516", + }, + { + label: "Arkansas", + value: "na.us.ar", + }, + { + label: "Fayetteville, Arkansas Area", + value: "na.us.ar.258", + }, + { + label: "Little Rock, Arkansas Area", + value: "na.us.ar.440", + }, + { + label: "Arizona", + value: "na.us.az", + }, + { + label: "Phoenix, Arizona Area", + value: "na.us.az.620", + }, + { + label: "Tucson, Arizona Area", + value: "na.us.az.852", + }, + { + label: "California", + value: "na.us.ca", + }, + { + label: "Fresno, California Area", + value: "na.us.ca.284", + }, + { + label: "Greater Los Angeles Area", + value: "na.us.ca.49", + }, + { + label: "Orange County, California Area", + value: "na.us.ca.51", + }, + { + label: "Salinas, California Area", + value: "na.us.ca.712", + }, + { + label: "Greater San Diego Area", + value: "na.us.ca.732", + }, + { + label: "Santa Barbara, California Area", + value: "na.us.ca.748", + }, + { + label: "Stockton, California Area", + value: "na.us.ca.812", + }, + { + label: "Sacramento, California Area", + value: "na.us.ca.82", + }, + { + label: "San Francisco Bay Area", + value: "na.us.ca.84", + }, + { + label: "Colorado", + value: "na.us.co", + }, + { + label: "Colorado Springs, Colorado Area", + value: "na.us.co.172", + }, + { + label: "Fort Collins, Colorado Area", + value: "na.us.co.267", + }, + { + label: "Greater Denver Area", + value: "na.us.co.34", + }, + { + label: "Connecticut", + value: "na.us.ct", + }, + { + label: "Hartford, Connecticut Area", + value: "na.us.ct.327", + }, + { + label: "New London/Norwich, Connecticut Area", + value: "na.us.ct.552", + }, + { + label: "District Of Columbia", + value: "na.us.dc", + }, + { + label: "Washington D.C. Metro Area", + value: "na.us.dc.97", + }, + { + label: "Delaware", + value: "na.us.de", + }, + { + label: "Florida", + value: "na.us.fl", + }, + { + label: "Daytona Beach, Florida Area", + value: "na.us.fl.202", + }, + { + label: "Fort Myers, Florida Area", + value: "na.us.fl.270", + }, + { + label: "Fort Pierce, Florida Area", + value: "na.us.fl.271", + }, + { + label: "Gainesville, Florida Area", + value: "na.us.fl.290", + }, + { + label: "Jacksonville, Florida Area", + value: "na.us.fl.359", + }, + { + label: "Lakeland, Florida Area", + value: "na.us.fl.398", + }, + { + label: "Melbourne, Florida Area", + value: "na.us.fl.490", + }, + { + label: "Miami/Fort Lauderdale Area", + value: "na.us.fl.56", + }, + { + label: "Orlando, Florida Area", + value: "na.us.fl.596", + }, + { + label: "Sarasota, Florida Area", + value: "na.us.fl.751", + }, + { + label: "Tallahassee, Florida Area", + value: "na.us.fl.824", + }, + { + label: "Tampa/St. Petersburg, Florida Area", + value: "na.us.fl.828", + }, + { + label: "West Palm Beach, Florida Area", + value: "na.us.fl.896", + }, + { + label: "Georgia", + value: "na.us.ga", + }, + { + label: "Greater Atlanta Area", + value: "na.us.ga.52", + }, + { + label: "Augusta, Georgia Area", + value: "na.us.ga.60", + }, + { + label: "Savannah, Georgia Area", + value: "na.us.ga.752", + }, + { + label: "Hawaii", + value: "na.us.hi", + }, + { + label: "Hawaiian Islands", + value: "na.us.hi.332", + }, + { + label: "Iowa", + value: "na.us.ia", + }, + { + label: "Davenport, Iowa Area", + value: "na.us.ia.196", + }, + { + label: "Des Moines, Iowa Area", + value: "na.us.ia.212", + }, + { + label: "Idaho", + value: "na.us.id", + }, + { + label: "Boise, Idaho Area", + value: "na.us.id.108", + }, + { + label: "Illinois", + value: "na.us.il", + }, + { + label: "Greater Chicago Area", + value: "na.us.il.14", + }, + { + label: "Urbana-Champaign, Illinois Area", + value: "na.us.il.140", + }, + { + label: "Peoria, Illinois Area", + value: "na.us.il.612", + }, + { + label: "Rockford, Illinois Area", + value: "na.us.il.688", + }, + { + label: "Indiana", + value: "na.us.in", + }, + { + label: "Evansville, Indiana Area", + value: "na.us.in.244", + }, + { + label: "Fort Wayne, Indiana Area", + value: "na.us.in.276", + }, + { + label: "Indianapolis, Indiana Area", + value: "na.us.in.348", + }, + { + label: "Kansas", + value: "na.us.ks", + }, + { + label: "Wichita, Kansas Area", + value: "na.us.ks.904", + }, + { + label: "Kentucky", + value: "na.us.ky", + }, + { + label: "Lexington, Kentucky Area", + value: "na.us.ky.428", + }, + { + label: "Louisville, Kentucky Area", + value: "na.us.ky.452", + }, + { + label: "Louisiana", + value: "na.us.la", + }, + { + label: "Greater New Orleans Area", + value: "na.us.la.556", + }, + { + label: "Baton Rouge, Louisiana Area", + value: "na.us.la.76", + }, + { + label: "Massachusetts", + value: "na.us.ma", + }, + { + label: "Greater Boston Area", + value: "na.us.ma.7", + }, + { + label: "Springfield, Massachusetts Area", + value: "na.us.ma.800", + }, + { + label: "Maryland", + value: "na.us.md", + }, + { + label: "Baltimore, Maryland Area", + value: "na.us.md.7416", + }, + { + label: "Maine", + value: "na.us.me", + }, + { + label: "Portland, Maine Area", + value: "na.us.me.640", + }, + { + label: "Michigan", + value: "na.us.mi", + }, + { + label: "Greater Grand Rapids, Michigan Area", + value: "na.us.mi.300", + }, + { + label: "Greater Detroit Area", + value: "na.us.mi.35", + }, + { + label: "Kalamazoo, Michigan Area", + value: "na.us.mi.372", + }, + { + label: "Lansing, Michigan Area", + value: "na.us.mi.404", + }, + { + label: "Saginaw, Michigan Area", + value: "na.us.mi.696", + }, + { + label: "Minnesota", + value: "na.us.mn", + }, + { + label: "Greater Minneapolis-St. Paul Area", + value: "na.us.mn.512", + }, + { + label: "Missouri", + value: "na.us.mo", + }, + { + label: "Columbia, Missouri Area", + value: "na.us.mo.174", + }, + { + label: "Kansas City, Missouri Area", + value: "na.us.mo.376", + }, + { + label: "Greater St. Louis Area", + value: "na.us.mo.704", + }, + { + label: "Springfield, Missouri Area", + value: "na.us.mo.792", + }, + { + label: "Mississippi", + value: "na.us.ms", + }, + { + label: "Jackson, Mississippi Area", + value: "na.us.ms.356", + }, + { + label: "Montana", + value: "na.us.mt", + }, + { + label: "North Carolina", + value: "na.us.nc", + }, + { + label: "Charlotte, North Carolina Area", + value: "na.us.nc.152", + }, + { + label: "Greensboro/Winston-Salem, North Carolina Area", + value: "na.us.nc.312", + }, + { + label: "Asheville, North Carolina Area", + value: "na.us.nc.48", + }, + { + label: "Raleigh-Durham, North Carolina Area", + value: "na.us.nc.664", + }, + { + label: "Wilmington, North Carolina Area", + value: "na.us.nc.920", + }, + { + label: "North Dakota", + value: "na.us.nd", + }, + { + label: "Lincoln, Nebraska Area", + value: "na.us.ne.436", + }, + { + label: "Greater Omaha Area", + value: "na.us.ne.592", + }, + { + label: "New Hampshire", + value: "na.us.nh", + }, + { + label: "New Jersey", + value: "na.us.nj", + }, + { + label: "New Mexico", + value: "na.us.nm", + }, + { + label: "Albuquerque, New Mexico Area", + value: "na.us.nm.20", + }, + { + label: "Nevada", + value: "na.us.nv", + }, + { + label: "Las Vegas, Nevada Area", + value: "na.us.nv.412", + }, + { + label: "Reno, Nevada Area", + value: "na.us.nv.672", + }, + { + label: "New York", + value: "na.us.ny", + }, + { + label: "Buffalo/Niagara, New York Area", + value: "na.us.ny.128", + }, + { + label: "Albany, New York Area", + value: "na.us.ny.16", + }, + { + label: "Rochester, New York Area", + value: "na.us.ny.684", + }, + { + label: "Greater New York City Area", + value: "na.us.ny.70", + }, + { + label: "Syracuse, New York Area", + value: "na.us.ny.816", + }, + { + label: "Ithaca, New York Area", + value: "na.us.ny.96", + }, + { + label: "Ohio", + value: "na.us.oh", + }, + { + label: "Columbus, Ohio Area", + value: "na.us.oh.184", + }, + { + label: "Dayton, Ohio Area", + value: "na.us.oh.200", + }, + { + label: "Dayton, Ohio Area", + value: "na.us.oh.200", + }, + { + label: "Cincinnati Area", + value: "na.us.oh.21", + }, + { + label: "Cleveland/Akron, Ohio Area", + value: "na.us.oh.28", + }, + { + label: "Toledo, Ohio Area", + value: "na.us.oh.840", + }, + { + label: "Oklahoma", + value: "na.us.ok", + }, + { + label: "Oklahoma City, Oklahoma Area", + value: "na.us.ok.588", + }, + { + label: "Tulsa, Oklahoma Area", + value: "na.us.ok.856", + }, + { + label: "Oregon", + value: "na.us.or", + }, + { + label: "Eugene, Oregon Area", + value: "na.us.or.240", + }, + { + label: "Portland, Oregon Area", + value: "na.us.or.79", + }, + { + label: "Pennsylvania", + value: "na.us.pa", + }, + { + label: "Allentown, Pennsylvania Area", + value: "na.us.pa.24", + }, + { + label: "Harrisburg, Pennsylvania Area", + value: "na.us.pa.324", + }, + { + label: "Lancaster, Pennsylvania Area", + value: "na.us.pa.400", + }, + { + label: "Greater Pittsburgh Area", + value: "na.us.pa.628", + }, + { + label: "Scranton, Pennsylvania Area", + value: "na.us.pa.756", + }, + { + label: "Greater Philadelphia Area", + value: "na.us.pa.77", + }, + { + label: "Rhode Island", + value: "na.us.ri", + }, + { + label: "Providence, Rhode Island Area", + value: "na.us.ri.648", + }, + { + label: "South Carolina", + value: "na.us.sc", + }, + { + label: "Charleston, South Carolina Area", + value: "na.us.sc.144", + }, + { + label: "Columbia, South Carolina Area", + value: "na.us.sc.176", + }, + { + label: "Greenville, South Carolina Area", + value: "na.us.sc.316", + }, + { + label: "South Dakota", + value: "na.us.sd", + }, + { + label: "Sioux Falls, South Dakota Area", + value: "na.us.sd.776", + }, + { + label: "Tennessee", + value: "na.us.tn", + }, + { + label: "Chattanooga, Tennessee Area", + value: "na.us.tn.156", + }, + { + label: "Johnson City, Tennessee Area", + value: "na.us.tn.366", + }, + { + label: "Knoxville, Tennessee Area", + value: "na.us.tn.384", + }, + { + label: "Greater Memphis Area", + value: "na.us.tn.492", + }, + { + label: "Greater Nashville Area", + value: "na.us.tn.536", + }, + { + label: "Texas", + value: "na.us.tx", + }, + { + label: "El Paso, Texas Area", + value: "na.us.tx.232", + }, + { + label: "Dallas/Fort Worth Area", + value: "na.us.tx.31", + }, + { + label: "Houston, Texas Area", + value: "na.us.tx.42", + }, + { + label: "Austin, Texas Area", + value: "na.us.tx.64", + }, + { + label: "San Antonio, Texas Area", + value: "na.us.tx.724", + }, + { + label: "Utah", + value: "na.us.ut", + }, + { + label: "Provo, Utah Area", + value: "na.us.ut.652", + }, + { + label: "Greater Salt Lake City Area", + value: "na.us.ut.716", + }, + { + label: "Virginia", + value: "na.us.va", + }, + { + label: "Charlottesville, Virginia Area", + value: "na.us.va.154", + }, + { + label: "Norfolk, Virginia Area", + value: "na.us.va.572", + }, + { + label: "Richmond, Virginia Area", + value: "na.us.va.676", + }, + { + label: "Roanoke, Virginia Area", + value: "na.us.va.680", + }, + { + label: "Vermont", + value: "na.us.vt", + }, + { + label: "Burlington, Vermont Area", + value: "na.us.vt.130", + }, + { + label: "Washington", + value: "na.us.wa", + }, + { + label: "Spokane, Washington Area", + value: "na.us.wa.784", + }, + { + label: "Greater Seattle Area", + value: "na.us.wa.91", + }, + { + label: "Wisconsin", + value: "na.us.wi", + }, + { + label: "Green Bay, Wisconsin Area", + value: "na.us.wi.308", + }, + { + label: "Oshkosh, Wisconsin Area", + value: "na.us.wi.46", + }, + { + label: "Madison, Wisconsin Area", + value: "na.us.wi.472", + }, + { + label: "Greater Milwaukee Area", + value: "na.us.wi.63", + }, + { + label: "West Virginia", + value: "na.us.wv", + }, + { + label: "Wyoming", + value: "na.us.wy", + }, + { + label: "Oceania", + value: "oc", + }, + { + label: "Australia", + value: "oc.au", + }, + { + label: "Adelaide Area, Australia", + value: "oc.au.*.4886", + }, + { + label: "Canberra Area, Australia", + value: "oc.au.*.4893", + }, + { + label: "Melbourne Area, Australia", + value: "oc.au.*.4900", + }, + { + label: "Perth Area, Australia", + value: "oc.au.*.4905", + }, + { + label: "Brisbane Area, Australia", + value: "oc.au.*.4909", + }, + { + label: "Sydney Area, Australia", + value: "oc.au.*.4910", + }, + { + label: "New Zealand", + value: "oc.nz", + }, +]; + +export const INDUSTRY_OPTIONS = [ + { + label: "Agriculture - Farming", + value: "63", + }, + { + label: "Agriculture - Ranching", + value: "64", + }, + { + label: "Agriculture - Dairy", + value: "65", + }, + { + label: "Agriculture - Fishery", + value: "66", + }, + { + label: "Arts - Motion Pictures and Film", + value: "35", + }, + { + label: "Arts - Museums and Institutions", + value: "37", + }, + { + label: "Arts - Fine Art", + value: "38", + }, + { + label: "Arts - Performing Arts", + value: "39", + }, + { + label: "Arts - Design", + value: "99", + }, + { + label: "Arts - Arts and Crafts", + value: "111", + }, + { + label: "Arts - Music", + value: "115", + }, + { + label: "Arts - Photography", + value: "136", + }, + { + label: "Arts - Graphic Design", + value: "140", + }, + { + label: "Construction - Construction", + value: "48", + }, + { + label: "Construction - Building Materials", + value: "49", + }, + { + label: "Construction - Architecture & Planning", + value: "50", + }, + { + label: "Construction - Civil Engineering", + value: "51", + }, + { + label: "Consumer Goods - Cosmetics", + value: "18", + }, + { + label: "Consumer Goods - Apparel & Fashion", + value: "19", + }, + { + label: "Consumer Goods - Sporting Goods", + value: "20", + }, + { + label: "Consumer Goods - Tobacco", + value: "21", + }, + { + label: "Consumer Goods - Supermarkets", + value: "22", + }, + { + label: "Consumer Goods - Food Production", + value: "23", + }, + { + label: "Consumer Goods - Consumer Electronics", + value: "24", + }, + { + label: "Consumer Goods - Consumer Goods", + value: "25", + }, + { + label: "Consumer Goods - Furniture", + value: "26", + }, + { + label: "Consumer Goods - Retail", + value: "27", + }, + { + label: "Consumer Goods - Wholesale", + value: "133", + }, + { + label: "Consumer Goods - Import and Export", + value: "134", + }, + { + label: "Consumer Goods - Wine and Spirits", + value: "142", + }, + { + label: "Consumer Goods - Luxury Goods & Jewelry", + value: "143", + }, + { + label: "Corporate - Management Consulting", + value: "11", + }, + { + label: "Corporate - Marketing and Advertising", + value: "80", + }, + { + label: "Corporate - Market Research", + value: "97", + }, + { + label: "Corporate - Public Relations and Communications", + value: "98", + }, + { + label: "Corporate - Staffing and Recruiting", + value: "104", + }, + { + label: "Corporate - Professional Training & Coaching", + value: "105", + }, + { + label: "Corporate - Security and Investigations", + value: "121", + }, + { + label: "Corporate - Facilities Services", + value: "122", + }, + { + label: "Corporate - Outsourcing/Offshoring", + value: "123", + }, + { + label: "Corporate - Human Resources", + value: "137", + }, + { + label: "Corporate - Business Supplies and Equipment", + value: "138", + }, + { + label: "Educational - Primary/Secondary Education", + value: "67", + }, + { + label: "Educational - Higher Education", + value: "68", + }, + { + label: "Educational - Education Management", + value: "69", + }, + { + label: "Educational - Research", + value: "70", + }, + { + label: "Educational - E-Learning", + value: "132", + }, + { + label: "Finance - Banking", + value: "41", + }, + { + label: "Finance - Insurance", + value: "42", + }, + { + label: "Finance - Financial Services", + value: "43", + }, + { + label: "Finance - Real Estate", + value: "44", + }, + { + label: "Finance - Investment Banking", + value: "45", + }, + { + label: "Finance - Investment Management", + value: "46", + }, + { + label: "Finance - Accounting", + value: "47", + }, + { + label: "Finance - Venture Capital & Private Equity", + value: "106", + }, + { + label: "Finance - Commercial Real Estate", + value: "128", + }, + { + label: "Finance - Capital Markets", + value: "129", + }, + { + label: "Government - Military", + value: "71", + }, + { + label: "Government - Legislative Office", + value: "72", + }, + { + label: "Government - Judiciary", + value: "73", + }, + { + label: "Government - International Affairs", + value: "74", + }, + { + label: "Government - Government Administration", + value: "75", + }, + { + label: "Government - Executive Office", + value: "76", + }, + { + label: "Government - Law Enforcement", + value: "77", + }, + { + label: "Government - Public Safety", + value: "78", + }, + { + label: "Government - Public Policy", + value: "79", + }, + { + label: "Government - Political Organization", + value: "107", + }, + { + label: "Government - Government Relations", + value: "148", + }, + { + label: "High Tech - Defense & Space", + value: "1", + }, + { + label: "High Tech - Computer Hardware", + value: "3", + }, + { + label: "High Tech - Computer Software", + value: "4", + }, + { + label: "High Tech - Computer Networking", + value: "5", + }, + { + label: "High Tech - Internet", + value: "6", + }, + { + label: "High Tech - Semiconductors", + value: "7", + }, + { + label: "High Tech - Telecommunications", + value: "8", + }, + { + label: "High Tech - Information Technology and Services", + value: "96", + }, + { + label: "High Tech - Nanotechnology", + value: "114", + }, + { + label: "High Tech - Computer & Network Security", + value: "118", + }, + { + label: "High Tech - Wireless", + value: "119", + }, + { + label: "Legal - Law Practice", + value: "9", + }, + { + label: "Legal - Legal Services", + value: "10", + }, + { + label: "Legal - Alternative Dispute Resolution", + value: "120", + }, + { + label: "Manufacturing - Aviation & Aerospace", + value: "52", + }, + { + label: "Manufacturing - Automotive", + value: "53", + }, + { + label: "Manufacturing - Chemicals", + value: "54", + }, + { + label: "Manufacturing - Machinery", + value: "55", + }, + { + label: "Manufacturing - Mining & Metals", + value: "56", + }, + { + label: "Manufacturing - Oil & Energy", + value: "57", + }, + { + label: "Manufacturing - Shipbuilding", + value: "58", + }, + { + label: "Manufacturing - Utilities", + value: "59", + }, + { + label: "Manufacturing - Textiles", + value: "60", + }, + { + label: "Manufacturing - Paper & Forest Products", + value: "61", + }, + { + label: "Manufacturing - Railroad Manufacture", + value: "62", + }, + { + label: "Manufacturing - Electrical/Electronic Manufacturing", + value: "112", + }, + { + label: "Manufacturing - Plastics", + value: "117", + }, + { + label: "Manufacturing - Mechanical or Industrial Engineering", + value: "135", + }, + { + label: "Manufacturing - Renewables & Environment", + value: "144", + }, + { + label: "Manufacturing - Glass, Ceramics & Concrete", + value: "145", + }, + { + label: "Manufacturing - Packaging and Containers", + value: "146", + }, + { + label: "Manufacturing - Industrial Automation", + value: "147", + }, + { + label: "Media - Broadcast Media", + value: "36", + }, + { + label: "Media - Newspapers", + value: "81", + }, + { + label: "Media - Publishing", + value: "82", + }, + { + label: "Media - Printing", + value: "83", + }, + { + label: "Media - Writing and Editing", + value: "103", + }, + { + label: "Media - Online Media", + value: "113", + }, + { + label: "Media - Media Production", + value: "126", + }, + { + label: "Media - Animation", + value: "127", + }, + { + label: "Medical - Biotechnology", + value: "12", + }, + { + label: "Medical - Medical Practice", + value: "13", + }, + { + label: "Medical - Hospital & Health Care", + value: "14", + }, + { + label: "Medical - Pharmaceuticals", + value: "15", + }, + { + label: "Medical - Veterinary", + value: "16", + }, + { + label: "Medical - Medical Devices", + value: "17", + }, + { + label: "Medical - Health, Wellness and Fitness", + value: "124", + }, + { + label: "Medical - Alternative Medicine", + value: "125", + }, + { + label: "Medical - Mental Health Care", + value: "139", + }, + { + label: "Non-profit - Consumer Services", + value: "91", + }, + { + label: "Non-profit - Non-profit Organization Management", + value: "100", + }, + { + label: "Non-profit - Fund-Raising", + value: "101", + }, + { + label: "Non-profit - Program Development", + value: "102", + }, + { + label: "Non-profit - Think Tanks", + value: "130", + }, + { + label: "Non-profit - Philanthropy", + value: "131", + }, + { + label: "Non-profit - International Trade and Development", + value: "141", + }, + { + label: "Recreational - Entertainment", + value: "28", + }, + { + label: "Recreational - Gambling & Casinos", + value: "29", + }, + { + label: "Recreational - Leisure, Travel & Tourism", + value: "30", + }, + { + label: "Recreational - Hospitality", + value: "31", + }, + { + label: "Recreational - Restaurants", + value: "32", + }, + { + label: "Recreational - Sports", + value: "33", + }, + { + label: "Recreational - Food & Beverages", + value: "34", + }, + { + label: "Recreational - Recreational Facilities and Services", + value: "40", + }, + { + label: "Recreational - Computer Games", + value: "109", + }, + { + label: "Recreational - Events Services", + value: "110", + }, + { + label: "Service - Information Services", + value: "84", + }, + { + label: "Service - Libraries", + value: "85", + }, + { + label: "Service - Environmental Services", + value: "86", + }, + { + label: "Service - Individual & Family Services", + value: "88", + }, + { + label: "Service - Religious Institutions", + value: "89", + }, + { + label: "Service - Civic & Social Organization", + value: "90", + }, + { + label: "Service - Translation and Localization", + value: "108", + }, + { + label: "Transportation - Package/Freight Delivery", + value: "87", + }, + { + label: "Transportation - Transportation/Trucking/Railroad", + value: "92", + }, + { + label: "Transportation - Warehousing", + value: "93", + }, + { + label: "Transportation - Airlines/Aviation", + value: "94", + }, + { + label: "Transportation - Maritime", + value: "95", + }, + { + label: "Transportation - Logistics and Supply Chain", + value: "116", + }, +]; + +export const JOB_FUNCTION_OPTIONS = [ + { + label: "Research", + value: "acad", + }, + { + label: "Accounting", + value: "acct", + }, + { + label: "Administrative", + value: "admn", + }, + { + label: "Business Development", + value: "bd", + }, + { + label: "Purchasing", + value: "buy", + }, + { + label: "Consulting", + value: "cnsl", + }, + { + label: "Arts and Design", + value: "cre", + }, + { + label: "Community and Social Services", + value: "css", + }, + { + label: "Education", + value: "edu", + }, + { + label: "Engineering", + value: "eng", + }, + { + label: "Entrepreneurship", + value: "ent", + }, + { + label: "Finance", + value: "finc", + }, + { + label: "Human Resources", + value: "hr", + }, + { + label: "Information Technology", + value: "it", + }, + { + label: "Legal", + value: "lgl", + }, + { + label: "Healthcare Services", + value: "med", + }, + { + label: "Marketing", + value: "mktg", + }, + { + label: "Military and Protective Services", + value: "mps", + }, + { + label: "Operations", + value: "ops", + }, + { + label: "Program and Project Management", + value: "ppm", + }, + { + label: "Media and Communication", + value: "pr", + }, + { + label: "Product Management", + value: "prod", + }, + { + label: "Quality Assurance", + value: "qa", + }, + { + label: "Real Estate", + value: "re", + }, + { + label: "Sales", + value: "sale", + }, + { + label: "Support", + value: "supp", + }, +]; + +export const SENIORITY_OPTIONS = [ + { + label: "Chief X Officer", + value: "c", + }, + { + label: "Director", + value: "d", + }, + { + label: "Entry", + value: "en", + }, + { + label: "Senior", + value: "ic", + }, + { + label: "Manager", + value: "m", + }, + { + label: "Owner", + value: "o", + }, + { + label: "Partner", + value: "p", + }, + { + label: "Training", + value: "tr", + }, + { + label: "Unpaid", + value: "up", + }, + { + label: "Vice President", + value: "vp", + }, +]; + +export const STAFF_COUNT_RANGE_OPTIONS = [ + "SIZE_1", + "SIZE_2_TO_10", + "SIZE_11_TO_50", + "SIZE_51_TO_200", + "SIZE_201_TO_500", + "SIZE_501_TO_1000", + "SIZE_1001_TO_5000", + "SIZE_5001_TO_10000", + "SIZE_10001_OR_MORE", +]; diff --git a/components/hootsuite/common/utils.mjs b/components/hootsuite/common/utils.mjs new file mode 100644 index 0000000000000..dcc9cc61f6f41 --- /dev/null +++ b/components/hootsuite/common/utils.mjs @@ -0,0 +1,24 @@ +export const parseObject = (obj) => { + if (!obj) return undefined; + + if (Array.isArray(obj)) { + return obj.map((item) => { + if (typeof item === "string") { + try { + return JSON.parse(item); + } catch (e) { + return item; + } + } + return item; + }); + } + if (typeof obj === "string") { + try { + return JSON.parse(obj); + } catch (e) { + return obj; + } + } + return obj; +}; diff --git a/components/hootsuite/hootsuite.app.mjs b/components/hootsuite/hootsuite.app.mjs index 731c5c46bafcf..a279c0d8f0f1d 100644 --- a/components/hootsuite/hootsuite.app.mjs +++ b/components/hootsuite/hootsuite.app.mjs @@ -3,29 +3,66 @@ import { axios } from "@pipedream/platform"; export default { type: "app", app: "hootsuite", - propDefinitions: {}, + propDefinitions: { + socialProfileIds: { + type: "string[]", + label: "Social Profile IDs", + description: "The social profiles that the message will be posted to.", + async options() { + const { data } = await this.listSocialProfiles(); + return data.map(({ + id: value, socialNetworkUsername: label, + }) => ({ + label, + value, + })); + }, + }, + }, methods: { - _oauthAccessToken() { - return this.$auth.oauth_access_token; + _baseUrl() { + return "https://platform.hootsuite.com/v1"; }, - _apiUrl() { - return "https://platform.hootsuite.com"; + _headers() { + return { + Authorization: `Bearer ${this.$auth.oauth_access_token}`, + }; }, - async _makeRequest({ - $ = this, path, ...args + _makeRequest({ + $ = this, path, noHeaders = false, ...opts }) { return axios($, { - url: `${this._apiUrl()}${path}`, - headers: { - Authorization: `Bearer ${this._oauthAccessToken()}`, - }, - ...args, + url: this._baseUrl() + path, + headers: noHeaders + ? {} + : this._headers(), + ...opts, + }); + }, + listSocialProfiles() { + return this._makeRequest({ + path: "/socialProfiles", + }); + }, + getMediaUploadStatus({ + fileId, ...opts + }) { + return this._makeRequest({ + path: `/media/${fileId}`, + ...opts, + }); + }, + scheduleMessage(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/messages", + ...opts, }); }, - async getPosts({ ...args } = {}) { + getPosts(opts = {}) { return this._makeRequest({ - path: "/v1/messages", - ...args, + path: "/messages", + ...opts, }); }, }, diff --git a/components/hootsuite/package.json b/components/hootsuite/package.json index 235b76acd10d9..a8d7b4029b121 100644 --- a/components/hootsuite/package.json +++ b/components/hootsuite/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/hootsuite", - "version": "0.1.0", + "version": "0.2.0", "description": "Pipedream Hootsuite Components", "main": "hootsuite.app.mjs", "keywords": [ @@ -13,7 +13,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.5.1", + "@pipedream/platform": "^3.1.0", "dayjs": "^1.11.7" } } diff --git a/components/hootsuite/sources/new-post-created/new-post-created.mjs b/components/hootsuite/sources/new-post-created/new-post-created.mjs index a2d3ff3725398..ed93aede9061b 100644 --- a/components/hootsuite/sources/new-post-created/new-post-created.mjs +++ b/components/hootsuite/sources/new-post-created/new-post-created.mjs @@ -1,11 +1,11 @@ +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; import dayjs from "dayjs"; import hootsuite from "../../hootsuite.app.mjs"; import constants from "../common/constants.mjs"; -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; export default { name: "New Post Created", - version: "0.0.1", + version: "0.0.2", key: "hootsuite-new-post-created", description: "Emit new event on each new created post. [See docs here](https://platform.hootsuite.com/docs/api/index.html#operation/retrieveMessages).", type: "source", @@ -72,12 +72,6 @@ export default { }, }); - console.log({ - startTime: dayjs(lastSyncTimestamp).subtract(24, "hour") - .toISOString(), - endTime: dayjs().toISOString(), - }); - posts.forEach(this.emitEvent); }, }; diff --git a/components/hospitable/hospitable.app.mjs b/components/hospitable/hospitable.app.mjs new file mode 100644 index 0000000000000..c76a8601ce937 --- /dev/null +++ b/components/hospitable/hospitable.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "hospitable", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/hospitable/package.json b/components/hospitable/package.json new file mode 100644 index 0000000000000..b3b4324a5fbd2 --- /dev/null +++ b/components/hospitable/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/hospitable", + "version": "0.0.1", + "description": "Pipedream Hospitable Components", + "main": "hospitable.app.mjs", + "keywords": [ + "pipedream", + "hospitable" + ], + "homepage": "https://pipedream.com/apps/hospitable", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/hotjar/.gitignore b/components/hotjar/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/hotjar/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/hotjar/app/hotjar.app.ts b/components/hotjar/app/hotjar.app.ts deleted file mode 100644 index cc66bac4c8c01..0000000000000 --- a/components/hotjar/app/hotjar.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "hotjar", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/hotjar/hotjar.app.mjs b/components/hotjar/hotjar.app.mjs new file mode 100644 index 0000000000000..12873a71bb093 --- /dev/null +++ b/components/hotjar/hotjar.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "hotjar", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/hotjar/package.json b/components/hotjar/package.json index c4c0730a00af7..b0ec117b199ac 100644 --- a/components/hotjar/package.json +++ b/components/hotjar/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/hotjar", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Hotjar Components", - "main": "dist/app/hotjar.app.mjs", + "main": "hotjar.app.mjs", "keywords": [ "pipedream", "hotjar" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/hotjar", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/httpsms/.gitignore b/components/httpsms/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/httpsms/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/httpsms/app/httpsms.app.ts b/components/httpsms/app/httpsms.app.ts deleted file mode 100644 index 7eeb87c288b4d..0000000000000 --- a/components/httpsms/app/httpsms.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "httpsms", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/httpsms/httpsms.app.mjs b/components/httpsms/httpsms.app.mjs new file mode 100644 index 0000000000000..01ba91023de1f --- /dev/null +++ b/components/httpsms/httpsms.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "httpsms", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/httpsms/package.json b/components/httpsms/package.json index 1b50bd2bb1887..e33c47429310d 100644 --- a/components/httpsms/package.json +++ b/components/httpsms/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/httpsms", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream httpSMS Components", - "main": "dist/app/httpsms.app.mjs", + "main": "httpsms.app.mjs", "keywords": [ "pipedream", "httpsms" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/httpsms", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/hub_planner/.gitignore b/components/hub_planner/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/hub_planner/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/hub_planner/app/hub_planner.app.ts b/components/hub_planner/app/hub_planner.app.ts deleted file mode 100644 index 3f68c449c2917..0000000000000 --- a/components/hub_planner/app/hub_planner.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "hub_planner", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/hub_planner/hub_planner.app.mjs b/components/hub_planner/hub_planner.app.mjs new file mode 100644 index 0000000000000..7a535b808f42b --- /dev/null +++ b/components/hub_planner/hub_planner.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "hub_planner", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/hub_planner/package.json b/components/hub_planner/package.json index c58751872781d..536cc0a30682d 100644 --- a/components/hub_planner/package.json +++ b/components/hub_planner/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/hub_planner", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream HUB Planner Components", - "main": "dist/app/hub_planner.app.mjs", + "main": "hub_planner.app.mjs", "keywords": [ "pipedream", "hub_planner" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/hub_planner", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs b/components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs index 1b3001f53db44..b663b4f5dfdd2 100644 --- a/components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs +++ b/components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs @@ -4,7 +4,7 @@ export default { key: "hubspot-add-contact-to-list", name: "Add Contact to List", description: "Adds a contact to a specific static list. [See the documentation](https://legacydocs.hubspot.com/docs/methods/lists/add_contact_to_list)", - version: "0.0.17", + version: "0.0.21", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/batch-create-companies/batch-create-companies.mjs b/components/hubspot/actions/batch-create-companies/batch-create-companies.mjs new file mode 100644 index 0000000000000..b5e123c0437cf --- /dev/null +++ b/components/hubspot/actions/batch-create-companies/batch-create-companies.mjs @@ -0,0 +1,47 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { API_PATH } from "../../common/constants.mjs"; +import { parseObject } from "../../common/utils.mjs"; +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-batch-create-companies", + name: "Batch Create Companies", + description: "Create a batch of companies in Hubspot. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/objects/companies#post-%2Fcrm%2Fv3%2Fobjects%2Fcompanies%2Fbatch%2Fcreate)", + version: "0.0.4", + type: "action", + props: { + hubspot, + inputs: { + type: "string[]", + label: "Inputs (Companies)", + description: "Provide a **list of companies** to be created. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/objects/companies#post-%2Fcrm%2Fv3%2Fobjects%2Fcompanies%2Fbatch%2Fcreate) for more information. Example: `[ { \"properties\": { \"name\": \"CompanyName\"} } ]`", + }, + }, + methods: { + batchCreateCompanies(opts = {}) { + return this.hubspot.makeRequest({ + api: API_PATH.CRMV3, + endpoint: "/objects/companies/batch/create", + method: "POST", + ...opts, + }); + }, + }, + async run({ $ }) { + try { + const response = await this.batchCreateCompanies({ + $, + data: { + inputs: parseObject(this.inputs), + }, + }); + $.export("$summary", `Created ${response.results.length} compan${response.results.length === 1 + ? "y" + : "ies"}`); + return response; + } catch (error) { + const message = JSON.parse((JSON.parse(error.message).message).split(/:(.+)/)[1])[0].message; + throw new ConfigurationError(message.split(/:(.+)/)[0]); + } + }, +}; diff --git a/components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs b/components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs index a30d0ac32fc87..dfc27e663cb14 100644 --- a/components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs +++ b/components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs @@ -4,7 +4,7 @@ export default { key: "hubspot-batch-create-or-update-contact", name: "Batch Create or Update Contact", description: "Create or update a batch of contacts by its ID or email. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts)", - version: "0.0.14", + version: "0.0.18", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/batch-update-companies/batch-update-companies.mjs b/components/hubspot/actions/batch-update-companies/batch-update-companies.mjs new file mode 100644 index 0000000000000..ffc6d9ad3d0a8 --- /dev/null +++ b/components/hubspot/actions/batch-update-companies/batch-update-companies.mjs @@ -0,0 +1,47 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { API_PATH } from "../../common/constants.mjs"; +import { parseObject } from "../../common/utils.mjs"; +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-batch-update-companies", + name: "Batch Update Companies", + description: "Update a batch of companies in Hubspot. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/objects/companies#post-%2Fcrm%2Fv3%2Fobjects%2Fcompanies%2Fbatch%2Fupdate)", + version: "0.0.4", + type: "action", + props: { + hubspot, + inputs: { + type: "string[]", + label: "Inputs (Companies)", + description: "Provide a **list of companies** to be updated. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/objects/companies#post-%2Fcrm%2Fv3%2Fobjects%2Fcompanies%2Fbatch%2Fupdate) for more information. Example: `[ { \"id\": \"123\", \"properties\": { \"name\": \"CompanyName\"} } ]`", + }, + }, + methods: { + batchUpdateCompanies(opts = {}) { + return this.hubspot.makeRequest({ + api: API_PATH.CRMV3, + endpoint: "/objects/companies/batch/update", + method: "POST", + ...opts, + }); + }, + }, + async run({ $ }) { + try { + const response = await this.batchUpdateCompanies({ + $, + data: { + inputs: parseObject(this.inputs), + }, + }); + $.export("$summary", `Updated ${response.results.length} compan${response.results.length === 1 + ? "y" + : "ies"}`); + return response; + } catch (error) { + const message = JSON.parse((JSON.parse(error.message).message).split(/:(.+)/)[1])[0].message; + throw new ConfigurationError(message.split(/:(.+)/)[0]); + } + }, +}; diff --git a/components/hubspot/actions/batch-upsert-companies/batch-upsert-companies.mjs b/components/hubspot/actions/batch-upsert-companies/batch-upsert-companies.mjs new file mode 100644 index 0000000000000..1acdfec42c08e --- /dev/null +++ b/components/hubspot/actions/batch-upsert-companies/batch-upsert-companies.mjs @@ -0,0 +1,50 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { API_PATH } from "../../common/constants.mjs"; +import { parseObject } from "../../common/utils.mjs"; +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-batch-upsert-companies", + name: "Batch Upsert Companies", + description: "Upsert a batch of companies in Hubspot. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/objects/companies#post-%2Fcrm%2Fv3%2Fobjects%2Fcompanies%2Fbatch%2Fupsert)", + version: "0.0.4", + type: "action", + props: { + hubspot, + infoAlert: { + type: "alert", + alertType: "info", + content: "Create or update companies identified by a unique property value as specified by the `idProperty` query parameter. `idProperty` query param refers to a property whose values are unique for the object. To manage properties in Hubspot, navigate to your Settings -> Data Management -> Properties.", + }, + inputs: { + type: "string[]", + label: "Inputs (Companies)", + description: "Provide a **list of companies** to be upserted. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/objects/companies#post-%2Fcrm%2Fv3%2Fobjects%2Fcompanies%2Fbatch%2Fupsert) for more information. Example: `[ { \"idProperty\": \"unique_property\", \"id\": \"123\", \"properties\": { \"name\": \"CompanyName\" } } ]`", + }, + }, + methods: { + batchUpsertCompanies(opts = {}) { + return this.hubspot.makeRequest({ + api: API_PATH.CRMV3, + endpoint: "/objects/companies/batch/upsert", + method: "POST", + ...opts, + }); + }, + }, + async run({ $ }) { + try { + const response = await this.batchUpsertCompanies({ + $, + data: { + inputs: parseObject(this.inputs), + }, + }); + $.export("$summary", `Upserted ${response.results.length} companies`); + return response; + } catch (error) { + const message = JSON.parse((JSON.parse(error.message).message).split(/:(.+)/)[1])[0].message; + throw new ConfigurationError(message.split(/:(.+)/)[0]); + } + }, +}; diff --git a/components/hubspot/actions/clone-email/clone-email.mjs b/components/hubspot/actions/clone-email/clone-email.mjs new file mode 100644 index 0000000000000..8730acce007a6 --- /dev/null +++ b/components/hubspot/actions/clone-email/clone-email.mjs @@ -0,0 +1,46 @@ +import { LANGUAGE_OPTIONS } from "../../common/constants.mjs"; +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-clone-email", + name: "Clone Marketing Email", + description: "Clone a marketing email in HubSpot. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/emails/marketing-emails#post-%2Fmarketing%2Fv3%2Femails%2Fclone)", + version: "0.0.2", + type: "action", + props: { + hubspot, + emailId: { + propDefinition: [ + hubspot, + "emailId", + ], + }, + cloneName: { + type: "string", + label: "Clone Name", + description: "The name to assign to the cloned email", + optional: true, + }, + language: { + type: "string", + label: "Language", + description: "The language code for the cloned email", + options: LANGUAGE_OPTIONS, + optional: true, + }, + }, + async run({ $ }) { + const response = await this.hubspot.cloneEmail({ + $, + data: { + cloneName: this.cloneName, + language: this.language, + id: this.emailId, + }, + }); + + $.export("$summary", `Successfully cloned email with ID: ${response.id}`); + + return response; + }, +}; diff --git a/components/hubspot/actions/clone-site-page/clone-site-page.mjs b/components/hubspot/actions/clone-site-page/clone-site-page.mjs new file mode 100644 index 0000000000000..c1940d7f22ed0 --- /dev/null +++ b/components/hubspot/actions/clone-site-page/clone-site-page.mjs @@ -0,0 +1,36 @@ +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-clone-site-page", + name: "Clone Site Page", + description: "Clone a site page in Hubspot. [See the documentation](https://developers.hubspot.com/docs/reference/api/cms/pages#post-%2Fcms%2Fv3%2Fpages%2Fsite-pages%2Fclone)", + version: "0.0.2", + type: "action", + props: { + hubspot, + pageId: { + propDefinition: [ + hubspot, + "pageId", + ], + }, + cloneName: { + type: "string", + label: "Clone Name", + description: "The name of the cloned page.", + }, + }, + async run({ $ }) { + const response = await this.hubspot.cloneSitePage({ + $, + data: { + id: this.pageId, + cloneName: this.cloneName, + }, + }); + + $.export("$summary", `Successfully cloned site page with ID: ${response.id}`); + + return response; + }, +}; diff --git a/components/hubspot/actions/common/common-page-prop.mjs b/components/hubspot/actions/common/common-page-prop.mjs new file mode 100644 index 0000000000000..de1dce9727dfa --- /dev/null +++ b/components/hubspot/actions/common/common-page-prop.mjs @@ -0,0 +1,79 @@ +import { LANGUAGE_OPTIONS } from "../../common/constants.mjs"; +import hubspot from "../../hubspot.app.mjs"; + +export default { + language: { + type: "string", + label: "Language", + description: "The language of the page.", + options: LANGUAGE_OPTIONS, + optional: true, + }, + enableLayoutStylesheets: { + type: "boolean", + label: "Enable Layout Stylesheets", + description: "Whether to enable layout stylesheets.", + optional: true, + }, + metaDescription: { + type: "string", + label: "Meta Description", + description: "The meta description of the page.", + optional: true, + }, + attachedStylesheets: { + type: "string[]", + label: "Attached Stylesheets", + description: "The stylesheets attached to the page.", + optional: true, + }, + password: { + type: "string", + label: "Password", + description: "The password of the page.", + optional: true, + }, + publishImmediately: { + type: "boolean", + label: "Publish Immediately", + description: "Whether to publish the page immediately.", + optional: true, + }, + htmlTitle: { + type: "string", + label: "HTML Title", + description: "The HTML title of the page.", + optional: true, + }, + translations: { + type: "object", + label: "Translations", + description: "The translations of the page.", + optional: true, + }, + layoutSections: { + type: "object", + label: "Layout Sections", + description: "The layout sections of the page.", + optional: true, + }, + footerHtml: { + type: "string", + label: "Footer HTML", + description: "The footer HTML of the page.", + optional: true, + }, + headHtml: { + type: "string", + label: "Head HTML", + description: "The head HTML of the page.", + optional: true, + }, + templatePath: { + propDefinition: [ + hubspot, + "templatePath", + ], + optional: true, + }, +}; diff --git a/components/hubspot/actions/create-associations/create-associations.mjs b/components/hubspot/actions/create-associations/create-associations.mjs index aae5d7444d36e..eca25331dfa41 100644 --- a/components/hubspot/actions/create-associations/create-associations.mjs +++ b/components/hubspot/actions/create-associations/create-associations.mjs @@ -1,11 +1,11 @@ -import hubspot from "../../hubspot.app.mjs"; import { ConfigurationError } from "@pipedream/platform"; +import hubspot from "../../hubspot.app.mjs"; export default { key: "hubspot-create-associations", name: "Create Associations", description: "Create associations between objects. [See the documentation](https://developers.hubspot.com/docs/api/crm/associations#endpoint?spec=POST-/crm/v3/associations/{fromObjectType}/{toObjectType}/batch/create)", - version: "1.0.3", + version: "1.0.7", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/create-communication/create-communication.mjs b/components/hubspot/actions/create-communication/create-communication.mjs index dbda8a1e88c97..b3031f8be3d7e 100644 --- a/components/hubspot/actions/create-communication/create-communication.mjs +++ b/components/hubspot/actions/create-communication/create-communication.mjs @@ -1,14 +1,14 @@ -import common from "../common/common-create.mjs"; -import appProp from "../common/common-app-prop.mjs"; import { ConfigurationError } from "@pipedream/platform"; import { ASSOCIATION_CATEGORY } from "../../common/constants.mjs"; +import appProp from "../common/common-app-prop.mjs"; +import common from "../common/common-create.mjs"; export default { ...common, key: "hubspot-create-communication", name: "Create Communication", description: "Create a WhatsApp, LinkedIn, or SMS message. [See the documentation](https://developers.hubspot.com/beta-docs/reference/api/crm/engagements/communications/v3#post-%2Fcrm%2Fv3%2Fobjects%2Fcommunications)", - version: "0.0.10", + version: "0.0.14", type: "action", props: { ...appProp.props, diff --git a/components/hubspot/actions/create-company/create-company.mjs b/components/hubspot/actions/create-company/create-company.mjs index 6609f59d7fdb1..caef7e034bbf6 100644 --- a/components/hubspot/actions/create-company/create-company.mjs +++ b/components/hubspot/actions/create-company/create-company.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-create-company", name: "Create Company", description: "Create a company in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies#endpoint?spec=POST-/crm/v3/objects/companies)", - version: "0.0.21", + version: "0.0.25", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/create-contact-workflow/create-contact-workflow.mjs b/components/hubspot/actions/create-contact-workflow/create-contact-workflow.mjs new file mode 100644 index 0000000000000..199ba4d91a234 --- /dev/null +++ b/components/hubspot/actions/create-contact-workflow/create-contact-workflow.mjs @@ -0,0 +1,164 @@ +import { parseObject } from "../../common/utils.mjs"; +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-create-contact-workflow", + name: "Create Contact Workflow", + description: "Create a contact workflow in Hubspot. [See the documentation](https://developers.hubspot.com/docs/reference/api/automation/create-manage-workflows#post-%2Fautomation%2Fv4%2Fflows)", + version: "0.0.2", + type: "action", + props: { + hubspot, + canEnrollFromSalesforce: { + type: "boolean", + label: "Can Enroll From Salesforce", + description: "Whether the contact workflow can enroll from Salesforce", + optional: true, + }, + isEnabled: { + type: "boolean", + label: "Is Enabled", + description: "Whether the contact workflow is enabled", + optional: true, + }, + flowType: { + type: "string", + label: "Flow Type", + description: "The type of flow", + options: [ + "WORKFLOW", + "ACTION_SET", + "UNKNOWN", + ], + optional: true, + }, + name: { + type: "string", + label: "Name", + description: "The name of the contact workflow", + optional: true, + }, + description: { + type: "string", + label: "Description", + description: "The description of the contact workflow", + optional: true, + }, + uuid: { + type: "string", + label: "UUID", + description: "The UUID of the contact workflow", + optional: true, + }, + startAction: { + type: "string", + label: "Start Action", + description: "The start action of the contact workflow", + optional: true, + }, + actions: { + type: "string[]", + label: "Actions", + description: "The actions of the contact workflow", + options: [ + "STATIC_BRANCH", + "LIST_BRANCH", + "AB_TEST_BRANCH", + "CUSTOM_CODE", + "WEBHOOK", + "SINGLE_CONNECTION", + ], + optional: true, + }, + enrollmentCriteria: { + type: "object", + label: "Enrollment Criteria", + description: "An object with the enrollment criteria data for the contact workflow. [See the documentation](https://developers.hubspot.com/changelog/enrollment-criteria-in-contact-workflows) for more information.", + optional: true, + }, + enrollmentSchedule: { + type: "object", + label: "Enrollment Schedule", + description: "An object with the enrollment schedule data for the contact workflow. [See the documentation](https://developers.hubspot.com/changelog/enrollment-schedule-in-contact-workflows) for more information.", + optional: true, + }, + timeWindows: { + type: "string[]", + label: "Time Windows", + description: "A list of time windows for the contact workflow. [See the documentation](https://developers.hubspot.com/changelog/time-windows-in-contact-workflows) for more information.", + optional: true, + }, + blockedDates: { + type: "string[]", + label: "Blocked Dates", + description: "A list of blocked dates for the contact workflow. [See the documentation](https://developers.hubspot.com/changelog/blocked-dates-in-contact-workflows) for more information.", + optional: true, + }, + customProperties: { + type: "object", + label: "Custom Properties", + description: "An object with the custom properties data for the contact workflow. [See the documentation](https://developers.hubspot.com/changelog/custom-properties-in-contact-workflows) for more information.", + optional: true, + }, + dataSources: { + type: "string[]", + label: "Data Sources", + description: "A list of data sources for the contact workflow. [See the documentation](https://developers.hubspot.com/changelog/data-sources-in-contact-workflows) for more information.", + optional: true, + }, + suppressionListIds: { + type: "string[]", + label: "Suppression List IDs", + description: "A list of suppression list IDs for the contact workflow. [See the documentation](https://developers.hubspot.com/changelog/suppression-list-ids-in-contact-workflows) for more information.", + optional: true, + }, + goalFilterBranch: { + type: "object", + label: "Goal Filter Branch", + description: "An object with the goal filter branch data for the contact workflow. [See the documentation](https://developers.hubspot.com/changelog/goal-filter-branch-in-contact-workflows) for more information.", + optional: true, + }, + eventAnchor: { + type: "object", + label: "Event Anchor", + description: "An object with the event anchor data for the contact workflow. [See the documentation](https://developers.hubspot.com/changelog/event-anchor-in-contact-workflows) for more information.", + optional: true, + }, + unEnrollmentSetting: { + type: "object", + label: "Un Enrollment Setting", + description: "An object with the un enrollment setting data for the contact workflow. [See the documentation](https://developers.hubspot.com/changelog/un-enrollment-setting-in-contact-workflows) for more information.", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.hubspot.createContactWorkflow({ + $, + data: { + type: "CONTACT_FLOW", + canEnrollFromSalesforce: this.canEnrollFromSalesforce, + isEnabled: this.isEnabled, + flowType: this.flowType, + name: this.name, + description: this.description, + uuid: this.uuid, + startAction: this.startAction, + actions: parseObject(this.actions), + enrollmentCriteria: parseObject(this.enrollmentCriteria), + enrollmentSchedule: parseObject(this.enrollmentSchedule), + timeWindows: parseObject(this.timeWindows), + blockedDates: parseObject(this.blockedDates), + customProperties: parseObject(this.customProperties), + dataSources: parseObject(this.dataSources), + suppressionListIds: parseObject(this.suppressionListIds), + goalFilterBranch: parseObject(this.goalFilterBranch), + eventAnchor: parseObject(this.eventAnchor), + unEnrollmentSetting: parseObject(this.unEnrollmentSetting), + }, + }); + + $.export("$summary", `Successfully created contact workflow with ID: ${response.id}`); + + return response; + }, +}; diff --git a/components/hubspot/actions/create-custom-object/create-custom-object.mjs b/components/hubspot/actions/create-custom-object/create-custom-object.mjs index 34534cb0345ba..dd856304c043c 100644 --- a/components/hubspot/actions/create-custom-object/create-custom-object.mjs +++ b/components/hubspot/actions/create-custom-object/create-custom-object.mjs @@ -1,12 +1,12 @@ -import common from "../common/common-create-object.mjs"; import appProp from "../common/common-app-prop.mjs"; +import common from "../common/common-create-object.mjs"; export default { ...common, key: "hubspot-create-custom-object", name: "Create Custom Object", description: "Create a new custom object in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/custom-objects#create-a-custom-object)", - version: "1.0.3", + version: "1.0.7", type: "action", props: { ...appProp.props, diff --git a/components/hubspot/actions/create-deal/create-deal.mjs b/components/hubspot/actions/create-deal/create-deal.mjs index cd136e3aead9b..2475e97bc77fe 100644 --- a/components/hubspot/actions/create-deal/create-deal.mjs +++ b/components/hubspot/actions/create-deal/create-deal.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-create-deal", name: "Create Deal", description: "Create a deal in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/deals#endpoint?spec=POST-/crm/v3/objects/deals)", - version: "0.0.21", + version: "0.0.25", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/create-email/create-email.mjs b/components/hubspot/actions/create-email/create-email.mjs new file mode 100644 index 0000000000000..6a8b8839e1772 --- /dev/null +++ b/components/hubspot/actions/create-email/create-email.mjs @@ -0,0 +1,169 @@ +import { + LANGUAGE_OPTIONS, OBJECT_TYPE, +} from "../../common/constants.mjs"; +import { parseObject } from "../../common/utils.mjs"; +import hubspot from "../../hubspot.app.mjs"; +import common from "../common/common-get-object.mjs"; + +export default { + key: "hubspot-create-email", + name: "Create Marketing Email", + description: "Create a marketing email in Hubspot. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/emails/marketing-emails#post-%2Fmarketing%2Fv3%2Femails%2F)", + version: "0.0.2", + type: "action", + props: { + hubspot, + name: { + type: "string", + label: "Name", + description: "The name of the email", + }, + campaign: { + propDefinition: [ + hubspot, + "campaignId", + ], + optional: true, + }, + customReplyTo: { + type: "string", + label: "Custom Reply To", + description: "The custom reply to address for the email", + optional: true, + }, + fromName: { + type: "string", + label: "From Name", + description: "The name of the sender", + optional: true, + }, + replyTo: { + type: "string", + label: "Reply To", + description: "The reply to address for the email", + optional: true, + }, + limitSendFrequency: { + type: "boolean", + label: "Limit Send Frequency", + description: "Whether to limit the send frequency for the email", + optional: true, + }, + suppressGraymail: { + type: "boolean", + label: "Suppress Graymail", + description: "Whether to suppress graymail for the email", + optional: true, + }, + includeContactLists: { + propDefinition: [ + hubspot, + "lists", + ], + optional: true, + }, + excludeContactLists: { + propDefinition: [ + hubspot, + "lists", + ], + optional: true, + }, + feedbackSurveyId: { + ...common.props.objectId, + label: "Feedback Survey ID", + description: "Hubspot's internal ID for the feedback survey", + optional: true, + }, + rssData: { + type: "object", + label: "RSS Data", + description: "An object with the RSS data for the email. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/emails/marketing-emails#post-%2Fmarketing%2Fv3%2Femails%2F) for more information.", + optional: true, + }, + subject: { + type: "string", + label: "Subject", + description: "The subject of the email", + optional: true, + }, + testing: { + type: "object", + label: "Testing", + description: "An object with the testing data for the email. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/emails/marketing-emails#post-%2Fmarketing%2Fv3%2Femails%2F) for more information.", + optional: true, + }, + language: { + type: "string", + label: "Language", + description: "The language of the email", + options: LANGUAGE_OPTIONS, + optional: true, + }, + content: { + type: "object", + label: "Content", + description: "An object with the content data for the email. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/emails/marketing-emails#post-%2Fmarketing%2Fv3%2Femails%2F) for more information.", + optional: true, + }, + webversion: { + type: "object", + label: "Webversion", + description: "An object with the webversion data for the email. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/emails/marketing-emails#post-%2Fmarketing%2Fv3%2Femails%2F) for more information.", + optional: true, + }, + subscriptionDetails: { + type: "object", + label: "Subscription Details", + description: "An object with the subscription details for the email. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/emails/marketing-emails#post-%2Fmarketing%2Fv3%2Femails%2F) for more information.", + optional: true, + }, + sendOnPublish: { + type: "boolean", + label: "Send On Publish", + description: "Whether to send the email on publish", + optional: true, + }, + }, + methods: { + ...common.methods, + getObjectType() { + return OBJECT_TYPE.FEEDBACK_SUBMISSION; + }, + }, + async run({ $ }) { + const response = await this.hubspot.createEmail({ + $, + data: { + name: this.name, + campaign: this.campaign, + from: { + customReplyTo: this.customReplyTo, + fromName: this.fromName, + replyTo: this.replyTo, + }, + to: { + limitSendFrequency: this.limitSendFrequency, + suppressGraymail: this.suppressGraymail, + contactLists: { + include: parseObject(this.includeContactLists), + exclude: parseObject(this.excludeContactLists), + }, + }, + feedbackSurveyId: this.feedbackSurveyId, + rssData: parseObject(this.rssData), + subject: this.subject, + testing: parseObject(this.testing), + language: this.language, + content: parseObject(this.content), + webversion: parseObject(this.webversion), + subscriptionDetails: parseObject(this.subscriptionDetails), + sendOnPublish: this.sendOnPublish, + }, + }); + + $.export("$summary", `Successfully created email with ID: ${response.id}`); + + return response; + }, +}; diff --git a/components/hubspot/actions/create-engagement/create-engagement.mjs b/components/hubspot/actions/create-engagement/create-engagement.mjs index 2cc80b10eaae9..39655fa69dc1f 100644 --- a/components/hubspot/actions/create-engagement/create-engagement.mjs +++ b/components/hubspot/actions/create-engagement/create-engagement.mjs @@ -1,15 +1,15 @@ -import common from "../common/common-create.mjs"; import { ConfigurationError } from "@pipedream/platform"; import { ASSOCIATION_CATEGORY, ENGAGEMENT_TYPE_OPTIONS, } from "../../common/constants.mjs"; +import common from "../common/common-create.mjs"; export default { ...common, key: "hubspot-create-engagement", name: "Create Engagement", description: "Create a new engagement for a contact. [See the documentation](https://developers.hubspot.com/docs/api/crm/engagements)", - version: "0.0.20", + version: "0.0.24", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/create-form/create-form.mjs b/components/hubspot/actions/create-form/create-form.mjs new file mode 100644 index 0000000000000..1ffe8ada1ed6d --- /dev/null +++ b/components/hubspot/actions/create-form/create-form.mjs @@ -0,0 +1,341 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { LANGUAGE_OPTIONS } from "../../common/constants.mjs"; +import { + cleanObject, parseObject, +} from "../../common/utils.mjs"; +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-create-form", + name: "Create Form", + description: "Create a form in HubSpot. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/forms#post-%2Fmarketing%2Fv3%2Fforms%2F)", + version: "0.0.2", + type: "action", + props: { + hubspot, + name: { + type: "string", + label: "Name", + description: "The name of the form.", + }, + archived: { + type: "boolean", + label: "Archived", + description: "Whether the form is archived.", + optional: true, + }, + fieldGroups: { + type: "string[]", + label: "Field Groups", + description: "A list for objects of group type and fields. **Format: `[{ \"groupType\": \"default_group\", \"richTextType\": \"text\", \"fields\": [ { \"objectTypeId\": \"0-1\", \"name\": \"email\", \"label\": \"Email\", \"required\": true, \"hidden\": false, \"fieldType\": \"email\", \"validation\": { \"blockedEmailDomains\": [], \"useDefaultBlockList\": false }}]}]`** [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/forms#post-%2Fmarketing%2Fv3%2Fforms%2F) for more information.", + optional: true, + }, + createNewContactForNewEmail: { + type: "boolean", + label: "Create New Contact for New Email", + description: "Whether to create a new contact when a form is submitted with an email address that doesn't match any in your existing contacts records.", + optional: true, + }, + editable: { + type: "boolean", + label: "Editable", + description: "Whether the form can be edited.", + optional: true, + }, + allowLinkToResetKnownValues: { + type: "boolean", + label: "Allow Link to Reset Known Values", + description: "Whether to add a reset link to the form. This removes any pre-populated content on the form and creates a new contact on submission.", + optional: true, + }, + lifecycleStages: { + type: "string[]", + label: "Lifecycle Stages", + description: "A list of objects of lifecycle stages. **Format: `[{ \"objectTypeId\": \"0-1\", \"value\": \"subscriber\" }]`** [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/forms#post-%2Fmarketing%2Fv3%2Fforms%2F) for more information.", + optional: true, + default: [], + }, + postSubmitActionType: { + type: "string", + label: "Post Submit Action Type", + description: "The action to take after submit. The default action is displaying a thank you message.", + options: [ + "thank_you", + "redirect_url", + ], + optional: true, + }, + postSubmitActionValue: { + type: "string", + label: "Post Submit Action Value", + description: "The thank you text or the page to redirect to.", + optional: true, + }, + language: { + type: "string", + label: "Language", + description: "The language of the form.", + options: LANGUAGE_OPTIONS, + optional: true, + }, + prePopulateKnownValues: { + type: "boolean", + label: "Pre-populate Known Values", + description: "Whether contact fields should pre-populate with known information when a contact returns to your site.", + optional: true, + }, + cloneable: { + type: "boolean", + label: "Cloneable", + description: "Whether the form can be cloned.", + optional: true, + }, + notifyContactOwner: { + type: "boolean", + label: "Notify Contact Owner", + description: "Whether to send a notification email to the contact owner when a submission is received.", + optional: true, + }, + recaptchaEnabled: { + type: "boolean", + label: "Recaptcha Enabled", + description: "Whether CAPTCHA (spam prevention) is enabled.", + optional: true, + }, + archivable: { + type: "boolean", + label: "Archivable", + description: "Whether the form can be archived.", + optional: true, + }, + notifyRecipients: { + propDefinition: [ + hubspot, + "contactEmail", + ], + type: "string[]", + optional: true, + }, + renderRawHtml: { + type: "boolean", + label: "Render Raw HTML", + description: "Whether the form will render as raw HTML as opposed to inside an iFrame.", + optional: true, + }, + cssClass: { + type: "string", + label: "CSS Class", + description: "The CSS class of the form.", + optional: true, + }, + theme: { + type: "string", + label: "Theme", + description: "The theme used for styling the input fields. This will not apply if the form is added to a HubSpot CMS page.", + options: [ + "default_style", + "canvas", + "linear", + "round", + "sharp", + "legacy", + ], + optional: true, + }, + submitButtonText: { + type: "string", + label: "Submit Button Text", + description: "The text displayed on the form submit button.", + optional: true, + }, + labelTextSize: { + type: "string", + label: "Label Text Size", + description: "The size of the label text.", + optional: true, + }, + legalConsentTextColor: { + type: "string", + label: "Legal Consent Text Color", + description: "The color of the legal consent text.", + optional: true, + }, + fontFamily: { + type: "string", + label: "Font Family", + description: "The font family of the form.", + optional: true, + }, + legalConsentTextSize: { + type: "string", + label: "Legal Consent Text Size", + description: "The size of the legal consent text.", + optional: true, + }, + backgroundWidth: { + type: "string", + label: "Background Width", + description: "The width of the background.", + optional: true, + }, + helpTextSize: { + type: "string", + label: "Help Text Size", + description: "The size of the help text.", + optional: true, + }, + submitFontColor: { + type: "string", + label: "Submit Font Color", + description: "The color of the submit font.", + optional: true, + }, + labelTextColor: { + type: "string", + label: "Label Text Color", + description: "The color of the label text.", + optional: true, + }, + submitAlignment: { + type: "string", + label: "Submit Alignment", + description: "The alignment of the submit button.", + options: [ + "left", + "center", + "right", + ], + optional: true, + }, + submitSize: { + type: "string", + label: "Submit Size", + description: "The size of the submit button.", + optional: true, + }, + helpTextColor: { + type: "string", + label: "Help Text Color", + description: "The color of the help text.", + optional: true, + }, + submitColor: { + type: "string", + label: "Submit Color", + description: "The color of the submit button.", + optional: true, + }, + legalConsentOptionsType: { + type: "string", + label: "Legal Consent Options Type", + description: "The type of legal consent options.", + options: [ + "none", + "legitimate_interest", + "explicit_consent_process", + "implicit_consent_process", + ], + optional: true, + }, + legalConsentOptionsObject: { + type: "object", + label: "Legal Consent Options Object", + description: "The object of legal consent options. **Format: `{\"subscriptionTypeIds\": [1,2,3], \"lawfulBasis\": \"lead\", \"privacy\": \"string\"}`** [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/forms#post-%2Fmarketing%2Fv3%2Fforms%2F) for more information.", + optional: true, + }, + }, + async run({ $ }) { + const configuration = {}; + if ( + (this.postSubmitActionType && !this.postSubmitActionValue) || + (!this.postSubmitActionType && this.postSubmitActionValue) + ) { + throw new ConfigurationError("Post Submit Action Type and Value must be provided together."); + } + + if (this.language) { + configuration.language = this.language; + } + if (this.cloneable) { + configuration.cloneable = this.cloneable; + } + if (this.postSubmitActionType) { + configuration.postSubmitAction = { + type: this.postSubmitActionType, + value: this.postSubmitActionValue, + }; + } + if (this.editable) { + configuration.editable = this.editable; + } + if (this.archivable) { + configuration.archivable = this.archivable; + } + if (this.recaptchaEnabled) { + configuration.recaptchaEnabled = this.recaptchaEnabled; + } + if (this.notifyContactOwner) { + configuration.notifyContactOwner = this.notifyContactOwner; + } + if (this.notifyRecipients) { + configuration.notifyRecipients = parseObject(this.notifyRecipients); + } + if (this.createNewContactForNewEmail) { + configuration.createNewContactForNewEmail = this.createNewContactForNewEmail; + } + if (this.prePopulateKnownValues) { + configuration.prePopulateKnownValues = this.prePopulateKnownValues; + } + if (this.allowLinkToResetKnownValues) { + configuration.allowLinkToResetKnownValues = this.allowLinkToResetKnownValues; + } + if (this.lifecycleStages) { + configuration.lifecycleStages = parseObject(this.lifecycleStages); + } + + const data = cleanObject({ + "formType": "hubspot", + "name": this.name, + "createdAt": new Date(Date.now()).toISOString(), + "archived": this.archived, + "fieldGroups": parseObject(this.fieldGroups), + "displayOptions": { + "renderRawHtml": this.renderRawHtml, + "cssClass": this.cssClass, + "theme": this.theme, + "submitButtonText": this.submitButtonText, + "style": { + "labelTextSize": this.labelTextSize, + "legalConsentTextColor": this.legalConsentTextColor, + "fontFamily": this.fontFamily, + "legalConsentTextSize": this.legalConsentTextSize, + "backgroundWidth": this.backgroundWidth, + "helpTextSize": this.helpTextSize, + "submitFontColor": this.submitFontColor, + "labelTextColor": this.labelTextColor, + "submitAlignment": this.submitAlignment, + "submitSize": this.submitSize, + "helpTextColor": this.helpTextColor, + "submitColor": this.submitColor, + }, + }, + "legalConsentOptions": { + "type": this.legalConsentOptionsType, + ...(this.legalConsentOptionsObject + ? parseObject(this.legalConsentOptionsObject) + : {}), + }, + }); + + data.configuration = cleanObject(configuration); + + const response = await this.hubspot.createForm({ + $, + data, + }); + + $.export("$summary", `Successfully created form with ID: ${response.id}`); + + return response; + }, +}; diff --git a/components/hubspot/actions/create-landing-page/create-landing-page.mjs b/components/hubspot/actions/create-landing-page/create-landing-page.mjs new file mode 100644 index 0000000000000..1e969becab39a --- /dev/null +++ b/components/hubspot/actions/create-landing-page/create-landing-page.mjs @@ -0,0 +1,53 @@ +import { parseObject } from "../../common/utils.mjs"; +import hubspot from "../../hubspot.app.mjs"; +import commonPageProp from "../common/common-page-prop.mjs"; + +export default { + key: "hubspot-create-landing-page", + name: "Create Landing Page", + description: "Create a landing page in Hubspot. [See the documentation](https://developers.hubspot.com/docs/reference/api/cms/pages#post-%2Fcms%2Fv3%2Fpages%2Flanding-pages)", + version: "0.0.2", + type: "action", + props: { + hubspot, + pageName: { + propDefinition: [ + hubspot, + "pageName", + ], + }, + landingFolderId: { + propDefinition: [ + hubspot, + "landingFolderId", + ], + optional: true, + }, + ...commonPageProp, + }, + async run({ $ }) { + const response = await this.hubspot.createLandingPage({ + $, + data: { + language: this.language, + enableLayoutStylesheets: this.enableLayoutStylesheets, + metaDescription: this.metaDescription, + attachedStylesheets: parseObject(this.attachedStylesheets), + password: this.password, + publishImmediately: this.publishImmediately, + htmlTitle: this.htmlTitle, + translations: parseObject(this.translations), + folderId: this.landingFolderId, + name: this.pageName, + layoutSections: parseObject(this.layoutSections), + footerHtml: this.footerHtml, + headHtml: this.headHtml, + templatePath: this.templatePath, + }, + }); + + $.export("$summary", `Successfully created landing page with ID: ${response.id}`); + + return response; + }, +}; diff --git a/components/hubspot/actions/create-lead/create-lead.mjs b/components/hubspot/actions/create-lead/create-lead.mjs index e1ed71cf9e361..ea1b99e8681de 100644 --- a/components/hubspot/actions/create-lead/create-lead.mjs +++ b/components/hubspot/actions/create-lead/create-lead.mjs @@ -1,15 +1,16 @@ import { - OBJECT_TYPE, ASSOCIATION_CATEGORY, + ASSOCIATION_CATEGORY, + OBJECT_TYPE, } from "../../common/constants.mjs"; -import common from "../common/common-create-object.mjs"; import appProp from "../common/common-app-prop.mjs"; +import common from "../common/common-create-object.mjs"; export default { ...common, key: "hubspot-create-lead", name: "Create Lead", description: "Create a lead in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/leads#create-leads)", - version: "0.0.9", + version: "0.0.13", type: "action", props: { ...appProp.props, diff --git a/components/hubspot/actions/create-meeting/create-meeting.mjs b/components/hubspot/actions/create-meeting/create-meeting.mjs index 7de8e706116f6..46ba1786f1fa5 100644 --- a/components/hubspot/actions/create-meeting/create-meeting.mjs +++ b/components/hubspot/actions/create-meeting/create-meeting.mjs @@ -1,16 +1,16 @@ /* eslint-disable no-unused-vars */ -import common from "../common/common-create.mjs"; import { ConfigurationError } from "@pipedream/platform"; import { ASSOCIATION_CATEGORY, OBJECT_TYPE, } from "../../common/constants.mjs"; +import common from "../common/common-create.mjs"; export default { ...common, key: "hubspot-create-meeting", name: "Create Meeting", description: "Creates a new meeting with optional associations to other objects. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/engagements/meetings#post-%2Fcrm%2Fv3%2Fobjects%2Fmeetings)", - version: "0.0.2", + version: "0.0.6", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/create-note/create-note.mjs b/components/hubspot/actions/create-note/create-note.mjs new file mode 100644 index 0000000000000..0d22605758a21 --- /dev/null +++ b/components/hubspot/actions/create-note/create-note.mjs @@ -0,0 +1,117 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { ASSOCIATION_CATEGORY } from "../../common/constants.mjs"; +import common from "../common/common-create.mjs"; + +export default { + ...common, + key: "hubspot-create-note", + name: "Create Note", + description: "Create a new note. [See the documentation](https://developers.hubspot.com/docs/api/crm/engagements)", + version: "0.0.5", + type: "action", + props: { + ...common.props, + toObjectType: { + propDefinition: [ + common.props.hubspot, + "objectType", + ], + label: "Associated Object Type", + description: "Type of object the note is being associated with", + optional: true, + }, + toObjectId: { + propDefinition: [ + common.props.hubspot, + "objectId", + (c) => ({ + objectType: c.toObjectType, + }), + ], + label: "Associated Object", + description: "ID of object the note is being associated with", + optional: true, + }, + associationType: { + propDefinition: [ + common.props.hubspot, + "associationType", + (c) => ({ + fromObjectType: "notes", + toObjectType: c.toObjectType, + }), + ], + description: "A unique identifier to indicate the association type between the note and the other object", + optional: true, + }, + }, + methods: { + ...common.methods, + getObjectType() { + return "notes"; + }, + isRelevantProperty(property) { + return common.methods.isRelevantProperty(property) && !property.name.includes("hs_pipeline"); + }, + createEngagement(objectType, properties, associations, $) { + return this.hubspot.createObject({ + objectType, + data: { + properties, + associations, + }, + $, + }); + }, + }, + async run({ $ }) { + const { + /* eslint-disable no-unused-vars */ + hubspot, + toObjectType, + toObjectId, + associationType, + $db, + objectProperties, + ...otherProperties + } = this; + + if ((toObjectId && !associationType) || (!toObjectId && associationType)) { + throw new ConfigurationError("Both `toObjectId` and `associationType` must be entered"); + } + + const properties = objectProperties + ? typeof objectProperties === "string" + ? JSON.parse(objectProperties) + : objectProperties + : otherProperties; + + const objectType = this.getObjectType(); + + const associations = toObjectId + ? [ + { + to: { + id: toObjectId, + }, + types: [ + { + associationTypeId: associationType, + associationCategory: ASSOCIATION_CATEGORY.HUBSPOT_DEFINED, + }, + ], + }, + ] + : undefined; + + if (properties.hs_task_reminders) { + properties.hs_task_reminders = Date.parse(properties.hs_task_reminders); + } + + const engagement = await this.createEngagement(objectType, properties, associations, $); + + $.export("$summary", "Successfully created note"); + + return engagement; + }, +}; diff --git a/components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs b/components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs index 8a1bfafd2ce3b..253baa623fafd 100644 --- a/components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs +++ b/components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-create-or-update-contact", name: "Create or Update Contact", description: "Create or update a contact in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts#endpoint?spec=POST-/crm/v3/objects/contacts)", - version: "0.0.19", + version: "0.0.23", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/create-page/create-page.mjs b/components/hubspot/actions/create-page/create-page.mjs new file mode 100644 index 0000000000000..28fdffbe27fd0 --- /dev/null +++ b/components/hubspot/actions/create-page/create-page.mjs @@ -0,0 +1,45 @@ +import { parseObject } from "../../common/utils.mjs"; +import hubspot from "../../hubspot.app.mjs"; +import commonPageProp from "../common/common-page-prop.mjs"; + +export default { + key: "hubspot-create-page", + name: "Create Page", + description: "Create a page in HubSpot. [See the documentation](https://developers.hubspot.com/docs/reference/api/cms/pages#post-%2Fcms%2Fv3%2Fpages%2Fsite-pages)", + version: "0.0.2", + type: "action", + props: { + hubspot, + pageName: { + propDefinition: [ + hubspot, + "pageName", + ], + }, + ...commonPageProp, + }, + async run({ $ }) { + const response = await this.hubspot.createPage({ + $, + data: { + language: this.language, + enableLayoutStylesheets: this.enableLayoutStylesheets, + metaDescription: this.metaDescription, + attachedStylesheets: parseObject(this.attachedStylesheets), + password: this.password, + publishImmediately: this.publishImmediately, + htmlTitle: this.htmlTitle, + translations: parseObject(this.translations), + name: this.pageName, + layoutSections: parseObject(this.layoutSections), + footerHtml: this.footerHtml, + headHtml: this.headHtml, + templatePath: this.templatePath, + }, + }); + + $.export("$summary", `Successfully created page with ID: ${response.id}`); + + return response; + }, +}; diff --git a/components/hubspot/actions/create-task/create-task.mjs b/components/hubspot/actions/create-task/create-task.mjs index 118992a8b585a..025a92acb820a 100644 --- a/components/hubspot/actions/create-task/create-task.mjs +++ b/components/hubspot/actions/create-task/create-task.mjs @@ -1,13 +1,13 @@ -import common from "../common/common-create.mjs"; import { ConfigurationError } from "@pipedream/platform"; import { ASSOCIATION_CATEGORY } from "../../common/constants.mjs"; +import common from "../common/common-create.mjs"; export default { ...common, key: "hubspot-create-task", name: "Create Task", description: "Create a new task. [See the documentation](https://developers.hubspot.com/docs/api/crm/engagements)", - version: "0.0.2", + version: "0.0.6", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/create-ticket/create-ticket.mjs b/components/hubspot/actions/create-ticket/create-ticket.mjs index 18cc6aa3db3a1..d73ff06e3af49 100644 --- a/components/hubspot/actions/create-ticket/create-ticket.mjs +++ b/components/hubspot/actions/create-ticket/create-ticket.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-create-ticket", name: "Create Ticket", description: "Create a ticket in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/tickets)", - version: "0.0.12", + version: "0.0.16", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs b/components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs index 5ffca89f93742..c30656d3dcb9e 100644 --- a/components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs +++ b/components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs @@ -4,7 +4,7 @@ export default { key: "hubspot-enroll-contact-into-workflow", name: "Enroll Contact Into Workflow", description: "Add a contact to a workflow. Note: The Workflows API currently only supports contact-based workflows and is only available for Marketing Hub Enterprise accounts. [See the documentation](https://legacydocs.hubspot.com/docs/methods/workflows/add_contact)", - version: "0.0.17", + version: "0.0.21", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/get-associated-emails/get-associated-emails.mjs b/components/hubspot/actions/get-associated-emails/get-associated-emails.mjs new file mode 100644 index 0000000000000..c74e487e40ff1 --- /dev/null +++ b/components/hubspot/actions/get-associated-emails/get-associated-emails.mjs @@ -0,0 +1,102 @@ +import { DEFAULT_EMAIL_PROPERTIES } from "../../common/constants.mjs"; +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-get-associated-emails", + name: "Get Associated Emails", + description: "Retrieves emails associated with a specific object (contact, company, or deal). [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/search)", + version: "0.0.3", + type: "action", + props: { + hubspot, + objectType: { + propDefinition: [ + hubspot, + "objectType", + () => ({ + includeCustom: true, + }), + ], + label: "Associated Object Type", + description: "The type of the object the emails are associated with", + }, + objectId: { + type: "string", + label: "Object ID", + description: "The ID of the object to get associated emails for", + propDefinition: [ + hubspot, + "objectIds", + ({ objectType }) => ({ + objectType, + }), + ], + }, + additionalProperties: { + type: "string[]", + label: "Additional Properties", + description: "Additional properties to retrieve for the emails", + optional: true, + }, + limit: { + type: "integer", + label: "Limit", + description: "Maximum number of emails to retrieve", + optional: true, + default: 20, + min: 1, + max: 100, + }, + }, + async run({ $ }) { + const properties = [ + ...DEFAULT_EMAIL_PROPERTIES, + ...(this.additionalProperties || []), + ]; + + const { + objectType, objectId, limit, + } = this; + + const { results } = await this.hubspot.getAssociations({ + $, + objectType, + objectId, + toObjectType: "emails", + params: { + limit, + }, + }); + + if (!results?.length > 0) { + $.export("$summary", "No emails found with this association"); + return []; + } + + const emailIds = results.map((association) => ({ + id: association.toObjectId, + })); + + const { results: emails } = await this.hubspot.batchGetObjects({ + $, + objectType: "emails", + data: { + properties, + inputs: emailIds, + }, + }); + + // Sort emails by timestamp in descending order (most recent first) + emails?.sort((a, b) => { + const timestampA = new Date(a.properties?.hs_timestamp || 0).getTime(); + const timestampB = new Date(b.properties?.hs_timestamp || 0).getTime(); + return timestampB - timestampA; + }) || []; + + const summary = `Successfully retrieved ${emails.length} email(s)`; + + $.export("$summary", summary); + + return emails; + }, +}; diff --git a/components/hubspot/actions/get-associated-meetings/get-associated-meetings.mjs b/components/hubspot/actions/get-associated-meetings/get-associated-meetings.mjs index a67f10cf131eb..035dd0d08c86c 100644 --- a/components/hubspot/actions/get-associated-meetings/get-associated-meetings.mjs +++ b/components/hubspot/actions/get-associated-meetings/get-associated-meetings.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-get-associated-meetings", name: "Get Associated Meetings", description: "Retrieves meetings associated with a specific object (contact, company, or deal) with optional time filtering. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/associations/association-details#get-%2Fcrm%2Fv4%2Fobjects%2F%7Bobjecttype%7D%2F%7Bobjectid%7D%2Fassociations%2F%7Btoobjecttype%7D)", - version: "0.0.2", + version: "0.0.6", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/get-company/get-company.mjs b/components/hubspot/actions/get-company/get-company.mjs index b5c8dfad731bd..7e5d6b887149c 100644 --- a/components/hubspot/actions/get-company/get-company.mjs +++ b/components/hubspot/actions/get-company/get-company.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-get-company", name: "Get Company", description: "Gets a company. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies#endpoint?spec=GET-/crm/v3/objects/companies/{companyId})", - version: "0.0.17", + version: "0.0.21", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/get-contact/get-contact.mjs b/components/hubspot/actions/get-contact/get-contact.mjs index b0fa9d37ac331..2a2db8cc08064 100644 --- a/components/hubspot/actions/get-contact/get-contact.mjs +++ b/components/hubspot/actions/get-contact/get-contact.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-get-contact", name: "Get Contact", description: "Gets a contact. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts#endpoint?spec=GET-/crm/v3/objects/contacts/{contactId})", - version: "0.0.17", + version: "0.0.21", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/get-deal/get-deal.mjs b/components/hubspot/actions/get-deal/get-deal.mjs index 4de1330f99fb7..8e2ed2778d3b4 100644 --- a/components/hubspot/actions/get-deal/get-deal.mjs +++ b/components/hubspot/actions/get-deal/get-deal.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-get-deal", name: "Get Deal", description: "Gets a deal. [See the documentation](https://developers.hubspot.com/docs/api/crm/deals#endpoint?spec=GET-/crm/v3/objects/deals/{dealId})", - version: "0.0.17", + version: "0.0.21", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/get-file-public-url/get-file-public-url.mjs b/components/hubspot/actions/get-file-public-url/get-file-public-url.mjs index 8e58fe44b8245..1d3f1aa047b06 100644 --- a/components/hubspot/actions/get-file-public-url/get-file-public-url.mjs +++ b/components/hubspot/actions/get-file-public-url/get-file-public-url.mjs @@ -4,7 +4,7 @@ export default { key: "hubspot-get-file-public-url", name: "Get File Public URL", description: "Get a publicly available URL for a file that was uploaded using a Hubspot form. [See the documentation](https://developers.hubspot.com/docs/api/files/files#endpoint?spec=GET-/files/v3/files/{fileId}/signed-url)", - version: "0.0.17", + version: "0.0.21", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/get-meeting/get-meeting.mjs b/components/hubspot/actions/get-meeting/get-meeting.mjs index 94700517b62df..06e6aa10d1519 100644 --- a/components/hubspot/actions/get-meeting/get-meeting.mjs +++ b/components/hubspot/actions/get-meeting/get-meeting.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-get-meeting", name: "Get Meeting", description: "Retrieves a specific meeting by its ID. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/engagements/meetings#get-%2Fcrm%2Fv3%2Fobjects%2Fmeetings%2F%7Bmeetingid%7D)", - version: "0.0.2", + version: "0.0.6", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/get-subscription-preferences/get-subscription-preferences.mjs b/components/hubspot/actions/get-subscription-preferences/get-subscription-preferences.mjs new file mode 100644 index 0000000000000..cf69c4f899912 --- /dev/null +++ b/components/hubspot/actions/get-subscription-preferences/get-subscription-preferences.mjs @@ -0,0 +1,30 @@ +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-get-subscription-preferences", + name: "Get Subscription Preferences", + description: "Retrieves the subscription preferences for a contact. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/subscriptions#get-%2Fcommunication-preferences%2Fv4%2Fstatuses%2F%7Bsubscriberidstring%7D)", + version: "0.0.3", + type: "action", + props: { + hubspot, + contactEmail: { + propDefinition: [ + hubspot, + "contactEmail", + ], + }, + }, + async run({ $ }) { + const response = await this.hubspot.getSubscriptionPreferences({ + $, + email: this.contactEmail, + params: { + channel: "EMAIL", + }, + }); + + $.export("$summary", `Retrieved subscription preferences for ${this.contactEmail}`); + return response; + }, +}; diff --git a/components/hubspot/actions/list-blog-posts/list-blog-posts.mjs b/components/hubspot/actions/list-blog-posts/list-blog-posts.mjs new file mode 100644 index 0000000000000..5b6e62e79bbbe --- /dev/null +++ b/components/hubspot/actions/list-blog-posts/list-blog-posts.mjs @@ -0,0 +1,115 @@ +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-list-blog-posts", + name: "List Blog Posts", + description: "Retrieves a list of blog posts. [See the documentation](https://developers.hubspot.com/docs/reference/api/cms/blogs/blog-posts)", + version: "0.0.3", + type: "action", + props: { + hubspot, + createdAt: { + type: "string", + label: "Created At", + description: "Only return Blog Posts created at exactly the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + createdAfter: { + type: "string", + label: "Created After", + description: "Only return Blog Posts created after the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + createdBefore: { + type: "string", + label: "Created Before", + description: "Only return Blog Posts created before the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + updatedAt: { + type: "string", + label: "Updated At", + description: "Only return Blog Posts updated at exactly the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + updatedAfter: { + type: "string", + label: "Updated After", + description: "Only return Blog Posts updated after the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + updatedBefore: { + type: "string", + label: "Updated Before", + description: "Only return Blog Posts updated before the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + archived: { + type: "boolean", + label: "Archived", + description: "Specifies whether to return deleted Blog Posts", + optional: true, + }, + sort: { + type: "string", + label: "Sort", + description: "Sort the results by the specified field", + options: [ + "name", + "createdAt", + "updatedAt", + "createdBy", + "updatedBy", + ], + optional: true, + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of results to return", + default: 100, + optional: true, + }, + }, + async run({ $ }) { + const results = []; + let hasMore, count = 0; + + const params = { + createdAt: this.createdAt, + createdAfter: this.createdAfter, + createdBefore: this.createdBefore, + updatedAt: this.updatedAt, + updatedAfter: this.updatedAfter, + updatedBefore: this.updatedBefore, + archived: this.archived, + sort: this.sort, + }; + + do { + const { + paging, results, + } = await this.hubspot.getBlogPosts({ + $, + params, + }); + if (!results?.length) { + break; + } + for (const item of results) { + results.push(item); + count++; + if (count >= this.maxResults) { + break; + } + } + hasMore = paging?.next.after; + params.after = paging?.next.after; + } while (hasMore && count < this.maxResults); + + $.export("$summary", `Found ${results.length} page${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/hubspot/actions/list-campaigns/list-campaigns.mjs b/components/hubspot/actions/list-campaigns/list-campaigns.mjs new file mode 100644 index 0000000000000..5b89be1529267 --- /dev/null +++ b/components/hubspot/actions/list-campaigns/list-campaigns.mjs @@ -0,0 +1,67 @@ +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-list-campaigns", + name: "List Campaigns", + description: "Retrieves a list of campaigns. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/campaigns#get-%2Fmarketing%2Fv3%2Fcampaigns%2F)", + version: "0.0.3", + type: "action", + props: { + hubspot, + sort: { + type: "string", + label: "Sort", + description: "The field by which to sort the results. An optional '-' before the property name can denote descending order", + options: [ + "hs_name", + "-hs_name", + "createdAt", + "-createdAt", + "updatedAt", + "-updatedAt", + ], + optional: true, + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of results to return", + default: 100, + optional: true, + }, + }, + async run({ $ }) { + const results = []; + let hasMore, count = 0; + + const params = { + sort: this.sort, + }; + + do { + const { + paging, results, + } = await this.hubspot.listCampaigns({ + $, + params, + }); + if (!results?.length) { + break; + } + for (const item of results) { + results.push(item); + count++; + if (count >= this.maxResults) { + break; + } + } + hasMore = paging?.next.after; + params.after = paging?.next.after; + } while (hasMore && count < this.maxResults); + + $.export("$summary", `Found ${results.length} campaign${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/hubspot/actions/list-forms/list-forms.mjs b/components/hubspot/actions/list-forms/list-forms.mjs new file mode 100644 index 0000000000000..58df18e8a9453 --- /dev/null +++ b/components/hubspot/actions/list-forms/list-forms.mjs @@ -0,0 +1,59 @@ +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-list-forms", + name: "List Forms", + description: "Retrieves a list of forms. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/forms#get-%2Fmarketing%2Fv3%2Fforms%2F)", + version: "0.0.3", + type: "action", + props: { + hubspot, + archived: { + type: "boolean", + label: "Archived", + description: "Whether to return only results that have been archived", + optional: true, + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of results to return", + default: 100, + optional: true, + }, + }, + async run({ $ }) { + const results = []; + let hasMore, count = 0; + + const params = { + archived: this.archived, + }; + + do { + const { + paging, results, + } = await this.hubspot.listMarketingForms({ + $, + params, + }); + if (!results?.length) { + break; + } + for (const item of results) { + results.push(item); + count++; + if (count >= this.maxResults) { + break; + } + } + hasMore = paging?.next.after; + params.after = paging?.next.after; + } while (hasMore && count < this.maxResults); + + $.export("$summary", `Found ${results.length} form${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/hubspot/actions/list-marketing-emails/list-marketing-emails.mjs b/components/hubspot/actions/list-marketing-emails/list-marketing-emails.mjs new file mode 100644 index 0000000000000..4c6cb11ea82a1 --- /dev/null +++ b/components/hubspot/actions/list-marketing-emails/list-marketing-emails.mjs @@ -0,0 +1,122 @@ +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-list-marketing-emails", + name: "List Marketing Emails", + description: "Retrieves a list of marketing emails. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/emails/marketing-emails#get-%2Fmarketing%2Fv3%2Femails%2F)", + version: "0.0.3", + type: "action", + props: { + hubspot, + createdAt: { + type: "string", + label: "Created At", + description: "Only return Marketing Emails created at exactly the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + createdAfter: { + type: "string", + label: "Created After", + description: "Only return Marketing Emails created after the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + createdBefore: { + type: "string", + label: "Created Before", + description: "Only return Marketing Emails created before the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + updatedAt: { + type: "string", + label: "Updated At", + description: "Only return Marketing Emails updated at exactly the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + updatedAfter: { + type: "string", + label: "Updated After", + description: "Only return Marketing Emails updated after the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + updatedBefore: { + type: "string", + label: "Updated Before", + description: "Only return Marketing Emails updated before the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + includeStats: { + type: "boolean", + label: "Include Stats", + description: "Include statistics with emails", + optional: true, + }, + archived: { + type: "boolean", + label: "Archived", + description: "Specifies whether to return deleted Marketing Emails", + optional: true, + }, + sort: { + type: "string", + label: "Sort", + description: "Sort the results by the specified field", + options: [ + "name", + "createdAt", + "updatedAt", + "createdBy", + "updatedBy", + ], + optional: true, + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of results to return", + default: 100, + optional: true, + }, + }, + async run({ $ }) { + const results = []; + let hasMore, count = 0; + + const params = { + createdAt: this.createdAt, + createdAfter: this.createdAfter, + createdBefore: this.createdBefore, + updatedAt: this.updatedAt, + updatedAfter: this.updatedAfter, + updatedBefore: this.updatedBefore, + includeStats: this.includeStats, + archived: this.archived, + sort: this.sort, + }; + + do { + const { + paging, results, + } = await this.hubspot.listMarketingEmails({ + $, + params, + }); + if (!results?.length) { + break; + } + for (const item of results) { + results.push(item); + count++; + if (count >= this.maxResults) { + break; + } + } + hasMore = paging?.next.after; + params.after = paging?.next.after; + } while (hasMore && count < this.maxResults); + + $.export("$summary", `Found ${results.length} email${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/hubspot/actions/list-marketing-events/list-marketing-events.mjs b/components/hubspot/actions/list-marketing-events/list-marketing-events.mjs new file mode 100644 index 0000000000000..15db09497ac3f --- /dev/null +++ b/components/hubspot/actions/list-marketing-events/list-marketing-events.mjs @@ -0,0 +1,52 @@ +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-list-marketing-events", + name: "List Marketing Events", + description: "Retrieves a list of marketing events. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/marketing-events#get-%2Fmarketing%2Fv3%2Fmarketing-events%2F)", + version: "0.0.3", + type: "action", + props: { + hubspot, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of results to return", + default: 100, + optional: true, + }, + }, + async run({ $ }) { + const results = []; + const params = { + limit: 100, + }; + let hasMore, count = 0; + + do { + const { + paging, results, + } = await this.hubspot.listMarketingEvents({ + $, + params, + }); + if (!results?.length) { + break; + } + for (const item of results) { + results.push(item); + count++; + if (count >= this.maxResults) { + break; + } + } + hasMore = paging?.next.after; + params.after = paging?.next.after; + } while (hasMore && count < this.maxResults); + + $.export("$summary", `Found ${results.length} event${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/hubspot/actions/list-pages/list-pages.mjs b/components/hubspot/actions/list-pages/list-pages.mjs new file mode 100644 index 0000000000000..8280a0f400df4 --- /dev/null +++ b/components/hubspot/actions/list-pages/list-pages.mjs @@ -0,0 +1,115 @@ +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-list-pages", + name: "List Pages", + description: "Retrieves a list of site pages. [See the documentation](https://developers.hubspot.com/docs/reference/api/cms/pages)", + version: "0.0.3", + type: "action", + props: { + hubspot, + createdAt: { + type: "string", + label: "Created At", + description: "Only return Site Pages created at exactly the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + createdAfter: { + type: "string", + label: "Created After", + description: "Only return Site Pages created after the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + createdBefore: { + type: "string", + label: "Created Before", + description: "Only return Site Pages created before the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + updatedAt: { + type: "string", + label: "Updated At", + description: "Only return Site Pages updated at exactly the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + updatedAfter: { + type: "string", + label: "Updated After", + description: "Only return Site Pages updated after the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + updatedBefore: { + type: "string", + label: "Updated Before", + description: "Only return Site Pages updated before the specified time. Format: YYYY-MM-DDTHH:MM:SSZ", + optional: true, + }, + archived: { + type: "boolean", + label: "Archived", + description: "Specifies whether to return deleted Site Pages", + optional: true, + }, + sort: { + type: "string", + label: "Sort", + description: "Sort the results by the specified field", + options: [ + "name", + "createdAt", + "updatedAt", + "createdBy", + "updatedBy", + ], + optional: true, + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of results to return", + default: 100, + optional: true, + }, + }, + async run({ $ }) { + const results = []; + let hasMore, count = 0; + + const params = { + createdAt: this.createdAt, + createdAfter: this.createdAfter, + createdBefore: this.createdBefore, + updatedAt: this.updatedAt, + updatedAfter: this.updatedAfter, + updatedBefore: this.updatedBefore, + archived: this.archived, + sort: this.sort, + }; + + do { + const { + paging, results, + } = await this.hubspot.listPages({ + $, + params, + }); + if (!results?.length) { + break; + } + for (const item of results) { + results.push(item); + count++; + if (count >= this.maxResults) { + break; + } + } + hasMore = paging?.next.after; + params.after = paging?.next.after; + } while (hasMore && count < this.maxResults); + + $.export("$summary", `Found ${results.length} page${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/hubspot/actions/list-templates/list-templates.mjs b/components/hubspot/actions/list-templates/list-templates.mjs new file mode 100644 index 0000000000000..f2ae58d868e06 --- /dev/null +++ b/components/hubspot/actions/list-templates/list-templates.mjs @@ -0,0 +1,53 @@ +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-list-templates", + name: "List Templates", + description: "Retrieves a list of templates. [See the documentation](https://developers.hubspot.com/docs/reference/api/cms/templates)", + version: "0.0.3", + type: "action", + props: { + hubspot, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of results to return", + default: 100, + optional: true, + }, + }, + async run({ $ }) { + const results = []; + const params = { + limit: 100, + offset: 0, + }; + let hasMore, count = 0; + + do { + const { + total_count: total, objects, + } = await this.hubspot.listTemplates({ + $, + params, + }); + if (!objects?.length) { + break; + } + for (const item of objects) { + results.push(item); + count++; + if (count >= this.maxResults) { + break; + } + } + hasMore = count < total; + params.offset += params.limit; + } while (hasMore && count < this.maxResults); + + $.export("$summary", `Found ${results.length} template${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/hubspot/actions/search-crm/search-crm.mjs b/components/hubspot/actions/search-crm/search-crm.mjs index 5cbd33258d008..5b3a319313d91 100644 --- a/components/hubspot/actions/search-crm/search-crm.mjs +++ b/components/hubspot/actions/search-crm/search-crm.mjs @@ -1,23 +1,23 @@ -import hubspot from "../../hubspot.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; import { - SEARCHABLE_OBJECT_TYPES, - DEFAULT_CONTACT_PROPERTIES, DEFAULT_COMPANY_PROPERTIES, + DEFAULT_CONTACT_PROPERTIES, DEFAULT_DEAL_PROPERTIES, - DEFAULT_TICKET_PROPERTIES, - DEFAULT_PRODUCT_PROPERTIES, - DEFAULT_LINE_ITEM_PROPERTIES, DEFAULT_LEAD_PROPERTIES, DEFAULT_LIMIT, + DEFAULT_LINE_ITEM_PROPERTIES, + DEFAULT_PRODUCT_PROPERTIES, + DEFAULT_TICKET_PROPERTIES, + SEARCHABLE_OBJECT_TYPES, } from "../../common/constants.mjs"; +import hubspot from "../../hubspot.app.mjs"; import common from "../common/common-create.mjs"; -import { ConfigurationError } from "@pipedream/platform"; export default { key: "hubspot-search-crm", name: "Search CRM", description: "Search companies, contacts, deals, feedback submissions, products, tickets, line-items, quotes, leads, or custom objects. [See the documentation](https://developers.hubspot.com/docs/api/crm/search)", - version: "1.0.4", + version: "1.0.8", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/update-company/update-company.mjs b/components/hubspot/actions/update-company/update-company.mjs index 6055b780ebe89..8754f760469e4 100644 --- a/components/hubspot/actions/update-company/update-company.mjs +++ b/components/hubspot/actions/update-company/update-company.mjs @@ -1,13 +1,13 @@ import { OBJECT_TYPE } from "../../common/constants.mjs"; -import common from "../common/common-update-object.mjs"; import appProp from "../common/common-app-prop.mjs"; +import common from "../common/common-update-object.mjs"; export default { ...common, key: "hubspot-update-company", name: "Update Company", description: "Update a company in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies)", - version: "0.0.17", + version: "0.0.21", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/update-contact/update-contact.mjs b/components/hubspot/actions/update-contact/update-contact.mjs index c76842e97a82e..b21fc4a6367f0 100644 --- a/components/hubspot/actions/update-contact/update-contact.mjs +++ b/components/hubspot/actions/update-contact/update-contact.mjs @@ -1,13 +1,13 @@ import { OBJECT_TYPE } from "../../common/constants.mjs"; -import common from "../common/common-update-object.mjs"; import appProp from "../common/common-app-prop.mjs"; +import common from "../common/common-update-object.mjs"; export default { ...common, key: "hubspot-update-contact", name: "Update Contact", description: "Update a contact in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts#endpoint?spec=POST-/crm/v3/objects/contacts)", - version: "0.0.18", + version: "0.0.22", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/update-custom-object/update-custom-object.mjs b/components/hubspot/actions/update-custom-object/update-custom-object.mjs index bc4f7d55f8490..456c27c4d703d 100644 --- a/components/hubspot/actions/update-custom-object/update-custom-object.mjs +++ b/components/hubspot/actions/update-custom-object/update-custom-object.mjs @@ -1,12 +1,12 @@ -import common from "../common/common-update-object.mjs"; import appProp from "../common/common-app-prop.mjs"; +import common from "../common/common-update-object.mjs"; export default { ...common, key: "hubspot-update-custom-object", name: "Update Custom Object", description: "Update a custom object in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/custom-objects#update-existing-custom-objects)", - version: "1.0.3", + version: "1.0.7", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/update-deal/update-deal.mjs b/components/hubspot/actions/update-deal/update-deal.mjs index 357518d10c3ca..f27761975ed6d 100644 --- a/components/hubspot/actions/update-deal/update-deal.mjs +++ b/components/hubspot/actions/update-deal/update-deal.mjs @@ -1,13 +1,13 @@ import { OBJECT_TYPE } from "../../common/constants.mjs"; -import common from "../common/common-update-object.mjs"; import appProp from "../common/common-app-prop.mjs"; +import common from "../common/common-update-object.mjs"; export default { ...common, key: "hubspot-update-deal", name: "Update Deal", description: "Update a deal in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/deals#update-deals)", - version: "0.0.8", + version: "0.0.12", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/update-fields-on-the-form/update-fields-on-the-form.mjs b/components/hubspot/actions/update-fields-on-the-form/update-fields-on-the-form.mjs new file mode 100644 index 0000000000000..5c32703468591 --- /dev/null +++ b/components/hubspot/actions/update-fields-on-the-form/update-fields-on-the-form.mjs @@ -0,0 +1,348 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { LANGUAGE_OPTIONS } from "../../common/constants.mjs"; +import { + cleanObject, parseObject, +} from "../../common/utils.mjs"; +import hubspot from "../../hubspot.app.mjs"; + +export default { + key: "hubspot-update-fields-on-the-form", + name: "Update Fields on the Form", + description: "Update some of the form definition components. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/forms#patch-%2Fmarketing%2Fv3%2Fforms%2F%7Bformid%7D)", + version: "0.0.2", + type: "action", + props: { + hubspot, + formId: { + propDefinition: [ + hubspot, + "formId", + ], + }, + name: { + type: "string", + label: "Name", + description: "The name of the form.", + optional: true, + }, + archived: { + type: "boolean", + label: "Archived", + description: "Whether the form is archived.", + optional: true, + }, + fieldGroups: { + type: "string[]", + label: "Field Groups", + description: "A list for objects of group type and fields. **Format: `[{ \"groupType\": \"default_group\", \"richTextType\": \"text\", \"fields\": [ { \"objectTypeId\": \"0-1\", \"name\": \"email\", \"label\": \"Email\", \"required\": true, \"hidden\": false, \"fieldType\": \"email\", \"validation\": { \"blockedEmailDomains\": [], \"useDefaultBlockList\": false }}]}]`** [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/forms#post-%2Fmarketing%2Fv3%2Fforms%2F) for more information.", + optional: true, + }, + createNewContactForNewEmail: { + type: "boolean", + label: "Create New Contact for New Email", + description: "Whether to create a new contact when a form is submitted with an email address that doesn't match any in your existing contacts records.", + optional: true, + }, + editable: { + type: "boolean", + label: "Editable", + description: "Whether the form can be edited.", + optional: true, + }, + allowLinkToResetKnownValues: { + type: "boolean", + label: "Allow Link to Reset Known Values", + description: "Whether to add a reset link to the form. This removes any pre-populated content on the form and creates a new contact on submission.", + optional: true, + }, + lifecycleStages: { + type: "string[]", + label: "Lifecycle Stages", + description: "A list of objects of lifecycle stages. **Format: `[{ \"objectTypeId\": \"0-1\", \"value\": \"subscriber\" }]`** [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/forms#post-%2Fmarketing%2Fv3%2Fforms%2F) for more information.", + optional: true, + default: [], + }, + postSubmitActionType: { + type: "string", + label: "Post Submit Action Type", + description: "The action to take after submit. The default action is displaying a thank you message.", + options: [ + "thank_you", + "redirect_url", + ], + optional: true, + }, + postSubmitActionValue: { + type: "string", + label: "Post Submit Action Value", + description: "The thank you text or the page to redirect to.", + optional: true, + }, + language: { + type: "string", + label: "Language", + description: "The language of the form.", + options: LANGUAGE_OPTIONS, + optional: true, + }, + prePopulateKnownValues: { + type: "boolean", + label: "Pre-populate Known Values", + description: "Whether contact fields should pre-populate with known information when a contact returns to your site.", + optional: true, + }, + cloneable: { + type: "boolean", + label: "Cloneable", + description: "Whether the form can be cloned.", + optional: true, + }, + notifyContactOwner: { + type: "boolean", + label: "Notify Contact Owner", + description: "Whether to send a notification email to the contact owner when a submission is received.", + optional: true, + }, + recaptchaEnabled: { + type: "boolean", + label: "Recaptcha Enabled", + description: "Whether CAPTCHA (spam prevention) is enabled.", + optional: true, + }, + archivable: { + type: "boolean", + label: "Archivable", + description: "Whether the form can be archived.", + optional: true, + }, + notifyRecipients: { + propDefinition: [ + hubspot, + "contactEmail", + ], + type: "string[]", + optional: true, + }, + renderRawHtml: { + type: "boolean", + label: "Render Raw HTML", + description: "Whether the form will render as raw HTML as opposed to inside an iFrame.", + optional: true, + }, + cssClass: { + type: "string", + label: "CSS Class", + description: "The CSS class of the form.", + optional: true, + }, + theme: { + type: "string", + label: "Theme", + description: "The theme used for styling the input fields. This will not apply if the form is added to a HubSpot CMS page`.", + options: [ + "default_style", + "canvas", + "linear", + "round", + "sharp", + "legacy", + ], + optional: true, + }, + submitButtonText: { + type: "string", + label: "Submit Button Text", + description: "The text displayed on the form submit button.", + optional: true, + }, + labelTextSize: { + type: "string", + label: "Label Text Size", + description: "The size of the label text.", + optional: true, + }, + legalConsentTextColor: { + type: "string", + label: "Legal Consent Text Color", + description: "The color of the legal consent text.", + optional: true, + }, + fontFamily: { + type: "string", + label: "Font Family", + description: "The font family of the form.", + optional: true, + }, + legalConsentTextSize: { + type: "string", + label: "Legal Consent Text Size", + description: "The size of the legal consent text.", + optional: true, + }, + backgroundWidth: { + type: "string", + label: "Background Width", + description: "The width of the background.", + optional: true, + }, + helpTextSize: { + type: "string", + label: "Help Text Size", + description: "The size of the help text.", + optional: true, + }, + submitFontColor: { + type: "string", + label: "Submit Font Color", + description: "The color of the submit font.", + optional: true, + }, + labelTextColor: { + type: "string", + label: "Label Text Color", + description: "The color of the label text.", + optional: true, + }, + submitAlignment: { + type: "string", + label: "Submit Alignment", + description: "The alignment of the submit button.", + options: [ + "left", + "center", + "right", + ], + optional: true, + }, + submitSize: { + type: "string", + label: "Submit Size", + description: "The size of the submit button.", + optional: true, + }, + helpTextColor: { + type: "string", + label: "Help Text Color", + description: "The color of the help text.", + optional: true, + }, + submitColor: { + type: "string", + label: "Submit Color", + description: "The color of the submit button.", + optional: true, + }, + legalConsentOptionsType: { + type: "string", + label: "Legal Consent Options Type", + description: "The type of legal consent options.", + options: [ + "none", + "legitimate_interest", + "explicit_consent_process", + "implicit_consent_process", + ], + optional: true, + }, + legalConsentOptionsObject: { + type: "object", + label: "Legal Consent Options Object", + description: "The object of legal consent options. **Format: `{\"subscriptionTypeIds\": [1,2,3], \"lawfulBasis\": \"lead\", \"privacy\": \"string\"}`** [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/forms#post-%2Fmarketing%2Fv3%2Fforms%2F) for more information.", + optional: true, + }, + }, + async run({ $ }) { + const configuration = {}; + if ( + (this.postSubmitActionType && !this.postSubmitActionValue) || + (!this.postSubmitActionType && this.postSubmitActionValue) + ) { + throw new ConfigurationError("Post Submit Action Type and Value must be provided together."); + } + + if (this.language) { + configuration.language = this.language; + } + if (this.cloneable) { + configuration.cloneable = this.cloneable; + } + if (this.postSubmitActionType) { + configuration.postSubmitAction = { + type: this.postSubmitActionType, + value: this.postSubmitActionValue, + }; + } + if (this.editable) { + configuration.editable = this.editable; + } + if (this.archivable) { + configuration.archivable = this.archivable; + } + if (this.recaptchaEnabled) { + configuration.recaptchaEnabled = this.recaptchaEnabled; + } + if (this.notifyContactOwner) { + configuration.notifyContactOwner = this.notifyContactOwner; + } + if (this.notifyRecipients) { + configuration.notifyRecipients = parseObject(this.notifyRecipients); + } + if (this.createNewContactForNewEmail) { + configuration.createNewContactForNewEmail = this.createNewContactForNewEmail; + } + if (this.prePopulateKnownValues) { + configuration.prePopulateKnownValues = this.prePopulateKnownValues; + } + if (this.allowLinkToResetKnownValues) { + configuration.allowLinkToResetKnownValues = this.allowLinkToResetKnownValues; + } + if (this.lifecycleStages) { + configuration.lifecycleStages = parseObject(this.lifecycleStages); + } + + const data = cleanObject({ + "formType": "hubspot", + "name": this.name, + "archived": this.archived, + "fieldGroups": parseObject(this.fieldGroups), + "displayOptions": { + "renderRawHtml": this.renderRawHtml, + "cssClass": this.cssClass, + "theme": this.theme, + "submitButtonText": this.submitButtonText, + "style": { + "labelTextSize": this.labelTextSize, + "legalConsentTextColor": this.legalConsentTextColor, + "fontFamily": this.fontFamily, + "legalConsentTextSize": this.legalConsentTextSize, + "backgroundWidth": this.backgroundWidth, + "helpTextSize": this.helpTextSize, + "submitFontColor": this.submitFontColor, + "labelTextColor": this.labelTextColor, + "submitAlignment": this.submitAlignment, + "submitSize": this.submitSize, + "helpTextColor": this.helpTextColor, + "submitColor": this.submitColor, + }, + }, + "legalConsentOptions": { + "type": this.legalConsentOptionsType, + ...(this.legalConsentOptionsObject + ? parseObject(this.legalConsentOptionsObject) + : {}), + }, + }); + + data.configuration = cleanObject(configuration); + + const response = await this.hubspot.updateForm({ + $, + formId: this.formId, + data, + }); + + $.export("$summary", `Successfully updated form with ID: ${response.id}`); + + return response; + }, +}; diff --git a/components/hubspot/actions/update-landing-page/update-landing-page.mjs b/components/hubspot/actions/update-landing-page/update-landing-page.mjs new file mode 100644 index 0000000000000..cdc2c2e6d4703 --- /dev/null +++ b/components/hubspot/actions/update-landing-page/update-landing-page.mjs @@ -0,0 +1,62 @@ +import { parseObject } from "../../common/utils.mjs"; +import hubspot from "../../hubspot.app.mjs"; +import commonPageProp from "../common/common-page-prop.mjs"; + +export default { + key: "hubspot-update-landing-page", + name: "Update Landing Page", + description: "Update a landing page in HubSpot. [See the documentation](https://developers.hubspot.com/docs/reference/api/cms/pages#patch-%2Fcms%2Fv3%2Fpages%2Flanding-pages%2F%7Bobjectid%7D)", + version: "0.0.2", + type: "action", + props: { + hubspot, + pageId: { + propDefinition: [ + hubspot, + "landingPageId", + ], + description: "The ID of the page to update.", + }, + pageName: { + propDefinition: [ + hubspot, + "pageName", + ], + optional: true, + }, + landingFolderId: { + propDefinition: [ + hubspot, + "landingFolderId", + ], + optional: true, + }, + ...commonPageProp, + }, + async run({ $ }) { + const response = await this.hubspot.updateLandingPage({ + $, + pageId: this.pageId, + data: { + language: this.language, + enableLayoutStylesheets: this.enableLayoutStylesheets, + metaDescription: this.metaDescription, + attachedStylesheets: parseObject(this.attachedStylesheets), + password: this.password, + publishImmediately: this.publishImmediately, + htmlTitle: this.htmlTitle, + translations: parseObject(this.translations), + folderId: this.landingFolderId, + name: this.pageName, + layoutSections: parseObject(this.layoutSections), + footerHtml: this.footerHtml, + headHtml: this.headHtml, + templatePath: this.templatePath, + }, + }); + + $.export("$summary", `Successfully updated landing page with ID: ${response.id}`); + + return response; + }, +}; diff --git a/components/hubspot/actions/update-lead/update-lead.mjs b/components/hubspot/actions/update-lead/update-lead.mjs index 5fd447d95cbd1..c5e28edb90914 100644 --- a/components/hubspot/actions/update-lead/update-lead.mjs +++ b/components/hubspot/actions/update-lead/update-lead.mjs @@ -1,13 +1,13 @@ import { OBJECT_TYPE } from "../../common/constants.mjs"; -import common from "../common/common-update-object.mjs"; import appProp from "../common/common-app-prop.mjs"; +import common from "../common/common-update-object.mjs"; export default { ...common, key: "hubspot-update-lead", name: "Update Lead", description: "Update a lead in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/leads#update-leads)", - version: "0.0.9", + version: "0.0.13", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/update-page/update-page.mjs b/components/hubspot/actions/update-page/update-page.mjs new file mode 100644 index 0000000000000..138a64aefe82a --- /dev/null +++ b/components/hubspot/actions/update-page/update-page.mjs @@ -0,0 +1,54 @@ +import { parseObject } from "../../common/utils.mjs"; +import hubspot from "../../hubspot.app.mjs"; +import commonPageProp from "../common/common-page-prop.mjs"; + +export default { + key: "hubspot-update-page", + name: "Update Page", + description: "Update a page in Hubspot. [See the documentation](https://developers.hubspot.com/docs/reference/api/cms/pages#patch-%2Fcms%2Fv3%2Fpages%2Fsite-pages%2F%7Bobjectid%7D)", + version: "0.0.2", + type: "action", + props: { + hubspot, + pageId: { + propDefinition: [ + hubspot, + "pageId", + ], + description: "The ID of the page to update.", + }, + pageName: { + propDefinition: [ + hubspot, + "pageName", + ], + optional: true, + }, + ...commonPageProp, + }, + async run({ $ }) { + const response = await this.hubspot.updatePage({ + $, + pageId: this.pageId, + data: { + language: this.language, + enableLayoutStylesheets: this.enableLayoutStylesheets, + metaDescription: this.metaDescription, + attachedStylesheets: parseObject(this.attachedStylesheets), + password: this.password, + publishImmediately: this.publishImmediately, + htmlTitle: this.htmlTitle, + translations: parseObject(this.translations), + name: this.pageName, + layoutSections: parseObject(this.layoutSections), + footerHtml: this.footerHtml, + headHtml: this.headHtml, + templatePath: this.templatePath, + }, + }); + + $.export("$summary", `Successfully updated page with ID: ${response.id}`); + + return response; + }, +}; diff --git a/components/hubspot/common/constants.mjs b/components/hubspot/common/constants.mjs index 3301483f693cc..b08b8469d9c83 100644 --- a/components/hubspot/common/constants.mjs +++ b/components/hubspot/common/constants.mjs @@ -20,9 +20,12 @@ const API_PATH = { CRMV4: "/crm/v4", CMS: "/cms/v3", AUTOMATION: "/automation/v2", + AUTOMATIONV4: "/automation/v4", DEAL: "/deals/v1", BUSINESS_UNITS: "/business-units/v3", MARKETINGV3: "/marketing/v3", + CONTENT: "/content/api/v2", + COMMUNICATION_PREFERENCES: "/communication-preferences/v4", }; /** Association categories for association types, as defined by the [Hubspot API @@ -170,6 +173,17 @@ const DEFAULT_LEAD_PROPERTIES = [ "hs_associated_company_name", ]; +const DEFAULT_EMAIL_PROPERTIES = [ + "hs_timestamp", + "hs_email_direction", + "hs_email_html", + "hs_email_status", + "hs_email_subject", + "hs_email_text", + "hs_attachment_ids", + "hs_email_headers", +]; + const DEFAULT_MEETING_PROPERTIES = [ "hs_timestamp", "hubspot_owner_id", @@ -206,22 +220,184 @@ const ENGAGEMENT_TYPE_OPTIONS = [ }, ]; +const LANGUAGE_OPTIONS = [ + { + label: "Afrikaans", + value: "af", + }, + { + label: "Arabic (Egypt)", + value: "ar-eg", + }, + { + label: "Bulgarian", + value: "bg", + }, + { + label: "Bengali", + value: "bn", + }, + { + label: "Czech", + value: "cs", + }, + { + label: "Danish", + value: "da", + }, + { + label: "Greek", + value: "el", + }, + { + label: "English", + value: "en", + }, + { + label: "Spanish", + value: "es", + }, + { + label: "Spanish (Mexico)", + value: "es-mx", + }, + { + label: "Finnish", + value: "fi", + }, + { + label: "French", + value: "fr", + }, + { + label: "French (Canada)", + value: "fr-ca", + }, + { + label: "Hebrew (Israel)", + value: "he-il", + }, + { + label: "Croatian", + value: "hr", + }, + { + label: "Hungarian", + value: "hu", + }, + { + label: "Indonesian", + value: "id", + }, + { + label: "Italian", + value: "it", + }, + { + label: "Japanese", + value: "ja", + }, + { + label: "Korean", + value: "ko", + }, + { + label: "Lithuanian", + value: "lt", + }, + { + label: "Malay", + value: "ms", + }, + { + label: "Dutch", + value: "nl", + }, + { + label: "Norwegian (Norway)", + value: "no-no", + }, + { + label: "Polish", + value: "pl", + }, + { + label: "Portuguese", + value: "pt", + }, + { + label: "Portuguese (Brazil)", + value: "pt-br", + }, + { + label: "Romanian", + value: "ro", + }, + { + label: "Russian", + value: "ru", + }, + { + label: "Slovak", + value: "sk", + }, + { + label: "Slovenian", + value: "sl", + }, + { + label: "Swedish", + value: "sv", + }, + { + label: "Thai", + value: "th", + }, + { + label: "Tagalog", + value: "tl", + }, + { + label: "Ukrainian", + value: "uk", + }, + { + label: "Vietnamese", + value: "vi", + }, + { + label: "Chinese (China)", + value: "zh-cn", + }, + { + label: "Chinese (Hong Kong)", + value: "zh-hk", + }, + { + label: "Chinese (Taiwan)", + value: "zh-tw", + }, +]; + export { - OBJECT_TYPE, - OBJECT_TYPES, - SEARCHABLE_OBJECT_TYPES, - HUBSPOT_OWNER, - BASE_URL, API_PATH, ASSOCIATION_CATEGORY, - DEFAULT_LIMIT, - DEFAULT_CONTACT_PROPERTIES, + BASE_URL, DEFAULT_COMPANY_PROPERTIES, + DEFAULT_CONTACT_PROPERTIES, DEFAULT_DEAL_PROPERTIES, - DEFAULT_TICKET_PROPERTIES, - DEFAULT_PRODUCT_PROPERTIES, - DEFAULT_LINE_ITEM_PROPERTIES, + DEFAULT_EMAIL_PROPERTIES, DEFAULT_LEAD_PROPERTIES, - ENGAGEMENT_TYPE_OPTIONS, + DEFAULT_LIMIT, + DEFAULT_LINE_ITEM_PROPERTIES, DEFAULT_MEETING_PROPERTIES, + DEFAULT_PRODUCT_PROPERTIES, + DEFAULT_TICKET_PROPERTIES, + ENGAGEMENT_TYPE_OPTIONS, + HUBSPOT_OWNER, + LANGUAGE_OPTIONS, + OBJECT_TYPE, + OBJECT_TYPES, + SEARCHABLE_OBJECT_TYPES, }; + diff --git a/components/hubspot/common/utils.mjs b/components/hubspot/common/utils.mjs new file mode 100644 index 0000000000000..1e6f34787bfde --- /dev/null +++ b/components/hubspot/common/utils.mjs @@ -0,0 +1,48 @@ +export const parseObject = (obj) => { + if (!obj) { + return undefined; + } + if (typeof obj === "string") { + try { + return JSON.parse(obj); + } catch (e) { + return obj; + } + } + if (Array.isArray(obj)) { + return obj.map(parseObject); + } + if (typeof obj === "object") { + return Object.fromEntries(Object.entries(obj).map(([ + key, + value, + ]) => [ + key, + parseObject(value), + ])); + } + return obj; +}; + +export const cleanObject = (obj) => { + return Object.entries(obj) + .filter(([ + _, + v, + ]) => (v != null && v != "" && _ != undefined && _ != {})) + .reduce((acc, [ + k, + v, + ]) => { + const result = (!Array.isArray(v) && v === Object(v)) + ? cleanObject(v) + : v; + + if (Object.keys(result).length === 0) { + return acc; + } + return { + ...acc, + [k]: result, + };}, {}); +}; diff --git a/components/hubspot/hubspot.app.mjs b/components/hubspot/hubspot.app.mjs index 06299b1ef8b48..1219d4744c230 100644 --- a/components/hubspot/hubspot.app.mjs +++ b/components/hubspot/hubspot.app.mjs @@ -1,21 +1,21 @@ import { axios } from "@pipedream/platform"; +import Bottleneck from "bottleneck"; import { API_PATH, BASE_URL, - HUBSPOT_OWNER, - OBJECT_TYPE, - OBJECT_TYPES, - DEFAULT_LIMIT, - DEFAULT_CONTACT_PROPERTIES, DEFAULT_COMPANY_PROPERTIES, + DEFAULT_CONTACT_PROPERTIES, DEFAULT_DEAL_PROPERTIES, - DEFAULT_TICKET_PROPERTIES, - DEFAULT_PRODUCT_PROPERTIES, + DEFAULT_LIMIT, DEFAULT_LINE_ITEM_PROPERTIES, + DEFAULT_PRODUCT_PROPERTIES, + DEFAULT_TICKET_PROPERTIES, + HUBSPOT_OWNER, + OBJECT_TYPE, + OBJECT_TYPES, } from "./common/constants.mjs"; -import Bottleneck from "bottleneck"; const limiter = new Bottleneck({ - minTime: 250, // 4 requests per second + minTime: 500, // 2 requests per second maxConcurrent: 1, }); const axiosRateLimiter = limiter.wrap(axios); @@ -367,7 +367,7 @@ export default { }, }, associationType: { - type: "string", + type: "integer", label: "Association Type", description: "Type of the association", async options({ @@ -498,6 +498,184 @@ export default { return results.map(({ id }) => id); }, }, + formId: { + type: "string", + label: "Form ID", + description: "The ID of the form to update.", + async options({ prevContext }) { + const { nextAfter } = prevContext; + const { + results, paging, + } = await this.listForms({ + data: { + after: nextAfter, + }, + }); + + return { + options: results?.map(({ + id: value, name: label, + }) => ({ + value, + label, + })) || [], + context: { + nextAfter: paging?.next.after, + }, + }; + }, + }, + pageId: { + type: "string", + label: "Page ID", + description: "The ID of the page to clone.", + async options({ prevContext }) { + const { nextAfter } = prevContext; + const { + results, paging, + } = await this.listSitePages({ + data: { + after: nextAfter, + }, + }); + + return { + options: results?.map(({ + id: value, name: label, + }) => ({ + value, + label, + })) || [], + context: { + nextAfter: paging?.next.after, + }, + }; + }, + }, + landingPageId: { + type: "string", + label: "Landing Page ID", + description: "The ID of the landing page to clone.", + async options({ prevContext }) { + const { nextAfter } = prevContext; + const { + results, paging, + } = await this.listLandingPages({ + data: { + after: nextAfter, + }, + }); + + return { + options: results?.map(({ + id: value, name: label, + }) => ({ + value, + label, + })) || [], + context: { + nextAfter: paging?.next.after, + }, + }; + }, + }, + templatePath: { + type: "string", + label: "Template Path", + description: "The template path of the page.", + async options({ page }) { + const { objects } = await this.listTemplates({ + params: { + limit: DEFAULT_LIMIT, + offset: page * DEFAULT_LIMIT, + }, + }); + return objects?.map(({ + path: value, label, + }) => ({ + value, + label, + })) || []; + }, + }, + pageName: { + type: "string", + label: "Page Name", + description: "The name of the page.", + }, + landingFolderId: { + type: "string", + label: "Folder ID", + description: "The ID of the folder to create the landing page in.", + async options({ prevContext }) { + const { nextAfter } = prevContext; + const { + results, paging, + } = await this.listLandingFolders({ + data: { + after: nextAfter, + }, + }); + return { + options: results?.map(({ + id: value, name: label, + }) => ({ + value, + label, + })) || [], + context: { + nextAfter: paging?.next.after, + }, + }; + }, + }, + campaignId: { + type: "string", + label: "Campaign ID", + description: "The ID of the campaign to create the email in.", + async options({ prevContext }) { + const { nextAfter } = prevContext; + const { + results, paging, + } = await this.listCampaigns({ + data: { + after: nextAfter, + }, + }); + return { + options: results?.map(({ id }) => id) || [], + context: { + nextAfter: paging?.next.after, + }, + }; + }, + }, + emailId: { + type: "string", + label: "Marketing Email ID", + description: "The ID of the marketing email to clone.", + async options({ prevContext }) { + const { nextAfter } = prevContext; + const { + results, paging, + } = await this.listMarketingEmails({ + data: { + after: nextAfter, + }, + }); + return { + options: results?.map(({ + id: value, name: label, + }) => ({ + value, + label, + })) || [], + context: { + nextAfter: paging?.next.after, + }, + }; + }, + }, }, methods: { _getHeaders() { @@ -694,15 +872,35 @@ export default { value: unit.id, })) || []; }, - searchCRM({ + async searchCRM({ object, ...opts }) { - return this.makeRequest({ - api: API_PATH.CRMV3, - method: "POST", - endpoint: `/objects/${object}/search`, - ...opts, - }); + // Adding retry logic here since the search endpoint specifically has a per-second rate limit + const MAX_RETRIES = 5; + const BASE_RETRY_DELAY = 500; + let success = false; + let retries = 0; + while (!success) { + try { + const response = await this.makeRequest({ + api: API_PATH.CRMV3, + method: "POST", + endpoint: `/objects/${object}/search`, + ...opts, + }); + return response; + } catch (error) { + if (error.status === 429 && ++retries < MAX_RETRIES) { + // Retry delays basically amount to: + // 1000-1500 ms, 2000-2500 ms, 4000-4500 ms, 8000-8500 ms + const randomDelay = Math.floor(Math.random() * BASE_RETRY_DELAY); + const delay = BASE_RETRY_DELAY * (2 ** retries) + randomDelay; + await new Promise((resolve) => setTimeout(resolve, delay)); + } else { + throw error; + } + } + } }, getBlogPosts(opts = {}) { return this.makeRequest({ @@ -790,13 +988,11 @@ export default { getLists({ listType, ...opts }) { - const basePath = "/lists"; - const path = listType - ? `${basePath}/${listType}` - : basePath; return this.makeRequest({ api: API_PATH.CONTACTS, - endpoint: path, + endpoint: `/lists${listType + ? `/${listType}` + : ""}`, ...opts, }); }, @@ -1142,5 +1338,170 @@ export default { ...opts, }); }, + listPages(opts = {}) { + return this.makeRequest({ + api: API_PATH.CMS, + endpoint: "/pages/site-pages", + ...opts, + }); + }, + listTemplates(opts = {}) { + return this.makeRequest({ + api: API_PATH.CONTENT, + endpoint: "/templates", + ...opts, + }); + }, + listCampaigns(opts = {}) { + return this.makeRequest({ + api: API_PATH.MARKETINGV3, + endpoint: "/campaigns", + ...opts, + }); + }, + listMarketingEmails(opts = {}) { + return this.makeRequest({ + api: API_PATH.MARKETINGV3, + endpoint: "/emails", + ...opts, + }); + }, + listMarketingEvents(opts = {}) { + return this.makeRequest({ + api: API_PATH.MARKETINGV3, + endpoint: "/marketing-events/", + ...opts, + }); + }, + listMarketingForms(opts = {}) { + return this.makeRequest({ + api: API_PATH.MARKETINGV3, + endpoint: "/forms", + ...opts, + }); + }, + getSubscriptionPreferences({ + email, ...opts + }) { + return this.makeRequest({ + api: API_PATH.COMMUNICATION_PREFERENCES, + endpoint: `/statuses/${email}`, + ...opts, + }); + }, + createForm(opts = {}) { + return this.makeRequest({ + method: "POST", + api: API_PATH.MARKETINGV3, + endpoint: "/forms", + ...opts, + }); + }, + updateForm({ + formId, ...opts + }) { + return this.makeRequest({ + method: "PATCH", + api: API_PATH.MARKETINGV3, + endpoint: `/forms/${formId}`, + ...opts, + }); + }, + listForms(opts = {}) { + return this.makeRequest({ + api: API_PATH.MARKETINGV3, + endpoint: "/forms", + ...opts, + }); + }, + listSitePages(opts = {}) { + return this.makeRequest({ + api: API_PATH.CMS, + endpoint: "/pages/site-pages", + ...opts, + }); + }, + listLandingPages(opts = {}) { + return this.makeRequest({ + api: API_PATH.CMS, + endpoint: "/pages/landing-pages", + ...opts, + }); + }, + cloneSitePage(opts = {}) { + return this.makeRequest({ + method: "POST", + api: API_PATH.CMS, + endpoint: "/pages/site-pages/clone", + ...opts, + }); + }, + createPage(opts = {}) { + return this.makeRequest({ + method: "POST", + api: API_PATH.CMS, + endpoint: "/pages/site-pages", + ...opts, + }); + }, + updatePage({ + pageId, ...opts + }) { + return this.makeRequest({ + method: "PATCH", + api: API_PATH.CMS, + endpoint: `/pages/site-pages/${pageId}`, + ...opts, + }); + }, + createLandingPage(opts = {}) { + return this.makeRequest({ + method: "POST", + api: API_PATH.CMS, + endpoint: "/pages/landing-pages", + ...opts, + }); + }, + updateLandingPage({ + pageId, ...opts + }) { + return this.makeRequest({ + method: "PATCH", + api: API_PATH.CMS, + endpoint: `/pages/landing-pages/${pageId}`, + ...opts, + }); + }, + listLandingFolders(opts = {}) { + return this.makeRequest({ + api: API_PATH.CMS, + endpoint: "/pages/landing-pages/folders", + ...opts, + }); + }, + createEmail(opts = {}) { + return this.makeRequest({ + method: "POST", + api: API_PATH.MARKETINGV3, + endpoint: "/emails", + ...opts, + }); + }, + cloneEmail(opts = {}) { + return this.makeRequest({ + method: "POST", + api: API_PATH.MARKETINGV3, + endpoint: "/emails/clone", + ...opts, + }); + }, + createContactWorkflow(opts = {}) { + return this.makeRequest({ + method: "POST", + api: API_PATH.AUTOMATIONV4, + endpoint: "/flows", + ...opts, + }); + }, }, }; diff --git a/components/hubspot/package.json b/components/hubspot/package.json index 97609a3e714b9..ac21534642986 100644 --- a/components/hubspot/package.json +++ b/components/hubspot/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/hubspot", - "version": "1.2.4", + "version": "1.6.2", "description": "Pipedream Hubspot Components", "main": "hubspot.app.mjs", "keywords": [ @@ -10,7 +10,7 @@ "homepage": "https://pipedream.com/apps/hubspot", "author": "Pipedream (https://pipedream.com/)", "dependencies": { - "@pipedream/platform": "^3.0.0", + "@pipedream/platform": "^3.1.0", "bottleneck": "^2.19.5" }, "gitHead": "e12480b94cc03bed4808ebc6b13e7fdb3a1ba535", diff --git a/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs b/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs index 945dab8c735af..ca8a4020223ac 100644 --- a/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs +++ b/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-delete-blog-article", name: "Deleted Blog Posts", description: "Emit new event for each deleted blog post.", - version: "0.0.23", + version: "0.0.27", dedupe: "unique", type: "source", methods: { diff --git a/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs b/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs index 3dfb8662f41d6..70a9860f8f535 100644 --- a/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs +++ b/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs @@ -1,5 +1,5 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -7,7 +7,7 @@ export default { key: "hubspot-new-company-property-change", name: "New Company Property Change", description: "Emit new event when a specified property is provided or updated on a company. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies)", - version: "0.0.16", + version: "0.0.20", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs b/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs index d0e0df4689add..41b8996d84fd2 100644 --- a/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs +++ b/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs @@ -1,5 +1,5 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -7,7 +7,7 @@ export default { key: "hubspot-new-contact-property-change", name: "New Contact Property Change", description: "Emit new event when a specified property is provided or updated on a contact. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts)", - version: "0.0.18", + version: "0.0.22", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs b/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs index 86fed846f6826..a78ad74f9462f 100644 --- a/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs +++ b/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs @@ -1,12 +1,12 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; export default { ...common, key: "hubspot-new-custom-object-property-change", name: "New Custom Object Property Change", description: "Emit new event when a specified property is provided or updated on a custom object.", - version: "0.0.8", + version: "0.0.12", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs b/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs index b571138f61d5b..a047e8ed4daa4 100644 --- a/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs +++ b/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs @@ -1,7 +1,9 @@ -import common from "../common/common.mjs"; import { - DEFAULT_LIMIT, DEFAULT_DEAL_PROPERTIES, API_PATH, + API_PATH, + DEFAULT_DEAL_PROPERTIES, + DEFAULT_LIMIT, } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -9,7 +11,7 @@ export default { key: "hubspot-new-deal-in-stage", name: "New Deal In Stage", description: "Emit new event for each new deal in a stage.", - version: "0.0.29", + version: "0.0.33", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs b/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs index e8afc75dacfbc..c9e9918eb4788 100644 --- a/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs +++ b/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs @@ -1,5 +1,5 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -7,7 +7,7 @@ export default { key: "hubspot-new-deal-property-change", name: "New Deal Property Change", description: "Emit new event when a specified property is provided or updated on a deal. [See the documentation](https://developers.hubspot.com/docs/api/crm/deals)", - version: "0.0.17", + version: "0.0.21", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-email-event/new-email-event.mjs b/components/hubspot/sources/new-email-event/new-email-event.mjs index f5c5fc93908cc..1d0c1df69dcab 100644 --- a/components/hubspot/sources/new-email-event/new-email-event.mjs +++ b/components/hubspot/sources/new-email-event/new-email-event.mjs @@ -1,6 +1,6 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT } from "../../common/constants.mjs"; import { EMAIL_EVENT_TYPES } from "../../common/object-types.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -8,7 +8,7 @@ export default { key: "hubspot-new-email-event", name: "New Email Event", description: "Emit new event for each new Hubspot email event.", - version: "0.0.26", + version: "0.0.30", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs b/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs index 67c1b9da052c4..5d4f471371f9c 100644 --- a/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs +++ b/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-new-email-subscriptions-timeline", name: "New Email Subscriptions Timeline", description: "Emit new event when a new email timeline subscription is added for the portal.", - version: "0.0.23", + version: "0.0.27", dedupe: "unique", type: "source", methods: { diff --git a/components/hubspot/sources/new-engagement/new-engagement.mjs b/components/hubspot/sources/new-engagement/new-engagement.mjs index 95f0f7e4c4a98..6b67b5a911410 100644 --- a/components/hubspot/sources/new-engagement/new-engagement.mjs +++ b/components/hubspot/sources/new-engagement/new-engagement.mjs @@ -1,6 +1,6 @@ -import common from "../common/common.mjs"; -import { ENGAGEMENT_TYPES } from "../../common/object-types.mjs"; import { DEFAULT_LIMIT } from "../../common/constants.mjs"; +import { ENGAGEMENT_TYPES } from "../../common/object-types.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -8,7 +8,7 @@ export default { key: "hubspot-new-engagement", name: "New Engagement", description: "Emit new event for each new engagement created. This action returns a maximum of 5000 records at a time, make sure you set a correct time range so you don't miss any events", - version: "0.0.28", + version: "0.0.32", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-event/new-event.mjs b/components/hubspot/sources/new-event/new-event.mjs index 659e4706cec27..0c4e482931d5d 100644 --- a/components/hubspot/sources/new-event/new-event.mjs +++ b/components/hubspot/sources/new-event/new-event.mjs @@ -1,6 +1,6 @@ -import common from "../common/common.mjs"; import { ConfigurationError } from "@pipedream/platform"; import { DEFAULT_LIMIT } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -8,7 +8,7 @@ export default { key: "hubspot-new-event", name: "New Events", description: "Emit new event for each new Hubspot event. Note: Only available for Marketing Hub Enterprise, Sales Hub Enterprise, Service Hub Enterprise, or CMS Hub Enterprise accounts", - version: "0.0.27", + version: "0.0.31", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-form-submission/new-form-submission.mjs b/components/hubspot/sources/new-form-submission/new-form-submission.mjs index e81613576f623..53e1b53ce36e6 100644 --- a/components/hubspot/sources/new-form-submission/new-form-submission.mjs +++ b/components/hubspot/sources/new-form-submission/new-form-submission.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-new-form-submission", name: "New Form Submission", description: "Emit new event for each new submission of a form.", - version: "0.0.28", + version: "0.0.32", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-note/new-note.mjs b/components/hubspot/sources/new-note/new-note.mjs index 3606d15bea3f2..606bf288e49b4 100644 --- a/components/hubspot/sources/new-note/new-note.mjs +++ b/components/hubspot/sources/new-note/new-note.mjs @@ -1,14 +1,14 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT, OBJECT_TYPES, } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; export default { ...common, key: "hubspot-new-note", name: "New Note Created", description: "Emit new event for each new note created. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/engagements/notes#get-%2Fcrm%2Fv3%2Fobjects%2Fnotes)", - version: "1.0.4", + version: "1.0.8", type: "source", dedupe: "unique", methods: { diff --git a/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs b/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs index 32ed9f68257b3..42c1c012df43f 100644 --- a/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs +++ b/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs @@ -1,5 +1,5 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -7,7 +7,7 @@ export default { key: "hubspot-new-or-updated-blog-article", name: "New or Updated Blog Post", description: "Emit new event for each new or updated blog post in Hubspot.", - version: "0.0.10", + version: "0.0.14", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs b/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs index 02f68b425c0e0..f6ecb5245d68f 100644 --- a/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs +++ b/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs @@ -1,7 +1,8 @@ -import common from "../common/common.mjs"; import { - DEFAULT_LIMIT, DEFAULT_COMPANY_PROPERTIES, + DEFAULT_COMPANY_PROPERTIES, + DEFAULT_LIMIT, } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -9,7 +10,7 @@ export default { key: "hubspot-new-or-updated-company", name: "New or Updated Company", description: "Emit new event for each new or updated company in Hubspot.", - version: "0.0.10", + version: "0.0.14", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs b/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs index 153b5904ac7d1..8ed95cbb4f4bd 100644 --- a/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs +++ b/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs @@ -1,7 +1,8 @@ -import common from "../common/common.mjs"; import { - DEFAULT_LIMIT, DEFAULT_CONTACT_PROPERTIES, + DEFAULT_CONTACT_PROPERTIES, + DEFAULT_LIMIT, } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -9,7 +10,7 @@ export default { key: "hubspot-new-or-updated-contact", name: "New or Updated Contact", description: "Emit new event for each new or updated contact in Hubspot.", - version: "0.0.10", + version: "0.0.14", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs b/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs index 08b897c592faf..6d76f04a44079 100644 --- a/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs +++ b/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs @@ -1,5 +1,5 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -7,7 +7,7 @@ export default { key: "hubspot-new-or-updated-crm-object", name: "New or Updated CRM Object", description: "Emit new event each time a CRM Object of the specified object type is updated.", - version: "0.0.23", + version: "0.0.27", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs b/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs index 2ebff11e687f1..082ca80ff7204 100644 --- a/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs +++ b/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs @@ -1,5 +1,5 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -7,7 +7,7 @@ export default { key: "hubspot-new-or-updated-custom-object", name: "New or Updated Custom Object", description: "Emit new event each time a Custom Object of the specified schema is updated.", - version: "0.0.12", + version: "0.0.16", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs b/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs index 74b46dbe0dd58..bb0f8224a70f9 100644 --- a/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs +++ b/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs @@ -1,7 +1,8 @@ -import common from "../common/common.mjs"; import { - DEFAULT_LIMIT, DEFAULT_DEAL_PROPERTIES, + DEFAULT_DEAL_PROPERTIES, + DEFAULT_LIMIT, } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -9,7 +10,7 @@ export default { key: "hubspot-new-or-updated-deal", name: "New or Updated Deal", description: "Emit new event for each new or updated deal in Hubspot", - version: "0.0.10", + version: "0.0.14", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs b/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs index be574e38ea308..a71760ee6b496 100644 --- a/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs +++ b/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs @@ -1,7 +1,7 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT, DEFAULT_LINE_ITEM_PROPERTIES, } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -9,7 +9,7 @@ export default { key: "hubspot-new-or-updated-line-item", name: "New or Updated Line Item", description: "Emit new event for each new line item added or updated in Hubspot.", - version: "0.0.10", + version: "0.0.14", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs b/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs index 60625e6f16807..d8b28d4445dea 100644 --- a/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs +++ b/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs @@ -1,7 +1,7 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT, DEFAULT_PRODUCT_PROPERTIES, } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -9,7 +9,7 @@ export default { key: "hubspot-new-or-updated-product", name: "New or Updated Product", description: "Emit new event for each new or updated product in Hubspot.", - version: "0.0.10", + version: "0.0.14", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs b/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs index 3fc749b0985e3..ced9962fab05f 100644 --- a/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs +++ b/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-new-social-media-message", name: "New Social Media Message", description: "Emit new event when a message is posted from HubSpot to the specified social media channel. Note: Only available for Marketing Hub Enterprise accounts", - version: "0.0.23", + version: "0.0.27", type: "source", dedupe: "unique", props: { diff --git a/components/hubspot/sources/new-task/new-task.mjs b/components/hubspot/sources/new-task/new-task.mjs index d7cdf966cc9f3..e1000b63dc6be 100644 --- a/components/hubspot/sources/new-task/new-task.mjs +++ b/components/hubspot/sources/new-task/new-task.mjs @@ -1,14 +1,14 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT, OBJECT_TYPES, } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; export default { ...common, key: "hubspot-new-task", name: "New Task Created", description: "Emit new event for each new task created. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/engagements/tasks#get-%2Fcrm%2Fv3%2Fobjects%2Ftasks)", - version: "1.0.4", + version: "1.0.8", type: "source", dedupe: "unique", methods: { diff --git a/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs b/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs index 54c54341c58cf..f8f450d390c35 100644 --- a/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs +++ b/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs @@ -1,5 +1,5 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -7,7 +7,7 @@ export default { key: "hubspot-new-ticket-property-change", name: "New Ticket Property Change", description: "Emit new event when a specified property is provided or updated on a ticket. [See the documentation](https://developers.hubspot.com/docs/api/crm/tickets)", - version: "0.0.17", + version: "0.0.21", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-ticket/new-ticket.mjs b/components/hubspot/sources/new-ticket/new-ticket.mjs index 304724eecdff3..1e4db1465d9cd 100644 --- a/components/hubspot/sources/new-ticket/new-ticket.mjs +++ b/components/hubspot/sources/new-ticket/new-ticket.mjs @@ -1,7 +1,7 @@ -import common from "../common/common.mjs"; import { DEFAULT_LIMIT, DEFAULT_TICKET_PROPERTIES, } from "../../common/constants.mjs"; +import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -9,7 +9,7 @@ export default { key: "hubspot-new-ticket", name: "New Ticket", description: "Emit new event for each new ticket created.", - version: "0.0.23", + version: "0.0.27", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot_developer_app/.gitignore b/components/hubspot_developer_app/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/hubspot_developer_app/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/hubspot_developer_app/app/hubspot_developer_app.app.ts b/components/hubspot_developer_app/app/hubspot_developer_app.app.ts deleted file mode 100644 index e5aec5dc7d5c8..0000000000000 --- a/components/hubspot_developer_app/app/hubspot_developer_app.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "hubspot_developer_app", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/hubspot_developer_app/hubspot_developer_app.app.mjs b/components/hubspot_developer_app/hubspot_developer_app.app.mjs new file mode 100644 index 0000000000000..eb6efcd3b81be --- /dev/null +++ b/components/hubspot_developer_app/hubspot_developer_app.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "hubspot_developer_app", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/hubspot_developer_app/package.json b/components/hubspot_developer_app/package.json index c99b9fd1b1748..cb343438abb0d 100644 --- a/components/hubspot_developer_app/package.json +++ b/components/hubspot_developer_app/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/hubspot_developer_app", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream HubSpot (Developer App) Components", - "main": "dist/app/hubspot_developer_app.app.mjs", + "main": "hubspot_developer_app.app.mjs", "keywords": [ "pipedream", "hubspot_developer_app" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/hubspot_developer_app", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/humanitix/.gitignore b/components/humanitix/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/humanitix/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/humanitix/app/humanitix.app.ts b/components/humanitix/app/humanitix.app.ts deleted file mode 100644 index 82eecd4a66d18..0000000000000 --- a/components/humanitix/app/humanitix.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "humanitix", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/humanitix/humanitix.app.mjs b/components/humanitix/humanitix.app.mjs new file mode 100644 index 0000000000000..c3c09bced5ff4 --- /dev/null +++ b/components/humanitix/humanitix.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "humanitix", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/humanitix/package.json b/components/humanitix/package.json index 1ea33cafb807a..84a1c99f66259 100644 --- a/components/humanitix/package.json +++ b/components/humanitix/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/humanitix", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Humanitix Components", - "main": "dist/app/humanitix.app.mjs", + "main": "humanitix.app.mjs", "keywords": [ "pipedream", "humanitix" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/humanitix", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/humanloop/.gitignore b/components/humanloop/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/humanloop/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/humanloop/app/humanloop.app.ts b/components/humanloop/app/humanloop.app.ts deleted file mode 100644 index 97cd74d7afbfb..0000000000000 --- a/components/humanloop/app/humanloop.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "humanloop", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/humanloop/humanloop.app.mjs b/components/humanloop/humanloop.app.mjs new file mode 100644 index 0000000000000..7b5509bbb924a --- /dev/null +++ b/components/humanloop/humanloop.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "humanloop", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/humanloop/package.json b/components/humanloop/package.json index 12fa45eeea47d..0cfad521726e7 100644 --- a/components/humanloop/package.json +++ b/components/humanloop/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/humanloop", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream HumanLoop Components", - "main": "dist/app/humanloop.app.mjs", + "main": "humanloop.app.mjs", "keywords": [ "pipedream", "humanloop" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/humanloop", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/hygraph/.gitignore b/components/hygraph/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/hygraph/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/hygraph/app/hygraph.app.ts b/components/hygraph/app/hygraph.app.ts deleted file mode 100644 index 083c914c53473..0000000000000 --- a/components/hygraph/app/hygraph.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "hygraph", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/hygraph/hygraph.app.mjs b/components/hygraph/hygraph.app.mjs new file mode 100644 index 0000000000000..0d6181ffa1774 --- /dev/null +++ b/components/hygraph/hygraph.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "hygraph", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/hygraph/package.json b/components/hygraph/package.json index 0b258db523242..bc28328dbf082 100644 --- a/components/hygraph/package.json +++ b/components/hygraph/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/hygraph", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Hygraph Components", - "main": "dist/app/hygraph.app.mjs", + "main": "hygraph.app.mjs", "keywords": [ "pipedream", "hygraph" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/hygraph", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/idealpostcodes/.gitignore b/components/idealpostcodes/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/idealpostcodes/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/idealpostcodes/app/idealpostcodes.app.ts b/components/idealpostcodes/app/idealpostcodes.app.ts deleted file mode 100644 index c97b8f777e5b2..0000000000000 --- a/components/idealpostcodes/app/idealpostcodes.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "idealpostcodes", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/idealpostcodes/idealpostcodes.app.mjs b/components/idealpostcodes/idealpostcodes.app.mjs new file mode 100644 index 0000000000000..0d63064dbe934 --- /dev/null +++ b/components/idealpostcodes/idealpostcodes.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "idealpostcodes", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/idealpostcodes/package.json b/components/idealpostcodes/package.json index 1bd25b54c9346..c66d89b36fa9d 100644 --- a/components/idealpostcodes/package.json +++ b/components/idealpostcodes/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/idealpostcodes", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream IdealPostcodes Components", - "main": "dist/app/idealpostcodes.app.mjs", + "main": "idealpostcodes.app.mjs", "keywords": [ "pipedream", "idealpostcodes" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/idealpostcodes", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/idealspot/.gitignore b/components/idealspot/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/idealspot/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/idealspot/app/idealspot.app.ts b/components/idealspot/app/idealspot.app.ts deleted file mode 100644 index e532a43e1c0c6..0000000000000 --- a/components/idealspot/app/idealspot.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "idealspot", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/idealspot/idealspot.app.mjs b/components/idealspot/idealspot.app.mjs new file mode 100644 index 0000000000000..5ec0544f18186 --- /dev/null +++ b/components/idealspot/idealspot.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "idealspot", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/idealspot/package.json b/components/idealspot/package.json index b001d2804ecb9..3fa016646d3b7 100644 --- a/components/idealspot/package.json +++ b/components/idealspot/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/idealspot", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream IdealSpot Components", - "main": "dist/app/idealspot.app.mjs", + "main": "idealspot.app.mjs", "keywords": [ "pipedream", "idealspot" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/idealspot", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/idx_broker/.gitignore b/components/idx_broker/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/idx_broker/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/idx_broker/app/idx_broker.app.ts b/components/idx_broker/app/idx_broker.app.ts deleted file mode 100644 index 8f84280b474a2..0000000000000 --- a/components/idx_broker/app/idx_broker.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "idx_broker", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/idx_broker/idx_broker.app.mjs b/components/idx_broker/idx_broker.app.mjs new file mode 100644 index 0000000000000..ba1847b4b7c2a --- /dev/null +++ b/components/idx_broker/idx_broker.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "idx_broker", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/idx_broker/package.json b/components/idx_broker/package.json index 5e81cbe397ba4..9e7df0a3d157f 100644 --- a/components/idx_broker/package.json +++ b/components/idx_broker/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/idx_broker", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream IDX Broker Components", - "main": "dist/app/idx_broker.app.mjs", + "main": "idx_broker.app.mjs", "keywords": [ "pipedream", "idx_broker" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/idx_broker", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/imgur/package.json b/components/imgur/package.json index 023aef91e9452..24aff4cbb88d7 100644 --- a/components/imgur/package.json +++ b/components/imgur/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/imgur", - "version": "2.0.0", + "version": "2.0.1", "description": "The imgur app file for Pipedream action & trigger integrations.", "main": "imgur.app.mjs", "scripts": { @@ -16,6 +16,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.1.0" + "@pipedream/platform": "^3.1.0", + "form-data": "^4.0.0" } } diff --git a/components/implisense_api/.gitignore b/components/implisense_api/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/implisense_api/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/implisense_api/app/implisense_api.app.ts b/components/implisense_api/app/implisense_api.app.ts deleted file mode 100644 index 2c30ef65143ee..0000000000000 --- a/components/implisense_api/app/implisense_api.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "implisense_api", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/implisense_api/implisense_api.app.mjs b/components/implisense_api/implisense_api.app.mjs new file mode 100644 index 0000000000000..1e43fc6a34574 --- /dev/null +++ b/components/implisense_api/implisense_api.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "implisense_api", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/implisense_api/package.json b/components/implisense_api/package.json index e356b20507e4a..83b7372c2eaa5 100644 --- a/components/implisense_api/package.json +++ b/components/implisense_api/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/implisense_api", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Implisense API Components", - "main": "dist/app/implisense_api.app.mjs", + "main": "implisense_api.app.mjs", "keywords": [ "pipedream", "implisense_api" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/implisense_api", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/infinity/package.json b/components/infinity/package.json index ab3742e1f082c..0e53259b28d1b 100644 --- a/components/infinity/package.json +++ b/components/infinity/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/infinity", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Infinity Components", "main": "infinity.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/infusionsoft/tsconfig.json b/components/infusionsoft/tsconfig.json index 873d4ff05af64..3a9389484d040 100644 --- a/components/infusionsoft/tsconfig.json +++ b/components/infusionsoft/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "types" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/intuiface/package.json b/components/intuiface/package.json index 38c9d876fe0bb..893ad3e4419a7 100644 --- a/components/intuiface/package.json +++ b/components/intuiface/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/intuiface", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Intuiface Components", - "main": "dist/app/intuiface.app.mjs", + "main": "intuiface.app.mjs", "keywords": [ "pipedream", "intuiface" @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/ionos_hosting_services/ionos_hosting_services.app.mjs b/components/ionos_hosting_services/ionos_hosting_services.app.mjs new file mode 100644 index 0000000000000..cb3b83820790f --- /dev/null +++ b/components/ionos_hosting_services/ionos_hosting_services.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "ionos_hosting_services", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/ionos_hosting_services/package.json b/components/ionos_hosting_services/package.json new file mode 100644 index 0000000000000..81f1eaac031b3 --- /dev/null +++ b/components/ionos_hosting_services/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/ionos_hosting_services", + "version": "0.0.1", + "description": "Pipedream IONOS Hosting Services Components", + "main": "ionos_hosting_services.app.mjs", + "keywords": [ + "pipedream", + "ionos_hosting_services" + ], + "homepage": "https://pipedream.com/apps/ionos_hosting_services", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/ipbase/package.json b/components/ipbase/package.json index b2f2822299a9d..3e0c2a60a188f 100644 --- a/components/ipbase/package.json +++ b/components/ipbase/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/ipbase", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream ipbase Components", "main": "ipbase.app.mjs", "keywords": [ @@ -12,5 +12,7 @@ "publishConfig": { "access": "public" }, - "dependencies": {} + "dependencies": { + "@pipedream/platform": "^3.1.0" + } } diff --git a/components/iqair_airvisual/.gitignore b/components/iqair_airvisual/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/iqair_airvisual/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/iqair_airvisual/app/iqair_airvisual.app.ts b/components/iqair_airvisual/app/iqair_airvisual.app.ts deleted file mode 100644 index ac3be34586972..0000000000000 --- a/components/iqair_airvisual/app/iqair_airvisual.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "iqair_airvisual", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/iqair_airvisual/iqair_airvisual.app.mjs b/components/iqair_airvisual/iqair_airvisual.app.mjs new file mode 100644 index 0000000000000..2d08acf4c947f --- /dev/null +++ b/components/iqair_airvisual/iqair_airvisual.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "iqair_airvisual", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/iqair_airvisual/package.json b/components/iqair_airvisual/package.json index 4bc6dd6813473..09c385853db06 100644 --- a/components/iqair_airvisual/package.json +++ b/components/iqair_airvisual/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/iqair_airvisual", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream IQAir AirVisual Components", - "main": "dist/app/iqair_airvisual.app.mjs", + "main": "iqair_airvisual.app.mjs", "keywords": [ "pipedream", "iqair_airvisual" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/iqair_airvisual", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/isn/.gitignore b/components/isn/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/isn/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/isn/app/isn.app.ts b/components/isn/app/isn.app.ts deleted file mode 100644 index a2f6fbda87716..0000000000000 --- a/components/isn/app/isn.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "isn", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/isn/isn.app.mjs b/components/isn/isn.app.mjs new file mode 100644 index 0000000000000..3412cef66b885 --- /dev/null +++ b/components/isn/isn.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "isn", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/isn/package.json b/components/isn/package.json index 8294c5bbb0670..1938e0e802c36 100644 --- a/components/isn/package.json +++ b/components/isn/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/isn", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream ISN Components", - "main": "dist/app/isn.app.mjs", + "main": "isn.app.mjs", "keywords": [ "pipedream", "isn" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/isn", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/jellyreach/.gitignore b/components/jellyreach/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/jellyreach/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/jellyreach/app/jellyreach.app.ts b/components/jellyreach/app/jellyreach.app.ts deleted file mode 100644 index 0a3fcf6c3c5eb..0000000000000 --- a/components/jellyreach/app/jellyreach.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "jellyreach", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/jellyreach/jellyreach.app.mjs b/components/jellyreach/jellyreach.app.mjs new file mode 100644 index 0000000000000..2f78b3bb5be96 --- /dev/null +++ b/components/jellyreach/jellyreach.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "jellyreach", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/jellyreach/package.json b/components/jellyreach/package.json index a32f6c46726d3..b0bded2f3f36d 100644 --- a/components/jellyreach/package.json +++ b/components/jellyreach/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/jellyreach", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Jellyreach Components", - "main": "dist/app/jellyreach.app.mjs", + "main": "jellyreach.app.mjs", "keywords": [ "pipedream", "jellyreach" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/jellyreach", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs b/components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs index 978434f3586a9..7b6c16a2bf2e4 100644 --- a/components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs +++ b/components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs @@ -6,7 +6,7 @@ export default { key: "jira-add-attachment-to-issue", name: "Add Attachment To Issue", description: "Adds an attachment to an issue, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-issue-issueidorkey-attachments-post)", - version: "1.0.2", + version: "1.0.4", type: "action", props: { jira, diff --git a/components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs b/components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs index 17dbec1df532d..0270ca0aa8053 100644 --- a/components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs +++ b/components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs @@ -5,7 +5,7 @@ export default { key: "jira-add-comment-to-issue", name: "Add Comment To Issue", description: "Adds a new comment to an issue, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-post)", - version: "0.1.10", + version: "0.1.12", type: "action", props: { jira, diff --git a/components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs b/components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs index dfca36302ab3b..2c94e1c94b1a5 100644 --- a/components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs +++ b/components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs @@ -6,7 +6,7 @@ export default { key: "jira-add-multiple-attachments-to-issue", name: "Add Multiple Attachments To Issue", description: "Adds multiple attachments to an issue, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-issue-issueidorkey-attachments-post)", - version: "1.0.2", + version: "1.0.4", type: "action", props: { jira, diff --git a/components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs b/components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs index 1a2a3caf8c4a5..b08f236b9902c 100644 --- a/components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs +++ b/components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs @@ -3,7 +3,7 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-add-watcher-to-issue", name: "Add Watcher To Issue", - version: "0.0.9", + version: "0.0.11", description: "Adds a user as a watcher of an issue by passing the account ID of the user, For example, `5b10ac8d82e05b22cc7d4ef5`, If no user is specified the calling user is added. [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-watchers/#api-rest-api-3-issue-issueidorkey-watchers-post)", type: "action", props: { diff --git a/components/jira/actions/assign-issue/assign-issue.mjs b/components/jira/actions/assign-issue/assign-issue.mjs index 00e99759c3d25..71c0441c847ea 100644 --- a/components/jira/actions/assign-issue/assign-issue.mjs +++ b/components/jira/actions/assign-issue/assign-issue.mjs @@ -3,7 +3,7 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-assign-issue", name: "Assign Issue", - version: "0.0.9", + version: "0.0.11", description: "Assigns an issue to a user. [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-assignee-put)", type: "action", props: { diff --git a/components/jira/actions/common/issue.mjs b/components/jira/actions/common/issue.mjs index d0249e8a97bfc..4bcdbc487821e 100644 --- a/components/jira/actions/common/issue.mjs +++ b/components/jira/actions/common/issue.mjs @@ -52,11 +52,13 @@ export default { cloudId, } = this; const maxResults = 50; - const { issues } = await app.getIssues({ + const { issues } = await app.searchIssues({ cloudId, params: { + jql: "project is not EMPTY ORDER BY created DESC", maxResults, startAt, + fields: "id,key", }, }); return { diff --git a/components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs b/components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs index c3311b633a9c7..771993d920fff 100644 --- a/components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs +++ b/components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs @@ -1,11 +1,11 @@ -import app from "../../jira.app.mjs"; import utils from "../../common/utils.mjs"; +import app from "../../jira.app.mjs"; export default { key: "jira-create-custom-field-options-context", name: "Create Custom Field Options (Context)", description: "Create a context for custom field options. [See the documentation here](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-post).", - version: "0.0.2", + version: "0.0.4", type: "action", props: { app, diff --git a/components/jira/actions/create-issue/create-issue.mjs b/components/jira/actions/create-issue/create-issue.mjs index 4723106ab1cd4..d19490685c5e7 100644 --- a/components/jira/actions/create-issue/create-issue.mjs +++ b/components/jira/actions/create-issue/create-issue.mjs @@ -7,7 +7,7 @@ export default { key: "jira-create-issue", name: "Create Issue", description: "Creates an issue or, where the option to create subtasks is enabled in Jira, a subtask, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-post)", - version: "0.1.21", + version: "0.1.23", type: "action", props: { ...common.props, diff --git a/components/jira/actions/create-version/create-version.mjs b/components/jira/actions/create-version/create-version.mjs index 0a2a9bb071330..64864d1beab95 100644 --- a/components/jira/actions/create-version/create-version.mjs +++ b/components/jira/actions/create-version/create-version.mjs @@ -4,7 +4,7 @@ export default { key: "jira-create-version", name: "Create Jira Version in project", description: "Creates a project version., [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/#api-rest-api-3-version-post)", - version: "0.1.10", + version: "0.1.12", type: "action", props: { jira, diff --git a/components/jira/actions/delete-project/delete-project.mjs b/components/jira/actions/delete-project/delete-project.mjs index 8b7b3d5424c93..23022f433fbb0 100644 --- a/components/jira/actions/delete-project/delete-project.mjs +++ b/components/jira/actions/delete-project/delete-project.mjs @@ -4,7 +4,7 @@ export default { key: "jira-delete-project", name: "Delete Project", description: "Deletes a project, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-projectidorkey-delete)", - version: "0.1.10", + version: "0.1.12", type: "action", props: { jira, diff --git a/components/jira/actions/get-all-projects/get-all-projects.mjs b/components/jira/actions/get-all-projects/get-all-projects.mjs index 42c92dd5f1a49..2d9676a2266f6 100644 --- a/components/jira/actions/get-all-projects/get-all-projects.mjs +++ b/components/jira/actions/get-all-projects/get-all-projects.mjs @@ -4,7 +4,7 @@ export default { key: "jira-get-all-projects", name: "Get All Projects", description: "Gets metadata on all projects, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-project-get)", - version: "0.1.11", + version: "0.1.13", type: "action", props: { jira, diff --git a/components/jira/actions/get-issue/get-issue.mjs b/components/jira/actions/get-issue/get-issue.mjs index cad55f21eea39..0f2037df49b2b 100644 --- a/components/jira/actions/get-issue/get-issue.mjs +++ b/components/jira/actions/get-issue/get-issue.mjs @@ -4,7 +4,7 @@ export default { key: "jira-get-issue", name: "Get Issue", description: "Gets the details for an issue. [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get)", - version: "0.1.12", + version: "0.1.14", type: "action", props: { jira, diff --git a/components/jira/actions/get-task/get-task.mjs b/components/jira/actions/get-task/get-task.mjs index 458dcb635a9d6..10c8e35f658e2 100644 --- a/components/jira/actions/get-task/get-task.mjs +++ b/components/jira/actions/get-task/get-task.mjs @@ -4,7 +4,7 @@ export default { key: "jira-get-task", name: "Get Task", description: "Gets the status of a long-running asynchronous task, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-get)", - version: "0.1.10", + version: "0.1.12", type: "action", props: { jira, diff --git a/components/jira/actions/get-transitions/get-transitions.mjs b/components/jira/actions/get-transitions/get-transitions.mjs index 2d353c36c4f38..191dbc4b58828 100644 --- a/components/jira/actions/get-transitions/get-transitions.mjs +++ b/components/jira/actions/get-transitions/get-transitions.mjs @@ -4,7 +4,7 @@ export default { key: "jira-get-transitions", name: "Get Transitions", description: "Gets either all transitions or a transition that can be performed by the user on an issue, based on the issue's status, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-get)", - version: "0.1.10", + version: "0.1.12", type: "action", props: { jira, diff --git a/components/jira/actions/get-user/get-user.mjs b/components/jira/actions/get-user/get-user.mjs index 3caaf78809953..6086adbb75077 100644 --- a/components/jira/actions/get-user/get-user.mjs +++ b/components/jira/actions/get-user/get-user.mjs @@ -4,7 +4,7 @@ export default { key: "jira-get-user", name: "Get User", description: "Gets details of user, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-get)", - version: "0.1.10", + version: "0.1.12", type: "action", props: { jira, diff --git a/components/jira/actions/get-users/get-users.mjs b/components/jira/actions/get-users/get-users.mjs index 54f10ccff3487..0c9f48e1c0edf 100644 --- a/components/jira/actions/get-users/get-users.mjs +++ b/components/jira/actions/get-users/get-users.mjs @@ -4,7 +4,7 @@ export default { key: "jira-get-users", name: "Get Users", description: "Gets details of a list of users. [See docs here](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-search-get)", - version: "0.0.5", + version: "0.0.7", type: "action", props: { jira, diff --git a/components/jira/actions/list-issue-comments/list-issue-comments.mjs b/components/jira/actions/list-issue-comments/list-issue-comments.mjs index e491b2e397209..4b963b0ba3b8a 100644 --- a/components/jira/actions/list-issue-comments/list-issue-comments.mjs +++ b/components/jira/actions/list-issue-comments/list-issue-comments.mjs @@ -4,7 +4,7 @@ export default { key: "jira-list-issue-comments", name: "List Issue Comments", description: "Lists all comments for an issue, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-get)", - version: "0.1.10", + version: "0.1.12", type: "action", props: { jira, diff --git a/components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs b/components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs index bf0e753f8c800..1b320bc7033a9 100644 --- a/components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs +++ b/components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs @@ -4,7 +4,7 @@ export default { name: "Search Issues with JQL", description: "Search for issues using JQL (Jira Query Language). [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-jql-get)", key: "jira-search-issues-with-jql", - version: "0.0.2", + version: "0.0.4", type: "action", props: { jira, @@ -90,17 +90,9 @@ export default { optional: true, }, }, - methods: { - searchIssues(args = {}) { - return this.jira._makeRequest({ - path: "/search/jql", - ...args, - }); - }, - }, async run({ $ }) { try { - const response = await this.searchIssues({ + const response = await this.jira.searchIssues({ $, cloudId: this.cloudId, params: { diff --git a/components/jira/actions/transition-issue/transition-issue.mjs b/components/jira/actions/transition-issue/transition-issue.mjs index 0f3e6539ead76..4d9ff2c24138e 100644 --- a/components/jira/actions/transition-issue/transition-issue.mjs +++ b/components/jira/actions/transition-issue/transition-issue.mjs @@ -5,7 +5,7 @@ export default { key: "jira-transition-issue", name: "Transition Issue", description: "Performs an issue transition and, if the transition has a screen, updates the fields from the transition screen, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-post)", - version: "0.1.12", + version: "0.1.14", type: "action", props: { jira, diff --git a/components/jira/actions/update-comment/update-comment.mjs b/components/jira/actions/update-comment/update-comment.mjs index 0e5ab14cf57d8..9208299adf299 100644 --- a/components/jira/actions/update-comment/update-comment.mjs +++ b/components/jira/actions/update-comment/update-comment.mjs @@ -5,7 +5,7 @@ export default { key: "jira-update-comment", name: "Update Comment", description: "Updates a comment, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-id-put)", - version: "0.1.10", + version: "0.1.12", type: "action", props: { jira, diff --git a/components/jira/actions/update-issue/update-issue.mjs b/components/jira/actions/update-issue/update-issue.mjs index 0a4413d42311a..b15c7a11b9def 100644 --- a/components/jira/actions/update-issue/update-issue.mjs +++ b/components/jira/actions/update-issue/update-issue.mjs @@ -1,14 +1,14 @@ +import { ConfigurationError } from "@pipedream/platform"; +import constants from "../../common/constants.mjs"; import utils from "../../common/utils.mjs"; import common from "../common/issue.mjs"; -import constants from "../../common/constants.mjs"; -import { ConfigurationError } from "@pipedream/platform"; export default { ...common, key: "jira-update-issue", name: "Update Issue", description: "Updates an issue. A transition may be applied and issue properties updated as part of the edit, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put)", - version: "0.2.14", + version: "0.2.16", type: "action", props: { ...common.props, @@ -20,7 +20,6 @@ export default { cloudId, }), ], - optional: true, }, issueIdOrKey: { reloadProps: true, diff --git a/components/jira/jira.app.mjs b/components/jira/jira.app.mjs index 2cc58a0d7f4e5..78b78b94b7337 100644 --- a/components/jira/jira.app.mjs +++ b/components/jira/jira.app.mjs @@ -93,11 +93,13 @@ export default { }) { let { startAt } = prevContext || {}; const pageSize = 50; - const resp = await this.getIssues({ + const resp = await this.searchIssues({ cloudId, params: { + jql: "project is not EMPTY ORDER BY created DESC", startAt, maxResults: pageSize, + fields: "id,key", }, }); startAt = startAt > 0 @@ -461,9 +463,9 @@ export default { ...args, }); }, - getIssues(args = {}) { + searchIssues(args = {}) { return this._makeRequest({ - path: "/search", + path: "/search/jql", ...args, }); }, diff --git a/components/jira/package.json b/components/jira/package.json index f26452d109cc0..cf9fa35512055 100644 --- a/components/jira/package.json +++ b/components/jira/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/jira", - "version": "1.0.2", + "version": "1.0.4", "description": "Pipedream Jira Components", "main": "jira.app.mjs", "keywords": [ diff --git a/components/jira/sources/events/events.mjs b/components/jira/sources/events/events.mjs index d2e54f6b5d6f1..2c4b87a6df895 100644 --- a/components/jira/sources/events/events.mjs +++ b/components/jira/sources/events/events.mjs @@ -5,7 +5,7 @@ export default { key: "jira-events", name: "New Event", description: "Emit new event when an event with subscribed event source triggered, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-webhooks/#api-rest-api-3-webhook-post)", - version: "0.0.11", + version: "0.0.13", type: "source", dedupe: "unique", ...common, diff --git a/components/jira/sources/issue-created/issue-created.mjs b/components/jira/sources/issue-created/issue-created.mjs index 8cb2f3be41826..ac3b65678f222 100644 --- a/components/jira/sources/issue-created/issue-created.mjs +++ b/components/jira/sources/issue-created/issue-created.mjs @@ -4,7 +4,7 @@ export default { key: "jira-issue-created", name: "New Issue Created Event (Instant)", description: "Emit new event when an issue is created. Note that Jira supports only one webhook, if more sources are needed please use `New Event` source and select multiple events.", - version: "0.0.11", + version: "0.0.13", type: "source", dedupe: "unique", ...common, diff --git a/components/jira/sources/issue-deleted/issue-deleted.mjs b/components/jira/sources/issue-deleted/issue-deleted.mjs index 5abbd63ea09c5..1193bbc717be7 100644 --- a/components/jira/sources/issue-deleted/issue-deleted.mjs +++ b/components/jira/sources/issue-deleted/issue-deleted.mjs @@ -4,7 +4,7 @@ export default { key: "jira-issue-deleted", name: "New Issue Deleted Event (Instant)", description: "Emit new event when an issue is deleted. Note that Jira supports only one webhook, if more sources are needed please use `New Event` source and select multiple events.", - version: "0.0.11", + version: "0.0.13", type: "source", dedupe: "unique", ...common, diff --git a/components/jira/sources/issue-updated/issue-updated.mjs b/components/jira/sources/issue-updated/issue-updated.mjs index 7999b96cdd3ea..7d2147ba52b0e 100644 --- a/components/jira/sources/issue-updated/issue-updated.mjs +++ b/components/jira/sources/issue-updated/issue-updated.mjs @@ -4,7 +4,7 @@ export default { key: "jira-issue-updated", name: "New Issue Updated Event (Instant)", description: "Emit new event when an issue is updated. Note that Jira supports only one webhook, if more sources are needed please use `New Event` source and select multiple events.", - version: "0.0.11", + version: "0.0.13", type: "source", dedupe: "unique", ...common, diff --git a/components/junip/.gitignore b/components/junip/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/junip/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/junip/app/junip.app.ts b/components/junip/app/junip.app.ts deleted file mode 100644 index 37d3f09a8deb0..0000000000000 --- a/components/junip/app/junip.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "junip", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/junip/junip.app.mjs b/components/junip/junip.app.mjs new file mode 100644 index 0000000000000..68baf1bb8c0e3 --- /dev/null +++ b/components/junip/junip.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "junip", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/junip/package.json b/components/junip/package.json index 06da53ab6761d..08e9f356a2ed1 100644 --- a/components/junip/package.json +++ b/components/junip/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/junip", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Junip Components", - "main": "dist/app/junip.app.mjs", + "main": "junip.app.mjs", "keywords": [ "pipedream", "junip" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/junip", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/jvzoo/package.json b/components/jvzoo/package.json index 05eee4e5fdff2..6ae1f19d24276 100644 --- a/components/jvzoo/package.json +++ b/components/jvzoo/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/jvzoo", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Jvzoo Components", "main": "jvzoo.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/kakao/.gitignore b/components/kakao/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/kakao/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/kakao/app/kakao.app.ts b/components/kakao/app/kakao.app.ts deleted file mode 100644 index 1ce6b4a6d503f..0000000000000 --- a/components/kakao/app/kakao.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "kakao", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/kakao/kakao.app.mjs b/components/kakao/kakao.app.mjs new file mode 100644 index 0000000000000..957333bd1170f --- /dev/null +++ b/components/kakao/kakao.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "kakao", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/kakao/package.json b/components/kakao/package.json index 3639226dc2628..6e712f2a61adf 100644 --- a/components/kakao/package.json +++ b/components/kakao/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/kakao", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Kakao Components", - "main": "dist/app/kakao.app.mjs", + "main": "kakao.app.mjs", "keywords": [ "pipedream", "kakao" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/kakao", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/kanbanflow/package.json b/components/kanbanflow/package.json index d8b3346e7b1cb..ccad5fe09f011 100644 --- a/components/kanbanflow/package.json +++ b/components/kanbanflow/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/kanbanflow", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream KanbanFlow Components", "main": "dist/app/kanbanflow.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/kanbanflow/tsconfig.json b/components/kanbanflow/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/kanbanflow/tsconfig.json +++ b/components/kanbanflow/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/karbon/.gitignore b/components/karbon/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/karbon/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/karbon/app/karbon.app.ts b/components/karbon/app/karbon.app.ts deleted file mode 100644 index bc53e7370c631..0000000000000 --- a/components/karbon/app/karbon.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "karbon", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/karbon/karbon.app.mjs b/components/karbon/karbon.app.mjs new file mode 100644 index 0000000000000..9dad9baab6d8a --- /dev/null +++ b/components/karbon/karbon.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "karbon", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/karbon/package.json b/components/karbon/package.json index 6e534393e6bdd..9e577194eac17 100644 --- a/components/karbon/package.json +++ b/components/karbon/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/karbon", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Karbon Components", - "main": "dist/app/karbon.app.mjs", + "main": "karbon.app.mjs", "keywords": [ "pipedream", "karbon" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/karbon", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/kartra/.gitignore b/components/kartra/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/kartra/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/kartra/app/kartra.app.ts b/components/kartra/app/kartra.app.ts deleted file mode 100644 index 24ba8e8a55d1b..0000000000000 --- a/components/kartra/app/kartra.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "kartra", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/kartra/kartra.app.mjs b/components/kartra/kartra.app.mjs new file mode 100644 index 0000000000000..e7a84cd32fadd --- /dev/null +++ b/components/kartra/kartra.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "kartra", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/kartra/package.json b/components/kartra/package.json index 64fec10bcdcba..51aba6114aac6 100644 --- a/components/kartra/package.json +++ b/components/kartra/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/kartra", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Kartra Components", - "main": "dist/app/kartra.app.mjs", + "main": "kartra.app.mjs", "keywords": [ "pipedream", "kartra" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/kartra", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/keen_io/.gitignore b/components/keen_io/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/keen_io/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/keen_io/app/keen_io.app.ts b/components/keen_io/app/keen_io.app.ts deleted file mode 100644 index d6d969eb00621..0000000000000 --- a/components/keen_io/app/keen_io.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "keen_io", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/keen_io/keen_io.app.mjs b/components/keen_io/keen_io.app.mjs new file mode 100644 index 0000000000000..684eb1158ff87 --- /dev/null +++ b/components/keen_io/keen_io.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "keen_io", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/keen_io/package.json b/components/keen_io/package.json index ae55e62714151..dc8d35c4a3e43 100644 --- a/components/keen_io/package.json +++ b/components/keen_io/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/keen_io", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Keen.io Components", - "main": "dist/app/keen_io.app.mjs", + "main": "keen_io.app.mjs", "keywords": [ "pipedream", "keen_io" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/keen_io", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/key_app_demo_1/.gitignore b/components/key_app_demo_1/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/key_app_demo_1/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/key_app_demo_1/app/key_app_demo_1.app.ts b/components/key_app_demo_1/app/key_app_demo_1.app.ts deleted file mode 100644 index f960a8628eb02..0000000000000 --- a/components/key_app_demo_1/app/key_app_demo_1.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "key_app_demo_1", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/key_app_demo_1/key_app_demo_1.app.mjs b/components/key_app_demo_1/key_app_demo_1.app.mjs new file mode 100644 index 0000000000000..413c7a2d8e50b --- /dev/null +++ b/components/key_app_demo_1/key_app_demo_1.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "key_app_demo_1", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/key_app_demo_1/package.json b/components/key_app_demo_1/package.json index 6bb07339806d5..7904efc960bb5 100644 --- a/components/key_app_demo_1/package.json +++ b/components/key_app_demo_1/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/key_app_demo_1", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Key App Demo 1 Components", - "main": "dist/app/key_app_demo_1.app.mjs", + "main": "key_app_demo_1.app.mjs", "keywords": [ "pipedream", "key_app_demo_1" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/key_app_demo_1", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/kintone/.gitignore b/components/kintone/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/kintone/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/kintone/app/kintone.app.ts b/components/kintone/app/kintone.app.ts deleted file mode 100644 index f641fad765359..0000000000000 --- a/components/kintone/app/kintone.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "kintone", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/kintone/kintone.app.mjs b/components/kintone/kintone.app.mjs new file mode 100644 index 0000000000000..c5856ba7b92c3 --- /dev/null +++ b/components/kintone/kintone.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "kintone", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/kintone/package.json b/components/kintone/package.json index d0b9e5649543b..331b595ce5e92 100644 --- a/components/kintone/package.json +++ b/components/kintone/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/kintone", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Kintone Components", - "main": "dist/app/kintone.app.mjs", + "main": "kintone.app.mjs", "keywords": [ "pipedream", "kintone" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/kintone", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/kiwihr/package.json b/components/kiwihr/package.json index e864a91de979a..ac5f3658c4c36 100644 --- a/components/kiwihr/package.json +++ b/components/kiwihr/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/kiwihr", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream kiwiHR Components", "main": "kiwihr.app.mjs", "keywords": [ @@ -13,6 +13,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.0.3" + "@pipedream/platform": "^3.1.0", + "graphql-request": "^6.0.0" } } diff --git a/components/knocommerce/knocommerce.app.mjs b/components/knocommerce/knocommerce.app.mjs new file mode 100644 index 0000000000000..e2267941f90ef --- /dev/null +++ b/components/knocommerce/knocommerce.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "knocommerce", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/knocommerce/package.json b/components/knocommerce/package.json new file mode 100644 index 0000000000000..ce645bd842dde --- /dev/null +++ b/components/knocommerce/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/knocommerce", + "version": "0.0.1", + "description": "Pipedream KnoCommerce Components", + "main": "knocommerce.app.mjs", + "keywords": [ + "pipedream", + "knocommerce" + ], + "homepage": "https://pipedream.com/apps/knocommerce", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/knowbe4/.gitignore b/components/knowbe4/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/knowbe4/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/knowbe4/app/knowbe4.app.ts b/components/knowbe4/app/knowbe4.app.ts deleted file mode 100644 index f3d21ab185d5d..0000000000000 --- a/components/knowbe4/app/knowbe4.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "knowbe4", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/knowbe4/knowbe4.app.mjs b/components/knowbe4/knowbe4.app.mjs new file mode 100644 index 0000000000000..8373f018f27d2 --- /dev/null +++ b/components/knowbe4/knowbe4.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "knowbe4", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/knowbe4/package.json b/components/knowbe4/package.json index d758c2368859f..eed3cca998622 100644 --- a/components/knowbe4/package.json +++ b/components/knowbe4/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/knowbe4", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream KnowBe4 Components", - "main": "dist/app/knowbe4.app.mjs", + "main": "knowbe4.app.mjs", "keywords": [ "pipedream", "knowbe4" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/knowbe4", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/kraken_io/kraken_io.app.mjs b/components/kraken_io/kraken_io.app.mjs index cf89340420b82..98bfa910d850a 100644 --- a/components/kraken_io/kraken_io.app.mjs +++ b/components/kraken_io/kraken_io.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/krispcall/actions/add-contact/add-contact.mjs b/components/krispcall/actions/add-contact/add-contact.mjs index 66cd7fdac227c..bbb8dc6833f4b 100644 --- a/components/krispcall/actions/add-contact/add-contact.mjs +++ b/components/krispcall/actions/add-contact/add-contact.mjs @@ -3,8 +3,8 @@ import krispcall from "../../krispcall.app.mjs"; export default { key: "krispcall-add-contact", name: "Add Contact", - description: "Creates a new contact. [See the documentation](https://documenter.getpostman.com/view/32476792/2sA3dxFCaL)", - version: "0.0.4", + description: "Creates a new contact. [See the documentation](https://documenter.getpostman.com/view/38507826/2sB2xEA8V5#12ee9977-7639-479c-8931-d92f7d7f9dfe)", + version: "0.0.6", type: "action", props: { krispcall, diff --git a/components/krispcall/actions/delete-contact/delete-contact.mjs b/components/krispcall/actions/delete-contact/delete-contact.mjs index d8f0a193bf907..329efd50f5f9b 100644 --- a/components/krispcall/actions/delete-contact/delete-contact.mjs +++ b/components/krispcall/actions/delete-contact/delete-contact.mjs @@ -4,8 +4,8 @@ import krispcall from "../../krispcall.app.mjs"; export default { key: "krispcall-delete-contact", name: "Delete Contact", - description: "Deletes a list of contacts. [See the documentation](https://documenter.getpostman.com/view/32476792/2sA3dxFCaL)", - version: "0.0.4", + description: "Deletes a list of contacts. [See the documentation](https://documenter.getpostman.com/view/38507826/2sB2xEA8V5#fa88b9ed-84fe-49f7-acc1-a37169fc6cb0)", + version: "0.0.6", type: "action", props: { krispcall, diff --git a/components/krispcall/actions/new-mms/new-mms.mjs b/components/krispcall/actions/new-mms/new-mms.mjs index 93849eccd43c7..661db2266fc3e 100644 --- a/components/krispcall/actions/new-mms/new-mms.mjs +++ b/components/krispcall/actions/new-mms/new-mms.mjs @@ -3,8 +3,8 @@ import krispcall from "../../krispcall.app.mjs"; export default { key: "krispcall-new-mms", name: "Send New MMS", - description: "Send a new MMS to a contact. [See the documentation](https://documenter.getpostman.com/view/32476792/2sA3dxFCaL)", - version: "0.0.4", + description: "Send a new MMS to a contact. [See the documentation](https://documenter.getpostman.com/view/38507826/2sB2xEA8V5#a5e31a96-ff7a-48cf-9f12-e1215e90970a)", + version: "0.0.6", type: "action", props: { krispcall, diff --git a/components/krispcall/actions/new-sms/new-sms.mjs b/components/krispcall/actions/new-sms/new-sms.mjs index fca726ad81cda..7563ef924c982 100644 --- a/components/krispcall/actions/new-sms/new-sms.mjs +++ b/components/krispcall/actions/new-sms/new-sms.mjs @@ -3,8 +3,8 @@ import krispcall from "../../krispcall.app.mjs"; export default { key: "krispcall-new-sms", name: "Send New SMS", - description: "Send a new SMS to a number. [See the documentation](https://documenter.getpostman.com/view/32476792/2sA3dxFCaL)", - version: "0.0.4", + description: "Send a new SMS to a number. [See the documentation](https://documenter.getpostman.com/view/38507826/2sB2xEA8V5#be2f5790-43b5-482e-9f4e-c9e8cb9fd633)", + version: "0.0.6", type: "action", props: { krispcall, diff --git a/components/krispcall/krispcall.app.mjs b/components/krispcall/krispcall.app.mjs index 9c8b2f09b67a6..fa5b6de74c1ca 100644 --- a/components/krispcall/krispcall.app.mjs +++ b/components/krispcall/krispcall.app.mjs @@ -7,7 +7,7 @@ export default { number: { type: "string", label: "Number", - description: "The phone number of the contact", + description: "The phone number of the contact. Example: `+16789296543`", }, name: { type: "string", @@ -75,10 +75,10 @@ export default { methods: { _baseUrl() { // Base URL for Production - return "https://automationapi.krispcall.com/api/v1/platform/pipedream"; + return "https://app.krispcall.com/api/v3/platform/pipedream"; // Base URL for Development - // return "https://automationqaapi.safefamilyapp.com/api/v1/platform/pipedream"; + // return "https://qa.safefamilyapp.com/api/v3/platform/pipedream"; }, _headers() { return { diff --git a/components/krispcall/package.json b/components/krispcall/package.json index c2f8bd54f8fa4..c975e8aae2a67 100644 --- a/components/krispcall/package.json +++ b/components/krispcall/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/krispcall", - "version": "0.2.2", + "version": "0.2.4", "description": "Pipedream KrispCall Components", "main": "krispcall.app.mjs", "keywords": [ diff --git a/components/krispcall/sources/common/base.mjs b/components/krispcall/sources/common/base.mjs index 13f32ce644f46..15b3b61f85caf 100644 --- a/components/krispcall/sources/common/base.mjs +++ b/components/krispcall/sources/common/base.mjs @@ -8,6 +8,11 @@ export default { customResponse: false, }, db: "$.service.db", + alert: { + type: "alert", + alertType: "info", + content: "Note: Krispcall webhook triggers will emit events for changes made via the KrispCall UI, but not via the API.", + }, }, methods: { _setHookId(hookId) { diff --git a/components/krispcall/sources/new-call-instant/new-call-instant.mjs b/components/krispcall/sources/new-call-instant/new-call-instant.mjs index 58e38c6b6ebe9..a8da95cc65fa4 100644 --- a/components/krispcall/sources/new-call-instant/new-call-instant.mjs +++ b/components/krispcall/sources/new-call-instant/new-call-instant.mjs @@ -6,7 +6,7 @@ export default { key: "krispcall-new-call-instant", name: "New Call (Instant)", description: "Emit new event when a new call is created.", - version: "0.0.3", + version: "0.0.5", type: "source", dedupe: "unique", methods: { diff --git a/components/krispcall/sources/new-contact-instant/new-contact-instant.mjs b/components/krispcall/sources/new-contact-instant/new-contact-instant.mjs index d630c630b94ba..31a187f9d3623 100644 --- a/components/krispcall/sources/new-contact-instant/new-contact-instant.mjs +++ b/components/krispcall/sources/new-contact-instant/new-contact-instant.mjs @@ -6,7 +6,7 @@ export default { key: "krispcall-new-contact-instant", name: "New Contact (Instant)", description: "Emit new event when a new contact is created.", - version: "0.0.4", + version: "0.0.6", type: "source", dedupe: "unique", methods: { diff --git a/components/krispcall/sources/new-sms-or-mms-instant/new-sms-or-mms-instant.mjs b/components/krispcall/sources/new-sms-or-mms-instant/new-sms-or-mms-instant.mjs index 6a31a0afdc5d0..40dfe3892161e 100644 --- a/components/krispcall/sources/new-sms-or-mms-instant/new-sms-or-mms-instant.mjs +++ b/components/krispcall/sources/new-sms-or-mms-instant/new-sms-or-mms-instant.mjs @@ -6,7 +6,7 @@ export default { key: "krispcall-new-sms-or-mms-instant", name: "New SMS or MMS Sent (Instant)", description: "Emit new event when a new SMS or MMS is sent.", - version: "0.0.4", + version: "0.0.6", type: "source", dedupe: "unique", methods: { diff --git a/components/krispcall/sources/new-voicemail-instant/new-voicemail-instant.mjs b/components/krispcall/sources/new-voicemail-instant/new-voicemail-instant.mjs index a1be6c9c00daf..5e9ef72a15380 100644 --- a/components/krispcall/sources/new-voicemail-instant/new-voicemail-instant.mjs +++ b/components/krispcall/sources/new-voicemail-instant/new-voicemail-instant.mjs @@ -6,7 +6,7 @@ export default { key: "krispcall-new-voicemail-instant", name: "New Voicemail (Instant)", description: "Emit new event when a new voicemail is sent.", - version: "0.0.4", + version: "0.0.6", type: "source", dedupe: "unique", methods: { diff --git a/components/kucoin_futures/package.json b/components/kucoin_futures/package.json index b5ee561ad9e2e..d55cf7951f5d6 100644 --- a/components/kucoin_futures/package.json +++ b/components/kucoin_futures/package.json @@ -1,16 +1,21 @@ { "name": "@pipedream/kucoin_futures", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Kucoin Futures Components", "main": "kucoin_futures.app.mjs", "keywords": [ "pipedream", "kucoin_futures" ], - "files": ["dist"], + "files": [ + "dist" + ], "homepage": "https://pipedream.com/apps/kucoin_futures", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/kustomer/actions/create-conversation/create-conversation.mjs b/components/kustomer/actions/create-conversation/create-conversation.mjs index 68c3416e212fe..8500ef6980176 100644 --- a/components/kustomer/actions/create-conversation/create-conversation.mjs +++ b/components/kustomer/actions/create-conversation/create-conversation.mjs @@ -7,7 +7,7 @@ export default { key: "kustomer-create-conversation", name: "Create Conversation", description: "Creates a new conversation in Kustomer. [See the documentation](https://developer.kustomer.com/kustomer-api-docs/reference/createaconversation)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { kustomer, diff --git a/components/kustomer/actions/create-customer/create-customer.mjs b/components/kustomer/actions/create-customer/create-customer.mjs index a2987830f4e81..448b59d6f82f9 100644 --- a/components/kustomer/actions/create-customer/create-customer.mjs +++ b/components/kustomer/actions/create-customer/create-customer.mjs @@ -7,7 +7,7 @@ export default { key: "kustomer-create-customer", name: "Create Customer", description: "Creates a new customer in Kustomer. [See the documentation](https://developer.kustomer.com/kustomer-api-docs/reference/createacustomer)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { kustomer, diff --git a/components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjs b/components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjs new file mode 100644 index 0000000000000..55ad2b28343b8 --- /dev/null +++ b/components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjs @@ -0,0 +1,38 @@ +import { ConfigurationError } from "@pipedream/platform"; +import kustomer from "../../kustomer.app.mjs"; + +export default { + key: "kustomer-get-custom-object-by-external-id", + name: "Get Custom Object by External ID", + description: "Gets a custom object by external ID in Kustomer. [See the documentation](https://developer.kustomer.com/kustomer-api-docs/reference/get-klasses-name-externalid-externalid)", + version: "0.0.1", + type: "action", + props: { + kustomer, + klassName: { + propDefinition: [ + kustomer, + "klassName", + ], + }, + externalId: { + type: "string", + label: "External ID", + description: "The external ID of the custom object to retrieve", + }, + }, + async run({ $ }) { + try { + const response = await this.kustomer.getCustomObjectByExternalId({ + $, + klassName: this.klassName, + externalId: this.externalId, + }); + + $.export("$summary", `Successfully retrieved custom object with external ID ${this.externalId}`); + return response; + } catch ({ response }) { + throw new ConfigurationError(response.data.errors[0].title); + } + }, +}; diff --git a/components/kustomer/actions/get-custom-object-by-id/get-custom-object-by-id.mjs b/components/kustomer/actions/get-custom-object-by-id/get-custom-object-by-id.mjs new file mode 100644 index 0000000000000..6bc2fc64413d6 --- /dev/null +++ b/components/kustomer/actions/get-custom-object-by-id/get-custom-object-by-id.mjs @@ -0,0 +1,42 @@ +import { ConfigurationError } from "@pipedream/platform"; +import kustomer from "../../kustomer.app.mjs"; + +export default { + key: "kustomer-get-custom-object-by-id", + name: "Get Custom Object by ID", + description: "Gets a custom object by ID in Kustomer. [See the documentation](https://developer.kustomer.com/kustomer-api-docs/reference/getkobject)", + version: "0.0.1", + type: "action", + props: { + kustomer, + klassName: { + propDefinition: [ + kustomer, + "klassName", + ], + }, + customObjectId: { + propDefinition: [ + kustomer, + "customObjectId", + ({ klassName }) => ({ + klassName, + }), + ], + }, + }, + async run({ $ }) { + try { + const response = await this.kustomer.getCustomObjectById({ + $, + klassName: this.klassName, + customObjectId: this.customObjectId, + }); + + $.export("$summary", `Successfully retrieved custom object with ID ${this.customObjectId}`); + return response; + } catch ({ response }) { + throw new ConfigurationError(response.data.errors[0].title); + } + }, +}; diff --git a/components/kustomer/actions/get-custom-objects/get-custom-objects.mjs b/components/kustomer/actions/get-custom-objects/get-custom-objects.mjs new file mode 100644 index 0000000000000..e3bad8bbf1eff --- /dev/null +++ b/components/kustomer/actions/get-custom-objects/get-custom-objects.mjs @@ -0,0 +1,41 @@ +import { ConfigurationError } from "@pipedream/platform"; +import kustomer from "../../kustomer.app.mjs"; + +export default { + key: "kustomer-get-custom-objects", + name: "Get Custom Objects", + description: "Gets custom objects in Kustomer. [See the documentation](https://developer.kustomer.com/kustomer-api-docs/reference/getkobjects)", + version: "0.0.1", + type: "action", + props: { + kustomer, + klassName: { + propDefinition: [ + kustomer, + "klassName", + ], + }, + fromDate: { + type: "string", + label: "From Date", + description: "Date-time string in Internet Date/Time format (ISO 8601) E.g. `2025-07-25T00:00:00Z`", + optional: true, + }, + }, + async run({ $ }) { + try { + const response = await this.kustomer.listCustomObjects({ + $, + klassName: this.klassName, + params: { + fromDate: this.fromDate, + }, + }); + + $.export("$summary", `Successfully retrieved ${response.data.length} custom objects`); + return response; + } catch ({ response }) { + throw new ConfigurationError(response.data.errors[0].title); + } + }, +}; diff --git a/components/kustomer/actions/update-conversation/update-conversation.mjs b/components/kustomer/actions/update-conversation/update-conversation.mjs index 2e2a1c486dfd6..ecac6e12f44ea 100644 --- a/components/kustomer/actions/update-conversation/update-conversation.mjs +++ b/components/kustomer/actions/update-conversation/update-conversation.mjs @@ -7,7 +7,7 @@ export default { key: "kustomer-update-conversation", name: "Update Conversation", description: "Updates an existing conversation in Kustomer. [See the documentation](https://developer.kustomer.com/kustomer-api-docs/reference/updateconversation).", - version: "0.0.1", + version: "0.0.2", type: "action", props: { kustomer, diff --git a/components/kustomer/actions/update-custom-object-by-id/update-custom-object-by-id.mjs b/components/kustomer/actions/update-custom-object-by-id/update-custom-object-by-id.mjs new file mode 100644 index 0000000000000..26e23e5883bfd --- /dev/null +++ b/components/kustomer/actions/update-custom-object-by-id/update-custom-object-by-id.mjs @@ -0,0 +1,97 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { parseObject } from "../../common/utils.mjs"; +import kustomer from "../../kustomer.app.mjs"; + +export default { + key: "kustomer-update-custom-object-by-id", + name: "Update Custom Object by ID", + description: "Updates a custom object identified by ID in Kustomer. [See the documentation](https://developer.kustomer.com/kustomer-api-docs/reference/updatekobject)", + version: "0.0.1", + type: "action", + props: { + kustomer, + klassName: { + propDefinition: [ + kustomer, + "klassName", + ], + }, + customObjectId: { + propDefinition: [ + kustomer, + "customObjectId", + ({ klassName }) => ({ + klassName, + }), + ], + }, + externalId: { + type: "string", + label: "External ID", + description: "The external ID of the custom object to update", + optional: true, + }, + title: { + type: "string", + label: "Title", + description: "The title of the custom object to update", + optional: true, + }, + description: { + type: "string", + label: "Description", + description: "The description of the custom object to update", + optional: true, + }, + data: { + type: "object", + label: "Data", + description: "The data to update the custom object with", + optional: true, + }, + custom: { + type: "object", + label: "Custom", + description: "The custom data of the custom object to update", + optional: true, + }, + tags: { + propDefinition: [ + kustomer, + "tags", + ], + label: "Tags", + description: "Tags associated with the custom object", + optional: true, + }, + rev: { + type: "integer", + label: "Rev", + description: "The rev of the custom object to update", + optional: true, + }, + }, + async run({ $ }) { + try { + const response = await this.kustomer.updateCustomObjectById({ + $, + klassName: this.klassName, + customObjectId: this.customObjectId, + data: { + externalId: this.externalId, + title: this.title, + description: this.description, + data: parseObject(this.data), + custom: parseObject(this.custom), + tags: parseObject(this.tags), + rev: this.rev, + }, + }); + + $.export("$summary", `Successfully updated custom object with ID ${this.customObjectId}`); + return response; + } catch ({ response }) { + throw new ConfigurationError(response.data.errors[0].title); + } + }, +}; diff --git a/components/kustomer/actions/update-customer/update-customer.mjs b/components/kustomer/actions/update-customer/update-customer.mjs index 22227af9e6843..1511d934e8b56 100644 --- a/components/kustomer/actions/update-customer/update-customer.mjs +++ b/components/kustomer/actions/update-customer/update-customer.mjs @@ -7,7 +7,7 @@ export default { key: "kustomer-update-customer", name: "Update Customer", description: "Updates an existing customer in Kustomer. [See the documentation](https://developer.kustomer.com/kustomer-api-docs/reference/updatecustomer)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { kustomer, diff --git a/components/kustomer/kustomer.app.mjs b/components/kustomer/kustomer.app.mjs index 02350afd565d9..cbc22d62b2cb3 100644 --- a/components/kustomer/kustomer.app.mjs +++ b/components/kustomer/kustomer.app.mjs @@ -127,6 +127,49 @@ export default { })); }, }, + klassName: { + type: "string", + label: "Klass Name", + description: "Klass name of the KObjects (custom objects)", + async options({ page }) { + const { data } = await this.listKlasses({ + params: { + page: page + 1, + pageSize: LIMIT * page, + }, + }); + return data.map(({ + attributes: { + name: value, displayName: label, + }, + }) => ({ + label, + value, + })); + }, + }, + customObjectId: { + type: "string", + label: "Custom Object ID", + description: "The ID of the custom object to retrieve", + async options({ + page, klassName, + }) { + const { data } = await this.listCustomObjects({ + klassName, + params: { + page: page + 1, + pageSize: LIMIT * page, + }, + }); + return data.map(({ + id: value, attributes: { title: label }, + }) => ({ + label, + value, + })); + }, + }, externalId: { type: "string", label: "External ID", @@ -327,6 +370,51 @@ export default { ...opts, }); }, + listKlasses(opts = {}) { + return this._makeRequest({ + path: "/klasses", + ...opts, + }); + }, + listCustomObjects({ + klassName, ...opts + }) { + return this._makeRequest({ + path: `/klasses/${klassName}`, + ...opts, + }); + }, + getCustomObjectById({ + klassName, + customObjectId, + ...opts + }) { + return this._makeRequest({ + path: `/klasses/${klassName}/${customObjectId}`, + ...opts, + }); + }, + getCustomObjectByExternalId({ + klassName, + externalId, + ...opts + }) { + return this._makeRequest({ + path: `/klasses/${klassName}/externalId=${externalId}`, + ...opts, + }); + }, + updateCustomObjectById({ + klassName, + customObjectId, + ...opts + }) { + return this._makeRequest({ + method: "PUT", + path: `/klasses/${klassName}/${customObjectId}`, + ...opts, + }); + }, createWebhook(opts = {}) { return this._makeRequest({ method: "POST", diff --git a/components/kustomer/package.json b/components/kustomer/package.json index 461537a2f3dad..c341e4171a549 100644 --- a/components/kustomer/package.json +++ b/components/kustomer/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/kustomer", - "version": "0.1.0", + "version": "0.2.0", "description": "Pipedream Kustomer Components", "main": "kustomer.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.0.3" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/kustomer/sources/new-conversation-instant/new-conversation-instant.mjs b/components/kustomer/sources/new-conversation-instant/new-conversation-instant.mjs index 3e43317b7df50..23007485106ef 100644 --- a/components/kustomer/sources/new-conversation-instant/new-conversation-instant.mjs +++ b/components/kustomer/sources/new-conversation-instant/new-conversation-instant.mjs @@ -6,7 +6,7 @@ export default { key: "kustomer-new-conversation-instant", name: "New Conversation Created (Instant)", description: "Emit new event when a conversation is created in Kustomer.", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", methods: { diff --git a/components/kustomer/sources/new-customer-instant/new-customer-instant.mjs b/components/kustomer/sources/new-customer-instant/new-customer-instant.mjs index f95c61d64135b..0004b43cb3a47 100644 --- a/components/kustomer/sources/new-customer-instant/new-customer-instant.mjs +++ b/components/kustomer/sources/new-customer-instant/new-customer-instant.mjs @@ -6,7 +6,7 @@ export default { key: "kustomer-new-customer-instant", name: "New Customer Created (Instant)", description: "Emit new event when a new customer is added to Kustomer.", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", methods: { diff --git a/components/kustomer/sources/new-message-instant/new-message-instant.mjs b/components/kustomer/sources/new-message-instant/new-message-instant.mjs index 6a1dc899c41fb..7c2e92a52c95c 100644 --- a/components/kustomer/sources/new-message-instant/new-message-instant.mjs +++ b/components/kustomer/sources/new-message-instant/new-message-instant.mjs @@ -6,7 +6,7 @@ export default { key: "kustomer-new-message-instant", name: "New Message Created in Conversation (Instant)", description: "Emit new event when a new message is created in a conversation.", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", methods: { diff --git a/components/kustomer/sources/updated-conversation-instant/updated-conversation-instant.mjs b/components/kustomer/sources/updated-conversation-instant/updated-conversation-instant.mjs index eea7b13895ee1..226db71f6abd5 100644 --- a/components/kustomer/sources/updated-conversation-instant/updated-conversation-instant.mjs +++ b/components/kustomer/sources/updated-conversation-instant/updated-conversation-instant.mjs @@ -6,7 +6,7 @@ export default { key: "kustomer-updated-conversation-instant", name: "Updated Conversation (Instant)", description: "Emit new event when an existing conversation is updated in Kustomer.", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", methods: { diff --git a/components/kustomer/sources/updated-customer-instant/updated-customer-instant.mjs b/components/kustomer/sources/updated-customer-instant/updated-customer-instant.mjs index bfc23bd58c609..29390d3ee1679 100644 --- a/components/kustomer/sources/updated-customer-instant/updated-customer-instant.mjs +++ b/components/kustomer/sources/updated-customer-instant/updated-customer-instant.mjs @@ -6,7 +6,7 @@ export default { key: "kustomer-updated-customer-instant", name: "Updated Customer (Instant)", description: "Emit new event when an existing customer's details are updated in Kustomer.", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", methods: { diff --git a/components/kwtsms/package.json b/components/kwtsms/package.json index 9def0b60a617a..1a66fb986ba52 100644 --- a/components/kwtsms/package.json +++ b/components/kwtsms/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/kwtsms", - "version": "0.1.1", + "version": "0.1.2", "description": "Pipedream Kwtsms Components", - "main": "dist/app/kwtsms.app.mjs", + "main": "kwtsms.app.mjs", "keywords": [ "pipedream", "kwtsms" diff --git a/components/kyvio/.gitignore b/components/kyvio/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/kyvio/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/kyvio/app/kyvio.app.ts b/components/kyvio/app/kyvio.app.ts deleted file mode 100644 index eb7d7f1bcb374..0000000000000 --- a/components/kyvio/app/kyvio.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "kyvio", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/kyvio/kyvio.app.mjs b/components/kyvio/kyvio.app.mjs new file mode 100644 index 0000000000000..bccd97a1f24a1 --- /dev/null +++ b/components/kyvio/kyvio.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "kyvio", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/kyvio/package.json b/components/kyvio/package.json index 47301a12531a1..458c72a7a9d49 100644 --- a/components/kyvio/package.json +++ b/components/kyvio/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/kyvio", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Kyvio Components", - "main": "dist/app/kyvio.app.mjs", + "main": "kyvio.app.mjs", "keywords": [ "pipedream", "kyvio" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/kyvio", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/labs64_netlicensing/.gitignore b/components/labs64_netlicensing/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/labs64_netlicensing/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/labs64_netlicensing/app/labs64_netlicensing.app.ts b/components/labs64_netlicensing/app/labs64_netlicensing.app.ts deleted file mode 100644 index 54d308c99ae9e..0000000000000 --- a/components/labs64_netlicensing/app/labs64_netlicensing.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "labs64_netlicensing", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/labs64_netlicensing/labs64_netlicensing.app.mjs b/components/labs64_netlicensing/labs64_netlicensing.app.mjs new file mode 100644 index 0000000000000..085a108e5a6c7 --- /dev/null +++ b/components/labs64_netlicensing/labs64_netlicensing.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "labs64_netlicensing", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/labs64_netlicensing/package.json b/components/labs64_netlicensing/package.json index 202cba1a5c92b..f2b02d4488b85 100644 --- a/components/labs64_netlicensing/package.json +++ b/components/labs64_netlicensing/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/labs64_netlicensing", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Labs64 NetLicensing Components", - "main": "dist/app/labs64_netlicensing.app.mjs", + "main": "labs64_netlicensing.app.mjs", "keywords": [ "pipedream", "labs64_netlicensing" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/labs64_netlicensing", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/lahar/.gitignore b/components/lahar/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/lahar/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/lahar/app/lahar.app.ts b/components/lahar/app/lahar.app.ts deleted file mode 100644 index 11132f716105c..0000000000000 --- a/components/lahar/app/lahar.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "lahar", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/lahar/lahar.app.mjs b/components/lahar/lahar.app.mjs new file mode 100644 index 0000000000000..7008e3b04733d --- /dev/null +++ b/components/lahar/lahar.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "lahar", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/lahar/package.json b/components/lahar/package.json index 0bfc61a962174..be32255674d50 100644 --- a/components/lahar/package.json +++ b/components/lahar/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/lahar", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Lahar Components", - "main": "dist/app/lahar.app.mjs", + "main": "lahar.app.mjs", "keywords": [ "pipedream", "lahar" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/lahar", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/laposta/package.json b/components/laposta/package.json index 03e777715e4a0..93c8e12279984 100644 --- a/components/laposta/package.json +++ b/components/laposta/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/laposta", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Laposta Components", - "main": "dist/app/laposta.app.mjs", + "main": "laposta.app.mjs", "keywords": [ "pipedream", "laposta" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/laposta", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/launch_darkly_oauth/actions/evaluate-feature-flag/evaluate-feature-flag.mjs b/components/launch_darkly_oauth/actions/evaluate-feature-flag/evaluate-feature-flag.mjs new file mode 100644 index 0000000000000..51cd0da99a2a2 --- /dev/null +++ b/components/launch_darkly_oauth/actions/evaluate-feature-flag/evaluate-feature-flag.mjs @@ -0,0 +1,22 @@ +import app from "../../launch_darkly_oauth.app.mjs"; +import common from "@pipedream/launchdarkly/actions/evaluate-feature-flag/evaluate-feature-flag.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "launch_darkly_oauth-evaluate-feature-flag", + version: "0.0.1", + name, + description, + type, + props: { + app, + ...props, + }, +}; diff --git a/components/launch_darkly_oauth/actions/get-feature-flag-status/get-feature-flag-status.mjs b/components/launch_darkly_oauth/actions/get-feature-flag-status/get-feature-flag-status.mjs new file mode 100644 index 0000000000000..3cb16dc0dd7e3 --- /dev/null +++ b/components/launch_darkly_oauth/actions/get-feature-flag-status/get-feature-flag-status.mjs @@ -0,0 +1,22 @@ +import app from "../../launch_darkly_oauth.app.mjs"; +import common from "@pipedream/launchdarkly/actions/get-feature-flag-status/get-feature-flag-status.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "launch_darkly_oauth-get-feature-flag-status", + version: "0.0.1", + name, + description, + type, + props: { + app, + ...props, + }, +}; diff --git a/components/launch_darkly_oauth/actions/get-feature-flag/get-feature-flag.mjs b/components/launch_darkly_oauth/actions/get-feature-flag/get-feature-flag.mjs new file mode 100644 index 0000000000000..701c65f9cd77c --- /dev/null +++ b/components/launch_darkly_oauth/actions/get-feature-flag/get-feature-flag.mjs @@ -0,0 +1,22 @@ +import app from "../../launch_darkly_oauth.app.mjs"; +import common from "@pipedream/launchdarkly/actions/get-feature-flag/get-feature-flag.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "launch_darkly_oauth-get-feature-flag", + version: "0.0.1", + name, + description, + type, + props: { + app, + ...props, + }, +}; diff --git a/components/launch_darkly_oauth/actions/get-project/get-project.mjs b/components/launch_darkly_oauth/actions/get-project/get-project.mjs new file mode 100644 index 0000000000000..28ce217bb9125 --- /dev/null +++ b/components/launch_darkly_oauth/actions/get-project/get-project.mjs @@ -0,0 +1,22 @@ +import app from "../../launch_darkly_oauth.app.mjs"; +import common from "@pipedream/launchdarkly/actions/get-project/get-project.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "launch_darkly_oauth-get-project", + version: "0.0.1", + name, + description, + type, + props: { + app, + ...props, + }, +}; diff --git a/components/launch_darkly_oauth/actions/list-environments/list-environments.mjs b/components/launch_darkly_oauth/actions/list-environments/list-environments.mjs new file mode 100644 index 0000000000000..7954b09023d4a --- /dev/null +++ b/components/launch_darkly_oauth/actions/list-environments/list-environments.mjs @@ -0,0 +1,22 @@ +import app from "../../launch_darkly_oauth.app.mjs"; +import common from "@pipedream/launchdarkly/actions/list-environments/list-environments.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "launch_darkly_oauth-list-environments", + version: "0.0.1", + name, + description, + type, + props: { + app, + ...props, + }, +}; diff --git a/components/launch_darkly_oauth/actions/list-feature-flags/list-feature-flags.mjs b/components/launch_darkly_oauth/actions/list-feature-flags/list-feature-flags.mjs new file mode 100644 index 0000000000000..9f8384dc67a8c --- /dev/null +++ b/components/launch_darkly_oauth/actions/list-feature-flags/list-feature-flags.mjs @@ -0,0 +1,22 @@ +import app from "../../launch_darkly_oauth.app.mjs"; +import common from "@pipedream/launchdarkly/actions/list-feature-flags/list-feature-flags.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "launch_darkly_oauth-list-feature-flags", + version: "0.0.1", + name, + description, + type, + props: { + app, + ...props, + }, +}; diff --git a/components/launch_darkly_oauth/actions/list-members/list-members.mjs b/components/launch_darkly_oauth/actions/list-members/list-members.mjs new file mode 100644 index 0000000000000..839abefe4384b --- /dev/null +++ b/components/launch_darkly_oauth/actions/list-members/list-members.mjs @@ -0,0 +1,22 @@ +import app from "../../launch_darkly_oauth.app.mjs"; +import common from "@pipedream/launchdarkly/actions/list-members/list-members.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "launch_darkly_oauth-list-members", + version: "0.0.1", + name, + description, + type, + props: { + app, + ...props, + }, +}; diff --git a/components/launch_darkly_oauth/actions/list-projects/list-projects.mjs b/components/launch_darkly_oauth/actions/list-projects/list-projects.mjs new file mode 100644 index 0000000000000..5a2cfbe08ba47 --- /dev/null +++ b/components/launch_darkly_oauth/actions/list-projects/list-projects.mjs @@ -0,0 +1,22 @@ +import app from "../../launch_darkly_oauth.app.mjs"; +import common from "@pipedream/launchdarkly/actions/list-projects/list-projects.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "launch_darkly_oauth-list-projects", + version: "0.0.1", + name, + description, + type, + props: { + app, + ...props, + }, +}; diff --git a/components/launch_darkly_oauth/actions/toggle-feature-flag/toggle-feature-flag.mjs b/components/launch_darkly_oauth/actions/toggle-feature-flag/toggle-feature-flag.mjs new file mode 100644 index 0000000000000..829bebbed95d7 --- /dev/null +++ b/components/launch_darkly_oauth/actions/toggle-feature-flag/toggle-feature-flag.mjs @@ -0,0 +1,22 @@ +import app from "../../launch_darkly_oauth.app.mjs"; +import common from "@pipedream/launchdarkly/actions/toggle-feature-flag/toggle-feature-flag.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "launch_darkly_oauth-toggle-feature-flag", + version: "0.0.1", + name, + description, + type, + props: { + app, + ...props, + }, +}; diff --git a/components/launch_darkly_oauth/actions/update-feature-flag/update-feature-flag.mjs b/components/launch_darkly_oauth/actions/update-feature-flag/update-feature-flag.mjs new file mode 100644 index 0000000000000..3b53cb0acca00 --- /dev/null +++ b/components/launch_darkly_oauth/actions/update-feature-flag/update-feature-flag.mjs @@ -0,0 +1,22 @@ +import app from "../../launch_darkly_oauth.app.mjs"; +import common from "@pipedream/launchdarkly/actions/update-feature-flag/update-feature-flag.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "launch_darkly_oauth-update-feature-flag", + version: "0.0.1", + name, + description, + type, + props: { + app, + ...props, + }, +}; diff --git a/components/launch_darkly_oauth/common/utils.mjs b/components/launch_darkly_oauth/common/utils.mjs new file mode 100644 index 0000000000000..d42df055ddeb0 --- /dev/null +++ b/components/launch_darkly_oauth/common/utils.mjs @@ -0,0 +1,40 @@ +export function adjustPropDefinitions(props, app) { + return Object.fromEntries( + Object.entries(props).map(([ + key, + prop, + ]) => { + if (typeof prop === "string") return [ + key, + prop, + ]; + const { + propDefinition, ...otherValues + } = prop; + if (propDefinition) { + const [ + , ...otherDefs + ] = propDefinition; + return [ + key, + { + propDefinition: [ + app, + ...otherDefs, + ], + ...otherValues, + }, + ]; + } + return [ + key, + otherValues.type === "app" + ? null + : otherValues, + ]; + }) + .filter(([ + , value, + ]) => value), + ); +} diff --git a/components/launch_darkly_oauth/launch_darkly_oauth.app.mjs b/components/launch_darkly_oauth/launch_darkly_oauth.app.mjs index b13a42295af5d..e8959379ac835 100644 --- a/components/launch_darkly_oauth/launch_darkly_oauth.app.mjs +++ b/components/launch_darkly_oauth/launch_darkly_oauth.app.mjs @@ -1,11 +1,17 @@ +import launchdarkly from "@pipedream/launchdarkly"; + export default { + ...launchdarkly, type: "app", app: "launch_darkly_oauth", - propDefinitions: {}, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + ...launchdarkly.methods, + getHeaders(headers) { + return { + "Content-Type": "application/json", + ...headers, + "Authorization": `Bearer ${this.$auth.oauth_access_token}`, + }; }, }, }; diff --git a/components/launch_darkly_oauth/package.json b/components/launch_darkly_oauth/package.json index f60df55b9581d..e67a6f3103588 100644 --- a/components/launch_darkly_oauth/package.json +++ b/components/launch_darkly_oauth/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/launch_darkly_oauth", - "version": "0.6.0", + "version": "0.7.0", "description": "Pipedream launch_darkly_oauth Components", "main": "launch_darkly_oauth.app.mjs", "keywords": [ @@ -13,6 +13,7 @@ "access": "public" }, "dependencies": { + "@pipedream/launchdarkly": "^0.1.1", "@pipedream/platform": "^3.0.0" } } diff --git a/components/launch_darkly_oauth/sources/new-access-token-event/new-access-token-event.mjs b/components/launch_darkly_oauth/sources/new-access-token-event/new-access-token-event.mjs new file mode 100644 index 0000000000000..3021e1e6b7076 --- /dev/null +++ b/components/launch_darkly_oauth/sources/new-access-token-event/new-access-token-event.mjs @@ -0,0 +1,22 @@ +import app from "../../launch_darkly_oauth.app.mjs"; +import common from "@pipedream/launchdarkly/sources/new-access-token-event/new-access-token-event.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "launch_darkly_oauth-new-access-token-event", + version: "0.0.1", + name, + description, + type, + props: { + app, + ...props, + }, +}; diff --git a/components/launch_darkly_oauth/sources/new-flag-event/new-flag-event.mjs b/components/launch_darkly_oauth/sources/new-flag-event/new-flag-event.mjs new file mode 100644 index 0000000000000..34f86039efcaa --- /dev/null +++ b/components/launch_darkly_oauth/sources/new-flag-event/new-flag-event.mjs @@ -0,0 +1,22 @@ +import app from "../../launch_darkly_oauth.app.mjs"; +import common from "@pipedream/launchdarkly/sources/new-flag-event/new-flag-event.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "launch_darkly_oauth-new-flag-event", + version: "0.0.1", + name, + description, + type, + props: { + app, + ...props, + }, +}; diff --git a/components/launch_darkly_oauth/sources/new-user-event/new-user-event.mjs b/components/launch_darkly_oauth/sources/new-user-event/new-user-event.mjs new file mode 100644 index 0000000000000..e37c7d69e90eb --- /dev/null +++ b/components/launch_darkly_oauth/sources/new-user-event/new-user-event.mjs @@ -0,0 +1,22 @@ +import app from "../../launch_darkly_oauth.app.mjs"; +import common from "@pipedream/launchdarkly/sources/new-user-event/new-user-event.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "launch_darkly_oauth-new-user-event", + version: "0.0.1", + name, + description, + type, + props: { + app, + ...props, + }, +}; diff --git a/components/launchdarkly/actions/evaluate-feature-flag/evaluate-feature-flag.mjs b/components/launchdarkly/actions/evaluate-feature-flag/evaluate-feature-flag.mjs index 310f7ad6f9c1d..f0b2dea7cb5c7 100644 --- a/components/launchdarkly/actions/evaluate-feature-flag/evaluate-feature-flag.mjs +++ b/components/launchdarkly/actions/evaluate-feature-flag/evaluate-feature-flag.mjs @@ -4,7 +4,7 @@ export default { key: "launchdarkly-evaluate-feature-flag", name: "Evaluate Feature Flag", description: "Evaluates an existing feature flag for a specific user or in a general context. [See the documentation](https://apidocs.launchdarkly.com/tag/Contexts#operation/evaluateContextInstance).", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/launchdarkly/actions/get-feature-flag-status/get-feature-flag-status.mjs b/components/launchdarkly/actions/get-feature-flag-status/get-feature-flag-status.mjs new file mode 100644 index 0000000000000..7bf6f4a30eefa --- /dev/null +++ b/components/launchdarkly/actions/get-feature-flag-status/get-feature-flag-status.mjs @@ -0,0 +1,50 @@ +import app from "../../launchdarkly.app.mjs"; + +export default { + key: "launchdarkly-get-feature-flag-status", + name: "Get Feature Flag Status", + description: "Get the status of a feature flag. [See the documentation](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag-status).", + version: "0.0.1", + type: "action", + props: { + app, + projectKey: { + propDefinition: [ + app, + "project", + ], + }, + environmentKey: { + propDefinition: [ + app, + "environment", + ({ projectKey }) => ({ + projectKey, + }), + ], + }, + featureFlagKey: { + propDefinition: [ + app, + "flag", + ({ + projectKey, environmentKey, + }) => ({ + projectKey, + environmentKey, + }), + ], + description: "The key of the feature flag to retrieve the status of", + }, + }, + async run({ $ }) { + const status = await this.app.getFeatureFlagStatus({ + $, + projectKey: this.projectKey, + environmentKey: this.environmentKey, + featureFlagKey: this.featureFlagKey, + }); + $.export("$summary", `Found feature flag status: ${status.name}`); + return status; + }, +}; diff --git a/components/launchdarkly/actions/get-feature-flag/get-feature-flag.mjs b/components/launchdarkly/actions/get-feature-flag/get-feature-flag.mjs new file mode 100644 index 0000000000000..9fa6cd758add0 --- /dev/null +++ b/components/launchdarkly/actions/get-feature-flag/get-feature-flag.mjs @@ -0,0 +1,49 @@ +import app from "../../launchdarkly.app.mjs"; + +export default { + key: "launchdarkly-get-feature-flag", + name: "Get Feature Flag", + description: "Get a feature flag by key. [See the documentation](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag).", + version: "0.0.1", + type: "action", + props: { + app, + projectKey: { + propDefinition: [ + app, + "project", + ], + }, + environmentKey: { + propDefinition: [ + app, + "environment", + ({ projectKey }) => ({ + projectKey, + }), + ], + }, + featureFlagKey: { + propDefinition: [ + app, + "flag", + ({ + projectKey, environmentKey, + }) => ({ + projectKey, + environmentKey, + }), + ], + description: "The key of the feature flag to retrieve", + }, + }, + async run({ $ }) { + const flag = await this.app.getFeatureFlag({ + $, + projectKey: this.projectKey, + featureFlagKey: this.featureFlagKey, + }); + $.export("$summary", `Found feature flag ${flag.key}`); + return flag; + }, +}; diff --git a/components/launchdarkly/actions/get-project/get-project.mjs b/components/launchdarkly/actions/get-project/get-project.mjs new file mode 100644 index 0000000000000..60cb2cd988ac7 --- /dev/null +++ b/components/launchdarkly/actions/get-project/get-project.mjs @@ -0,0 +1,25 @@ +import app from "../../launchdarkly.app.mjs"; + +export default { + key: "launchdarkly-get-project", + name: "Get Project", + description: "Get a project by key. [See the documentation](https://launchdarkly.com/docs/api/projects/get-project).", + version: "0.0.1", + type: "action", + props: { + app, + projectKey: { + propDefinition: [ + app, + "project", + ], + }, + }, + async run({ $ }) { + const project = await this.app.getProject({ + projectKey: this.projectKey, + }); + $.export("$summary", `Found project: ${project.name}`); + return project; + }, +}; diff --git a/components/launchdarkly/actions/list-environments/list-environments.mjs b/components/launchdarkly/actions/list-environments/list-environments.mjs new file mode 100644 index 0000000000000..0d6adeb260660 --- /dev/null +++ b/components/launchdarkly/actions/list-environments/list-environments.mjs @@ -0,0 +1,76 @@ +import app from "../../launchdarkly.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "launchdarkly-list-environments", + name: "List Environments", + description: "List all environments. [See the documentation](https://launchdarkly.com/docs/api/environments/get-environments-by-project).", + version: "0.0.1", + type: "action", + props: { + app, + projectKey: { + propDefinition: [ + app, + "project", + ], + }, + filter: { + type: "string[]", + label: "Filter", + description: "A list of filters. Each filter is of the form `field:value`. Example: `query:abc`. [See the documentation](https://launchdarkly.com/docs/api/environments/get-environments-by-project#filtering-environments) for supported fields.", + optional: true, + }, + sort: { + type: "string", + label: "Sort Field", + description: "The field to sort by. Fields prefixed by a dash ( - ) sort in descending order.", + options: [ + "createdOn", + "-createdOn", + "critical", + "-critical", + "name", + "-name", + ], + optional: true, + }, + maxResults: { + propDefinition: [ + app, + "maxResults", + ], + }, + }, + async run({ $ }) { + // validate array props + if (this.filter && !Array.isArray(this.filter)) { + throw new ConfigurationError("Filter must be an array"); + } + + const params = { + filter: this.filter?.join(","), + sort: this.sort, + }; + + const environments = this.app.paginate({ + fn: this.app.listEnvironments, + args: { + $, + projectKey: this.projectKey, + params, + }, + max: this.maxResults, + }); + + const results = []; + for await (const environment of environments) { + results.push(environment); + } + + $.export("$summary", `Found ${results.length} environment${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/launchdarkly/actions/list-feature-flags/list-feature-flags.mjs b/components/launchdarkly/actions/list-feature-flags/list-feature-flags.mjs new file mode 100644 index 0000000000000..2959628f690b1 --- /dev/null +++ b/components/launchdarkly/actions/list-feature-flags/list-feature-flags.mjs @@ -0,0 +1,109 @@ +import app from "../../launchdarkly.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "launchdarkly-list-feature-flags", + name: "List Feature Flags", + description: "List all feature flags. [See the documentation](https://launchdarkly.com/docs/api/feature-flags/get-feature-flags).", + version: "0.0.1", + type: "action", + props: { + app, + projectKey: { + propDefinition: [ + app, + "project", + ], + }, + environmentKey: { + propDefinition: [ + app, + "environment", + ({ projectKey }) => ({ + projectKey, + }), + ], + }, + filter: { + type: "string[]", + label: "Filter", + description: "A list of filters. Each filter is of the form `field:value`. Example: `query:dark-mode`. [See the documentation](https://launchdarkly.com/docs/api/feature-flags/get-feature-flags#filtering-flags) for supported fields.", + optional: true, + }, + expand: { + type: "string[]", + label: "Expand", + description: "A list of properties that can reveal additional information in the response", + options: [ + "codeReferences", + "evaluation", + "migrationSettings", + ], + optional: true, + }, + sort: { + type: "string", + label: "Sort Field", + description: "The field to sort by. Fields prefixed by a dash ( - ) sort in descending order.", + options: [ + "creationDate", + "-creationDate", + "key", + "-key", + "maintainerId", + "-maintainerId", + "name", + "-name", + "tags", + "-tags", + "targetingModifiedDate", + "-targetingModifiedDate", + "type", + "-type", + ], + optional: true, + }, + maxResults: { + propDefinition: [ + app, + "maxResults", + ], + }, + }, + async run({ $ }) { + // validate array props + if (this.filter && !Array.isArray(this.filter)) { + throw new ConfigurationError("Filter must be an array"); + } + if (this.expand && !Array.isArray(this.expand)) { + throw new ConfigurationError("Expand must be an array"); + } + + const params = { + filter: this.filter?.join(","), + expand: this.expand?.join(","), + sort: this.sort, + env: this.environmentKey, + }; + + const flags = this.app.paginate({ + fn: this.app.listFeatureFlags, + args: { + $, + projectKey: this.projectKey, + params, + }, + max: this.maxResults, + }); + + const results = []; + for await (const flag of flags) { + results.push(flag); + } + + $.export("$summary", `Found ${results.length} feature flag${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/launchdarkly/actions/list-members/list-members.mjs b/components/launchdarkly/actions/list-members/list-members.mjs new file mode 100644 index 0000000000000..39bca88ae559e --- /dev/null +++ b/components/launchdarkly/actions/list-members/list-members.mjs @@ -0,0 +1,81 @@ +import app from "../../launchdarkly.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "launchdarkly-list-members", + name: "List Members", + description: "List all members in an account. [See the documentation](https://launchdarkly.com/docs/api/account-members/get-members).", + version: "0.0.1", + type: "action", + props: { + app, + filter: { + type: "string[]", + label: "Filter", + description: "A list of filters. Each filter is of the form `field:value`. Example: `query:abc`. [See the documentation](https://launchdarkly.com/docs/api/account-members/get-members#filtering-members) for supported fields.", + optional: true, + }, + expand: { + type: "string[]", + label: "Expand", + description: "A list of properties that can reveal additional information in the response", + options: [ + "customRoles", + "roleAttributes", + ], + optional: true, + }, + sort: { + type: "string", + label: "Sort Field", + description: "The field to sort by. Fields prefixed by a dash ( - ) sort in descending order.", + options: [ + "displayName", + "-displayName", + "lastSeen", + "-lastSeen", + ], + optional: true, + }, + maxResults: { + propDefinition: [ + app, + "maxResults", + ], + }, + }, + async run({ $ }) { + // validate array props + if (this.filter && !Array.isArray(this.filter)) { + throw new ConfigurationError("Filter must be an array"); + } + if (this.expand && !Array.isArray(this.expand)) { + throw new ConfigurationError("Expand must be an array"); + } + + const params = { + filter: this.filter?.join(","), + expand: this.expand?.join(","), + sort: this.sort, + }; + + const members = this.app.paginate({ + fn: this.app.listAccountMembers, + args: { + $, + params, + }, + max: this.maxResults, + }); + + const results = []; + for await (const member of members) { + results.push(member); + } + + $.export("$summary", `Found ${results.length} member${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/launchdarkly/actions/list-projects/list-projects.mjs b/components/launchdarkly/actions/list-projects/list-projects.mjs new file mode 100644 index 0000000000000..4b3ec9610d0c6 --- /dev/null +++ b/components/launchdarkly/actions/list-projects/list-projects.mjs @@ -0,0 +1,80 @@ +import app from "../../launchdarkly.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "launchdarkly-list-projects", + name: "List Projects", + description: "List all projects. [See the documentation](https://launchdarkly.com/docs/api/projects/get-projects).", + version: "0.0.1", + type: "action", + props: { + app, + filter: { + type: "string[]", + label: "Filter", + description: "A list of filters. Each filter is of the form `field:value`. Example: `query:abc`. [See the documentation](https://launchdarkly.com/docs/api/projects/get-projects#filtering-projects) for supported fields.", + optional: true, + }, + expand: { + type: "string[]", + label: "Expand", + description: "A list of properties that can reveal additional information in the response", + options: [ + "environments", + ], + optional: true, + }, + sort: { + type: "string", + label: "Sort Field", + description: "The field to sort by. Fields prefixed by a dash ( - ) sort in descending order.", + options: [ + "createdOn", + "-createdOn", + "name", + "-name", + ], + optional: true, + }, + maxResults: { + propDefinition: [ + app, + "maxResults", + ], + }, + }, + async run({ $ }) { + // validate array props + if (this.filter && !Array.isArray(this.filter)) { + throw new ConfigurationError("Filter must be an array"); + } + if (this.expand && !Array.isArray(this.expand)) { + throw new ConfigurationError("Expand must be an array"); + } + + const params = { + filter: this.filter?.join(","), + expand: this.expand?.join(","), + sort: this.sort, + }; + + const projects = this.app.paginate({ + fn: this.app.listProjects, + args: { + $, + params, + }, + max: this.maxResults, + }); + + const results = []; + for await (const project of projects) { + results.push(project); + } + + $.export("$summary", `Found ${results.length} project${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/launchdarkly/actions/toggle-feature-flag/toggle-feature-flag.mjs b/components/launchdarkly/actions/toggle-feature-flag/toggle-feature-flag.mjs index 890a97f43ecc7..7ae78def28a84 100644 --- a/components/launchdarkly/actions/toggle-feature-flag/toggle-feature-flag.mjs +++ b/components/launchdarkly/actions/toggle-feature-flag/toggle-feature-flag.mjs @@ -4,7 +4,7 @@ export default { key: "launchdarkly-toggle-feature-flag", name: "Toggle Feature Flag", description: "Toggles the status of a feature flag, switching it from active to inactive, or vice versa. [See the documentation](https://apidocs.launchdarkly.com/tag/Feature-flags#operation/patchFeatureFlag)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/launchdarkly/actions/update-feature-flag/update-feature-flag.mjs b/components/launchdarkly/actions/update-feature-flag/update-feature-flag.mjs index 96ba7203d488f..ad5ead94c2616 100644 --- a/components/launchdarkly/actions/update-feature-flag/update-feature-flag.mjs +++ b/components/launchdarkly/actions/update-feature-flag/update-feature-flag.mjs @@ -5,7 +5,7 @@ export default { key: "launchdarkly-update-feature-flag", name: "Update Feature Flag", description: "Updates an existing feature flag using a JSON object. [See the documentation](https://apidocs.launchdarkly.com/tag/Feature-flags#operation/patchFeatureFlag)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/launchdarkly/launchdarkly.app.mjs b/components/launchdarkly/launchdarkly.app.mjs index 8868132f45f22..a86aa74171b7d 100644 --- a/components/launchdarkly/launchdarkly.app.mjs +++ b/components/launchdarkly/launchdarkly.app.mjs @@ -128,6 +128,13 @@ export default { return items.map(mapper); }, }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of results to return", + optional: true, + default: 100, + }, }, methods: { getUrl(path) { @@ -227,5 +234,48 @@ export default { ...args, }); }, + getFeatureFlagStatus({ + projectKey, environmentKey, featureFlagKey, ...args + } = {}) { + return this._makeRequest({ + path: `/flag-statuses/${projectKey}/${environmentKey}/${featureFlagKey}`, + ...args, + }); + }, + getProject({ + projectKey, ...args + } = {}) { + return this._makeRequest({ + path: `/projects/${projectKey}`, + ...args, + }); + }, + async *paginate({ + fn, args = {}, max, + }) { + args = { + ...args, + params: { + ...args?.params, + limit: 100, + offset: 0, + }, + }; + let totalItems, count = 0; + do { + const { + items, totalCount, + } = await fn(args); + for (const item of items) { + yield item; + count++; + if (max && count >= max) { + return; + } + } + totalItems = totalCount; + args.params.offset += args.params.limit; + } while (count < totalItems); + }, }, }; diff --git a/components/launchdarkly/package.json b/components/launchdarkly/package.json index 4c2789a3025a5..37784b07e221c 100644 --- a/components/launchdarkly/package.json +++ b/components/launchdarkly/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/launchdarkly", - "version": "0.0.1", + "version": "0.1.1", "description": "Pipedream LaunchDarkly Components", "main": "launchdarkly.app.mjs", "keywords": [ @@ -13,6 +13,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "3.0.3" + "@pipedream/platform": "3.0.3", + "uuid": "^11.1.0" } } diff --git a/components/launchdarkly/sources/new-access-token-event/new-access-token-event.mjs b/components/launchdarkly/sources/new-access-token-event/new-access-token-event.mjs index 1488f57efbcfb..d0246fa4f7689 100644 --- a/components/launchdarkly/sources/new-access-token-event/new-access-token-event.mjs +++ b/components/launchdarkly/sources/new-access-token-event/new-access-token-event.mjs @@ -5,7 +5,7 @@ export default { key: "launchdarkly-new-access-token-event", name: "New Access Token Event", description: "Emit new event when a new access token activity happens. [See the documentation](https://apidocs.launchdarkly.com/tag/Webhooks#operation/postWebhook).", - version: "0.0.1", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/components/launchdarkly/sources/new-flag-event/new-flag-event.mjs b/components/launchdarkly/sources/new-flag-event/new-flag-event.mjs index 3d82355ee93ae..144ded7df7c52 100644 --- a/components/launchdarkly/sources/new-flag-event/new-flag-event.mjs +++ b/components/launchdarkly/sources/new-flag-event/new-flag-event.mjs @@ -5,7 +5,7 @@ export default { key: "launchdarkly-new-flag-event", name: "New Flag Event", description: "Emit new event when flag activity occurs. [See the documentation](https://apidocs.launchdarkly.com/tag/Webhooks#operation/postWebhook).", - version: "0.0.1", + version: "0.0.3", type: "source", dedupe: "unique", methods: { diff --git a/components/launchdarkly/sources/new-user-event/new-user-event.mjs b/components/launchdarkly/sources/new-user-event/new-user-event.mjs index 36239f3d33daa..2f4303b6f3950 100644 --- a/components/launchdarkly/sources/new-user-event/new-user-event.mjs +++ b/components/launchdarkly/sources/new-user-event/new-user-event.mjs @@ -5,7 +5,7 @@ export default { key: "launchdarkly-new-user-event", name: "New User Event", description: "Emit new event when user activity is noted. [See the documentation](https://apidocs.launchdarkly.com/tag/Webhooks#operation/postWebhook).", - version: "0.0.1", + version: "0.0.3", type: "source", dedupe: "unique", methods: { diff --git a/components/leadboxer/.gitignore b/components/leadboxer/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/leadboxer/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/leadboxer/app/leadboxer.app.ts b/components/leadboxer/app/leadboxer.app.ts deleted file mode 100644 index 5f16de679a3f6..0000000000000 --- a/components/leadboxer/app/leadboxer.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "leadboxer", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/leadboxer/leadboxer.app.mjs b/components/leadboxer/leadboxer.app.mjs new file mode 100644 index 0000000000000..b0735a781ef7a --- /dev/null +++ b/components/leadboxer/leadboxer.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "leadboxer", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/leadboxer/package.json b/components/leadboxer/package.json index a5abef98e5a99..355a57cad6468 100644 --- a/components/leadboxer/package.json +++ b/components/leadboxer/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/leadboxer", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream LeadBoxer Components", - "main": "dist/app/leadboxer.app.mjs", + "main": "leadboxer.app.mjs", "keywords": [ "pipedream", "leadboxer" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/leadboxer", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/learndash/.gitignore b/components/learndash/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/learndash/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/learndash/app/learndash.app.ts b/components/learndash/app/learndash.app.ts deleted file mode 100644 index e7b6eb0355e57..0000000000000 --- a/components/learndash/app/learndash.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "learndash", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/learndash/learndash.app.mjs b/components/learndash/learndash.app.mjs new file mode 100644 index 0000000000000..64db9cba1a9c6 --- /dev/null +++ b/components/learndash/learndash.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "learndash", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/learndash/package.json b/components/learndash/package.json index 2ce0b4aa324a7..ae59568f1da15 100644 --- a/components/learndash/package.json +++ b/components/learndash/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/learndash", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream LearnDash Components", - "main": "dist/app/learndash.app.mjs", + "main": "learndash.app.mjs", "keywords": [ "pipedream", "learndash" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/learndash", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/lemlist/package.json b/components/lemlist/package.json index d1c823c96fc69..ca0829bda7d35 100644 --- a/components/lemlist/package.json +++ b/components/lemlist/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/lemlist", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Lemlist Components", - "main": "dist/app/lemlist.app.mjs", + "main": "lemlist.app.mjs", "keywords": [ "pipedream", "lemlist" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/lemlist", "author": "Pipedream (https://pipedream.com/)", "dependencies": { diff --git a/components/lemon_squeezy/package.json b/components/lemon_squeezy/package.json index 5b0ff0b065960..e55f562867f1d 100644 --- a/components/lemon_squeezy/package.json +++ b/components/lemon_squeezy/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/lemon_squeezy", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Lemon Squeezy Components", "main": "dist/app/lemon_squeezy.app.mjs", "keywords": [ @@ -16,6 +16,10 @@ "access": "public" }, "dependencies": { - "moment": "^2.29.4" + "moment": "^2.29.4", + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/lemon_squeezy/tsconfig.json b/components/lemon_squeezy/tsconfig.json index 8e0713505004b..3a9389484d040 100644 --- a/components/lemon_squeezy/tsconfig.json +++ b/components/lemon_squeezy/tsconfig.json @@ -1,24 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common", - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/leonardo_ai/leonardo_ai.app.mjs b/components/leonardo_ai/leonardo_ai.app.mjs new file mode 100644 index 0000000000000..21ed86a6964f8 --- /dev/null +++ b/components/leonardo_ai/leonardo_ai.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "leonardo_ai", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/leonardo_ai/package.json b/components/leonardo_ai/package.json new file mode 100644 index 0000000000000..01a75f55d3cda --- /dev/null +++ b/components/leonardo_ai/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/leonardo_ai", + "version": "0.0.1", + "description": "Pipedream Leonardo AI Components", + "main": "leonardo_ai.app.mjs", + "keywords": [ + "pipedream", + "leonardo_ai" + ], + "homepage": "https://pipedream.com/apps/leonardo_ai", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/lessaccounting/.gitignore b/components/lessaccounting/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/lessaccounting/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/lessaccounting/app/lessaccounting.app.ts b/components/lessaccounting/app/lessaccounting.app.ts deleted file mode 100644 index 8fa7ca6667cb0..0000000000000 --- a/components/lessaccounting/app/lessaccounting.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "lessaccounting", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/lessaccounting/lessaccounting.app.mjs b/components/lessaccounting/lessaccounting.app.mjs new file mode 100644 index 0000000000000..3b111b487696d --- /dev/null +++ b/components/lessaccounting/lessaccounting.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "lessaccounting", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/lessaccounting/package.json b/components/lessaccounting/package.json index c7ea0fae37963..0f9407717248d 100644 --- a/components/lessaccounting/package.json +++ b/components/lessaccounting/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/lessaccounting", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream LessAccounting Components", - "main": "dist/app/lessaccounting.app.mjs", + "main": "lessaccounting.app.mjs", "keywords": [ "pipedream", "lessaccounting" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/lessaccounting", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/lettria/package.json b/components/lettria/package.json index e3e7f0cb1efa8..723381e168a0e 100644 --- a/components/lettria/package.json +++ b/components/lettria/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/lettria", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Lettria Components", "main": "lettria.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/leverly/leverly.app.mjs b/components/leverly/leverly.app.mjs index 3844ecdb13f72..0fc5a2cd73720 100644 --- a/components/leverly/leverly.app.mjs +++ b/components/leverly/leverly.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/levity/.gitignore b/components/levity/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/levity/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/levity/app/levity.app.ts b/components/levity/app/levity.app.ts deleted file mode 100644 index ef619669792c6..0000000000000 --- a/components/levity/app/levity.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "levity", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/levity/levity.app.mjs b/components/levity/levity.app.mjs new file mode 100644 index 0000000000000..90fb4e91a0583 --- /dev/null +++ b/components/levity/levity.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "levity", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/levity/package.json b/components/levity/package.json index d009e91f13874..7e70584252193 100644 --- a/components/levity/package.json +++ b/components/levity/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/levity", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Levity Components", - "main": "dist/app/levity.app.mjs", + "main": "levity.app.mjs", "keywords": [ "pipedream", "levity" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/levity", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/lexoffice/.gitignore b/components/lexoffice/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/lexoffice/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/lexoffice/app/lexoffice.app.ts b/components/lexoffice/app/lexoffice.app.ts deleted file mode 100644 index 61da80e837486..0000000000000 --- a/components/lexoffice/app/lexoffice.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "lexoffice", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/lexoffice/lexoffice.app.mjs b/components/lexoffice/lexoffice.app.mjs new file mode 100644 index 0000000000000..3ff8dd6a545b2 --- /dev/null +++ b/components/lexoffice/lexoffice.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "lexoffice", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/lexoffice/package.json b/components/lexoffice/package.json index abca7a9ad2f90..8b40d58a116b1 100644 --- a/components/lexoffice/package.json +++ b/components/lexoffice/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/lexoffice", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Lexoffice Components", - "main": "dist/app/lexoffice.app.mjs", + "main": "lexoffice.app.mjs", "keywords": [ "pipedream", "lexoffice" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/lexoffice", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/lifterlms/.gitignore b/components/lifterlms/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/lifterlms/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/lifterlms/app/lifterlms.app.ts b/components/lifterlms/app/lifterlms.app.ts deleted file mode 100644 index 94a64180dec43..0000000000000 --- a/components/lifterlms/app/lifterlms.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "lifterlms", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/lifterlms/lifterlms.app.mjs b/components/lifterlms/lifterlms.app.mjs new file mode 100644 index 0000000000000..f68f50164bd31 --- /dev/null +++ b/components/lifterlms/lifterlms.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "lifterlms", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/lifterlms/package.json b/components/lifterlms/package.json index 634a2f682b254..64f7a533d819d 100644 --- a/components/lifterlms/package.json +++ b/components/lifterlms/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/lifterlms", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream LifterLMS Components", - "main": "dist/app/lifterlms.app.mjs", + "main": "lifterlms.app.mjs", "keywords": [ "pipedream", "lifterlms" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/lifterlms", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/line_messaging_api/actions/send-broadcast-message/send-broadcast-message.mjs b/components/line_messaging_api/actions/send-broadcast-message/send-broadcast-message.mjs new file mode 100644 index 0000000000000..e3e950d61e6e7 --- /dev/null +++ b/components/line_messaging_api/actions/send-broadcast-message/send-broadcast-message.mjs @@ -0,0 +1,40 @@ +import line from "../../line_messaging_api.app.mjs"; + +export default { + name: "Send Broadcast Message", + description: "Sends a broadcast message to all users. [See the documentation](https://developers.line.biz/en/reference/messaging-api/#send-broadcast-message)", + key: "line_messaging_api-send-broadcast-message", + version: "0.0.1", + type: "action", + props: { + line, + message: { + propDefinition: [ + line, + "message", + ], + }, + notificationDisabled: { + propDefinition: [ + line, + "notificationDisabled", + ], + }, + }, + async run({ $ }) { + const response = await this.line.sendBroadcastMessage({ + $, + data: { + messages: [ + { + type: "text", + text: this.message, + }, + ], + notificationDisabled: this.notificationDisabled ?? false, + }, + }); + $.export("$summary", "Successfully sent broadcast message"); + return response; + }, +}; diff --git a/components/line_messaging_api/actions/send-multicast-message/send-multicast-message.mjs b/components/line_messaging_api/actions/send-multicast-message/send-multicast-message.mjs new file mode 100644 index 0000000000000..2d8eb33d4f433 --- /dev/null +++ b/components/line_messaging_api/actions/send-multicast-message/send-multicast-message.mjs @@ -0,0 +1,46 @@ +import line from "../../line_messaging_api.app.mjs"; + +export default { + name: "Send Multicast Message", + description: "Sends a multicast message to a list of users. [See the documentation](https://developers.line.biz/en/reference/messaging-api/#send-multicast-message)", + key: "line_messaging_api-send-multicast-message", + version: "0.0.1", + type: "action", + props: { + line, + to: { + label: "To", + type: "string[]", + description: "An array of user IDs to send the message to", + }, + message: { + propDefinition: [ + line, + "message", + ], + }, + notificationDisabled: { + propDefinition: [ + line, + "notificationDisabled", + ], + }, + }, + async run({ $ }) { + const response = await this.line.sendMulticastMessage({ + $, + data: { + to: this.to, + messages: [ + { + type: "text", + text: this.message, + }, + ], + notificationDisabled: this.notificationDisabled ?? false, + }, + }); + $.export("$summary", `Successfully sent multicast message to: ${this.to}`); + return response; + }, +}; diff --git a/components/line_messaging_api/actions/send-push-message/send-push-message.mjs b/components/line_messaging_api/actions/send-push-message/send-push-message.mjs new file mode 100644 index 0000000000000..20f11b77df96d --- /dev/null +++ b/components/line_messaging_api/actions/send-push-message/send-push-message.mjs @@ -0,0 +1,46 @@ +import line from "../../line_messaging_api.app.mjs"; + +export default { + name: "Send Push Message", + description: "Sends a push message to a user. [See the documentation](https://developers.line.biz/en/reference/messaging-api/#send-push-message)", + key: "line_messaging_api-send-push-message", + version: "0.0.1", + type: "action", + props: { + line, + to: { + label: "To", + type: "string", + description: "The ID of user, group, or room the message will be sent to", + }, + message: { + propDefinition: [ + line, + "message", + ], + }, + notificationDisabled: { + propDefinition: [ + line, + "notificationDisabled", + ], + }, + }, + async run({ $ }) { + const response = await this.line.sendPushMessage({ + $, + data: { + to: this.to, + messages: [ + { + type: "text", + text: this.message, + }, + ], + notificationDisabled: this.notificationDisabled ?? false, + }, + }); + $.export("$summary", `Successfully sent push message to: ${this.to}`); + return response; + }, +}; diff --git a/components/line_messaging_api/actions/send-reply-message/send-reply-message.mjs b/components/line_messaging_api/actions/send-reply-message/send-reply-message.mjs new file mode 100644 index 0000000000000..f7e247e28fdd7 --- /dev/null +++ b/components/line_messaging_api/actions/send-reply-message/send-reply-message.mjs @@ -0,0 +1,46 @@ +import line from "../../line_messaging_api.app.mjs"; + +export default { + name: "Send Reply Message", + description: "Sends a reply message to a user. [See the documentation](https://developers.line.biz/en/reference/messaging-api/#send-reply-message)", + key: "line_messaging_api-send-reply-message", + version: "0.0.1", + type: "action", + props: { + line, + replyToken: { + label: "Message Reply Token", + type: "string", + description: "Reply token of the received message", + }, + message: { + propDefinition: [ + line, + "message", + ], + }, + notificationDisabled: { + propDefinition: [ + line, + "notificationDisabled", + ], + }, + }, + async run({ $ }) { + const response = await this.line.sendReplyMessage({ + $, + data: { + replyToken: this.replyToken, + messages: [ + { + type: "text", + text: this.message, + }, + ], + notificationDisabled: this.notificationDisabled ?? false, + }, + }); + $.export("$summary", `Successfully sent reply message to: ${this.replyToken}`); + return response; + }, +}; diff --git a/components/line_messaging_api/line_messaging_api.app.mjs b/components/line_messaging_api/line_messaging_api.app.mjs index e003d37a606a0..f1ca6dae47aca 100644 --- a/components/line_messaging_api/line_messaging_api.app.mjs +++ b/components/line_messaging_api/line_messaging_api.app.mjs @@ -1,11 +1,77 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "line_messaging_api", - propDefinitions: {}, + propDefinitions: { + message: { + label: "Message Text", + type: "string", + description: "The text of message to send", + }, + notificationDisabled: { + label: "Disable Notification", + type: "boolean", + description: "The user will receive a push notification when the message is sent", + default: false, + optional: true, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://api.line.me/v2/bot"; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: { + Authorization: `Bearer ${this.$auth.long_lived_channel_access_token}`, + }, + ...opts, + }); + }, + createWebhook(opts = {}) { + return this._makeRequest({ + path: "/channel/webhook/endpoint", + method: "PUT", + ...opts, + }); + }, + getWebhook(opts = {}) { + return this._makeRequest({ + path: "/channel/webhook/endpoint", + ...opts, + }); + }, + sendPushMessage(opts = {}) { + return this._makeRequest({ + path: "/message/push", + method: "POST", + ...opts, + }); + }, + sendReplyMessage(opts = {}) { + return this._makeRequest({ + path: "/message/reply", + method: "POST", + ...opts, + }); + }, + sendMulticastMessage(opts = {}) { + return this._makeRequest({ + path: "/message/multicast", + method: "POST", + ...opts, + }); + }, + sendBroadcastMessage(opts = {}) { + return this._makeRequest({ + path: "/message/broadcast", + method: "POST", + ...opts, + }); }, }, }; diff --git a/components/line_messaging_api/package.json b/components/line_messaging_api/package.json index 7e7318fc77310..f4462a6878bf5 100644 --- a/components/line_messaging_api/package.json +++ b/components/line_messaging_api/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/line_messaging_api", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream LINE Messaging API Components", "main": "line_messaging_api.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } -} \ No newline at end of file +} diff --git a/components/line_messaging_api/sources/common/base-webhook.mjs b/components/line_messaging_api/sources/common/base-webhook.mjs new file mode 100644 index 0000000000000..1ad79b9c6141d --- /dev/null +++ b/components/line_messaging_api/sources/common/base-webhook.mjs @@ -0,0 +1,26 @@ +import line from "../../line_messaging_api.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + props: { + line, + http: "$.interface.http", + }, + hooks: { + async activate() { + try { + await this.line.getWebhook(); + await this.line.createWebhook({ + data: { + endpoint: this.http.endpoint, + }, + }); + console.log("Webhook created successfully."); + console.log("If you are not receiving webhooks, please confirm you have Use Webhooks enabled in your Line Developer Console:"); + } catch (error) { + throw new ConfigurationError("Error creating webhook. Please make sure you have enabled webhooks in your Line Developer Console."); + } + console.log("https://developers.line.biz/en/docs/messaging-api/building-bot/#setting-webhook-url"); + }, + }, +}; diff --git a/components/line_messaging_api/sources/new-message-received/new-message-received.mjs b/components/line_messaging_api/sources/new-message-received/new-message-received.mjs new file mode 100644 index 0000000000000..76a53a3ae71ef --- /dev/null +++ b/components/line_messaging_api/sources/new-message-received/new-message-received.mjs @@ -0,0 +1,34 @@ +import common from "../common/base-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "line_messaging_api-new-message-received", + name: "New Message Received (Instant)", + description: "Emit new event for every received message in a channel", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + generateMeta(event) { + return { + id: event.message.id, + summary: event.message.text, + ts: event.timestamp, + }; + }, + }, + async run({ body }) { + if (!body?.events) { + return; + } + body.events.forEach((event) => { + if (event.type === "message") { + const meta = this.generateMeta(event); + this.$emit(event, meta); + } + }); + }, + sampleEmit, +}; diff --git a/components/line_messaging_api/sources/new-message-received/test-event.mjs b/components/line_messaging_api/sources/new-message-received/test-event.mjs new file mode 100644 index 0000000000000..a8312d7c0505e --- /dev/null +++ b/components/line_messaging_api/sources/new-message-received/test-event.mjs @@ -0,0 +1,19 @@ +export default { + "type": "message", + "message": { + "type": "text", + "id": "14353798921116", + "text": "Hello, world" + }, + "timestamp": 1625665242211, + "source": { + "type": "user", + "userId": "U80696558e1aa831..." + }, + "replyToken": "757913772c4646b784d4b7ce46d12671", + "mode": "active", + "webhookEventId": "01FZ74A0TDDPYRVKNK77XKC3ZR", + "deliveryContext": { + "isRedelivery": false + } +} \ No newline at end of file diff --git a/components/linear/actions/create-issue/create-issue.mjs b/components/linear/actions/create-issue/create-issue.mjs index 26789559b8371..2959f76ac6ee3 100644 --- a/components/linear/actions/create-issue/create-issue.mjs +++ b/components/linear/actions/create-issue/create-issue.mjs @@ -10,6 +10,5 @@ export default { ...utils.getAppProps(createIssue), key: "linear-create-issue", description: "Creates a new issue in Linear. Requires team ID and title. Optional: description, assignee, project, state. Returns response object with success status and issue details. Uses OAuth authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues).", - version: "0.4.10", + version: "0.4.11", }; - diff --git a/components/linear/actions/get-issue/get-issue.mjs b/components/linear/actions/get-issue/get-issue.mjs index f3f8e4e8c982c..61e82596b7734 100644 --- a/components/linear/actions/get-issue/get-issue.mjs +++ b/components/linear/actions/get-issue/get-issue.mjs @@ -10,6 +10,5 @@ export default { ...utils.getAppProps(getIssue), key: "linear-get-issue", description: "Retrieves a Linear issue by its ID. Returns complete issue details including title, description, state, assignee, team, project, labels, and timestamps. Uses OAuth authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api).", - version: "0.1.10", + version: "0.1.11", }; - diff --git a/components/linear/actions/get-teams/get-teams.mjs b/components/linear/actions/get-teams/get-teams.mjs index 39e020ab282f4..d3ba5124f69b5 100644 --- a/components/linear/actions/get-teams/get-teams.mjs +++ b/components/linear/actions/get-teams/get-teams.mjs @@ -10,6 +10,5 @@ export default { ...utils.getAppProps(getTeams), key: "linear-get-teams", description: "Retrieves all teams in your Linear workspace. Returns array of team objects with details like ID, name, and key. Supports pagination with configurable limit. Uses OAuth authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api).", - version: "0.2.11", + version: "0.2.12", }; - diff --git a/components/linear/actions/search-issues/search-issues.mjs b/components/linear/actions/search-issues/search-issues.mjs index 31f95cbe2dfc4..4348e33f46a59 100644 --- a/components/linear/actions/search-issues/search-issues.mjs +++ b/components/linear/actions/search-issues/search-issues.mjs @@ -10,6 +10,5 @@ export default { ...utils.getAppProps(searchIssues), key: "linear-search-issues", description: "Searches Linear issues by team, project, assignee, labels, state, or text query. Supports pagination, ordering, and archived issues. Returns array of matching issues. Uses OAuth authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api).", - version: "0.2.10", + version: "0.2.11", }; - diff --git a/components/linear/actions/update-issue/update-issue.mjs b/components/linear/actions/update-issue/update-issue.mjs index 3131cf59c3be9..0692a0c9106a9 100644 --- a/components/linear/actions/update-issue/update-issue.mjs +++ b/components/linear/actions/update-issue/update-issue.mjs @@ -9,6 +9,5 @@ export default { ...utils.getAppProps(updateIssue), key: "linear-update-issue", description: "Updates an existing Linear issue. Can modify title, description, assignee, state, project, team, labels, priority, and dates. Returns updated issue details. Uses OAuth authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues).", - version: "0.1.10", + version: "0.1.11", }; - diff --git a/components/linear/package.json b/components/linear/package.json index 496ba2d41efd3..a91467f2f040a 100644 --- a/components/linear/package.json +++ b/components/linear/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/linear", - "version": "0.7.4", + "version": "0.7.5", "description": "Pipedream Linear Components", "main": "linear.app.mjs", "keywords": [ @@ -14,8 +14,8 @@ "access": "public" }, "dependencies": { - "@linear/sdk": "^13.0.0", - "@pipedream/linear_app": "^0.7.3", + "@linear/sdk": "^55.1.0", + "@pipedream/linear_app": "^0.7.5", "@pipedream/platform": "^3.0.3" } } diff --git a/components/linear/sources/comment-created-instant/comment-created-instant.mjs b/components/linear/sources/comment-created-instant/comment-created-instant.mjs index 472f04d8e9b65..4b11fe29ad48c 100644 --- a/components/linear/sources/comment-created-instant/comment-created-instant.mjs +++ b/components/linear/sources/comment-created-instant/comment-created-instant.mjs @@ -10,5 +10,5 @@ export default { ...utils.getAppProps(commentCreatedInstant), key: "linear-comment-created-instant", description: "Triggers instantly when a new comment is added to an issue in Linear. Returns comment details including content, author, issue reference, and timestamps. Supports filtering by team. Uses OAuth authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).", - version: "0.1.12", + version: "0.1.13", }; diff --git a/components/linear/sources/issue-created-instant/issue-created-instant.mjs b/components/linear/sources/issue-created-instant/issue-created-instant.mjs index bf2618384ff9b..b086f2f9854ad 100644 --- a/components/linear/sources/issue-created-instant/issue-created-instant.mjs +++ b/components/linear/sources/issue-created-instant/issue-created-instant.mjs @@ -10,5 +10,5 @@ export default { ...utils.getAppProps(issueCreatedInstant), key: "linear-issue-created-instant", description: "Triggers instantly when a new issue is created in Linear. Provides complete issue details including title, description, team, assignee, state, and timestamps. Supports filtering by team and project. Uses OAuth authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).", - version: "0.3.12", + version: "0.3.13", }; diff --git a/components/linear/sources/issue-updated-instant/issue-updated-instant.mjs b/components/linear/sources/issue-updated-instant/issue-updated-instant.mjs index 769792c7247d7..23a208e7fd88b 100644 --- a/components/linear/sources/issue-updated-instant/issue-updated-instant.mjs +++ b/components/linear/sources/issue-updated-instant/issue-updated-instant.mjs @@ -10,5 +10,5 @@ export default { ...utils.getAppProps(issueUpdatedInstant), key: "linear-issue-updated-instant", description: "Triggers instantly when any issue is updated in Linear. Provides complete issue details with changes. Supports filtering by team and project. Includes all updates except status changes. Uses OAuth authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).", - version: "0.3.12", + version: "0.3.13", }; diff --git a/components/linear/sources/new-issue-status-updated/new-issue-status-updated.mjs b/components/linear/sources/new-issue-status-updated/new-issue-status-updated.mjs index 67d5310431f3a..856472186c282 100644 --- a/components/linear/sources/new-issue-status-updated/new-issue-status-updated.mjs +++ b/components/linear/sources/new-issue-status-updated/new-issue-status-updated.mjs @@ -10,5 +10,5 @@ export default { ...utils.getAppProps(newIssueStatusUpdated), key: "linear-new-issue-status-updated", description: "Triggers instantly when an issue's workflow state changes (e.g., Todo to In Progress). Returns issue with previous and current state info. Can filter by specific target state. Uses OAuth authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).", - version: "0.1.13", + version: "0.1.14", }; diff --git a/components/linear/sources/new-projectupdate-created/new-projectupdate-created.mjs b/components/linear/sources/new-projectupdate-created/new-projectupdate-created.mjs index 4b8d09d77f5e0..9c9d600f27b1a 100644 --- a/components/linear/sources/new-projectupdate-created/new-projectupdate-created.mjs +++ b/components/linear/sources/new-projectupdate-created/new-projectupdate-created.mjs @@ -11,5 +11,5 @@ export default { ...utils.getAppProps(newProjectUpdateCreated), key: "linear-new-projectupdate-created", description: "Triggers instantly when a project update (status report) is created in Linear. Returns update content, author, project details, and health status. Filters by team and optionally by project. Uses OAuth authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/linear/sources/project-updated-instant/project-updated-instant.mjs b/components/linear/sources/project-updated-instant/project-updated-instant.mjs index 7c68232cbde5a..c84da9b81e9af 100644 --- a/components/linear/sources/project-updated-instant/project-updated-instant.mjs +++ b/components/linear/sources/project-updated-instant/project-updated-instant.mjs @@ -11,5 +11,5 @@ export default { ...utils.getAppProps(projectUpdatedInstant), key: "linear-project-updated-instant", description: "Triggers instantly when a project is updated in Linear. Returns project details including name, description, status, dates, and team info. Supports filtering by specific teams. Uses OAuth authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/linear_app/actions/create-issue/create-issue.mjs b/components/linear_app/actions/create-issue/create-issue.mjs index 63a50b4bd61ef..7c89c4a132923 100644 --- a/components/linear_app/actions/create-issue/create-issue.mjs +++ b/components/linear_app/actions/create-issue/create-issue.mjs @@ -5,7 +5,7 @@ export default { key: "linear_app-create-issue", name: "Create Issue", description: "Creates a new issue in Linear. Requires team ID and title. Optional: description, assignee, project, state. Returns response object with success status and issue details. Uses API Key authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues).", - version: "0.4.10", + version: "0.4.12", props: { linearApp, teamId: { diff --git a/components/linear_app/actions/get-issue/get-issue.mjs b/components/linear_app/actions/get-issue/get-issue.mjs index 187779ddd12a1..abae4d041381e 100644 --- a/components/linear_app/actions/get-issue/get-issue.mjs +++ b/components/linear_app/actions/get-issue/get-issue.mjs @@ -4,7 +4,7 @@ export default { key: "linear_app-get-issue", name: "Get Issue", description: "Retrieves a Linear issue by its ID. Returns complete issue details including title, description, state, assignee, team, project, labels, and timestamps. Uses API Key authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api).", - version: "0.1.10", + version: "0.1.12", type: "action", props: { linearApp, diff --git a/components/linear_app/actions/get-teams/get-teams.mjs b/components/linear_app/actions/get-teams/get-teams.mjs index 173f00032c22b..f8f2add2316b1 100644 --- a/components/linear_app/actions/get-teams/get-teams.mjs +++ b/components/linear_app/actions/get-teams/get-teams.mjs @@ -5,7 +5,7 @@ export default { key: "linear_app-get-teams", name: "Get Teams", description: "Retrieves all teams in your Linear workspace. Returns array of team objects with details like ID, name, and key. Supports pagination with configurable limit. Uses API Key authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api).", - version: "0.2.10", + version: "0.2.12", type: "action", props: { linearApp, diff --git a/components/linear_app/actions/search-issues/search-issues.mjs b/components/linear_app/actions/search-issues/search-issues.mjs index 55d0f547cb0f3..a0ab6506ef961 100644 --- a/components/linear_app/actions/search-issues/search-issues.mjs +++ b/components/linear_app/actions/search-issues/search-issues.mjs @@ -7,7 +7,7 @@ export default { name: "Search Issues", description: "Searches Linear issues by team, project, assignee, labels, state, or text query. Supports pagination, ordering, and archived issues. Returns array of matching issues. Uses API Key authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api).", type: "action", - version: "0.2.10", + version: "0.2.12", props: { linearApp, teamId: { diff --git a/components/linear_app/actions/update-issue/update-issue.mjs b/components/linear_app/actions/update-issue/update-issue.mjs index 28891044aa5de..5799c98238aa5 100644 --- a/components/linear_app/actions/update-issue/update-issue.mjs +++ b/components/linear_app/actions/update-issue/update-issue.mjs @@ -5,7 +5,7 @@ export default { name: "Update Issue", description: "Updates an existing Linear issue. Can modify title, description, assignee, state, project, team, labels, priority, and dates. Returns updated issue details. Uses API Key authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues).", type: "action", - version: "0.1.10", + version: "0.1.12", props: { linearApp, teamId: { diff --git a/components/linear_app/package.json b/components/linear_app/package.json index caa8de5c21d1f..01ccbec47dfce 100644 --- a/components/linear_app/package.json +++ b/components/linear_app/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/linear_app", - "version": "0.7.3", + "version": "0.7.5", "description": "Pipedream Linear_app Components", "main": "linear_app.app.mjs", "keywords": [ @@ -14,7 +14,7 @@ "access": "public" }, "dependencies": { - "@linear/sdk": "^13.0.0", + "@linear/sdk": "^55.1.0", "@pipedream/platform": "^3.0.3" } } diff --git a/components/linear_app/sources/comment-created-instant/comment-created-instant.mjs b/components/linear_app/sources/comment-created-instant/comment-created-instant.mjs index 4d2dc8263e6e4..2ec4f776708d2 100644 --- a/components/linear_app/sources/comment-created-instant/comment-created-instant.mjs +++ b/components/linear_app/sources/comment-created-instant/comment-created-instant.mjs @@ -7,7 +7,7 @@ export default { name: "New Comment Created (Instant)", description: "Triggers instantly when a new comment is added to an issue in Linear. Returns comment details including content, author, issue reference, and timestamps. Supports filtering by team. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).", type: "source", - version: "0.1.12", + version: "0.1.14", dedupe: "unique", methods: { ...common.methods, diff --git a/components/linear_app/sources/issue-created-instant/issue-created-instant.mjs b/components/linear_app/sources/issue-created-instant/issue-created-instant.mjs index 0b7d926435ce8..7d9522f68e684 100644 --- a/components/linear_app/sources/issue-created-instant/issue-created-instant.mjs +++ b/components/linear_app/sources/issue-created-instant/issue-created-instant.mjs @@ -7,7 +7,7 @@ export default { name: "New Issue Created (Instant)", description: "Triggers instantly when a new issue is created in Linear. Provides complete issue details including title, description, team, assignee, state, and timestamps. Supports filtering by team and project. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).", type: "source", - version: "0.3.12", + version: "0.3.14", dedupe: "unique", methods: { ...common.methods, diff --git a/components/linear_app/sources/issue-updated-instant/issue-updated-instant.mjs b/components/linear_app/sources/issue-updated-instant/issue-updated-instant.mjs index 4422bd2376987..885fe8068e7cb 100644 --- a/components/linear_app/sources/issue-updated-instant/issue-updated-instant.mjs +++ b/components/linear_app/sources/issue-updated-instant/issue-updated-instant.mjs @@ -7,7 +7,7 @@ export default { name: "Issue Updated (Instant)", description: "Triggers instantly when any issue is updated in Linear. Provides complete issue details with changes. Supports filtering by team and project. Includes all updates except status changes. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).", type: "source", - version: "0.3.12", + version: "0.3.14", dedupe: "unique", methods: { ...common.methods, diff --git a/components/linear_app/sources/new-issue-status-updated/new-issue-status-updated.mjs b/components/linear_app/sources/new-issue-status-updated/new-issue-status-updated.mjs index 622a4d9ad85f7..7f9d992d593fa 100644 --- a/components/linear_app/sources/new-issue-status-updated/new-issue-status-updated.mjs +++ b/components/linear_app/sources/new-issue-status-updated/new-issue-status-updated.mjs @@ -8,7 +8,7 @@ export default { name: "Issue Status Updated (Instant)", description: "Triggers instantly when an issue's workflow state changes (e.g., Todo to In Progress). Returns issue with previous and current state info. Can filter by specific target state. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).", type: "source", - version: "0.1.12", + version: "0.1.14", dedupe: "unique", props: { linearApp: common.props.linearApp, diff --git a/components/linear_app/sources/new-projectupdate-created/new-projectupdate-created.mjs b/components/linear_app/sources/new-projectupdate-created/new-projectupdate-created.mjs index c6c4640fe2776..cb1fa34b257bf 100644 --- a/components/linear_app/sources/new-projectupdate-created/new-projectupdate-created.mjs +++ b/components/linear_app/sources/new-projectupdate-created/new-projectupdate-created.mjs @@ -8,7 +8,7 @@ export default { name: "New Project Update Written (Instant)", description: "Triggers instantly when a project update (status report) is created in Linear. Returns update content, author, project details, and health status. Filters by team and optionally by project. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).", type: "source", - version: "0.0.4", + version: "0.0.6", dedupe: "unique", props: { linearApp, diff --git a/components/linear_app/sources/project-updated-instant/project-updated-instant.mjs b/components/linear_app/sources/project-updated-instant/project-updated-instant.mjs index 6d9b7e6745c1d..57fb6822d6e40 100644 --- a/components/linear_app/sources/project-updated-instant/project-updated-instant.mjs +++ b/components/linear_app/sources/project-updated-instant/project-updated-instant.mjs @@ -8,7 +8,7 @@ export default { name: "Project Updated (Instant)", description: "Triggers instantly when a project is updated in Linear. Returns project details including name, description, status, dates, and team info. Supports filtering by specific teams. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).", type: "source", - version: "0.0.5", + version: "0.0.7", dedupe: "unique", props: { linearApp, diff --git a/components/linkedin/actions/create-comment/create-comment.mjs b/components/linkedin/actions/create-comment/create-comment.mjs index 04d7d2b575a54..8e0a5e08ad667 100644 --- a/components/linkedin/actions/create-comment/create-comment.mjs +++ b/components/linkedin/actions/create-comment/create-comment.mjs @@ -4,7 +4,7 @@ export default { key: "linkedin-create-comment", name: "Create Comment", description: "Create a comment on a share or user generated content post. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/network-update-social-actions#create-comment)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { linkedin, diff --git a/components/linkedin/actions/create-image-post-organization/create-image-post-organization.mjs b/components/linkedin/actions/create-image-post-organization/create-image-post-organization.mjs index 2ad4440611fb4..d45b93b93d907 100644 --- a/components/linkedin/actions/create-image-post-organization/create-image-post-organization.mjs +++ b/components/linkedin/actions/create-image-post-organization/create-image-post-organization.mjs @@ -7,7 +7,7 @@ export default { key: "linkedin-create-image-post-organization", name: "Create Image Post (Organization)", description: "Create an image post on LinkedIn. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/images-api?view=li-lms-2023-09&tabs=http#uploading-an-image)", - version: "1.0.2", + version: "1.0.3", type: "action", props: { linkedin, @@ -87,7 +87,11 @@ export default { await this.linkedin.createPost({ data: { - author: this.organizationId, + author: `urn:li:organization:${this.organizationId}`, + lifecycleState: "PUBLISHED", + distribution: { + feedDistribution: "MAIN_FEED", + }, commentary: utils.escapeText(this.text), visibility: "PUBLIC", content: { diff --git a/components/linkedin/actions/create-image-post-user/create-image-post-user.mjs b/components/linkedin/actions/create-image-post-user/create-image-post-user.mjs index ba55db5454229..d301e8677ec5c 100644 --- a/components/linkedin/actions/create-image-post-user/create-image-post-user.mjs +++ b/components/linkedin/actions/create-image-post-user/create-image-post-user.mjs @@ -7,7 +7,7 @@ export default { key: "linkedin-create-image-post-user", name: "Create Image Post (User)", description: "Create an image post on LinkedIn. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/images-api?view=li-lms-2023-09&tabs=http#uploading-an-image)", - version: "1.0.2", + version: "1.0.3", type: "action", props: { linkedin, @@ -85,8 +85,17 @@ export default { await this.uploadImage(uploadUrl, formData); + const { id } = await this.linkedin.getCurrentMemberProfile({ + $, + }); + await this.linkedin.createPost({ data: { + author: `urn:li:person:${id}`, + lifecycleState: "PUBLISHED", + distribution: { + feedDistribution: "MAIN_FEED", + }, commentary: utils.escapeText(this.text), visibility: this.visibility, content: { diff --git a/components/linkedin/actions/create-like-on-share/create-like-on-share.mjs b/components/linkedin/actions/create-like-on-share/create-like-on-share.mjs index 0deca78da9b46..1d3703cf38a01 100644 --- a/components/linkedin/actions/create-like-on-share/create-like-on-share.mjs +++ b/components/linkedin/actions/create-like-on-share/create-like-on-share.mjs @@ -4,7 +4,7 @@ export default { key: "linkedin-create-like-on-share", name: "Create Like On Share", description: "Creates a like on a share. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/network-update-social-actions#create-a-like-on-a-share)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { linkedin, diff --git a/components/linkedin/actions/create-text-post-organization/create-text-post-organization.mjs b/components/linkedin/actions/create-text-post-organization/create-text-post-organization.mjs index 9d9e7025a46d0..5c12a813aef5b 100644 --- a/components/linkedin/actions/create-text-post-organization/create-text-post-organization.mjs +++ b/components/linkedin/actions/create-text-post-organization/create-text-post-organization.mjs @@ -5,7 +5,7 @@ export default { key: "linkedin-create-text-post-organization", name: "Create a Simple Post (Organization)", description: "Create post on LinkedIn using text, URL or article. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/posts-api?view=li-lms-2022-11&tabs=http#create-organic-posts) for more information", - version: "0.0.7", + version: "0.0.8", type: "action", props: { linkedin, @@ -30,9 +30,13 @@ export default { }, async run({ $ }) { const data = { - author: this.organizationId, + author: `urn:li:organization:${this.organizationId}`, commentary: utils.escapeText(this.text), visibility: "PUBLIC", + lifecycleState: "PUBLISHED", + distribution: { + feedDistribution: "MAIN_FEED", + }, }; if (this.article) { data.content = { @@ -47,6 +51,8 @@ export default { data, }); $.export("$summary", "Successfully created a new Post as Organization"); - return response; + return response || { + success: true, + }; }, }; diff --git a/components/linkedin/actions/create-text-post-user/create-text-post-user.mjs b/components/linkedin/actions/create-text-post-user/create-text-post-user.mjs index 84f7f02775bb4..2ba4e1553c58d 100644 --- a/components/linkedin/actions/create-text-post-user/create-text-post-user.mjs +++ b/components/linkedin/actions/create-text-post-user/create-text-post-user.mjs @@ -5,7 +5,7 @@ export default { key: "linkedin-create-text-post-user", name: "Create a Simple Post (User)", description: "Create post on LinkedIn using text, URL or article. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/posts-api?view=li-lms-2022-11&tabs=http#create-organic-posts) for more information", - version: "0.0.7", + version: "0.0.8", type: "action", props: { linkedin, @@ -29,23 +29,43 @@ export default { }, }, async run({ $ }) { - const data = { - commentary: utils.escapeText(this.text), - visibility: this.visibility, - }; - if (this.article) { - data.content = { - article: { - source: this.article, - title: this.article, - }, - }; - } - const response = await this.linkedin.createPost({ + const { + linkedin, + visibility, + text, + article, + } = this; + + const profile = await linkedin.getCurrentMemberProfile({ + $, + }); + + const response = await linkedin.createPost({ $, - data, + data: { + author: `urn:li:person:${profile?.id}`, + lifecycleState: "PUBLISHED", + distribution: { + feedDistribution: "MAIN_FEED", + }, + commentary: utils.escapeText(text), + visibility, + ...(article + ? { + content: { + article: { + source: article, + title: article, + }, + }, + } + : {} + ), + }, }); $.export("$summary", "Successfully created a new Post as User"); - return response; + return response || { + success: true, + }; }, }; diff --git a/components/linkedin/actions/delete-post/delete-post.mjs b/components/linkedin/actions/delete-post/delete-post.mjs index 85719c5c15f36..0c49ee6e9d0e8 100644 --- a/components/linkedin/actions/delete-post/delete-post.mjs +++ b/components/linkedin/actions/delete-post/delete-post.mjs @@ -4,7 +4,7 @@ export default { key: "linkedin-delete-post", name: "Delete Post", description: "Removes a post from user's wall. [See the docs](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/share-api?tabs=http#delete-shares) for more information", - version: "0.0.7", + version: "0.0.8", type: "action", props: { linkedin, diff --git a/components/linkedin/actions/fetch-ad-account/fetch-ad-account.mjs b/components/linkedin/actions/fetch-ad-account/fetch-ad-account.mjs index 3a877bb7c3215..ecb3443dff1d3 100644 --- a/components/linkedin/actions/fetch-ad-account/fetch-ad-account.mjs +++ b/components/linkedin/actions/fetch-ad-account/fetch-ad-account.mjs @@ -4,7 +4,7 @@ export default { key: "linkedin-fetch-ad-account", name: "Fetch Ad Account", description: "Fetches an individual adAccount given its id. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-accounts#fetch-ad-account)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { linkedin, diff --git a/components/linkedin/actions/get-current-member-profile/get-current-member-profile.mjs b/components/linkedin/actions/get-current-member-profile/get-current-member-profile.mjs index 28e986a779682..28cc879fa2b26 100644 --- a/components/linkedin/actions/get-current-member-profile/get-current-member-profile.mjs +++ b/components/linkedin/actions/get-current-member-profile/get-current-member-profile.mjs @@ -4,7 +4,7 @@ export default { key: "linkedin-get-current-member-profile", name: "Get Current Member Profile", description: "Gets the profile of the current authenticated member. [See the docs here](https://docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api#retrieve-current-members-profile)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { linkedin, diff --git a/components/linkedin/actions/get-member-profile/get-member-profile.mjs b/components/linkedin/actions/get-member-profile/get-member-profile.mjs index fe1280bd16fba..82e39aa9981d1 100644 --- a/components/linkedin/actions/get-member-profile/get-member-profile.mjs +++ b/components/linkedin/actions/get-member-profile/get-member-profile.mjs @@ -4,7 +4,7 @@ export default { key: "linkedin-get-member-profile", name: "Get Member Profile", description: "Gets another member's profile, given its person id. [See the docs here](https://docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api#retrieve-other-members-profile)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { linkedin, diff --git a/components/linkedin/actions/get-multiple-member-profiles/get-multiple-member-profiles.mjs b/components/linkedin/actions/get-multiple-member-profiles/get-multiple-member-profiles.mjs index c2a451c051ecb..3a05d11d07bcd 100644 --- a/components/linkedin/actions/get-multiple-member-profiles/get-multiple-member-profiles.mjs +++ b/components/linkedin/actions/get-multiple-member-profiles/get-multiple-member-profiles.mjs @@ -4,7 +4,7 @@ export default { key: "linkedin-get-multiple-member-profiles", name: "Get Multiple Member Profiles", description: "Gets multiple member profiles at once. [See the docs here](https://docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api#retrieve-other-members-profile)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { linkedin, diff --git a/components/linkedin/actions/get-org-member-access/get-org-member-access.mjs b/components/linkedin/actions/get-org-member-access/get-org-member-access.mjs index af03e2ce70085..8dfadaad838c9 100644 --- a/components/linkedin/actions/get-org-member-access/get-org-member-access.mjs +++ b/components/linkedin/actions/get-org-member-access/get-org-member-access.mjs @@ -4,7 +4,7 @@ export default { key: "linkedin-get-org-member-access", name: "Get Member's Organization Access Control Information", description: "Gets the organization access control information of the current authenticated member. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/organizations/organization-access-control-by-role?view=li-lms-2025-01&tabs=http#find-a-members-organization-access-control-information)", - version: "1.0.2", + version: "1.0.3", type: "action", props: { linkedin, diff --git a/components/linkedin/actions/get-organization-access-control/get-organization-access-control.mjs b/components/linkedin/actions/get-organization-access-control/get-organization-access-control.mjs index 4ce9b3322c8fc..65a36163d23ce 100644 --- a/components/linkedin/actions/get-organization-access-control/get-organization-access-control.mjs +++ b/components/linkedin/actions/get-organization-access-control/get-organization-access-control.mjs @@ -4,7 +4,7 @@ export default { key: "linkedin-get-organization-access-control", name: "Gets Organization Access Control", description: "Gets a selected organization's access control information. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/organizations/organization-access-control-by-role?view=li-lms-2025-01&tabs=http#find-organization-access-control)", - version: "0.2.1", + version: "0.2.2", type: "action", props: { linkedin, diff --git a/components/linkedin/actions/get-organization-administrators/get-organization-administrators.mjs b/components/linkedin/actions/get-organization-administrators/get-organization-administrators.mjs index 93817ffc77d13..1438e18676f25 100644 --- a/components/linkedin/actions/get-organization-administrators/get-organization-administrators.mjs +++ b/components/linkedin/actions/get-organization-administrators/get-organization-administrators.mjs @@ -4,7 +4,7 @@ export default { key: "linkedin-get-organization-administrators", name: "Get Organization Administrators", description: "Gets the administrator members of a selected organization. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/organizations/organization-access-control-by-role?view=li-lms-2025-01&tabs=http#find-organization-administrators)", - version: "0.3.1", + version: "0.3.2", type: "action", props: { linkedin, diff --git a/components/linkedin/actions/get-profile-picture-fields/get-profile-picture-fields.mjs b/components/linkedin/actions/get-profile-picture-fields/get-profile-picture-fields.mjs index eea578c0627bb..f4a04a1600741 100644 --- a/components/linkedin/actions/get-profile-picture-fields/get-profile-picture-fields.mjs +++ b/components/linkedin/actions/get-profile-picture-fields/get-profile-picture-fields.mjs @@ -5,7 +5,7 @@ export default { key: "linkedin-get-profile-picture-fields", name: "Get Profile Picture Fields", description: "Gets the authenticated user's profile picture data including display image and metadata. [See the documentation](https://learn.microsoft.com/en-us/linkedin/shared/references/v2/profile/profile-picture)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { linkedin, diff --git a/components/linkedin/actions/retrieve-comments-on-comments/retrieve-comments-on-comments.mjs b/components/linkedin/actions/retrieve-comments-on-comments/retrieve-comments-on-comments.mjs index 94d5da8505e91..15486e79970e1 100644 --- a/components/linkedin/actions/retrieve-comments-on-comments/retrieve-comments-on-comments.mjs +++ b/components/linkedin/actions/retrieve-comments-on-comments/retrieve-comments-on-comments.mjs @@ -4,7 +4,7 @@ export default { key: "linkedin-retrieve-comments-on-comments", name: "Retrieves Comments on Comments", description: "Retrieves comments on comments, given the parent comment urn. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/network-update-social-actions#retrieve-comments-on-comments)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { linkedin, diff --git a/components/linkedin/actions/retrieve-comments-shares/retrieve-comments-shares.mjs b/components/linkedin/actions/retrieve-comments-shares/retrieve-comments-shares.mjs index ccd8c7a725ade..c778142ab70cd 100644 --- a/components/linkedin/actions/retrieve-comments-shares/retrieve-comments-shares.mjs +++ b/components/linkedin/actions/retrieve-comments-shares/retrieve-comments-shares.mjs @@ -4,7 +4,7 @@ export default { key: "linkedin-retrieve-comments-shares", name: "Retrieve Comments On Shares", description: "Retrieve comments on shares given the share urn. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/network-update-social-actions#retrieve-comments-on-shares)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { linkedin, diff --git a/components/linkedin/actions/search-organization/search-organization.mjs b/components/linkedin/actions/search-organization/search-organization.mjs index 9d70cbfcb67fa..94a5a284dc753 100644 --- a/components/linkedin/actions/search-organization/search-organization.mjs +++ b/components/linkedin/actions/search-organization/search-organization.mjs @@ -4,7 +4,7 @@ export default { key: "linkedin-search-organization", name: "Search Organization", description: "Searches for an organization by vanity name or email domain. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/organizations/organization-lookup-api)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { linkedin, diff --git a/components/linkedin/linkedin.app.mjs b/components/linkedin/linkedin.app.mjs index 97600b1564976..fd19c8be6c5bd 100644 --- a/components/linkedin/linkedin.app.mjs +++ b/components/linkedin/linkedin.app.mjs @@ -157,23 +157,10 @@ export default { ...otherConfig, }); }, - async createPost({ - data, ...args - }) { - data = { - ...data, - author: `urn:li:${data?.author - ? "organization" - : "person"}:${data.author || this.$auth.oauth_uid}`, - lifecycleState: "PUBLISHED", - distribution: { - feedDistribution: "MAIN_FEED", - }, - }; + createPost(args = {}) { return this._makeRequest({ method: "POST", path: "/posts", - data, ...args, }); }, diff --git a/components/linkedin/package.json b/components/linkedin/package.json index e9dc258ce1dc2..06593438c15cf 100644 --- a/components/linkedin/package.json +++ b/components/linkedin/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/linkedin", - "version": "1.2.0", + "version": "1.2.1", "description": "Pipedream Linkedin Components", "main": "linkedin.app.mjs", "keywords": [ diff --git a/components/linkedin/sources/new-organization-post-created/new-organization-post-created.mjs b/components/linkedin/sources/new-organization-post-created/new-organization-post-created.mjs index 2190d0b71c1d5..3f617b10d01e7 100644 --- a/components/linkedin/sources/new-organization-post-created/new-organization-post-created.mjs +++ b/components/linkedin/sources/new-organization-post-created/new-organization-post-created.mjs @@ -9,7 +9,7 @@ export default { name: "New Organization Post Created", description: "Emit new event when a new post is created by the organization. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/posts-api?view=li-lms-2024-09&tabs=curl#find-posts-by-authors).", type: "source", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", props: { ...common.props, diff --git a/components/linqs_cc/.gitignore b/components/linqs_cc/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/linqs_cc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/linqs_cc/app/linqs_cc.app.ts b/components/linqs_cc/app/linqs_cc.app.ts deleted file mode 100644 index d64e0a2b5b1a6..0000000000000 --- a/components/linqs_cc/app/linqs_cc.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "linqs_cc", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/linqs_cc/linqs_cc.app.mjs b/components/linqs_cc/linqs_cc.app.mjs new file mode 100644 index 0000000000000..de49598940e28 --- /dev/null +++ b/components/linqs_cc/linqs_cc.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "linqs_cc", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/linqs_cc/package.json b/components/linqs_cc/package.json index 27a87c4e5d4a2..b0eff1968aa8e 100644 --- a/components/linqs_cc/package.json +++ b/components/linqs_cc/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/linqs_cc", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream linqs Components", - "main": "dist/app/linqs_cc.app.mjs", + "main": "linqs_cc.app.mjs", "keywords": [ "pipedream", "linqs_cc" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/linqs_cc", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/liondesk/.gitignore b/components/liondesk/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/liondesk/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/liondesk/app/liondesk.app.ts b/components/liondesk/app/liondesk.app.ts deleted file mode 100644 index 2f1ee1eec0c31..0000000000000 --- a/components/liondesk/app/liondesk.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "liondesk", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/liondesk/liondesk.app.mjs b/components/liondesk/liondesk.app.mjs new file mode 100644 index 0000000000000..f40eff90eb048 --- /dev/null +++ b/components/liondesk/liondesk.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "liondesk", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/liondesk/package.json b/components/liondesk/package.json index 69a1042bae269..80c57dceba50f 100644 --- a/components/liondesk/package.json +++ b/components/liondesk/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/liondesk", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Liondesk Components", - "main": "dist/app/liondesk.app.mjs", + "main": "liondesk.app.mjs", "keywords": [ "pipedream", "liondesk" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/liondesk", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/listen_notes/package.json b/components/listen_notes/package.json index cf135b7b6549b..6feb359d73116 100644 --- a/components/listen_notes/package.json +++ b/components/listen_notes/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/listen_notes", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Listen Notes Components", "main": "listen_notes.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/livespace/livespace.app.mjs b/components/livespace/livespace.app.mjs index 63947067be26b..f2de3faf2b37e 100644 --- a/components/livespace/livespace.app.mjs +++ b/components/livespace/livespace.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/lob/package.json b/components/lob/package.json index 9447ec9246d34..82a5c0c6729a8 100644 --- a/components/lob/package.json +++ b/components/lob/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/lob", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Lob Components", "main": "dist/app/lob.app.mjs", "keywords": [ @@ -16,6 +16,10 @@ "access": "public" }, "dependencies": { - "@lob/lob-typescript-sdk": "^1.0.0" + "@lob/lob-typescript-sdk": "^1.0.0", + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/lob/tsconfig.json b/components/lob/tsconfig.json index 84d5ff7b990d3..3a9389484d040 100644 --- a/components/lob/tsconfig.json +++ b/components/lob/tsconfig.json @@ -1,23 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/lodgify/.gitignore b/components/lodgify/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/lodgify/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/lodgify/app/lodgify.app.ts b/components/lodgify/app/lodgify.app.ts deleted file mode 100644 index 1dfdc419af616..0000000000000 --- a/components/lodgify/app/lodgify.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "lodgify", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/lodgify/lodgify.app.mjs b/components/lodgify/lodgify.app.mjs new file mode 100644 index 0000000000000..a5960ee8c3432 --- /dev/null +++ b/components/lodgify/lodgify.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "lodgify", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/lodgify/package.json b/components/lodgify/package.json index ea999aedcaa4d..9f48f81060755 100644 --- a/components/lodgify/package.json +++ b/components/lodgify/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/lodgify", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Lodgify Components", - "main": "dist/app/lodgify.app.mjs", + "main": "lodgify.app.mjs", "keywords": [ "pipedream", "lodgify" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/lodgify", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/logoraisr/.gitignore b/components/logoraisr/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/logoraisr/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/logoraisr/app/logoraisr.app.ts b/components/logoraisr/app/logoraisr.app.ts deleted file mode 100644 index cf1be8de521b6..0000000000000 --- a/components/logoraisr/app/logoraisr.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "logoraisr", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/logoraisr/logoraisr.app.mjs b/components/logoraisr/logoraisr.app.mjs new file mode 100644 index 0000000000000..c0488df61888d --- /dev/null +++ b/components/logoraisr/logoraisr.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "logoraisr", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/logoraisr/package.json b/components/logoraisr/package.json index 3380cd45bb1f3..b8b04e0c69184 100644 --- a/components/logoraisr/package.json +++ b/components/logoraisr/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/logoraisr", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Logoraisr Components", - "main": "dist/app/logoraisr.app.mjs", + "main": "logoraisr.app.mjs", "keywords": [ "pipedream", "logoraisr" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/logoraisr", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/logsnag/.gitignore b/components/logsnag/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/logsnag/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/logsnag/app/logsnag.app.ts b/components/logsnag/app/logsnag.app.ts deleted file mode 100644 index c349c639cc7a4..0000000000000 --- a/components/logsnag/app/logsnag.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "logsnag", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/logsnag/logsnag.app.mjs b/components/logsnag/logsnag.app.mjs new file mode 100644 index 0000000000000..12f9cbde919ef --- /dev/null +++ b/components/logsnag/logsnag.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "logsnag", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/logsnag/package.json b/components/logsnag/package.json index 3b8d42aa3b79a..37ed40e77acc4 100644 --- a/components/logsnag/package.json +++ b/components/logsnag/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/logsnag", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream LogSnag Components", - "main": "dist/app/logsnag.app.mjs", + "main": "logsnag.app.mjs", "keywords": [ "pipedream", "logsnag" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/logsnag", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/looker/.gitignore b/components/looker/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/looker/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/looker/app/looker.app.ts b/components/looker/app/looker.app.ts deleted file mode 100644 index d72b19dd9e80c..0000000000000 --- a/components/looker/app/looker.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "looker", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/looker/looker.app.mjs b/components/looker/looker.app.mjs new file mode 100644 index 0000000000000..1395ad9ad86b0 --- /dev/null +++ b/components/looker/looker.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "looker", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/looker/package.json b/components/looker/package.json index d3af0dd06f267..d4940a8877b87 100644 --- a/components/looker/package.json +++ b/components/looker/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/looker", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Looker Components", - "main": "dist/app/looker.app.mjs", + "main": "looker.app.mjs", "keywords": [ "pipedream", "looker" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/looker", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/loqate/.gitignore b/components/loqate/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/loqate/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/loqate/app/loqate.app.ts b/components/loqate/app/loqate.app.ts deleted file mode 100644 index 814e15dbf4051..0000000000000 --- a/components/loqate/app/loqate.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "loqate", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/loqate/loqate.app.mjs b/components/loqate/loqate.app.mjs new file mode 100644 index 0000000000000..26d1a120c1f5e --- /dev/null +++ b/components/loqate/loqate.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "loqate", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/loqate/package.json b/components/loqate/package.json index 1844ed9c9d3de..89ac32641e98c 100644 --- a/components/loqate/package.json +++ b/components/loqate/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/loqate", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Loqate Components", - "main": "dist/app/loqate.app.mjs", + "main": "loqate.app.mjs", "keywords": [ "pipedream", "loqate" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/loqate", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/lumin_pdf/actions/cancel-signature-request/cancel-signature-request.mjs b/components/lumin_pdf/actions/cancel-signature-request/cancel-signature-request.mjs new file mode 100644 index 0000000000000..d51e244d38b92 --- /dev/null +++ b/components/lumin_pdf/actions/cancel-signature-request/cancel-signature-request.mjs @@ -0,0 +1,32 @@ +import luminPdf from "../../lumin_pdf.app.mjs"; + +export default { + key: "lumin_pdf-cancel-signature-request", + name: "Cancel Signature Request", + description: "Cancel a signature request. [See the documentation](https://developers.luminpdf.com/api/cancel-signature-request/)", + version: "0.0.1", + type: "action", + props: { + luminPdf, + alert: { + type: "alert", + alertType: "info", + content: "This action only works for signature requests that were created via API.", + }, + signatureRequestId: { + propDefinition: [ + luminPdf, + "signatureRequestId", + ], + }, + }, + async run({ $ }) { + const response = await this.luminPdf.cancelSignatureRequest({ + $, + signatureRequestId: this.signatureRequestId, + }); + + $.export("$summary", `Successfully cancelled signature request with ID: ${this.signatureRequestId}`); + return response; + }, +}; diff --git a/components/lumin_pdf/actions/download-file-as-file-url/download-file-as-file-url.mjs b/components/lumin_pdf/actions/download-file-as-file-url/download-file-as-file-url.mjs new file mode 100644 index 0000000000000..0df2ca17bee44 --- /dev/null +++ b/components/lumin_pdf/actions/download-file-as-file-url/download-file-as-file-url.mjs @@ -0,0 +1,27 @@ +import luminPdf from "../../lumin_pdf.app.mjs"; + +export default { + name: "Download File as File URL", + version: "0.0.1", + key: "lumin_pdf-download-file-as-file-url", + description: "Get a download URL for a file. [See the documentation](https://developers.luminpdf.com/api/download-file-as-file-url/)", + type: "action", + props: { + luminPdf, + signatureRequestId: { + propDefinition: [ + luminPdf, + "signatureRequestId", + ], + }, + }, + async run({ $ }) { + const response = await this.luminPdf.downloadFileAsFileUrl({ + $, + signatureRequestId: this.signatureRequestId, + }); + + $.export("$summary", `Successfully retrieved download URL for signature request with ID: ${this.signatureRequestId}`); + return response; + }, +}; diff --git a/components/lumin_pdf/actions/download-file/download-file.mjs b/components/lumin_pdf/actions/download-file/download-file.mjs new file mode 100644 index 0000000000000..1957263d11289 --- /dev/null +++ b/components/lumin_pdf/actions/download-file/download-file.mjs @@ -0,0 +1,46 @@ +import fs from "fs"; +import stream from "stream"; +import { promisify } from "util"; +import luminPdf from "../../lumin_pdf.app.mjs"; + +export default { + name: "Download File", + version: "0.0.1", + key: "lumin_pdf-download-file", + description: "Download a file directly. [See the documentation](https://developers.luminpdf.com/api/download-file/)", + type: "action", + props: { + luminPdf, + signatureRequestId: { + propDefinition: [ + luminPdf, + "signatureRequestId", + ], + }, + filePath: { + type: "string", + label: "File Path", + description: "The path to the file you'd like to download eg. `/tmp/file.pdf`", + }, + syncDir: { + type: "dir", + accessMode: "write", + sync: true, + }, + }, + async run({ $ }) { + const response = await this.luminPdf.downloadFile({ + $, + signatureRequestId: this.signatureRequestId, + responseType: "stream", + }); + + const pipeline = promisify(stream.pipeline); + await pipeline(response, fs.createWriteStream(this.filePath)); + + $.export("$summary", `Successfully downloaded file for signature request with ID: ${this.signatureRequestId}`); + return { + filePath: this.filePath, + }; + }, +}; diff --git a/components/lumin_pdf/actions/get-signature-request/get-signature-request.mjs b/components/lumin_pdf/actions/get-signature-request/get-signature-request.mjs new file mode 100644 index 0000000000000..68ff064ed5fdc --- /dev/null +++ b/components/lumin_pdf/actions/get-signature-request/get-signature-request.mjs @@ -0,0 +1,27 @@ +import luminPdf from "../../lumin_pdf.app.mjs"; + +export default { + key: "lumin_pdf-get-signature-request", + name: "Get Signature Request", + description: "Get details of a specific signature request. [See the documentation](https://developers.luminpdf.com/api/get-signature-request/)", + version: "0.0.1", + type: "action", + props: { + luminPdf, + signatureRequestId: { + propDefinition: [ + luminPdf, + "signatureRequestId", + ], + }, + }, + async run({ $ }) { + const response = await this.luminPdf.getSignatureRequest({ + $, + signatureRequestId: this.signatureRequestId, + }); + + $.export("$summary", `Successfully retrieved signature request with ID: ${this.signatureRequestId}`); + return response; + }, +}; diff --git a/components/lumin_pdf/actions/get-user-information/get-user-information.mjs b/components/lumin_pdf/actions/get-user-information/get-user-information.mjs new file mode 100644 index 0000000000000..823d078bb1e02 --- /dev/null +++ b/components/lumin_pdf/actions/get-user-information/get-user-information.mjs @@ -0,0 +1,20 @@ +import luminPdf from "../../lumin_pdf.app.mjs"; + +export default { + name: "Get User Information", + version: "0.0.1", + key: "lumin_pdf-get-user-information", + description: "Get information about the current authenticated user. [See the documentation](https://developers.luminpdf.com/api/get-user-information/)", + type: "action", + props: { + luminPdf, + }, + async run({ $ }) { + const response = await this.luminPdf.getUserInformation({ + $, + }); + + $.export("$summary", `Successfully retrieved user information for ${response.user.email || response.user.id}`); + return response; + }, +}; diff --git a/components/lumin_pdf/actions/send-signature-request/send-signature-request.mjs b/components/lumin_pdf/actions/send-signature-request/send-signature-request.mjs new file mode 100644 index 0000000000000..2e28037eede78 --- /dev/null +++ b/components/lumin_pdf/actions/send-signature-request/send-signature-request.mjs @@ -0,0 +1,194 @@ +import { + ConfigurationError, + getFileStreamAndMetadata, +} from "@pipedream/platform"; +import FormData from "form-data"; +import { parseObject } from "../../common/utils.mjs"; +import luminPdf from "../../lumin_pdf.app.mjs"; + +export default { + key: "lumin_pdf-send-signature-request", + name: "Send Signature Request", + description: "Send a signature request to signers. [See the documentation](https://developers.luminpdf.com/api/send-signature-request/)", + version: "0.0.1", + type: "action", + props: { + luminPdf, + fileUrl: { + type: "string", + label: "File URL", + description: "The URL of a single file to be downloaded and signed. This field is mutually exclusive with `file`, `files`, and `File URLs`. Only one of these fields should be provided in the request.", + optional: true, + }, + file: { + type: "string", + label: "File", + description: "A single path to a file in the `/tmp` directory (for example, `/tmp/myFile.pdf`) to be sent for signature. This field is mutually exclusive with `File URL`, `Files`, and `File URLs`. Only one of these fields should be provided in the request.", + optional: true, + }, + fileUrls: { + type: "string[]", + label: "File URLs", + description: "An array of URLs of files to be downloaded and signed. This field is mutually exclusive with `File`, `Files`, and `File URL`. Only one of these fields should be provided in the request.", + optional: true, + }, + files: { + type: "string[]", + label: "Files", + description: "An array of path to files in the `/tmp` directory (for example, `/tmp/myFile.pdf`) to be sent for signature. This field is mutually exclusive with `File URL`, `Files`, and `File URLs`. Only one of these fields should be provided in the request.", + optional: true, + }, + signers: { + type: "string[]", + label: "Signers", + description: "A list of objects of signers to add to your Signature Request. Format: `[{'email_address': 'email@example.com', 'name': 'John Doe', 'group': 1}, {'email_address': 'email2@example.com', 'name': 'Jane Doe', 'group': 2}]`. [See the documentation](https://developers.luminpdf.com/api/send-signature-request/) for more information.", + optional: true, + }, + viewers: { + type: "string[]", + label: "Viewers", + description: "A list of objects of viewers to add to your Signature Request. Format: `[{'email_address': 'email@example.com', 'name': 'John Doe'}, {'email_address': 'email2@example.com', 'name': 'Jane Doe'}]`. [See the documentation](https://developers.luminpdf.com/api/send-signature-request/) for more information.", + optional: true, + }, + title: { + type: "string", + label: "Title", + description: "The title you want to give the Signature Request.", + }, + expiresAt: { + type: "string", + label: "Expires At", + description: "When the Signature Request will expire. Should be later than today. In ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ).", + }, + useTextTags: { + type: "boolean", + label: "Use Text Tags", + description: "Set to `true` to enable Text Tag parsing in your document. Your Text Tags will be converted into UI components for the user to interact with.", + optional: true, + }, + signingType: { + type: "string", + label: "Signing Type", + description: "The signing order for the Signature Request.", + options: [ + "SAME_TIME", + "ORDER", + ], + optional: true, + }, + senderEmail: { + type: "string", + label: "Sender Email", + description: "The email address of the sender.", + optional: true, + }, + subject: { + type: "string", + label: "Subject", + description: "The subject of the email.", + optional: true, + }, + customEmailTitle: { + type: "string", + label: "Custom Email Title", + description: "The title of the email.", + optional: true, + }, + syncDir: { + type: "dir", + accessMode: "read", + sync: true, + optional: true, + }, + }, + methods: { + async appendFile(formData, fieldName, file) { + const { + stream, + metadata, + } = await getFileStreamAndMetadata(file); + formData.append(fieldName, stream, { + contentType: metadata.contentType, + knownLength: metadata.size, + filename: metadata.name, + }); + }, + }, + async run({ $ }) { + const formData = new FormData(); + const checkFiles = {}; + if (this.file) checkFiles.file = this.file; + if (this.files) checkFiles.files = this.files; + if (this.fileUrl) checkFiles.fileUrl = this.fileUrl; + if (this.fileUrls) checkFiles.fileUrls = this.fileUrls; + + if (Object.keys(checkFiles).length > 1) { + throw new ConfigurationError("Only one of `File URL`, `File`, `File URLs`, or `Files` should be provided in the request."); + } + if (Object.keys(checkFiles).length === 0) { + throw new ConfigurationError("At least one of `File URL`, `File`, `File URLs`, or `Files` should be provided in the request."); + } + + if (this.file) { + await this.appendFile(formData, "file", this.file); + } + if (this.files) { + for (const [ + index, + file, + ] of this.files.entries()) { + await this.appendFile(formData, `files[${index}]`, file); + } + } + if (this.fileUrl) { + formData.append("file_url", this.fileUrl); + } + if (this.fileUrls) { + for (const [ + index, + fileUrl, + ] of this.fileUrls.entries()) { + formData.append(`file_urls[${index}]`, fileUrl); + } + } + if (this.signers) { + for (const [ + index, + signer, + ] of parseObject(this.signers).entries()) { + for (const item of Object.keys(signer)) { + formData.append(`signers[${index}][${item}]`, signer[item]); + } + } + } + if (this.viewers) { + for (const [ + index, + viewer, + ] of parseObject(this.viewers).entries()) { + for (const item of Object.keys(viewer)) { + formData.append(`viewers[${index}][${item}]`, viewer[item]); + } + } + } + if (this.title) formData.append("title", this.title); + if (this.expiresAt) formData.append("expires_at", Date.parse(this.expiresAt)); + if (this.useTextTags) formData.append("use_text_tags", `${this.useTextTags}`); + if (this.signingType) formData.append("signing_type", this.signingType); + if (this.senderEmail) formData.append("custom_email[sender_email]", this.senderEmail); + if (this.senderEmail) formData.append("custom_email[subject_name]", this.subject); + if (this.senderEmail) formData.append("custom_email[title]", this.customEmailTitle); + + const response = await this.luminPdf.sendSignatureRequest({ + $, + headers: formData.getHeaders(), + data: formData, + }); + + if (response) { + $.export("$summary", `Successfully sent signature request ${response.signature_request.signature_request_id}`); + } + + return response; + }, +}; diff --git a/components/lumin_pdf/common/utils.mjs b/components/lumin_pdf/common/utils.mjs new file mode 100644 index 0000000000000..dcc9cc61f6f41 --- /dev/null +++ b/components/lumin_pdf/common/utils.mjs @@ -0,0 +1,24 @@ +export const parseObject = (obj) => { + if (!obj) return undefined; + + if (Array.isArray(obj)) { + return obj.map((item) => { + if (typeof item === "string") { + try { + return JSON.parse(item); + } catch (e) { + return item; + } + } + return item; + }); + } + if (typeof obj === "string") { + try { + return JSON.parse(obj); + } catch (e) { + return obj; + } + } + return obj; +}; diff --git a/components/lumin_pdf/lumin_pdf.app.mjs b/components/lumin_pdf/lumin_pdf.app.mjs new file mode 100644 index 0000000000000..8003d137c2857 --- /dev/null +++ b/components/lumin_pdf/lumin_pdf.app.mjs @@ -0,0 +1,79 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "lumin_pdf", + propDefinitions: { + signatureRequestId: { + type: "string", + label: "Signature Request ID", + description: "The ID of the signature request", + }, + }, + methods: { + _baseUrl() { + return "https://api.luminpdf.com/v1"; + }, + _headers(headers = {}) { + return { + "x-api-key": `${this.$auth.api_key}`, + ...headers, + }; + }, + _makeRequest({ + $ = this, path, headers, ...opts + }) { + return axios($, { + url: this._baseUrl() + path, + headers: this._headers(headers), + ...opts, + }); + }, + getSignatureRequest({ + signatureRequestId, ...opts + }) { + return this._makeRequest({ + path: `/signature_request/${signatureRequestId}`, + ...opts, + }); + }, + sendSignatureRequest(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/signature_request/send", + ...opts, + }); + }, + cancelSignatureRequest({ + signatureRequestId, ...opts + }) { + return this._makeRequest({ + method: "PUT", + path: `/signature_request/cancel/${signatureRequestId}`, + ...opts, + }); + }, + downloadFileAsFileUrl({ + signatureRequestId, ...opts + }) { + return this._makeRequest({ + path: `/signature_request/files_as_file_url/${signatureRequestId}`, + ...opts, + }); + }, + downloadFile({ + signatureRequestId, ...opts + }) { + return this._makeRequest({ + path: `/signature_request/files/${signatureRequestId}`, + ...opts, + }); + }, + getUserInformation(opts = {}) { + return this._makeRequest({ + path: "/user/info", + ...opts, + }); + }, + }, +}; diff --git a/components/lumin_pdf/package.json b/components/lumin_pdf/package.json new file mode 100644 index 0000000000000..3a93392fc8bcf --- /dev/null +++ b/components/lumin_pdf/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/lumin_pdf", + "version": "0.1.0", + "description": "Pipedream Lumin PDF Components", + "main": "lumin_pdf.app.mjs", + "keywords": [ + "pipedream", + "lumin_pdf" + ], + "homepage": "https://pipedream.com/apps/lumin_pdf", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + } +} diff --git a/components/luminous/.gitignore b/components/luminous/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/luminous/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/luminous/app/luminous.app.ts b/components/luminous/app/luminous.app.ts deleted file mode 100644 index 52190db252dc0..0000000000000 --- a/components/luminous/app/luminous.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "luminous", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/luminous/luminous.app.mjs b/components/luminous/luminous.app.mjs new file mode 100644 index 0000000000000..debfb480b750b --- /dev/null +++ b/components/luminous/luminous.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "luminous", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/luminous/package.json b/components/luminous/package.json index 0c49b25e48f0f..997b6282db6a6 100644 --- a/components/luminous/package.json +++ b/components/luminous/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/luminous", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Luminous Components", - "main": "dist/app/luminous.app.mjs", + "main": "luminous.app.mjs", "keywords": [ "pipedream", "luminous" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/luminous", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mailbluster/package.json b/components/mailbluster/package.json index 27572fa2d4e7f..5f800000bbd15 100644 --- a/components/mailbluster/package.json +++ b/components/mailbluster/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/mailbluster", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Mailbluster Components", "main": "dist/app/mailbluster.app.mjs", "keywords": [ @@ -17,6 +17,10 @@ }, "dependencies": { "md5": "^2.3.0", - "moment": "^2.29.4" + "moment": "^2.29.4", + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/mailbluster/tsconfig.json b/components/mailbluster/tsconfig.json index a61206464b8c0..3a9389484d040 100644 --- a/components/mailbluster/tsconfig.json +++ b/components/mailbluster/tsconfig.json @@ -1,23 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/mailboxvalidator/package.json b/components/mailboxvalidator/package.json index 0006c04ca4ccb..b332d0e90ee15 100644 --- a/components/mailboxvalidator/package.json +++ b/components/mailboxvalidator/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/mailboxvalidator", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream MailboxValidator Components", "main": "dist/app/mailboxvalidator.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/mailboxvalidator/tsconfig.json b/components/mailboxvalidator/tsconfig.json index 910b87fc8266a..3a9389484d040 100644 --- a/components/mailboxvalidator/tsconfig.json +++ b/components/mailboxvalidator/tsconfig.json @@ -1,24 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/mailcoach/.gitignore b/components/mailcoach/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/mailcoach/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/mailcoach/app/mailcoach.app.ts b/components/mailcoach/app/mailcoach.app.ts deleted file mode 100644 index 54205455ee931..0000000000000 --- a/components/mailcoach/app/mailcoach.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "mailcoach", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/mailcoach/mailcoach.app.mjs b/components/mailcoach/mailcoach.app.mjs new file mode 100644 index 0000000000000..27398035e3a04 --- /dev/null +++ b/components/mailcoach/mailcoach.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mailcoach", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/mailcoach/package.json b/components/mailcoach/package.json index a1efae0c04b43..68e84a73ae595 100644 --- a/components/mailcoach/package.json +++ b/components/mailcoach/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/mailcoach", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Mailcoach Components", - "main": "dist/app/mailcoach.app.mjs", + "main": "mailcoach.app.mjs", "keywords": [ "pipedream", "mailcoach" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/mailcoach", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mailify/.gitignore b/components/mailify/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/mailify/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/mailify/app/mailify.app.ts b/components/mailify/app/mailify.app.ts deleted file mode 100644 index 1fab82653cf69..0000000000000 --- a/components/mailify/app/mailify.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "mailify", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/mailify/mailify.app.mjs b/components/mailify/mailify.app.mjs new file mode 100644 index 0000000000000..81440538b2f50 --- /dev/null +++ b/components/mailify/mailify.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mailify", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/mailify/package.json b/components/mailify/package.json index 9a193a8e3988c..634a34cce24e0 100644 --- a/components/mailify/package.json +++ b/components/mailify/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/mailify", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Mailify Components", - "main": "dist/app/mailify.app.mjs", + "main": "mailify.app.mjs", "keywords": [ "pipedream", "mailify" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/mailify", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mailrefine/.gitignore b/components/mailrefine/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/mailrefine/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/mailrefine/app/mailrefine.app.ts b/components/mailrefine/app/mailrefine.app.ts deleted file mode 100644 index f7caf76e0b8f5..0000000000000 --- a/components/mailrefine/app/mailrefine.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "mailrefine", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/mailrefine/mailrefine.app.mjs b/components/mailrefine/mailrefine.app.mjs new file mode 100644 index 0000000000000..18da028bc64ff --- /dev/null +++ b/components/mailrefine/mailrefine.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mailrefine", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/mailrefine/package.json b/components/mailrefine/package.json index 41441a628dc91..4db32e1d990d2 100644 --- a/components/mailrefine/package.json +++ b/components/mailrefine/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/mailrefine", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Mailrefine Components", - "main": "dist/app/mailrefine.app.mjs", + "main": "mailrefine.app.mjs", "keywords": [ "pipedream", "mailrefine" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/mailrefine", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mailrelay/mailrelay.app.mjs b/components/mailrelay/mailrelay.app.mjs index f78b00f94354c..65026e4274606 100644 --- a/components/mailrelay/mailrelay.app.mjs +++ b/components/mailrelay/mailrelay.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/mailsoftly/mailsoftly.app.mjs b/components/mailsoftly/mailsoftly.app.mjs index 4a46b0375b988..113647612616f 100644 --- a/components/mailsoftly/mailsoftly.app.mjs +++ b/components/mailsoftly/mailsoftly.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/mailwizz/package.json b/components/mailwizz/package.json index a0497480f6a0b..764afa37bb857 100644 --- a/components/mailwizz/package.json +++ b/components/mailwizz/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/mailwizz", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Mailwizz Components", "main": "mailwizz.app.mjs", "keywords": [ @@ -13,6 +13,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.4.1" + "@pipedream/platform": "^3.1.0", + "qs": "^6.11.0" } } diff --git a/components/mainwp/.gitignore b/components/mainwp/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/mainwp/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/mainwp/app/mainwp.app.ts b/components/mainwp/app/mainwp.app.ts deleted file mode 100644 index d456b33ce4627..0000000000000 --- a/components/mainwp/app/mainwp.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "mainwp", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/mainwp/mainwp.app.mjs b/components/mainwp/mainwp.app.mjs new file mode 100644 index 0000000000000..cef7e9dabe30f --- /dev/null +++ b/components/mainwp/mainwp.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mainwp", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/mainwp/package.json b/components/mainwp/package.json index d1a709d5ec9e6..e13320a9a5b86 100644 --- a/components/mainwp/package.json +++ b/components/mainwp/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/mainwp", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream MainWP Components", - "main": "dist/app/mainwp.app.mjs", + "main": "mainwp.app.mjs", "keywords": [ "pipedream", "mainwp" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/mainwp", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/manifestly_checklists/.gitignore b/components/manifestly_checklists/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/manifestly_checklists/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/manifestly_checklists/app/manifestly_checklists.app.ts b/components/manifestly_checklists/app/manifestly_checklists.app.ts deleted file mode 100644 index 7afa83fdfb9e7..0000000000000 --- a/components/manifestly_checklists/app/manifestly_checklists.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "manifestly_checklists", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/manifestly_checklists/manifestly_checklists.app.mjs b/components/manifestly_checklists/manifestly_checklists.app.mjs new file mode 100644 index 0000000000000..9dc63c5e27c65 --- /dev/null +++ b/components/manifestly_checklists/manifestly_checklists.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "manifestly_checklists", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/manifestly_checklists/package.json b/components/manifestly_checklists/package.json index dbce1352a2160..2222fd97ffed4 100644 --- a/components/manifestly_checklists/package.json +++ b/components/manifestly_checklists/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/manifestly_checklists", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Manifestly Checklists Components", - "main": "dist/app/manifestly_checklists.app.mjs", + "main": "manifestly_checklists.app.mjs", "keywords": [ "pipedream", "manifestly_checklists" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/manifestly_checklists", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/marketing_master_io/.gitignore b/components/marketing_master_io/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/marketing_master_io/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/marketing_master_io/app/marketing_master_io.app.ts b/components/marketing_master_io/app/marketing_master_io.app.ts deleted file mode 100644 index 12196b4c6afba..0000000000000 --- a/components/marketing_master_io/app/marketing_master_io.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "marketing_master_io", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/marketing_master_io/marketing_master_io.app.mjs b/components/marketing_master_io/marketing_master_io.app.mjs new file mode 100644 index 0000000000000..e38ebb2dcc3dd --- /dev/null +++ b/components/marketing_master_io/marketing_master_io.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "marketing_master_io", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/marketing_master_io/package.json b/components/marketing_master_io/package.json index f1b760fd83961..ea8bf7396d797 100644 --- a/components/marketing_master_io/package.json +++ b/components/marketing_master_io/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/marketing_master_io", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Marketing Master IO Components", - "main": "dist/app/marketing_master_io.app.mjs", + "main": "marketing_master_io.app.mjs", "keywords": [ "pipedream", "marketing_master_io" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/marketing_master_io", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/marketstack/.gitignore b/components/marketstack/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/marketstack/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/marketstack/app/marketstack.app.ts b/components/marketstack/app/marketstack.app.ts deleted file mode 100644 index f208ec99d8272..0000000000000 --- a/components/marketstack/app/marketstack.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "marketstack", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/marketstack/marketstack.app.mjs b/components/marketstack/marketstack.app.mjs new file mode 100644 index 0000000000000..dca16aa1c45f6 --- /dev/null +++ b/components/marketstack/marketstack.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "marketstack", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/marketstack/package.json b/components/marketstack/package.json index bbd2ad528a488..ad8bc23a99748 100644 --- a/components/marketstack/package.json +++ b/components/marketstack/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/marketstack", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Marketstack Components", - "main": "dist/app/marketstack.app.mjs", + "main": "marketstack.app.mjs", "keywords": [ "pipedream", "marketstack" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/marketstack", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/matrix/matrix.app.mjs b/components/matrix/matrix.app.mjs new file mode 100644 index 0000000000000..d993a2e053e29 --- /dev/null +++ b/components/matrix/matrix.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "matrix", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/matrix/package.json b/components/matrix/package.json new file mode 100644 index 0000000000000..7503b56f13afb --- /dev/null +++ b/components/matrix/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/matrix", + "version": "0.0.1", + "description": "Pipedream Matrix Components", + "main": "matrix.app.mjs", + "keywords": [ + "pipedream", + "matrix" + ], + "homepage": "https://pipedream.com/apps/matrix", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/mattermost/package.json b/components/mattermost/package.json index 7e73638491dde..56993613ab44e 100644 --- a/components/mattermost/package.json +++ b/components/mattermost/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/mattermost", - "version": "0.1.1", + "version": "0.1.2", "description": "Pipedream Mattermost Components", "main": "dist/app/mattermost.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.6.0", - "@pipedream/types": "^0.3.0" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/mattermost/tsconfig.json b/components/mattermost/tsconfig.json index 910b87fc8266a..3a9389484d040 100644 --- a/components/mattermost/tsconfig.json +++ b/components/mattermost/tsconfig.json @@ -1,24 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/mav/.gitignore b/components/mav/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/mav/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/mav/app/mav.app.ts b/components/mav/app/mav.app.ts deleted file mode 100644 index 22ae9c0487906..0000000000000 --- a/components/mav/app/mav.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "mav", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/mav/mav.app.mjs b/components/mav/mav.app.mjs new file mode 100644 index 0000000000000..cd680c67d917a --- /dev/null +++ b/components/mav/mav.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mav", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/mav/package.json b/components/mav/package.json index 0d30839d839d6..865556a1a6a16 100644 --- a/components/mav/package.json +++ b/components/mav/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/mav", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Mav Components", - "main": "dist/app/mav.app.mjs", + "main": "mav.app.mjs", "keywords": [ "pipedream", "mav" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/mav", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mboum/actions/get-ad/get-ad.mjs b/components/mboum/actions/get-ad/get-ad.mjs new file mode 100644 index 0000000000000..70f28f88a3b21 --- /dev/null +++ b/components/mboum/actions/get-ad/get-ad.mjs @@ -0,0 +1,43 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-ad", + name: "Get Accumulation/Distribution Line (AD)", + description: "Calculate Accumulation/Distribution Line technical indicator to measure volume flow and confirm price trends. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-indicators-ad)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + interval: { + propDefinition: [ + mboum, + "interval", + ], + }, + limit: { + propDefinition: [ + mboum, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getAD({ + $, + params: { + ticker: this.ticker, + interval: this.interval, + limit: this.limit, + }, + }); + + $.export("$summary", `Successfully calculated A/D Line for ${this.ticker} on ${this.interval} intervals`); + return response; + }, +}; diff --git a/components/mboum/actions/get-adosc/get-adosc.mjs b/components/mboum/actions/get-adosc/get-adosc.mjs new file mode 100644 index 0000000000000..b94b6eaa34453 --- /dev/null +++ b/components/mboum/actions/get-adosc/get-adosc.mjs @@ -0,0 +1,64 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-adosc", + name: "Get Accumulation/Distribution Oscillator (ADOSC)", + description: "Calculate Accumulation/Distribution Oscillator technical indicator to measure the momentum of volume flow. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-indicators-adosc)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + interval: { + propDefinition: [ + mboum, + "interval", + ], + }, + seriesType: { + propDefinition: [ + mboum, + "seriesType", + ], + }, + fastPeriod: { + type: "integer", + label: "Fast Period", + description: "Fast period for ADOSC calculation", + optional: true, + }, + slowPeriod: { + type: "integer", + label: "Slow Period", + description: "Slow period for ADOSC calculation", + optional: true, + }, + limit: { + propDefinition: [ + mboum, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getADOSC({ + $, + params: { + ticker: this.ticker, + interval: this.interval, + series_type: this.seriesType, + fast_period: this.fastPeriod, + slow_period: this.slowPeriod, + limit: this.limit, + }, + }); + + $.export("$summary", `Successfully calculated ADOSC(${this.fastPeriod},${this.slowPeriod}) for ${this.ticker} on ${this.interval} intervals`); + return response; + }, +}; diff --git a/components/mboum/actions/get-adx/get-adx.mjs b/components/mboum/actions/get-adx/get-adx.mjs new file mode 100644 index 0000000000000..2dca4c51c34ba --- /dev/null +++ b/components/mboum/actions/get-adx/get-adx.mjs @@ -0,0 +1,57 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-adx", + name: "Get Average Directional Index (ADX)", + description: "Calculate Average Directional Index technical indicator to measure trend strength and direction. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-indicators-adx)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + interval: { + propDefinition: [ + mboum, + "interval", + ], + }, + seriesType: { + propDefinition: [ + mboum, + "seriesType", + ], + }, + timePeriod: { + type: "integer", + label: "Time Period", + description: "Number of periods for ADX calculation", + optional: true, + }, + limit: { + propDefinition: [ + mboum, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getADX({ + $, + params: { + ticker: this.ticker, + interval: this.interval, + series_type: this.seriesType, + time_period: this.timePeriod, + limit: this.limit, + }, + }); + + $.export("$summary", `Successfully calculated ADX(${this.timePeriod}) for ${this.ticker} on ${this.interval} intervals`); + return response; + }, +}; diff --git a/components/mboum/actions/get-analyst-ratings/get-analyst-ratings.mjs b/components/mboum/actions/get-analyst-ratings/get-analyst-ratings.mjs new file mode 100644 index 0000000000000..8f2410c3ed1cc --- /dev/null +++ b/components/mboum/actions/get-analyst-ratings/get-analyst-ratings.mjs @@ -0,0 +1,36 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-analyst-ratings", + name: "Get Analyst Ratings", + description: "Get analyst ratings and recommendations for a stock including buy/sell/hold ratings. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-stock-analyst-ratings)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getAnalystRatings({ + $, + params: { + ticker: this.ticker, + page: this.page, + }, + }); + + $.export("$summary", `Successfully retrieved analyst ratings for ${this.ticker}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-cci/get-cci.mjs b/components/mboum/actions/get-cci/get-cci.mjs new file mode 100644 index 0000000000000..6a1a2a91b1675 --- /dev/null +++ b/components/mboum/actions/get-cci/get-cci.mjs @@ -0,0 +1,57 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-cci", + name: "Get Commodity Channel Index (CCI)", + description: "Calculate Commodity Channel Index technical indicator to identify cyclical trends and overbought/oversold conditions. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-indicators-cci)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + interval: { + propDefinition: [ + mboum, + "interval", + ], + }, + seriesType: { + propDefinition: [ + mboum, + "seriesType", + ], + }, + timePeriod: { + type: "integer", + label: "Time Period", + description: "Number of periods for CCI calculation", + optional: true, + }, + limit: { + propDefinition: [ + mboum, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getCCI({ + $, + params: { + ticker: this.ticker, + interval: this.interval, + series_type: this.seriesType, + time_period: this.timePeriod, + limit: this.limit, + }, + }); + + $.export("$summary", `Successfully calculated CCI(${this.timePeriod}) for ${this.ticker} on ${this.interval} intervals`); + return response; + }, +}; diff --git a/components/mboum/actions/get-crypto-currencies/get-crypto-currencies.mjs b/components/mboum/actions/get-crypto-currencies/get-crypto-currencies.mjs new file mode 100644 index 0000000000000..480f71388db1b --- /dev/null +++ b/components/mboum/actions/get-crypto-currencies/get-crypto-currencies.mjs @@ -0,0 +1,30 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-crypto-currencies", + name: "Get Crypto Currencies", + description: "Get crypto currencies. [See the documentation](https://docs.mboum.com/#crypto-GETapi-v1-crypto-coins)", + version: "0.0.1", + type: "action", + props: { + mboum, + page: { + type: "integer", + label: "Page", + description: "The page number to fetch", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.mboum.getCryptoCurrencies({ + $, + params: { + page: this.page, + }, + }); + + $.export("$summary", "Successfully fetched crypto currencies"); + + return response.data; + }, +}; diff --git a/components/mboum/actions/get-crypto-holders/get-crypto-holders.mjs b/components/mboum/actions/get-crypto-holders/get-crypto-holders.mjs new file mode 100644 index 0000000000000..322164732bc58 --- /dev/null +++ b/components/mboum/actions/get-crypto-holders/get-crypto-holders.mjs @@ -0,0 +1,29 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-crypto-holders", + name: "Get Crypto Holders", + description: "Get crypto holders. [See the documentation](https://docs.mboum.com/#crypto-GETapi-v1-crypto-holders)", + version: "0.0.1", + type: "action", + props: { + mboum, + key: { + type: "string", + label: "Key", + description: "Provide the crypto ID. Example: `bitcoin`", + }, + }, + async run({ $ }) { + const response = await this.mboum.getCryptoHolders({ + $, + params: { + key: this.key, + }, + }); + + $.export("$summary", `Successfully fetched crypto holders for ${this.key}`); + + return response.data; + }, +}; diff --git a/components/mboum/actions/get-crypto-modules/get-crypto-modules.mjs b/components/mboum/actions/get-crypto-modules/get-crypto-modules.mjs new file mode 100644 index 0000000000000..40987b18d99a3 --- /dev/null +++ b/components/mboum/actions/get-crypto-modules/get-crypto-modules.mjs @@ -0,0 +1,31 @@ +import mboum from "../../mboum.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "mboum-get-crypto-modules", + name: "Get Crypto Modules", + description: "Get crypto modules. [See the documentation](https://docs.mboum.com/#crypto-GETapi-v1-crypto-modules)", + version: "0.0.1", + type: "action", + props: { + mboum, + module: { + type: "string", + label: "Module", + description: "The module to fetch", + options: constants.CRYPTO_MODULES, + }, + }, + async run({ $ }) { + const response = await this.mboum.getCryptoModules({ + $, + params: { + module: this.module, + }, + }); + + $.export("$summary", "Successfully fetched crypto modules"); + + return response; + }, +}; diff --git a/components/mboum/actions/get-crypto-profile/get-crypto-profile.mjs b/components/mboum/actions/get-crypto-profile/get-crypto-profile.mjs new file mode 100644 index 0000000000000..2513aa410d686 --- /dev/null +++ b/components/mboum/actions/get-crypto-profile/get-crypto-profile.mjs @@ -0,0 +1,29 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-crypto-profile", + name: "Get Crypto Profile", + description: "Get crypto profile. [See the documentation](https://docs.mboum.com/#crypto-GETapi-v1-crypto-profile)", + version: "0.0.1", + type: "action", + props: { + mboum, + key: { + type: "string", + label: "Key", + description: "Provide the crypto ID. Example: `bitcoin`", + }, + }, + async run({ $ }) { + const response = await this.mboum.getCryptoProfile({ + $, + params: { + key: this.key, + }, + }); + + $.export("$summary", `Successfully fetched crypto profile for ${this.key}`); + + return response.data; + }, +}; diff --git a/components/mboum/actions/get-crypto-quotes/get-crypto-quotes.mjs b/components/mboum/actions/get-crypto-quotes/get-crypto-quotes.mjs new file mode 100644 index 0000000000000..794e67caf1aeb --- /dev/null +++ b/components/mboum/actions/get-crypto-quotes/get-crypto-quotes.mjs @@ -0,0 +1,29 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-crypto-quotes", + name: "Get Crypto Quotes", + description: "Get crypto quotes. [See the documentation](https://docs.mboum.com/#crypto-GETapi-v1-crypto-quotes)", + version: "0.0.1", + type: "action", + props: { + mboum, + key: { + type: "string", + label: "Key", + description: "Provide the crypto ID. Example: `bitcoin`", + }, + }, + async run({ $ }) { + const response = await this.mboum.getCryptoQuotes({ + $, + params: { + key: this.key, + }, + }); + + $.export("$summary", `Successfully fetched crypto quotes for ${this.key}`); + + return response; + }, +}; diff --git a/components/mboum/actions/get-dividends/get-dividends.mjs b/components/mboum/actions/get-dividends/get-dividends.mjs new file mode 100644 index 0000000000000..1ca9e2c7fd5d4 --- /dev/null +++ b/components/mboum/actions/get-dividends/get-dividends.mjs @@ -0,0 +1,36 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-dividends", + name: "Get Dividends Calendar", + description: "Get upcoming and historical dividend payments and ex-dividend dates. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-calendar-dividends)", + version: "0.0.1", + type: "action", + props: { + mboum, + date: { + propDefinition: [ + mboum, + "date", + ], + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getDividends({ + $, + params: { + date: this.date, + page: this.page, + }, + }); + + $.export("$summary", "Successfully retrieved dividends calendar data"); + return response; + }, +}; diff --git a/components/mboum/actions/get-earnings/get-earnings.mjs b/components/mboum/actions/get-earnings/get-earnings.mjs new file mode 100644 index 0000000000000..01745774e32db --- /dev/null +++ b/components/mboum/actions/get-earnings/get-earnings.mjs @@ -0,0 +1,55 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-earnings", + name: "Get Earnings Calendar", + description: "Get upcoming and historical earnings announcements and reports. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-calendar-earnings)", + version: "0.0.2", + type: "action", + props: { + mboum, + startDate: { + type: "string", + label: "Start Date", + description: "Get companies reporting earnings on the specified start date: YYYY-MM-DD", + }, + endDate: { + type: "string", + label: "End Date", + description: "Enter a calendar date. Format: YYYY-MM-DD", + }, + priceMin: { + type: "string", + label: "Price Min", + description: "Filter results by min price of the stock per share value", + optional: true, + }, + optionable: { + type: "boolean", + label: "Optionable", + description: "Return only stocks with optionable contracts available", + optional: true, + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getEarnings({ + $, + params: { + start_date: this.startDate, + end_date: this.endDate, + price_min: this.priceMin, + optionable: this.optionable, + page: this.page, + }, + }); + + $.export("$summary", "Successfully retrieved earnings calendar data"); + return response; + }, +}; diff --git a/components/mboum/actions/get-economic-events/get-economic-events.mjs b/components/mboum/actions/get-economic-events/get-economic-events.mjs new file mode 100644 index 0000000000000..f5684cf31c6a2 --- /dev/null +++ b/components/mboum/actions/get-economic-events/get-economic-events.mjs @@ -0,0 +1,29 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-economic-events", + name: "Get Economic Events", + description: "Get upcoming and historical economic events and indicators that can impact market movements. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-calendar-economic_events)", + version: "0.0.1", + type: "action", + props: { + mboum, + date: { + propDefinition: [ + mboum, + "date", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getEconomicEvents({ + $, + params: { + date: this.date, + }, + }); + + $.export("$summary", "Successfully retrieved economic events"); + return response; + }, +}; diff --git a/components/mboum/actions/get-financials/get-financials.mjs b/components/mboum/actions/get-financials/get-financials.mjs new file mode 100644 index 0000000000000..871cf30ed273f --- /dev/null +++ b/components/mboum/actions/get-financials/get-financials.mjs @@ -0,0 +1,29 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-financials", + name: "Get Financial Statements", + description: "Get comprehensive financial statements including income statement, balance sheet, and cash flow data. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-stock-financials)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getFinancials({ + $, + params: { + ticker: this.ticker, + }, + }); + + $.export("$summary", `Successfully retrieved financials for ${this.ticker}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-highest-iv-options/get-highest-iv-options.mjs b/components/mboum/actions/get-highest-iv-options/get-highest-iv-options.mjs new file mode 100644 index 0000000000000..e9fc8e7e6b846 --- /dev/null +++ b/components/mboum/actions/get-highest-iv-options/get-highest-iv-options.mjs @@ -0,0 +1,39 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-highest-iv-options", + name: "Get Highest IV Options", + description: "Get options contracts with the highest Implied Volatility (IV) levels for volatility trading strategies. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-options-highest-iv)", + version: "0.0.1", + type: "action", + props: { + mboum, + sort: { + type: "string", + label: "Sort", + description: "Sort options by", + options: [ + "HIGHEST", + "LOWEST", + ], + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getHighestIv({ + $, + params: { + sort: this.sort, + page: this.page, + }, + }); + + $.export("$summary", "Successfully retrieved highest IV options"); + return response; + }, +}; diff --git a/components/mboum/actions/get-historical-data/get-historical-data.mjs b/components/mboum/actions/get-historical-data/get-historical-data.mjs new file mode 100644 index 0000000000000..0285f2bee5b01 --- /dev/null +++ b/components/mboum/actions/get-historical-data/get-historical-data.mjs @@ -0,0 +1,60 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-historical-data", + name: "Get Historical Data", + description: "Get comprehensive historical stock data with advanced filtering and date range options. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-stock-historical)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + type: { + type: "string", + label: "Type", + description: "Type of historical data to retrieve", + options: [ + "STOCKS", + "ETF", + "MUTUALFUNDS", + "FUTURES", + ], + }, + fromDate: { + type: "string", + label: "From Date", + description: "Enter a from date, format: YYYY-MM-DD", + }, + toDate: { + type: "string", + label: "To Date", + description: "Enter a to date, format: YYYY-MM-DD", + }, + limit: { + type: "integer", + label: "Limit", + description: "Maximum number of data points to return", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.mboum.getHistoricalData({ + $, + params: { + ticker: this.ticker, + type: this.type, + from_date: this.fromDate, + to_date: this.toDate, + limit: this.limit, + }, + }); + + $.export("$summary", `Successfully retrieved historical data for ${this.ticker}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-history/get-history.mjs b/components/mboum/actions/get-history/get-history.mjs new file mode 100644 index 0000000000000..ce9dd48e507c4 --- /dev/null +++ b/components/mboum/actions/get-history/get-history.mjs @@ -0,0 +1,53 @@ +import mboum from "../../mboum.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "mboum-get-history", + name: "Get Stock History", + description: "Get historical stock data including OHLCV (Open, High, Low, Close, Volume) data. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-stock-history)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + interval: { + type: "string", + label: "Interval", + description: "Time interval between two consecutive data points in the time series", + options: constants.HISTORICAL_DATA_INTERVALS, + }, + limit: { + type: "integer", + label: "Limit", + description: "Maximum number of data points to return. (1-1000)", + optional: true, + min: 1, + max: 1000, + }, + dividend: { + type: "boolean", + label: "Dividend", + description: "Include dividend in response", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.mboum.getHistory({ + $, + params: { + ticker: this.ticker, + interval: this.interval, + limit: this.limit, + dividend: this.dividend, + }, + }); + + $.export("$summary", `Successfully retrieved ${this.interval} historical data for ${this.ticker}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-insider-trading/get-insider-trading.mjs b/components/mboum/actions/get-insider-trading/get-insider-trading.mjs new file mode 100644 index 0000000000000..348f018c17c4a --- /dev/null +++ b/components/mboum/actions/get-insider-trading/get-insider-trading.mjs @@ -0,0 +1,65 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-insider-trading", + name: "Get Insider Trading Data", + description: "Get insider trading activities including buys, sells, and other transactions by company insiders. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-insider-trades)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + type: { + type: "string", + label: "Transaction Type", + description: "Type of insider transaction", + options: [ + "Buy", + "Sell", + "Transfer", + ], + optional: true, + }, + minValue: { + type: "string", + label: "Minimum Value", + description: "Filter results by min transaction value", + optional: true, + }, + politiciansOnly: { + type: "boolean", + label: "Politicians Only", + description: "Return insider trades from U.S Congressmen and Senators only", + optional: true, + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getInsiderTrading({ + $, + params: { + ticker: this.ticker, + type: this.type, + minValue: this.minValue, + politiciansOnly: this.politiciansOnly, + page: this.page, + }, + }); + + const tickerText = this.ticker + ? ` for ${this.ticker}` + : ""; + $.export("$summary", `Successfully retrieved insider trading data${tickerText}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-institutional-holdings/get-institutional-holdings.mjs b/components/mboum/actions/get-institutional-holdings/get-institutional-holdings.mjs new file mode 100644 index 0000000000000..24959e76132ba --- /dev/null +++ b/components/mboum/actions/get-institutional-holdings/get-institutional-holdings.mjs @@ -0,0 +1,44 @@ +import mboum from "../../mboum.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "mboum-get-institutional-holdings", + name: "Get Institutional Holdings", + description: "Get institutional ownership data including top institutional holders and their position changes. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-stock-institutional-holdings)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + type: { + type: "string", + label: "Type", + description: "Type of institutional holdings to retrieve", + options: constants.INTERNATIONAL_HOLDINGS_TYPES, + }, + limit: { + type: "integer", + label: "Limit", + description: "Maximum number of data points to return", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.mboum.getInstitutionalHoldings({ + $, + params: { + ticker: this.ticker, + type: this.type, + limit: this.limit, + }, + }); + + $.export("$summary", `Successfully retrieved institutional holdings for ${this.ticker}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-ipo-data/get-ipo-data.mjs b/components/mboum/actions/get-ipo-data/get-ipo-data.mjs new file mode 100644 index 0000000000000..9df351d2621cd --- /dev/null +++ b/components/mboum/actions/get-ipo-data/get-ipo-data.mjs @@ -0,0 +1,29 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-ipo-data", + name: "Get IPO Data", + description: "Get upcoming and recent Initial Public Offering (IPO) data including dates, prices, and company information. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-calendar-ipo)", + version: "0.0.1", + type: "action", + props: { + mboum, + date: { + propDefinition: [ + mboum, + "date", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getIpoData({ + $, + params: { + date: this.date, + }, + }); + + $.export("$summary", "Successfully retrieved IPO data"); + return response; + }, +}; diff --git a/components/mboum/actions/get-iv-change/get-iv-change.mjs b/components/mboum/actions/get-iv-change/get-iv-change.mjs new file mode 100644 index 0000000000000..160fe59938468 --- /dev/null +++ b/components/mboum/actions/get-iv-change/get-iv-change.mjs @@ -0,0 +1,58 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-iv-change", + name: "Get IV Change", + description: "Get Implied Volatility (IV) change data showing volatility movements and trends over time. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-options-iv-change)", + version: "0.0.2", + type: "action", + props: { + mboum, + type: { + type: "string", + label: "Type", + description: "Type of IV change to retrieve", + options: [ + "STOCKS", + "ETFS", + "INDICES", + ], + }, + direction: { + type: "string", + label: "Direction", + description: "Direction of to sort by", + options: [ + "UP", + "DOWN", + ], + optional: true, + }, + priceMin: { + type: "string", + label: "Price Min", + description: "Filter results by min price of the stock per share value", + optional: true, + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getIvChange({ + $, + params: { + type: this.type, + direction: this.direction, + price_min: this.priceMin, + page: this.page, + }, + }); + + $.export("$summary", "Successfully retrieved IV change data"); + return response; + }, +}; diff --git a/components/mboum/actions/get-iv-rank-percentile/get-iv-rank-percentile.mjs b/components/mboum/actions/get-iv-rank-percentile/get-iv-rank-percentile.mjs new file mode 100644 index 0000000000000..4c46b96ab619b --- /dev/null +++ b/components/mboum/actions/get-iv-rank-percentile/get-iv-rank-percentile.mjs @@ -0,0 +1,47 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-iv-rank-percentile", + name: "Get IV Rank Percentile", + description: "Get Implied Volatility (IV) rank and percentile data for options to assess volatility levels. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-options-iv-rank-percentile)", + version: "0.0.2", + type: "action", + props: { + mboum, + type: { + type: "string", + label: "Type", + description: "Type of IV rank percentile to retrieve", + options: [ + "STOCKS", + "ETFS", + "INDICES", + ], + }, + priceMin: { + type: "string", + label: "Price Min", + description: "Filter results by min price of the stock per share value", + optional: true, + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getIvRankPercentile({ + $, + params: { + type: this.type, + price_min: this.priceMin, + page: this.page, + }, + }); + + $.export("$summary", "Successfully retrieved IV rank percentile data"); + return response; + }, +}; diff --git a/components/mboum/actions/get-macd/get-macd.mjs b/components/mboum/actions/get-macd/get-macd.mjs new file mode 100644 index 0000000000000..dd6395baf5d04 --- /dev/null +++ b/components/mboum/actions/get-macd/get-macd.mjs @@ -0,0 +1,71 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-macd", + name: "Get MACD", + description: "Calculate Moving Average Convergence Divergence (MACD) technical indicator to identify trend changes and momentum. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-indicators-macd)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + interval: { + propDefinition: [ + mboum, + "interval", + ], + }, + seriesType: { + propDefinition: [ + mboum, + "seriesType", + ], + }, + fastPeriod: { + type: "integer", + label: "Fast Period", + description: "Fast period for MACD calculation", + optional: true, + }, + slowPeriod: { + type: "integer", + label: "Slow Period", + description: "Slow period for MACD calculation", + optional: true, + }, + signalPeriod: { + type: "integer", + label: "Signal Period", + description: "Signal line period for MACD calculation", + optional: true, + }, + limit: { + propDefinition: [ + mboum, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getMACD({ + $, + params: { + ticker: this.ticker, + interval: this.interval, + series_type: this.seriesType, + fast_period: this.fastPeriod, + slow_period: this.slowPeriod, + signal_period: this.signalPeriod, + limit: this.limit, + }, + }); + + $.export("$summary", `Successfully calculated MACD(${this.fastPeriod},${this.slowPeriod},${this.signalPeriod}) for ${this.ticker} on ${this.interval} intervals`); + return response; + }, +}; diff --git a/components/mboum/actions/get-market-info/get-market-info.mjs b/components/mboum/actions/get-market-info/get-market-info.mjs new file mode 100644 index 0000000000000..c106753a083a7 --- /dev/null +++ b/components/mboum/actions/get-market-info/get-market-info.mjs @@ -0,0 +1,20 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-market-info", + name: "Get Market Information", + description: "Get comprehensive market information including indices, market status, and general market data. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-market-info)", + version: "0.0.1", + type: "action", + props: { + mboum, + }, + async run({ $ }) { + const response = await this.mboum.getMarketInfo({ + $, + }); + + $.export("$summary", "Successfully retrieved market information"); + return response; + }, +}; diff --git a/components/mboum/actions/get-modules/get-modules.mjs b/components/mboum/actions/get-modules/get-modules.mjs new file mode 100644 index 0000000000000..241a3bc9292b3 --- /dev/null +++ b/components/mboum/actions/get-modules/get-modules.mjs @@ -0,0 +1,52 @@ +import mboum from "../../mboum.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "mboum-get-modules", + name: "Get Stock Modules", + description: "Get comprehensive stock data modules including financial metrics, statistics, and company information. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-stock-modules)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + module: { + type: "string", + label: "Module", + description: "Specific module to retrieve data for", + options: constants.STOCK_MODULES, + }, + timeframe: { + type: "string", + label: "Timeframe", + description: "Timeframe for the data", + options: [ + "annually", + "quarterly", + "trailing", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.mboum.getModules({ + $, + params: { + ticker: this.ticker, + module: this.module, + timeframe: this.timeframe, + }, + }); + + const moduleText = this.module + ? ` (${this.module} module)` + : ""; + $.export("$summary", `Successfully retrieved stock modules for ${this.ticker}${moduleText}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-most-active-options/get-most-active-options.mjs b/components/mboum/actions/get-most-active-options/get-most-active-options.mjs new file mode 100644 index 0000000000000..ed86ee4a214e1 --- /dev/null +++ b/components/mboum/actions/get-most-active-options/get-most-active-options.mjs @@ -0,0 +1,40 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-most-active-options", + name: "Get Most Active Options", + description: "Get the most actively traded options contracts based on volume and trading activity. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-options-most-active)", + version: "0.0.1", + type: "action", + props: { + mboum, + type: { + type: "string", + label: "Type", + description: "Type of most active options to retrieve", + options: [ + "STOCKS", + "ETFS", + "INDICES", + ], + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getMostActive({ + $, + params: { + type: this.type, + page: this.page, + }, + }); + + $.export("$summary", "Successfully retrieved most active options"); + return response; + }, +}; diff --git a/components/mboum/actions/get-movers/get-movers.mjs b/components/mboum/actions/get-movers/get-movers.mjs new file mode 100644 index 0000000000000..83278e00acaef --- /dev/null +++ b/components/mboum/actions/get-movers/get-movers.mjs @@ -0,0 +1,57 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-movers", + name: "Get Market Movers", + description: "Get top market movers including gainers, losers, and most active stocks. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-movers)", + version: "0.0.1", + type: "action", + props: { + mboum, + type: { + type: "string", + label: "Mover Type", + description: "Type of market movers to retrieve", + options: [ + "PERCENT", + "PRICE", + "GAP", + ], + }, + direction: { + type: "string", + label: "Direction", + description: "Direction of the movers to retrieve", + options: [ + "UP", + "DOWN", + ], + }, + priceMin: { + type: "string", + label: "Price Min", + description: "Filter results by min price of the stock per share value", + optional: true, + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getMovers({ + $, + params: { + type: this.type, + direction: this.direction, + price_min: this.priceMin, + page: this.page, + }, + }); + + $.export("$summary", "Successfully retrieved movers"); + return response; + }, +}; diff --git a/components/mboum/actions/get-news/get-news.mjs b/components/mboum/actions/get-news/get-news.mjs new file mode 100644 index 0000000000000..c04b3b32b8287 --- /dev/null +++ b/components/mboum/actions/get-news/get-news.mjs @@ -0,0 +1,44 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-news", + name: "Get Financial News", + description: "Get latest financial news and market updates, with optional filtering by ticker or category. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-news)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + type: { + type: "string", + label: "Type", + description: "Type of news to retrieve", + options: [ + "ALL", + "MARKET", + "VIDEO", + "PRESS-RELEASE", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getNews({ + $, + params: { + ticker: this.ticker, + type: this.type, + }, + }); + + const tickerText = this.ticker + ? ` for ${this.ticker}` + : ""; + $.export("$summary", `Successfully retrieved financial news${tickerText}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-options-flow/get-options-flow.mjs b/components/mboum/actions/get-options-flow/get-options-flow.mjs new file mode 100644 index 0000000000000..128872bb28f4f --- /dev/null +++ b/components/mboum/actions/get-options-flow/get-options-flow.mjs @@ -0,0 +1,40 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-options-flow", + name: "Get Options Flow", + description: "Get real-time options flow data showing large block trades and institutional activity. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-options-options-flow)", + version: "0.0.1", + type: "action", + props: { + mboum, + type: { + type: "string", + label: "Type", + description: "Type of options flow to retrieve", + options: [ + "STOCKS", + "ETFS", + "INDICES", + ], + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getOptionsFlow({ + $, + params: { + type: this.type, + page: this.page, + }, + }); + + $.export("$summary", "Successfully retrieved options flow data"); + return response; + }, +}; diff --git a/components/mboum/actions/get-options/get-options.mjs b/components/mboum/actions/get-options/get-options.mjs new file mode 100644 index 0000000000000..f2fa4db4e6d8e --- /dev/null +++ b/components/mboum/actions/get-options/get-options.mjs @@ -0,0 +1,36 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-options", + name: "Get Options Data", + description: "Get comprehensive options data including prices, Greeks, and market metrics. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v3-markets-options)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + expiration: { + type: "string", + label: "Expiration Date", + description: "Enter an expiration date, format: YYYY-MM-DD", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.mboum.getOptions({ + $, + params: { + ticker: this.ticker, + expiration: this.expiration, + }, + }); + + $.export("$summary", `Successfully retrieved options data for ${this.ticker}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-price-targets/get-price-targets.mjs b/components/mboum/actions/get-price-targets/get-price-targets.mjs new file mode 100644 index 0000000000000..6ae8ad89a46d3 --- /dev/null +++ b/components/mboum/actions/get-price-targets/get-price-targets.mjs @@ -0,0 +1,29 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-price-targets", + name: "Get Price Targets", + description: "Get analyst price targets and recommendations for a stock including target highs, lows, and consensus. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-stock-price-targets)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getPriceTargets({ + $, + params: { + ticker: this.ticker, + }, + }); + + $.export("$summary", `Successfully retrieved price targets for ${this.ticker}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-public-offerings/get-public-offerings.mjs b/components/mboum/actions/get-public-offerings/get-public-offerings.mjs new file mode 100644 index 0000000000000..a0086dfac61ae --- /dev/null +++ b/components/mboum/actions/get-public-offerings/get-public-offerings.mjs @@ -0,0 +1,29 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-public-offerings", + name: "Get Public Offerings", + description: "Get data on public offerings including secondary offerings, SPAC mergers, and other capital market events. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-calendar-public_offerings)", + version: "0.0.1", + type: "action", + props: { + mboum, + date: { + propDefinition: [ + mboum, + "date", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getPublicOfferings({ + $, + params: { + date: this.date, + }, + }); + + $.export("$summary", "Successfully retrieved public offerings data"); + return response; + }, +}; diff --git a/components/mboum/actions/get-realtime-quote/get-realtime-quote.mjs b/components/mboum/actions/get-realtime-quote/get-realtime-quote.mjs new file mode 100644 index 0000000000000..fd188f7772803 --- /dev/null +++ b/components/mboum/actions/get-realtime-quote/get-realtime-quote.mjs @@ -0,0 +1,41 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-realtime-quote", + name: "Get Realtime Quote", + description: "Get real-time stock quote data including current price, volume, and market data. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-quote)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + type: { + type: "string", + label: "Type", + description: "Type of quote to retrieve", + options: [ + "STOCKS", + "ETF", + "MUTUALFUNDS", + "FUTURES", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getRealtimeQuote({ + $, + params: { + ticker: this.ticker, + type: this.type, + }, + }); + + $.export("$summary", `Successfully retrieved realtime quote for ${this.ticker}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-revenue/get-revenue.mjs b/components/mboum/actions/get-revenue/get-revenue.mjs new file mode 100644 index 0000000000000..27c479094d0ab --- /dev/null +++ b/components/mboum/actions/get-revenue/get-revenue.mjs @@ -0,0 +1,36 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-revenue", + name: "Get Revenue Data", + description: "Get detailed revenue breakdown and analysis for a company including revenue trends and segments. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-stock-revenue)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getRevenue({ + $, + params: { + ticker: this.ticker, + page: this.page, + }, + }); + + $.export("$summary", `Successfully retrieved revenue data for ${this.ticker}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-rsi/get-rsi.mjs b/components/mboum/actions/get-rsi/get-rsi.mjs new file mode 100644 index 0000000000000..82fdb670cbf03 --- /dev/null +++ b/components/mboum/actions/get-rsi/get-rsi.mjs @@ -0,0 +1,57 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-rsi", + name: "Get Relative Strength Index (RSI)", + description: "Calculate Relative Strength Index technical indicator to measure momentum and identify overbought/oversold conditions. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-indicators-rsi)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + interval: { + propDefinition: [ + mboum, + "interval", + ], + }, + seriesType: { + propDefinition: [ + mboum, + "seriesType", + ], + }, + timePeriod: { + type: "integer", + label: "Time Period", + description: "Number of periods for RSI calculation", + optional: true, + }, + limit: { + propDefinition: [ + mboum, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getRSI({ + $, + params: { + ticker: this.ticker, + interval: this.interval, + series_type: this.seriesType, + time_period: this.timePeriod, + limit: this.limit, + }, + }); + + $.export("$summary", `Successfully calculated RSI(${this.timePeriod}) for ${this.ticker} on ${this.interval} intervals`); + return response; + }, +}; diff --git a/components/mboum/actions/get-screener/get-screener.mjs b/components/mboum/actions/get-screener/get-screener.mjs new file mode 100644 index 0000000000000..0d0b85b22dbb0 --- /dev/null +++ b/components/mboum/actions/get-screener/get-screener.mjs @@ -0,0 +1,49 @@ +import mboum from "../../mboum.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "mboum-get-screener", + name: "Get Stock Screener Results", + description: "Screen stocks based on various financial criteria and filters. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-screener)", + version: "0.0.1", + type: "action", + props: { + mboum, + metricType: { + type: "string", + label: "Metric Type", + description: "Type of metric to use for screening", + options: [ + "overview", + "technical", + "performance", + "fundamental", + ], + }, + filter: { + type: "string", + label: "Filter", + description: "Filter to apply to the screener. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-screener) for more information about screeners", + options: constants.SCREENER_FILTERS, + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getScreener({ + $, + params: { + metricType: this.metricType, + filter: this.filter, + page: this.page, + }, + }); + + $.export("$summary", "Successfully screened stocks"); + return response; + }, +}; diff --git a/components/mboum/actions/get-sec-filings/get-sec-filings.mjs b/components/mboum/actions/get-sec-filings/get-sec-filings.mjs new file mode 100644 index 0000000000000..3304fcdb4362e --- /dev/null +++ b/components/mboum/actions/get-sec-filings/get-sec-filings.mjs @@ -0,0 +1,46 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-sec-filings", + name: "Get SEC Filings", + description: "Get SEC filings data including 10-K, 10-Q, 8-K, and other regulatory filings. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-stock-sec-filings)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + type: { + type: "string", + label: "Filing Type", + description: "Type of SEC filing to retrieve", + options: [ + "FORM-4", + "ALL", + ], + }, + limit: { + type: "integer", + label: "Limit", + description: "Maximum number of data points to return", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.mboum.getSecFilings({ + $, + params: { + ticker: this.ticker, + type: this.type, + limit: this.limit, + }, + }); + + $.export("$summary", `Successfully retrieved SEC filings for ${this.ticker}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-short-interest/get-short-interest.mjs b/components/mboum/actions/get-short-interest/get-short-interest.mjs new file mode 100644 index 0000000000000..797427b987f69 --- /dev/null +++ b/components/mboum/actions/get-short-interest/get-short-interest.mjs @@ -0,0 +1,41 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-short-interest", + name: "Get Short Interest", + description: "Get short interest data including short ratio, short percentage of float, and short interest trends. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-stock-short-interest)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + type: { + type: "string", + label: "Type", + description: "Type of short interest to retrieve", + options: [ + "STOCKS", + "ETF", + "MUTUALFUNDS", + "FUTURES", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getShortInterest({ + $, + params: { + ticker: this.ticker, + type: this.type, + }, + }); + + $.export("$summary", `Successfully retrieved short interest data for ${this.ticker}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-sma/get-sma.mjs b/components/mboum/actions/get-sma/get-sma.mjs new file mode 100644 index 0000000000000..560015ad88d1e --- /dev/null +++ b/components/mboum/actions/get-sma/get-sma.mjs @@ -0,0 +1,57 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-sma", + name: "Get Simple Moving Average (SMA)", + description: "Calculate Simple Moving Average technical indicator for stocks and crypto. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-indicators-sma)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + interval: { + propDefinition: [ + mboum, + "interval", + ], + }, + seriesType: { + propDefinition: [ + mboum, + "seriesType", + ], + }, + timePeriod: { + type: "integer", + label: "Time Period", + description: "Number of periods for SMA calculation", + optional: true, + }, + limit: { + propDefinition: [ + mboum, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getSMA({ + $, + params: { + ticker: this.ticker, + interval: this.interval, + series_type: this.seriesType, + time_period: this.timePeriod, + limit: this.limit, + }, + }); + + $.export("$summary", `Successfully calculated SMA(${this.timePeriod}) for ${this.ticker} on ${this.interval} intervals`); + return response; + }, +}; diff --git a/components/mboum/actions/get-stoch/get-stoch.mjs b/components/mboum/actions/get-stoch/get-stoch.mjs new file mode 100644 index 0000000000000..2762b3633b6ca --- /dev/null +++ b/components/mboum/actions/get-stoch/get-stoch.mjs @@ -0,0 +1,81 @@ +import mboum from "../../mboum.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "mboum-get-stoch", + name: "Get Stochastic Oscillator (STOCH)", + description: "Calculate Stochastic Oscillator technical indicator to identify momentum and potential reversal points. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-indicators-stochh)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + interval: { + propDefinition: [ + mboum, + "interval", + ], + }, + fastKPeriod: { + type: "integer", + label: "Fast K Period", + description: "Number of periods for %K calculation", + optional: true, + }, + slowKPeriod: { + type: "integer", + label: "Slow K Period", + description: "Smoothing period for %K", + optional: true, + }, + slowDPeriod: { + type: "integer", + label: "Slow D Period", + description: "Smoothing period for %D", + optional: true, + }, + slowKMaType: { + type: "string", + label: "Slow K MA Type", + description: "Moving average type for %K smoothing", + options: constants.MA_TYPES, + optional: true, + }, + slowDMaType: { + type: "string", + label: "Slow D MA Type", + description: "Moving average type for %D smoothing", + options: constants.MA_TYPES, + optional: true, + }, + limit: { + propDefinition: [ + mboum, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getSTOCH({ + $, + params: { + ticker: this.ticker, + interval: this.interval, + fastK_period: this.fastKPeriod, + slowK_period: this.slowKPeriod, + slowD_period: this.slowDPeriod, + slowK_ma_type: this.slowKMaType, + slowD_ma_type: this.slowDMaType, + limit: this.limit, + }, + }); + + $.export("$summary", `Successfully calculated STOCH(${this.fastKPeriod},${this.slowKPeriod},${this.slowDPeriod}) for ${this.ticker} on ${this.interval} intervals`); + return response; + }, +}; diff --git a/components/mboum/actions/get-stock-splits/get-stock-splits.mjs b/components/mboum/actions/get-stock-splits/get-stock-splits.mjs new file mode 100644 index 0000000000000..564e724d9ed4a --- /dev/null +++ b/components/mboum/actions/get-stock-splits/get-stock-splits.mjs @@ -0,0 +1,36 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-stock-splits", + name: "Get Stock Splits", + description: "Get upcoming and historical stock split data including split ratios, dates, and company information. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-calendar-stock-splits)", + version: "0.0.1", + type: "action", + props: { + mboum, + date: { + propDefinition: [ + mboum, + "date", + ], + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getStockSplits({ + $, + params: { + date: this.date, + page: this.page, + }, + }); + + $.export("$summary", "Successfully retrieved stock splits data"); + return response; + }, +}; diff --git a/components/mboum/actions/get-ticker-summary/get-ticker-summary.mjs b/components/mboum/actions/get-ticker-summary/get-ticker-summary.mjs new file mode 100644 index 0000000000000..772d8c2948e6b --- /dev/null +++ b/components/mboum/actions/get-ticker-summary/get-ticker-summary.mjs @@ -0,0 +1,41 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-ticker-summary", + name: "Get Ticker Summary", + description: "Get comprehensive ticker summary including key statistics, financial metrics, and company overview. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-stock-ticker-summary)", + version: "0.0.1", + type: "action", + props: { + mboum, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + type: { + type: "string", + label: "Type", + description: "Type of ticker summary to retrieve", + options: [ + "STOCKS", + "ETF", + "MUTUALFUNDS", + "FUTURES", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getTickerSummary({ + $, + params: { + ticker: this.ticker, + type: this.type, + }, + }); + + $.export("$summary", `Successfully retrieved ticker summary for ${this.ticker}`); + return response; + }, +}; diff --git a/components/mboum/actions/get-tickers/get-tickers.mjs b/components/mboum/actions/get-tickers/get-tickers.mjs new file mode 100644 index 0000000000000..9ad3acfae28d9 --- /dev/null +++ b/components/mboum/actions/get-tickers/get-tickers.mjs @@ -0,0 +1,42 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-tickers", + name: "Get Market Tickers", + description: "Get a comprehensive list of stock tickers and symbols with detailed information. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-tickers)", + version: "0.0.1", + type: "action", + props: { + mboum, + type: { + type: "string", + label: "Type", + description: "Type of tickers to retrieve", + options: [ + "STOCKS", + "ETF", + "MUTUALFUNDS", + "FUTURES", + "INDEX", + ], + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getTickers({ + $, + params: { + type: this.type, + page: this.page, + }, + }); + + $.export("$summary", "Successfully retrieved market tickers"); + return response; + }, +}; diff --git a/components/mboum/actions/get-unusual-options-activity/get-unusual-options-activity.mjs b/components/mboum/actions/get-unusual-options-activity/get-unusual-options-activity.mjs new file mode 100644 index 0000000000000..38fbfdd2e08a3 --- /dev/null +++ b/components/mboum/actions/get-unusual-options-activity/get-unusual-options-activity.mjs @@ -0,0 +1,60 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-get-unusual-options-activity", + name: "Get Unusual Options Activity", + description: "Get unusual options activity including high volume and large trades that deviate from normal patterns. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-options-unusual-options-activity)", + version: "0.0.1", + type: "action", + props: { + mboum, + type: { + type: "string", + label: "Type", + description: "Type of unusual options activity to retrieve", + options: [ + "STOCKS", + "ETFS", + "INDICES", + ], + }, + ticker: { + propDefinition: [ + mboum, + "ticker", + ], + }, + date: { + type: "string", + label: "Date", + description: "Enter a historical date: YYYY-MM-DD", + }, + priceMin: { + type: "string", + label: "Price Min", + description: "Filter results by min price of the stock per share value", + optional: true, + }, + page: { + propDefinition: [ + mboum, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.mboum.getUnusualOptionsActivity({ + $, + params: { + type: this.type, + ticker: this.ticker, + date: this.date, + price_min: this.priceMin, + page: this.page, + }, + }); + + $.export("$summary", "Successfully retrieved unusual options activity"); + return response; + }, +}; diff --git a/components/mboum/actions/search/search.mjs b/components/mboum/actions/search/search.mjs new file mode 100644 index 0000000000000..0bc67f143ea70 --- /dev/null +++ b/components/mboum/actions/search/search.mjs @@ -0,0 +1,28 @@ +import mboum from "../../mboum.app.mjs"; + +export default { + key: "mboum-search", + name: "Search Markets", + description: "Search for stocks, ETFs, and other financial instruments. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v2-markets-search)", + version: "0.0.1", + type: "action", + props: { + mboum, + search: { + type: "string", + label: "Search Query", + description: "Search term for stocks, ETFs, or other financial instruments", + }, + }, + async run({ $ }) { + const response = await this.mboum.search({ + $, + params: { + search: this.search, + }, + }); + + $.export("$summary", `Successfully searched for "${this.search}"`); + return response; + }, +}; diff --git a/components/mboum/common/constants.mjs b/components/mboum/common/constants.mjs new file mode 100644 index 0000000000000..6af099af877d5 --- /dev/null +++ b/components/mboum/common/constants.mjs @@ -0,0 +1,198 @@ +const INTERVALS = [ + "1m", + "5m", + "15m", + "30m", + "1h", + "1d", + "1wk", +]; + +const HISTORICAL_DATA_INTERVALS = [ + { + value: "1m", + label: "1 min candles", + }, + { + value: "2m", + label: "2 min candles", + }, + { + value: "3m", + label: "3 min candles", + }, + { + value: "5m", + label: "5 mins candles", + }, + { + value: "15m", + label: "15 mins candles", + }, + { + value: "30m", + label: "30 mins candles", + }, + { + value: "1wk", + label: "weekly candles", + }, + { + value: "1mo", + label: "monthly candles", + }, + { + value: "1qty", + label: "quarterly candles", + }, +]; + +const SERIES_TYPES = [ + { + value: "open", + label: "Open Price", + }, + { + value: "close", + label: "Close Price", + }, + { + value: "high", + label: "High Price", + }, + { + value: "low", + label: "Low Price", + }, +]; + +const MA_TYPES = [ + { + value: "0", + label: "Simple Moving Average (SMA)", + }, + { + value: "1", + label: "Exponential Moving Average (EMA)", + }, + { + value: "2", + label: "Weighted Moving Average (WMA)", + }, + { + value: "3", + label: "Double Exponential Moving Average (DEMA)", + }, + { + value: "4", + label: "Triple Exponential Moving Average (TEMA)", + }, + { + value: "5", + label: "Triangular Moving Average (TRIMA)", + }, + { + value: "6", + label: "T3 Moving Average", + }, + { + value: "7", + label: "Kaufman Adaptive Moving Average (KAMA)", + }, + { + value: "8", + label: "MESA Adaptive Moving Average (MAMA)", + }, +]; + +const INTERNATIONAL_HOLDINGS_TYPES = [ + "TOTAL", + "INCREASED", + "NEW", + "DECREASED", + "SOLDOUT", + "ACTIVITY", +]; + +const STOCK_MODULES = [ + "profile", + "income-statement", + "income-statement-v2", + "balance-sheet", + "balance-sheet-v2", + "cashflow-statement", + "cashflow-statement-v2", + "financial-data", + "statistics", + "ratios", + "calendar-events", + "sec-filings", + "recommendation-trend", + "upgrade-downgrade-history", + "insider-transactions", + "insider-holders", + "net-share-purchase-activity", + "earnings", + "index-trend", + "industry-trend", + "sector-trend", +]; + +const SCREENER_FILTERS = [ + "high_volume", + "hot_stocks", + "top_under_10", + "dividend", + "top_fundamentals", + "top_tech", + "j_pattern", + "golden_cross", + "death_cross", + "consolidation", + "rsi_overbought", + "rsi_oversold", + "52wk_toppicks", + "penny_gap", + "defensive_stock", + "income_growth", + "buy_longterm", + "sell_growth", +]; + +const CRYPTO_MODULES = [ + { + value: "global_matric", + label: "Global Metric data", + }, + { + value: "trending", + label: "Top Trending cryptocurrencies", + }, + { + value: "most_visited", + label: "Most visited cryptocurrencies sites", + }, + { + value: "new_coins", + label: "Newly launched cryptocurrencies", + }, + { + value: "gainer", + label: "Top cryptocurrency gainers", + }, + { + value: "loser", + label: "Top cryptocurrency losers", + }, +]; + +export default { + INTERVALS, + MA_TYPES, + SERIES_TYPES, + HISTORICAL_DATA_INTERVALS, + INTERNATIONAL_HOLDINGS_TYPES, + STOCK_MODULES, + SCREENER_FILTERS, + CRYPTO_MODULES, +}; diff --git a/components/mboum/mboum.app.mjs b/components/mboum/mboum.app.mjs index f383fb7047cc8..513a0bbc4c0b7 100644 --- a/components/mboum/mboum.app.mjs +++ b/components/mboum/mboum.app.mjs @@ -1,11 +1,342 @@ +import { axios } from "@pipedream/platform"; +import constants from "./common/constants.mjs"; + export default { type: "app", app: "mboum", - propDefinitions: {}, + propDefinitions: { + ticker: { + type: "string", + label: "Ticker", + description: "Ticker symbol to get data for. (e.g., AAPL, MSFT)", + }, + page: { + type: "integer", + label: "Page", + description: "Page number to return", + optional: true, + default: 1, + }, + date: { + type: "string", + label: "Date", + description: "Enter a calendar date. Format: YYYY-MM-DD", + optional: true, + }, + interval: { + type: "string", + label: "Interval", + description: "Time interval between two consecutive data points in the time series", + options: constants.INTERVALS, + }, + limit: { + type: "integer", + label: "Limit", + description: "Maximum number of results to return (default: 50)", + optional: true, + }, + seriesType: { + type: "string", + label: "Series Type", + description: "The price series to use for calculation", + options: constants.SERIES_TYPES, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://api.mboum.com/"; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: { + Authorization: `Bearer ${this.$auth.api_key}`, + }, + ...opts, + }); + }, + // General API + search(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/search", + ...opts, + }); + }, + getMovers(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/movers", + ...opts, + }); + }, + getScreener(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/screener", + ...opts, + }); + }, + getInsiderTrading(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/insider-trades", + ...opts, + }); + }, + getNews(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/news", + ...opts, + }); + }, + getTickers(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/tickers", + ...opts, + }); + }, + getMarketInfo(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/market-info", + ...opts, + }); + }, + // Stocks API + getRealtimeQuote(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/quote", + ...opts, + }); + }, + getHistory(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/stock/history", + ...opts, + }); + }, + getModules(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/stock/modules", + ...opts, + }); + }, + getAnalystRatings(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/stock/analyst-ratings", + ...opts, + }); + }, + getTickerSummary(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/stock/ticker-summary", + ...opts, + }); + }, + getPriceTargets(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/stock/price-targets", + ...opts, + }); + }, + getFinancials(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/stock/financials", + ...opts, + }); + }, + getRevenue(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/stock/revenue", + ...opts, + }); + }, + getShortInterest(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/stock/short-interest", + ...opts, + }); + }, + getInstitutionalHoldings(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/stock/institutional-holdings", + ...opts, + }); + }, + getSecFilings(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/stock/sec-filings", + ...opts, + }); + }, + getHistoricalData(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/stock/historical", + ...opts, + }); + }, + // Options API + getOptions(opts = {}) { + return this._makeRequest({ + path: "/v3/markets/options", + ...opts, + }); + }, + getUnusualOptionsActivity(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/options/unusual-options-activity", + ...opts, + }); + }, + getIvRankPercentile(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/options/iv-rank-percentile", + ...opts, + }); + }, + getIvChange(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/options/iv-change", + ...opts, + }); + }, + getMostActive(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/options/most-active", + ...opts, + }); + }, + getHighestIv(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/options/highest-iv", + ...opts, + }); + }, + getOptionsFlow(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/options/options-flow", + ...opts, + }); + }, + // Calendar Events API + getEarnings(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/calendar/earnings", + ...opts, + }); + }, + getDividends(opts = {}) { + return this._makeRequest({ + path: "/v2/markets/calendar/dividends", + ...opts, + }); + }, + getEconomicEvents(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/calendar/economic_events", + ...opts, + }); + }, + getIpoData(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/calendar/ipo", + ...opts, + }); + }, + getPublicOfferings(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/calendar/public_offerings", + ...opts, + }); + }, + getStockSplits(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/calendar/stock-splits", + ...opts, + }); + }, + getSMA(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/indicators/sma", + ...opts, + }); + }, + getRSI(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/indicators/rsi", + ...opts, + }); + }, + getMACD(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/indicators/macd", + ...opts, + }); + }, + getCCI(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/indicators/cci", + ...opts, + }); + }, + getADX(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/indicators/adx", + ...opts, + }); + }, + getEMA(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/indicators/ema", + ...opts, + }); + }, + getSTOCH(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/indicators/stoch", + ...opts, + }); + }, + getADOSC(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/indicators/adosc", + ...opts, + }); + }, + getAD(opts = {}) { + return this._makeRequest({ + path: "/v1/markets/indicators/ad", + ...opts, + }); + }, + // Crypto API + getCryptoProfile(opts = {}) { + return this._makeRequest({ + path: "/v1/crypto/profile", + ...opts, + }); + }, + getCryptoHolders(opts = {}) { + return this._makeRequest({ + path: "/v1/crypto/holders", + ...opts, + }); + }, + getCryptoQuotes(opts = {}) { + return this._makeRequest({ + path: "/v1/crypto/quotes", + ...opts, + }); + }, + getCryptoCurrencies(opts = {}) { + return this._makeRequest({ + path: "/v1/crypto/coins", + ...opts, + }); + }, + getCryptoModules(opts = {}) { + return this._makeRequest({ + path: "/v1/crypto/modules", + ...opts, + }); }, }, }; diff --git a/components/mboum/package.json b/components/mboum/package.json index d8f15f90c6c81..444709f4f511e 100644 --- a/components/mboum/package.json +++ b/components/mboum/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/mboum", - "version": "0.0.1", + "version": "0.1.1", "description": "Pipedream Mboum Components", "main": "mboum.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/mediatoolkit/package.json b/components/mediatoolkit/package.json index 9f692eb32b69f..4a48b8a37bff4 100644 --- a/components/mediatoolkit/package.json +++ b/components/mediatoolkit/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/mediatoolkit", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Mediatoolkit Components", "main": "dist/app/mediatoolkit.app.mjs", "keywords": [ @@ -16,6 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.0" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/mediatoolkit/tsconfig.json b/components/mediatoolkit/tsconfig.json index 335fa6f1cf6ec..3a9389484d040 100644 --- a/components/mediatoolkit/tsconfig.json +++ b/components/mediatoolkit/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/meetup/.gitignore b/components/meetup/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/meetup/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/meetup/app/meetup.app.ts b/components/meetup/app/meetup.app.ts deleted file mode 100644 index 00f0bad0d8b5a..0000000000000 --- a/components/meetup/app/meetup.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "meetup", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/meetup/meetup.app.mjs b/components/meetup/meetup.app.mjs new file mode 100644 index 0000000000000..cd1a059391335 --- /dev/null +++ b/components/meetup/meetup.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "meetup", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/meetup/package.json b/components/meetup/package.json index bb43ce0d5ce04..0c0e26717d8f1 100644 --- a/components/meetup/package.json +++ b/components/meetup/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/meetup", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Meetup Components", - "main": "dist/app/meetup.app.mjs", + "main": "meetup.app.mjs", "keywords": [ "pipedream", "meetup" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/meetup", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mem/package.json b/components/mem/package.json index 412055fd349d7..6447f3de03074 100644 --- a/components/mem/package.json +++ b/components/mem/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/mem", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Mem Components", "main": "mem.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/memberful/package.json b/components/memberful/package.json index 786ce712fdc8e..860c91273da1f 100644 --- a/components/memberful/package.json +++ b/components/memberful/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/memberful", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Memberful Components", - "main": "dist/app/memberful.app.mjs", + "main": "memberful.app.mjs", "keywords": [ "pipedream", "memberful" diff --git a/components/membervault/.gitignore b/components/membervault/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/membervault/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/membervault/app/membervault.app.ts b/components/membervault/app/membervault.app.ts deleted file mode 100644 index 32260e62f94b2..0000000000000 --- a/components/membervault/app/membervault.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "membervault", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/membervault/membervault.app.mjs b/components/membervault/membervault.app.mjs new file mode 100644 index 0000000000000..3b16c4dfdec5b --- /dev/null +++ b/components/membervault/membervault.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "membervault", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/membervault/package.json b/components/membervault/package.json index f80674c60ffc0..7409624e861af 100644 --- a/components/membervault/package.json +++ b/components/membervault/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/membervault", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Membervault Components", - "main": "dist/app/membervault.app.mjs", + "main": "membervault.app.mjs", "keywords": [ "pipedream", "membervault" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/membervault", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/memix/package.json b/components/memix/package.json index 8656b0f71c259..2cd297b3b72b0 100644 --- a/components/memix/package.json +++ b/components/memix/package.json @@ -1,16 +1,18 @@ { "name": "@pipedream/memix", - "version": "0.1.1", + "version": "0.1.2", "description": "Pipedream Memix Components", - "main": "dist/app/memix.app.mjs", + "main": "memix.app.mjs", "keywords": [ "pipedream", "memix" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/memix", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/metaphor/package.json b/components/metaphor/package.json index 905e19782685e..c353294ddf8dd 100644 --- a/components/metaphor/package.json +++ b/components/metaphor/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/metaphor", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Metaphor Components", "main": "metaphor.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/metatext_ai_inference_api/.gitignore b/components/metatext_ai_inference_api/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/metatext_ai_inference_api/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/metatext_ai_inference_api/app/metatext_ai_inference_api.app.ts b/components/metatext_ai_inference_api/app/metatext_ai_inference_api.app.ts deleted file mode 100644 index e0cc47ccf21c1..0000000000000 --- a/components/metatext_ai_inference_api/app/metatext_ai_inference_api.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "metatext_ai_inference_api", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/metatext_ai_inference_api/metatext_ai_inference_api.app.mjs b/components/metatext_ai_inference_api/metatext_ai_inference_api.app.mjs new file mode 100644 index 0000000000000..2273e524ce2fb --- /dev/null +++ b/components/metatext_ai_inference_api/metatext_ai_inference_api.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "metatext_ai_inference_api", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/metatext_ai_inference_api/package.json b/components/metatext_ai_inference_api/package.json index a76897bcc185f..d3a8f4f057d8b 100644 --- a/components/metatext_ai_inference_api/package.json +++ b/components/metatext_ai_inference_api/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/metatext_ai_inference_api", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Metatext.AI Inference API Components", - "main": "dist/app/metatext_ai_inference_api.app.mjs", + "main": "metatext_ai_inference_api.app.mjs", "keywords": [ "pipedream", "metatext_ai_inference_api" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/metatext_ai_inference_api", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mews/actions/add-customer-file/add-customer-file.mjs b/components/mews/actions/add-customer-file/add-customer-file.mjs new file mode 100644 index 0000000000000..498fd46c4681a --- /dev/null +++ b/components/mews/actions/add-customer-file/add-customer-file.mjs @@ -0,0 +1,67 @@ +import app from "../../mews.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + name: "Add Customer File", + description: "Add a customer file to the Mews system. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/customers#add-customer-file)", + key: "mews-add-customer-file", + version: "0.0.1", + type: "action", + props: { + app, + customerId: { + propDefinition: [ + app, + "customerId", + ], + }, + name: { + type: "string", + label: "File Name", + description: "Name of the file.", + }, + type: { + type: "string", + label: "File Type", + description: "Type of the file (e.g., image/png, application/pdf).", + options: [ + "application/pdf", + "image/bmp", + "image/gif", + "image/jpeg", + "image/png", + "image/tiff", + ], + }, + filePath: { + propDefinition: [ + app, + "filePath", + ], + }, + }, + async run({ $ }) { + const { + app, + customerId, + name, + type, + filePath, + } = this; + + const data = await utils.fromFilePathToBase64(filePath); + + const response = await app.customersAddFile({ + $, + data: { + CustomerId: customerId, + Name: name, + Type: type, + Data: data, + }, + }); + + $.export("$summary", `Successfully added file with ID \`${response.FileId}\``); + return response; + }, +}; diff --git a/components/mews/actions/add-customer/add-customer.mjs b/components/mews/actions/add-customer/add-customer.mjs new file mode 100644 index 0000000000000..e3fc14d0fb025 --- /dev/null +++ b/components/mews/actions/add-customer/add-customer.mjs @@ -0,0 +1,237 @@ +import { ConfigurationError } from "@pipedream/platform"; +import app from "../../mews.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + name: "Add Customer", + description: "Adds a new customer to the system. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/customers#add-customer)", + key: "mews-add-customer", + version: "0.0.1", + type: "action", + props: { + app, + overwriteExisting: { + type: "boolean", + label: "Overwrite Existing", + description: "Whether an existing customer should be overwritten in case of duplicity. This applies only to basic personal information", + }, + lastName: { + optional: false, + propDefinition: [ + app, + "lastName", + ], + }, + firstName: { + propDefinition: [ + app, + "firstName", + ], + }, + secondLastName: { + propDefinition: [ + app, + "secondLastName", + ], + }, + title: { + propDefinition: [ + app, + "title", + ], + }, + nationalityCode: { + propDefinition: [ + app, + "countryCode", + ], + label: "Nationality Code", + description: "ISO 3166-1 code of the Country", + }, + sex: { + propDefinition: [ + app, + "sex", + ], + }, + birthDate: { + propDefinition: [ + app, + "birthDate", + ], + }, + birthPlace: { + propDefinition: [ + app, + "birthPlace", + ], + }, + occupation: { + propDefinition: [ + app, + "occupation", + ], + }, + email: { + propDefinition: [ + app, + "email", + ], + }, + phone: { + propDefinition: [ + app, + "phone", + ], + }, + loyaltyCode: { + propDefinition: [ + app, + "loyaltyCode", + ], + }, + notes: { + description: "Internal notes about the customer", + propDefinition: [ + app, + "notes", + ], + optional: true, + }, + carRegistrationNumber: { + propDefinition: [ + app, + "carRegistrationNumber", + ], + }, + dietaryRequirements: { + propDefinition: [ + app, + "dietaryRequirements", + ], + }, + taxIdentificationNumber: { + propDefinition: [ + app, + "taxIdentificationNumber", + ], + }, + companyId: { + propDefinition: [ + app, + "companyId", + ], + optional: true, + }, + address: { + propDefinition: [ + app, + "address", + ], + }, + classifications: { + propDefinition: [ + app, + "classifications", + ], + }, + options: { + propDefinition: [ + app, + "options", + ], + }, + italianDestinationCode: { + propDefinition: [ + app, + "italianDestinationCode", + ], + }, + italianFiscalCode: { + propDefinition: [ + app, + "italianFiscalCode", + ], + }, + }, + async run({ $ }) { + const { + app, + title, + firstName, + lastName, + secondLastName, + nationalityCode, + sex, + birthDate, + birthPlace, + occupation, + email, + phone, + loyaltyCode, + notes, + carRegistrationNumber, + dietaryRequirements, + taxIdentificationNumber, + companyId, + address, + classifications, + options, + overwriteExisting, + italianDestinationCode, + italianFiscalCode, + } = this; + + const parsedClassifications = classifications + ? utils.parseArray(classifications) + : undefined; + + // Validate array + if (parsedClassifications && !Array.isArray(parsedClassifications)) { + throw new ConfigurationError("**Classifications** must be an array when provided"); + } + + const parsedAddress = address + ? utils.parseJson(address) + : undefined; + + // Validate address + if (parsedAddress && typeof parsedAddress !== "object") { + throw new ConfigurationError("**Address** must be a valid address object"); + } + + const response = await app.customersAdd({ + $, + data: { + LastName: lastName, + FirstName: firstName, + SecondLastName: secondLastName, + Title: title, + NationalityCode: nationalityCode, + Sex: sex, + BirthDate: birthDate, + BirthPlace: birthPlace, + Occupation: occupation, + Email: email, + Phone: phone, + LoyaltyCode: loyaltyCode, + Notes: notes, + CarRegistrationNumber: carRegistrationNumber, + DietaryRequirements: dietaryRequirements, + TaxIdentificationNumber: taxIdentificationNumber, + CompanyId: companyId, + Address: parsedAddress, + Classifications: parsedClassifications, + Options: options, + OverwriteExisting: overwriteExisting, + ItalianDestinationCode: italianDestinationCode, + ItalianFiscalCode: italianFiscalCode, + }, + }); + + $.export("$summary", `Successfully added customer${response.Email + ? ` with email ${response.Email}` + : ""}`); + return response; + }, +}; diff --git a/components/mews/actions/add-reservation-companion/add-reservation-companion.mjs b/components/mews/actions/add-reservation-companion/add-reservation-companion.mjs new file mode 100644 index 0000000000000..57a421caa0261 --- /dev/null +++ b/components/mews/actions/add-reservation-companion/add-reservation-companion.mjs @@ -0,0 +1,44 @@ +import app from "../../mews.app.mjs"; + +export default { + name: "Add Reservation Companion", + description: "Add a customer as a companion to a reservation. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/reservations#add-reservation-companion)", + key: "mews-add-reservation-companion", + version: "0.0.1", + type: "action", + props: { + app, + reservationId: { + propDefinition: [ + app, + "reservationId", + ], + description: "Identifier of the reservation to add the companion to.", + }, + customerId: { + propDefinition: [ + app, + "customerId", + ], + description: "Identifier of the customer who will be the companion.", + }, + }, + async run({ $ }) { + const { + app, + reservationId, + customerId, + } = this; + + const response = await app.reservationsAddCompanion({ + $, + data: { + ReservationId: reservationId, + CustomerId: customerId, + }, + }); + + $.export("$summary", `Successfully added reservation companion with ID \`${response.CompanionshipId}\``); + return response; + }, +}; diff --git a/components/mews/actions/add-reservation-product/add-reservation-product.mjs b/components/mews/actions/add-reservation-product/add-reservation-product.mjs new file mode 100644 index 0000000000000..1d16436725fd7 --- /dev/null +++ b/components/mews/actions/add-reservation-product/add-reservation-product.mjs @@ -0,0 +1,130 @@ +import app from "../../mews.app.mjs"; + +export default { + name: "Add Reservation Product", + description: "Add a product to a reservation. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/reservations#add-reservation-product)", + key: "mews-add-reservation-product", + version: "0.0.1", + type: "action", + props: { + app, + reservationId: { + propDefinition: [ + app, + "reservationId", + ], + description: "Identifier of the reservation to add the product to.", + }, + serviceIds: { + type: "string[]", + label: "Service IDs", + description: "Identifiers of the services for which the product is available.", + propDefinition: [ + app, + "serviceId", + ], + }, + productId: { + propDefinition: [ + app, + "productId", + ({ serviceIds }) => ({ + data: { + ServiceIds: serviceIds, + }, + }), + ], + }, + count: { + type: "integer", + label: "Count", + description: "The count of products to be added. If not specified, `1` is the default.", + optional: true, + }, + startUtc: { + propDefinition: [ + app, + "startUtc", + ], + description: "Start time of the product in ISO 8601 format (UTC). Eg. `2025-01-01T00:00:00Z`", + }, + endUtc: { + propDefinition: [ + app, + "endUtc", + ], + description: "End time of the product in ISO 8601 format (UTC). Eg. `2025-01-01T00:00:00Z`", + }, + unitAmountGrossValue: { + type: "string", + label: "Unit Amount - Gross Value", + description: "Gross value of the product.", + optional: true, + }, + unitAmountNetValue: { + type: "string", + label: "Unit Amount - Net Value", + description: "Net value of the product.", + optional: true, + }, + unitAmountCurrency: { + propDefinition: [ + app, + "currency", + ], + }, + unitAmountTaxCodes: { + type: "string[]", + label: "Unit Amount - Tax Codes", + description: "Codes of Tax rates to be applied to the item. (Note, you can only define one tax when sending **Gross Value**. For multiple taxes, use **Net Value**)", + optional: true, + propDefinition: [ + app, + "taxRate", + ], + }, + }, + async run({ $ }) { + const { + app, + reservationId, + productId, + startUtc, + endUtc, + count, + unitAmountGrossValue, + unitAmountNetValue, + unitAmountCurrency, + unitAmountTaxCodes, + } = this; + + const response = await app.reservationsAddProduct({ + $, + data: { + ReservationId: reservationId, + ProductId: productId, + StartUtc: startUtc, + EndUtc: endUtc, + Count: count, + ...(unitAmountGrossValue || unitAmountNetValue + ? { + UnitAmount: { + Currency: unitAmountCurrency, + ...(unitAmountGrossValue && { + GrossValue: parseFloat(unitAmountGrossValue), + }), + ...(unitAmountNetValue && { + NetValue: parseFloat(unitAmountNetValue), + }), + TaxCodes: unitAmountTaxCodes, + }, + } + : undefined + ), + }, + }); + + $.export("$summary", `Successfully added product ${productId} to reservation ${reservationId}`); + return response; + }, +}; diff --git a/components/mews/actions/cancel-reservation/cancel-reservation.mjs b/components/mews/actions/cancel-reservation/cancel-reservation.mjs new file mode 100644 index 0000000000000..40850a46fab73 --- /dev/null +++ b/components/mews/actions/cancel-reservation/cancel-reservation.mjs @@ -0,0 +1,44 @@ +import app from "../../mews.app.mjs"; + +export default { + name: "Cancel Reservation", + description: "Cancel a reservation in Mews.", + key: "mews-cancel-reservation", + version: "0.0.2", + type: "action", + props: { + app, + reservationId: { + propDefinition: [ + app, + "reservationId", + ], + }, + notes: { + description: "Reason for cancellation.", + propDefinition: [ + app, + "notes", + ], + }, + }, + async run({ $ }) { + const { + app, + reservationId, + notes, + } = this; + const response = await app.reservationsCancel({ + $, + data: { + ReservationIds: [ + reservationId, + ], + Notes: notes, + }, + }); + $.export("$summary", "Successfully cancelled reservation"); + return response; + }, +}; + diff --git a/components/mews/actions/create-availability-block/create-availability-block.mjs b/components/mews/actions/create-availability-block/create-availability-block.mjs new file mode 100644 index 0000000000000..a84565c94e604 --- /dev/null +++ b/components/mews/actions/create-availability-block/create-availability-block.mjs @@ -0,0 +1,198 @@ +import app from "../../mews.app.mjs"; + +export default { + name: "Create Availability Block", + description: "Create an availability block in Mews. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/availabilityblocks#add-availability-blocks)", + key: "mews-create-availability-block", + version: "0.0.1", + type: "action", + props: { + app, + serviceId: { + propDefinition: [ + app, + "serviceId", + ], + description: "Unique identifier of the Service to assign block to.", + }, + rateId: { + optional: false, + propDefinition: [ + app, + "rateId", + ], + description: "Unique identifier of the Rate to assign block to.", + }, + firstTimeUnitStartUtc: { + type: "string", + label: "First Time Unit Start (UTC)", + description: "Start of the time interval, expressed as the timestamp for the start of the first time unit, in UTC timezone ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + }, + lastTimeUnitStartUtc: { + type: "string", + label: "Last Time Unit Start (UTC)", + description: "End of the time interval, expressed as the timestamp for the start of the first time unit, in UTC timezone ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + }, + state: { + type: "string", + label: "State", + description: "State of the availability block.", + options: [ + "Confirmed", + "Optional", + "Inquired", + "Canceled", + ], + }, + releasedUtc: { + type: "string", + label: "Released (UTC)", + description: "The moment when the block and its availability is released, in UTC timezone ISO 8601 format. Takes precedence over RollingReleaseOffset. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + name: { + type: "string", + label: "Name", + description: "The name of the block.", + optional: true, + }, + bookerId: { + type: "string", + label: "Booker ID", + description: "Unique identifier of the Booker as a creator of an availability block.", + optional: true, + propDefinition: [ + app, + "customerId", + ], + }, + companyId: { + propDefinition: [ + app, + "companyId", + ], + description: "Unique identifier of Company.", + optional: true, + }, + travelAgencyId: { + label: "Travel Agency ID", + description: "Identifier of the Travel Agency. (Company with a TravelAgencyContract)", + propDefinition: [ + app, + "companyId", + () => ({ + filter: (company) => { + return company.NchClassifications?.OnlineTravelAgency === true; + }, + }), + ], + optional: true, + }, + budgetCurrency: { + propDefinition: [ + app, + "currency", + ], + description: "Currency of the budget.", + }, + budgetValue: { + type: "string", + label: "Budget Value", + description: "The value of the budget.", + optional: true, + }, + reservationPurpose: { + type: "string", + label: "Reservation Purpose", + description: "The purpose of the block.", + optional: true, + options: [ + "Business", + "Leisure", + "Student", + ], + }, + externalIdentifier: { + type: "string", + label: "External Identifier", + description: "Identifier of the block from external system. Max length 255 characters.", + optional: true, + }, + notes: { + propDefinition: [ + app, + "notes", + ], + description: "Additional notes of the block.", + optional: true, + }, + quoteId: { + type: "string", + label: "Quote ID", + description: "Unique identifier of the Mews Events quote associated with the availability block.", + optional: true, + }, + purchaseOrderNumber: { + type: "string", + label: "Purchase Order Number", + description: "Unique number of the purchase order. This number is propagated to any newly picked up Reservation within the block.", + optional: true, + }, + }, + async run({ $ }) { + const { + app, + serviceId, + rateId, + firstTimeUnitStartUtc, + lastTimeUnitStartUtc, + state, + releasedUtc, + name, + bookerId, + companyId, + travelAgencyId, + budgetCurrency, + budgetValue, + reservationPurpose, + externalIdentifier, + notes, + quoteId, + purchaseOrderNumber, + } = this; + + const response = await app.availabilityBlocksCreate({ + $, + data: { + AvailabilityBlocks: [ + { + ServiceId: serviceId, + RateId: rateId, + FirstTimeUnitStartUtc: firstTimeUnitStartUtc, + LastTimeUnitStartUtc: lastTimeUnitStartUtc, + State: state, + ReleasedUtc: releasedUtc, + Name: name, + BookerId: bookerId, + CompanyId: companyId, + TravelAgencyId: travelAgencyId, + ReservationPurpose: reservationPurpose, + ExternalIdentifier: externalIdentifier, + Notes: notes, + QuoteId: quoteId, + PurchaseOrderNumber: purchaseOrderNumber, + ...(budgetValue && { + Budget: { + Currency: budgetCurrency, + Value: parseFloat(budgetValue), + }, + }), + }, + ], + }, + }); + + $.export("$summary", "Successfully created availability block"); + return response; + }, +}; diff --git a/components/mews/actions/create-order/create-order.mjs b/components/mews/actions/create-order/create-order.mjs new file mode 100644 index 0000000000000..4477d3b5d5f84 --- /dev/null +++ b/components/mews/actions/create-order/create-order.mjs @@ -0,0 +1,184 @@ +import { ConfigurationError } from "@pipedream/platform"; +import app from "../../mews.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + name: "Create Order", + description: "Create an order in Mews. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/orders#add-order)", + key: "mews-create-order", + version: "0.0.1", + type: "action", + props: { + app, + accountType: { + propDefinition: [ + app, + "accountType", + ], + }, + accountId: { + propDefinition: [ + app, + "accountId", + ({ accountType }) => ({ + accountType, + }), + ], + }, + serviceId: { + propDefinition: [ + app, + "serviceId", + ], + description: "Identifier of the Service to be ordered.", + }, + billId: { + propDefinition: [ + app, + "billId", + ], + }, + linkedReservationId: { + propDefinition: [ + app, + "reservationId", + ], + label: "Linked Reservation ID", + description: "Identifier of the Reservation to which the created order will be linked.", + optional: true, + }, + consumptionUtc: { + type: "string", + label: "Consumption (UTC)", + description: "Date and time of the order consumption in UTC timezone in ISO 8601 format. If not specified, current date and time is used.", + optional: true, + }, + notes: { + propDefinition: [ + app, + "notes", + ], + description: "Additional notes of the order.", + optional: true, + }, + productOrders: { + type: "string[]", + label: "Product Orders", + description: `Array of product orders in JSON format. Each order must include: + +**Required:** +- \`ProductId\` (string) - Unique identifier of the Product to be ordered + +**Optional:** +- \`Count\` (number) - Count of products to be ordered (e.g. 10 in case of 10 beers) +- \`UnitAmount\` (object) - Unit amount of the product that overrides the amount defined in Mews: + - \`Currency\` (string) - ISO-4217 currency code + - \`GrossValue\` (number) - Gross value including all taxes + - \`NetValue\` (number) - Net value excluding taxes + - \`TaxCodes\` (string[]) - Tax codes applied to the amount +- \`StartUtc\` (string) - Product start in UTC timezone in ISO 8601 format (for Add order operation this can be omitted) +- \`EndUtc\` (string) - Product end in UTC timezone in ISO 8601 format (for Add order operation this can be omitted) + +*Note: Either GrossValue or NetValue must be specified in amount objects, but not both. For products with charging Once and PerPerson, StartUtc and EndUtc must be set to the same value.* + +**Example:** +\`\`\`json +[ + { + "ProductId": "12345678-1234-1234-1234-123456789012", + "Count": 2, + "UnitAmount": { + "Currency": "USD", + "GrossValue": 15.50, + "TaxCodes": ["VAT"] + }, + "StartUtc": "2025-01-01T00:00:00Z", + "EndUtc": "2025-01-01T00:00:00Z" + } +] +\`\`\``, + optional: true, + }, + items: { + type: "string[]", + label: "Items", + description: `Array of custom items in JSON format. Each item must include: + +**Required:** +- \`Name\` (string) - Name of the item +- \`UnitCount\` (integer) - Count of units to be ordered (must be positive) +- \`UnitAmount\` (object) - Amount per unit of the item: + - \`Currency\` (string) - ISO-4217 currency code + - \`GrossValue\` (number) - Gross value including all taxes + - \`NetValue\` (number) - Net value excluding taxes + - \`TaxCodes\` (string[]) - Tax codes applied to the amount + +**Optional:** +- \`AccountingCategoryId\` (string) - Identifier of the Accounting Category + +*Note: Either GrossValue or NetValue must be specified in UnitAmount, but not both.* + +**Example:** +\`\`\`json +[ + { + "Name": "Room Service", + "UnitCount": 1, + "UnitAmount": { + "Currency": "USD", + "GrossValue": 25.00, + "TaxCodes": ["VAT"] + }, + "AccountingCategoryId": "87654321-4321-4321-4321-210987654321" + } +] +\`\`\``, + optional: true, + }, + }, + async run({ $ }) { + const { + app, + accountId, + serviceId, + billId, + linkedReservationId, + consumptionUtc, + notes, + productOrders, + items, + } = this; + + const parsedProductOrders = productOrders + ? utils.parseArray(productOrders) + : undefined; + const parsedItems = items + ? utils.parseArray(items) + : undefined; + + if (parsedProductOrders && !Array.isArray(parsedProductOrders)) { + throw new ConfigurationError("**Product Orders** must be an array when provided"); + } + + if (parsedItems && !Array.isArray(parsedItems)) { + throw new ConfigurationError("**Items** must be an array when provided"); + } + + const response = await app.ordersCreate({ + $, + data: { + AccountId: accountId, + ServiceId: serviceId, + BillId: billId, + LinkedReservationId: linkedReservationId, + ConsumptionUtc: consumptionUtc, + Notes: notes, + ProductOrders: parsedProductOrders, + Items: parsedItems, + }, + }); + + $.export("$summary", "Successfully created order"); + return response; + }, +}; diff --git a/components/mews/actions/create-reservation/create-reservation.mjs b/components/mews/actions/create-reservation/create-reservation.mjs new file mode 100644 index 0000000000000..4cb7445dd2fb9 --- /dev/null +++ b/components/mews/actions/create-reservation/create-reservation.mjs @@ -0,0 +1,195 @@ +import app from "../../mews.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + name: "Create Reservation", + description: "Create a reservation in Mews. See reservation parameters in the docs. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/reservations#add-reservations)", + key: "mews-create-reservation", + version: "0.0.2", + type: "action", + props: { + app, + serviceId: { + propDefinition: [ + app, + "serviceId", + ], + }, + startUtc: { + optional: false, + propDefinition: [ + app, + "startUtc", + ], + }, + endUtc: { + optional: false, + propDefinition: [ + app, + "endUtc", + ], + }, + personCounts: { + type: "string[]", + label: "Person Counts", + description: `Number of people per age category the reservation was booked for. At least one category with valid count must be provided. + +**Parameters:** +- **AgeCategoryId** (string, required): Unique identifier of the Age category +- **Count** (integer, required): Number of people of a given age category. Only positive value is accepted + +**Example:** +\`\`\`json +[ + { + "AgeCategoryId": "3ed9e2f3-4bba-4df6-8d41-ab1400b21942", + "Count": 2 + }, + { + "AgeCategoryId": "ab7e1cf3-5fda-4cd2-8f41-ab1400b21943", + "Count": 1 + } +] +\`\`\``, + }, + customerId: { + propDefinition: [ + app, + "customerId", + ], + }, + requestedCategoryId: { + label: "Requested Category ID", + description: "The category of the resource requested for the reservation.", + optional: false, + propDefinition: [ + app, + "resourceCategoryId", + ({ serviceId }) => ({ + data: { + ServiceIds: [ + serviceId, + ], + }, + }), + ], + }, + rateId: { + optional: false, + propDefinition: [ + app, + "rateId", + ({ serviceId }) => ({ + data: { + ServiceIds: [ + serviceId, + ], + }, + }), + ], + }, + state: { + optional: true, + propDefinition: [ + app, + "state", + ], + }, + channelNumber: { + type: "string", + label: "Channel Number", + description: "The number of the channel that made the reservation.", + optional: true, + }, + notes: { + propDefinition: [ + app, + "notes", + ], + optional: true, + }, + companyId: { + propDefinition: [ + app, + "companyId", + ], + optional: true, + }, + travelAgencyId: { + label: "Travel Agency ID", + description: "Identifier of the Travel Agency. (Company with a TravelAgencyContract)", + propDefinition: [ + app, + "companyId", + () => ({ + filter: (company) => { + return company.NchClassifications?.OnlineTravelAgency === true; + }, + }), + ], + optional: true, + }, + businessSegmentId: { + propDefinition: [ + app, + "businessSegmentId", + ], + optional: true, + }, + additionalFields: { + propDefinition: [ + app, + "additionalFields", + ], + optional: true, + }, + }, + async run({ $ }) { + const { + app, + serviceId, + channelNumber, + state, + startUtc, + endUtc, + personCounts, + customerId, + requestedCategoryId, + rateId, + travelAgencyId, + companyId, + businessSegmentId, + notes, + additionalFields, + } = this; + + const response = await app.reservationsCreate({ + $, + data: { + ServiceId: serviceId, + Reservations: [ + { + ChannelNumber: channelNumber, + State: state, + StartUtc: startUtc, + EndUtc: endUtc, + PersonCounts: utils.parseArray(personCounts), + CustomerId: customerId, + RequestedCategoryId: requestedCategoryId, + RateId: rateId, + TravelAgencyId: travelAgencyId, + CompanyId: companyId, + BusinessSegmentId: businessSegmentId, + Notes: notes, + ...(additionalFields && { + ...utils.parseJson(additionalFields), + }), + }, + ], + }, + }); + + $.export("$summary", "Successfully created reservation"); + return response; + }, +}; diff --git a/components/mews/actions/create-task/create-task.mjs b/components/mews/actions/create-task/create-task.mjs new file mode 100644 index 0000000000000..f9778532f65f0 --- /dev/null +++ b/components/mews/actions/create-task/create-task.mjs @@ -0,0 +1,66 @@ +import app from "../../mews.app.mjs"; + +export default { + name: "Create New Task", + description: "Create a new task in Mews. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/tasks#add-task)", + key: "mews-create-task", + version: "0.0.1", + type: "action", + props: { + app, + name: { + type: "string", + label: "Name", + description: "Name (or title) of the task.", + }, + deadlineUtc: { + type: "string", + label: "Deadline (UTC)", + description: "Deadline of the task in UTC timezone in ISO 8601 format.", + }, + description: { + type: "string", + label: "Description", + description: "Description of the task.", + optional: true, + }, + departmentId: { + propDefinition: [ + app, + "departmentId", + ], + description: "Unique identifier of the Department the task is addressed to.", + }, + serviceOrderId: { + propDefinition: [ + app, + "productServiceOrderId", + ], + description: "Unique identifier of the Service the task is related to.", + }, + }, + async run({ $ }) { + const { + app, + name, + description, + departmentId, + serviceOrderId, + deadlineUtc, + } = this; + + const response = await app.tasksCreate({ + $, + data: { + Name: name, + Description: description, + DepartmentId: departmentId, + ServiceOrderId: serviceOrderId, + DeadlineUtc: deadlineUtc, + }, + }); + + $.export("$summary", "Successfully created task"); + return response; + }, +}; diff --git a/components/mews/actions/fetch-age-categories/fetch-age-categories.mjs b/components/mews/actions/fetch-age-categories/fetch-age-categories.mjs new file mode 100644 index 0000000000000..c9e5658adf32d --- /dev/null +++ b/components/mews/actions/fetch-age-categories/fetch-age-categories.mjs @@ -0,0 +1,115 @@ +import { ConfigurationError } from "@pipedream/platform"; +import app from "../../mews.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + name: "Fetch Age Categories", + description: "Retrieve all age categories filtered by service. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/agecategories#get-all-age-categories)", + key: "mews-fetch-age-categories", + version: "0.0.1", + type: "action", + props: { + app, + enterpriseIds: { + propDefinition: [ + app, + "enterpriseIds", + ], + }, + ageCategoryIds: { + type: "string[]", + label: "Age Category IDs", + description: "Unique identifiers of Age categories. Max 1000 items.", + optional: true, + }, + serviceIds: { + type: "string[]", + label: "Service IDs", + description: "Unique identifiers of Service associated with the age categories. If not provided, defaults to all bookable services. Max 1000 items.", + propDefinition: [ + app, + "serviceId", + ], + optional: true, + }, + updatedStartUtc: { + propDefinition: [ + app, + "updatedStartUtc", + ], + }, + updatedEndUtc: { + propDefinition: [ + app, + "updatedEndUtc", + ], + }, + activityStates: { + propDefinition: [ + app, + "activityStates", + ], + }, + }, + async run({ $ }) { + const { + app, + enterpriseIds, + ageCategoryIds, + serviceIds, + updatedStartUtc, + updatedEndUtc, + activityStates, + } = this; + + // Parse arrays + const parsedEnterpriseIds = enterpriseIds + ? utils.parseArray(enterpriseIds) + : undefined; + const parsedAgeCategoryIds = ageCategoryIds + ? utils.parseArray(ageCategoryIds) + : undefined; + const parsedServiceIds = serviceIds + ? utils.parseArray(serviceIds) + : undefined; + + // Validate arrays + if (parsedEnterpriseIds && !Array.isArray(parsedEnterpriseIds)) { + throw new ConfigurationError("**Enterprise IDs** must be an array when provided"); + } + + if (parsedAgeCategoryIds && !Array.isArray(parsedAgeCategoryIds)) { + throw new ConfigurationError("**Age Category IDs** must be an array when provided"); + } + + if (parsedServiceIds && !Array.isArray(parsedServiceIds)) { + throw new ConfigurationError("**Service IDs** must be an array when provided"); + } + + const items = await app.paginate({ + requester: app.ageCategoriesGetAll, + requesterArgs: { + $, + data: { + EnterpriseIds: parsedEnterpriseIds, + AgeCategoryIds: parsedAgeCategoryIds, + ServiceIds: parsedServiceIds, + ...(updatedStartUtc && updatedEndUtc + ? { + UpdatedUtc: { + StartUtc: updatedStartUtc, + EndUtc: updatedEndUtc, + }, + } + : undefined + ), + ActivityStates: activityStates, + }, + }, + resultKey: "AgeCategories", + }); + + $.export("summary", "Successfully fetched age categories"); + return items; + }, +}; diff --git a/components/mews/actions/fetch-customers/fetch-customers.mjs b/components/mews/actions/fetch-customers/fetch-customers.mjs new file mode 100644 index 0000000000000..90b1766b0d31b --- /dev/null +++ b/components/mews/actions/fetch-customers/fetch-customers.mjs @@ -0,0 +1,183 @@ +import app from "../../mews.app.mjs"; + +export default { + name: "Fetch Customers", + description: "Retrieve customers using Mews Connector API. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/customers#get-all-customers)", + key: "mews-fetch-customers", + version: "0.0.2", + type: "action", + props: { + app, + createdStartUtc: { + propDefinition: [ + app, + "createdStartUtc", + ], + }, + createdEndUtc: { + propDefinition: [ + app, + "createdEndUtc", + ], + }, + updatedStartUtc: { + propDefinition: [ + app, + "updatedStartUtc", + ], + }, + updatedEndUtc: { + propDefinition: [ + app, + "updatedEndUtc", + ], + }, + deletedStartUtc: { + propDefinition: [ + app, + "deletedStartUtc", + ], + }, + deletedEndUtc: { + propDefinition: [ + app, + "deletedEndUtc", + ], + }, + activityStates: { + type: "string[]", + label: "Activity States", + description: "Whether to return only active, only deleted or both records.", + optional: true, + options: [ + "Active", + "Deleted", + ], + }, + customerIds: { + type: "string[]", + label: "Customer IDs", + description: "Unique identifiers of Customers. Required if no other filter is provided. Max 1000 items.", + optional: true, + propDefinition: [ + app, + "customerId", + ], + }, + companyIds: { + type: "string[]", + label: "Company IDs", + description: "Unique identifier of the Company the customer is associated with. Max 1 item.", + optional: true, + propDefinition: [ + app, + "companyId", + ], + }, + emails: { + type: "string[]", + label: "Emails", + description: "Emails of the Customers. Max 1000 items.", + optional: true, + propDefinition: [ + app, + "customerId", + () => ({ + mapper: (customer) => ({ + label: `${customer.FirstName} ${customer.LastName}`, + value: customer.Email, + }), + }), + ], + }, + firstNames: { + type: "string[]", + label: "First Names", + description: "First names of the Customers. Max 1000 items.", + optional: true, + }, + lastNames: { + type: "string[]", + label: "Last Names", + description: "Last names of the Customers. Max 1000 items.", + optional: true, + }, + extentCustomers: { + type: "boolean", + label: "Extent - Customers", + description: "Whether to include customer data in the response.", + optional: true, + default: true, + }, + extentAddresses: { + type: "boolean", + label: "Extent - Addresses", + description: "Whether to include address data in the response.", + optional: true, + default: false, + }, + }, + async run({ $ }) { + const { + app, + createdStartUtc, + createdEndUtc, + updatedStartUtc, + updatedEndUtc, + deletedStartUtc, + deletedEndUtc, + activityStates, + customerIds, + companyIds, + emails, + firstNames, + lastNames, + extentCustomers, + extentAddresses, + } = this; + + const items = await app.paginate({ + requester: app.customersGetAll, + requesterArgs: { + $, + data: { + ...(createdStartUtc || createdEndUtc) && { + CreatedUtc: { + StartUtc: createdStartUtc, + EndUtc: createdEndUtc, + }, + }, + ...(updatedStartUtc || updatedEndUtc) && { + UpdatedUtc: { + StartUtc: updatedStartUtc, + EndUtc: updatedEndUtc, + }, + }, + ...(deletedStartUtc || deletedEndUtc) && { + DeletedUtc: { + StartUtc: deletedStartUtc, + EndUtc: deletedEndUtc, + }, + }, + Extent: { + Customers: extentCustomers, + Addresses: extentAddresses, + }, + ActivityStates: activityStates, + CustomerIds: customerIds, + CompanyIds: companyIds, + Emails: emails, + FirstNames: firstNames, + LastNames: lastNames, + }, + }, + resultKey: "Customers", + }); + + $.export("$summary", `Successfully fetched ${items.length} customer${items.length !== 1 + ? "s" + : ""}`); + return items; + }, +}; + diff --git a/components/mews/actions/fetch-order-items/fetch-order-items.mjs b/components/mews/actions/fetch-order-items/fetch-order-items.mjs new file mode 100644 index 0000000000000..a7faf7b169862 --- /dev/null +++ b/components/mews/actions/fetch-order-items/fetch-order-items.mjs @@ -0,0 +1,244 @@ +import app from "../../mews.app.mjs"; + +export default { + name: "Fetch Order Items", + description: "Retrieve order items using Mews Connector API. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/orderitems#get-all-order-items)", + key: "mews-fetch-order-items", + version: "0.0.2", + type: "action", + props: { + app, + createdStartUtc: { + description: "Start of the interval in which Order item was created. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + propDefinition: [ + app, + "createdStartUtc", + ], + }, + createdEndUtc: { + description: "End of the interval in which Order item was created. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + propDefinition: [ + app, + "createdEndUtc", + ], + }, + updatedStartUtc: { + description: "Start of the interval in which Order item was updated. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + propDefinition: [ + app, + "updatedStartUtc", + ], + }, + updatedEndUtc: { + description: "End of the interval in which Order item was updated. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + propDefinition: [ + app, + "updatedEndUtc", + ], + }, + consumedStartUtc: { + type: "string", + label: "Consumed Start (UTC)", + description: "Start of the interval in which Order item was consumed. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + consumedEndUtc: { + type: "string", + label: "Consumed End (UTC)", + description: "End of the interval in which Order item was consumed. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + canceledStartUtc: { + type: "string", + label: "Canceled Start (UTC)", + description: "Start of the interval in which Order item was canceled. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + canceledEndUtc: { + type: "string", + label: "Canceled End (UTC)", + description: "End of the interval in which Order item was canceled. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + closedStartUtc: { + type: "string", + label: "Closed Start (UTC)", + description: "Start of the interval in which Order item was closed. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + closedEndUtc: { + type: "string", + label: "Closed End (UTC)", + description: "End of the interval in which Order item was closed. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + enterpriseIds: { + propDefinition: [ + app, + "enterpriseIds", + ], + }, + orderItemIds: { + propDefinition: [ + app, + "orderItemIds", + ], + }, + accountType: { + propDefinition: [ + app, + "accountType", + ], + }, + accountIds: { + type: "string[]", + label: "Account IDs", + description: "Unique identifiers of specific Accounts to which the order items belong to. Required if no other filter is provided. Max 100 items.", + optional: true, + propDefinition: [ + app, + "accountId", + ({ accountType }) => ({ + accountType, + }), + ], + }, + serviceOrderIds: { + type: "string[]", + label: "Service Order IDs", + description: "Unique identifiers of the service orders (product service orders or reservations). Required if no other filter is provided. Max 1000 items.", + optional: true, + propDefinition: [ + app, + "reservationId", + ], + }, + serviceIds: { + type: "string[]", + label: "Service IDs", + description: "Unique identifiers of the Services. Required if no other filter is provided. Max 1000 items.", + optional: true, + propDefinition: [ + app, + "serviceId", + ], + }, + billIds: { + type: "string[]", + label: "Bill IDs", + description: "Unique identifiers of the Bills to which order item is assigned. Required if no other filter is provided. Max 1000 items.", + optional: true, + propDefinition: [ + app, + "billId", + ], + }, + currency: { + type: "string", + label: "Currency", + description: "ISO-4217 code of the Currency the item costs should be converted to.", + optional: true, + }, + accountingStates: { + type: "string[]", + label: "Accounting States", + description: "Accounting state of the item. Max 1000 items.", + optional: true, + options: [ + "Open", + "Closed", + "Deferred", + "Canceled", + ], + }, + types: { + type: "string[]", + label: "Types", + description: "Order item type, e.g. whether product order or space order. Max 1000 items.", + optional: true, + options: [ + "ProductOrder", + "SpaceOrder", + ], + }, + }, + async run({ $ }) { + const { + app, + createdStartUtc, + createdEndUtc, + updatedStartUtc, + updatedEndUtc, + consumedStartUtc, + consumedEndUtc, + canceledStartUtc, + canceledEndUtc, + closedStartUtc, + closedEndUtc, + enterpriseIds, + orderItemIds, + accountIds, + serviceOrderIds, + serviceIds, + billIds, + currency, + accountingStates, + types, + } = this; + + const items = await app.paginate({ + requester: app.orderItemsGetAll, + requesterArgs: { + $, + data: { + ...(createdStartUtc || createdEndUtc) && { + CreatedUtc: { + StartUtc: createdStartUtc, + EndUtc: createdEndUtc, + }, + }, + ...(updatedStartUtc || updatedEndUtc) && { + UpdatedUtc: { + StartUtc: updatedStartUtc, + EndUtc: updatedEndUtc, + }, + }, + ...(consumedStartUtc || consumedEndUtc) && { + ConsumedUtc: { + StartUtc: consumedStartUtc, + EndUtc: consumedEndUtc, + }, + }, + ...(canceledStartUtc || canceledEndUtc) && { + CanceledUtc: { + StartUtc: canceledStartUtc, + EndUtc: canceledEndUtc, + }, + }, + ...(closedStartUtc || closedEndUtc) && { + ClosedUtc: { + StartUtc: closedStartUtc, + EndUtc: closedEndUtc, + }, + }, + EnterpriseIds: enterpriseIds, + OrderItemIds: orderItemIds, + AccountIds: accountIds, + ServiceOrderIds: serviceOrderIds, + ServiceIds: serviceIds, + BillIds: billIds, + Currency: currency, + AccountingStates: accountingStates, + Types: types, + }, + }, + resultKey: "OrderItems", + }); + + $.export("$summary", `Successfully fetched ${items.length} order item${items.length !== 1 + ? "s" + : ""}`); + return items; + }, +}; + diff --git a/components/mews/actions/fetch-products/fetch-products.mjs b/components/mews/actions/fetch-products/fetch-products.mjs new file mode 100644 index 0000000000000..cbc56ded971a3 --- /dev/null +++ b/components/mews/actions/fetch-products/fetch-products.mjs @@ -0,0 +1,92 @@ +import app from "../../mews.app.mjs"; + +export default { + name: "Fetch Products", + description: "Retrieve products using Mews Connector API. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/products#get-all-products)", + key: "mews-fetch-products", + version: "0.0.2", + type: "action", + props: { + app, + serviceIds: { + type: "string[]", + label: "Service IDs", + description: "Unique identifiers of the Services. Max 1000 items.", + propDefinition: [ + app, + "serviceId", + ], + }, + updatedStartUtc: { + type: "string", + label: "Updated Start (UTC)", + description: "Start of the interval in which products were updated. ISO 8601 format.", + optional: true, + }, + updatedEndUtc: { + type: "string", + label: "Updated End (UTC)", + description: "End of the interval in which products were updated. ISO 8601 format. Max 3 months interval.", + optional: true, + }, + enterpriseIds: { + propDefinition: [ + app, + "enterpriseIds", + ], + }, + productIds: { + type: "string[]", + label: "Product IDs", + description: "Unique identifiers of the products. Max 1000 items.", + optional: true, + propDefinition: [ + app, + "productId", + ], + }, + includeDefault: { + type: "boolean", + label: "Include Default", + description: "Whether or not to include default products for the service, i.e. products which are standard includes and not true extras. For example, the night's stay would be the default product for a room reservation. These may be useful for accounting purposes but should not be displayed to customers for selection. If Product IDs are provided, Include Default defaults to true, otherwise it defaults to false.", + optional: true, + }, + }, + async run({ $ }) { + const { + app, + serviceIds, + updatedStartUtc, + updatedEndUtc, + enterpriseIds, + productIds, + includeDefault, + } = this; + + const items = await app.paginate({ + requester: app.productsGetAll, + requesterArgs: { + $, + data: { + ServiceIds: serviceIds, + ...(updatedStartUtc || updatedEndUtc) && { + UpdatedUtc: { + StartUtc: updatedStartUtc, + EndUtc: updatedEndUtc, + }, + }, + EnterpriseIds: enterpriseIds, + ProductIds: productIds, + IncludeDefault: includeDefault, + }, + }, + resultKey: "Products", + }); + + $.export("$summary", `Successfully fetched ${items.length} product${items.length !== 1 + ? "s" + : ""}`); + return items; + }, +}; + diff --git a/components/mews/actions/fetch-reservations/fetch-reservations.mjs b/components/mews/actions/fetch-reservations/fetch-reservations.mjs new file mode 100644 index 0000000000000..3f04190fcc5b7 --- /dev/null +++ b/components/mews/actions/fetch-reservations/fetch-reservations.mjs @@ -0,0 +1,314 @@ +import app from "../../mews.app.mjs"; + +export default { + name: "Fetch Reservations", + description: "Retrieve reservations using Mews Connector API. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/reservations#get-all-reservations-ver-2023-06-06)", + key: "mews-fetch-reservations", + version: "0.0.2", + type: "action", + props: { + app, + createdStartUtc: { + description: "Start of the interval in which Reservation was created. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + propDefinition: [ + app, + "createdStartUtc", + ], + }, + createdEndUtc: { + description: "End of the interval in which Reservation was created. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + propDefinition: [ + app, + "createdEndUtc", + ], + }, + updatedStartUtc: { + description: "Start of the interval in which Reservations were updated. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + propDefinition: [ + app, + "updatedStartUtc", + ], + }, + updatedEndUtc: { + description: "End of the interval in which Reservations were updated. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + propDefinition: [ + app, + "updatedEndUtc", + ], + }, + collidingStartUtc: { + type: "string", + label: "Colliding Start (UTC)", + description: "Start of the interval in which reservations are active. Reservation is selected if any part of its interval intersects with the interval specified. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + collidingEndUtc: { + type: "string", + label: "Colliding End (UTC)", + description: "End of the interval in which reservations are active. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + scheduledStartStartUtc: { + type: "string", + label: "Scheduled Start - Start (UTC)", + description: "Start of the interval filtering Reservations by their scheduled start time. Cannot be used with Actual Start. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + scheduledStartEndUtc: { + type: "string", + label: "Scheduled Start - End (UTC)", + description: "End of the interval filtering Reservations by their scheduled start time. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + scheduledEndStartUtc: { + type: "string", + label: "Scheduled End - Start (UTC)", + description: "Start of the interval filtering Reservations by their scheduled end time. Cannot be used with Actual End. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + scheduledEndEndUtc: { + type: "string", + label: "Scheduled End - End (UTC)", + description: "End of the interval filtering Reservations by their scheduled end time. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + actualStartStartUtc: { + type: "string", + label: "Actual Start - Start (UTC)", + description: "Start of the interval filtering Reservations by their actual start (check-in) time. Cannot be used with Scheduled Start. Note that the filter applies only to started or processed reservations. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + actualStartEndUtc: { + type: "string", + label: "Actual Start - End (UTC)", + description: "End of the interval filtering Reservations by their actual start (check-in) time. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + actualEndStartUtc: { + type: "string", + label: "Actual End - Start (UTC)", + description: "Start of the interval filtering Reservations by their actual end (check-out) time. Cannot be used with Scheduled End. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + actualEndEndUtc: { + type: "string", + label: "Actual End - End (UTC)", + description: "End of the interval filtering Reservations by their actual end (check-out) time. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + enterpriseIds: { + propDefinition: [ + app, + "enterpriseIds", + ], + }, + reservationIds: { + type: "string[]", + label: "Reservation IDs", + description: "Unique identifiers of the Reservations. Max 1000 items.", + optional: true, + propDefinition: [ + app, + "reservationId", + ], + }, + serviceIds: { + type: "string[]", + label: "Service IDs", + description: "Unique identifiers of the Services. If not provided, all bookable services are used. Max 1000 items.", + optional: true, + propDefinition: [ + app, + "serviceId", + ], + }, + reservationGroupIds: { + propDefinition: [ + app, + "reservationGroupIds", + ], + }, + accountIds: { + type: "string[]", + label: "Account IDs", + description: "Unique identifiers of accounts (currently only Customers, in the future also Companies) the reservation is associated with. Max 1000 items.", + optional: true, + propDefinition: [ + app, + "accountId", + () => ({ + accountType: "customer", + }), + ], + }, + partnerCompanyIds: { + type: "string[]", + label: "Partner Company IDs", + description: "Unique identifiers of the Companies on behalf of which the reservations were made. Max 100 items.", + optional: true, + propDefinition: [ + app, + "companyId", + ], + }, + travelAgencyIds: { + type: "string[]", + label: "Travel Agency IDs", + description: "Identifier of the Travel Agencies (Company) that mediated the reservations. Max 100 items. (Company with a TravelAgencyContract)", + optional: true, + propDefinition: [ + app, + "companyId", + () => ({ + filter: (company) => { + return company.NchClassifications?.OnlineTravelAgency === true; + }, + }), + ], + }, + numbers: { + type: "string[]", + label: "Confirmation Numbers", + description: "Reservation confirmation numbers. Max 1000 items.", + optional: true, + }, + channelNumbers: { + type: "string[]", + label: "Channel Numbers", + description: "Numbers or references used by a Channel (OTA, GDS, CRS, etc.) in case the reservation group originates there, e.g. Booking.com confirmation numbers. Max 100 items.", + optional: true, + }, + assignedResourceIds: { + type: "string[]", + label: "Assigned Resource IDs", + description: "Unique identifiers of the Resources assigned to the reservations. Max 1000 items.", + optional: true, + propDefinition: [ + app, + "resourceId", + ], + }, + availabilityBlockIds: { + type: "string[]", + label: "Availability Block IDs", + description: "Unique identifiers of the Availability blocks assigned to the reservations. Max 100 items.", + optional: true, + }, + states: { + type: "string[]", + label: "States", + description: "A list of service order states to filter by.", + optional: true, + options: [ + "Inquired", + "Requested", + "Optional", + "Confirmed", + "Started", + "Processed", + "Canceled", + ], + }, + }, + async run({ $ }) { + const { + app, + createdStartUtc, + createdEndUtc, + updatedStartUtc, + updatedEndUtc, + collidingStartUtc, + collidingEndUtc, + scheduledStartStartUtc, + scheduledStartEndUtc, + scheduledEndStartUtc, + scheduledEndEndUtc, + actualStartStartUtc, + actualStartEndUtc, + actualEndStartUtc, + actualEndEndUtc, + enterpriseIds, + reservationIds, + serviceIds, + reservationGroupIds, + accountIds, + partnerCompanyIds, + travelAgencyIds, + numbers, + channelNumbers, + assignedResourceIds, + availabilityBlockIds, + states, + } = this; + + const items = await app.paginate({ + requester: app.reservationsGetAll, + requesterArgs: { + $, + data: { + ...(createdStartUtc || createdEndUtc) && { + CreatedUtc: { + StartUtc: createdStartUtc, + EndUtc: createdEndUtc, + }, + }, + ...(updatedStartUtc || updatedEndUtc) && { + UpdatedUtc: { + StartUtc: updatedStartUtc, + EndUtc: updatedEndUtc, + }, + }, + ...(collidingStartUtc || collidingEndUtc) && { + CollidingUtc: { + StartUtc: collidingStartUtc, + EndUtc: collidingEndUtc, + }, + }, + ...(scheduledStartStartUtc || scheduledStartEndUtc) && { + ScheduledStartUtc: { + StartUtc: scheduledStartStartUtc, + EndUtc: scheduledStartEndUtc, + }, + }, + ...(scheduledEndStartUtc || scheduledEndEndUtc) && { + ScheduledEndUtc: { + StartUtc: scheduledEndStartUtc, + EndUtc: scheduledEndEndUtc, + }, + }, + ...(actualStartStartUtc || actualStartEndUtc) && { + ActualStartUtc: { + StartUtc: actualStartStartUtc, + EndUtc: actualStartEndUtc, + }, + }, + ...(actualEndStartUtc || actualEndEndUtc) && { + ActualEndUtc: { + StartUtc: actualEndStartUtc, + EndUtc: actualEndEndUtc, + }, + }, + EnterpriseIds: enterpriseIds, + ReservationIds: reservationIds, + ServiceIds: serviceIds, + ReservationGroupIds: reservationGroupIds, + AccountIds: accountIds, + PartnerCompanyIds: partnerCompanyIds, + TravelAgencyIds: travelAgencyIds, + Numbers: numbers, + ChannelNumbers: channelNumbers, + AssignedResourceIds: assignedResourceIds, + AvailabilityBlockIds: availabilityBlockIds, + States: states, + }, + }, + resultKey: "Reservations", + }); + + $.export("$summary", `Successfully fetched ${items.length} reservation${items.length !== 1 + ? "s" + : ""}`); + return items; + }, +}; + diff --git a/components/mews/actions/get-bill-pdf/get-bill-pdf.mjs b/components/mews/actions/get-bill-pdf/get-bill-pdf.mjs new file mode 100644 index 0000000000000..6582fc736113b --- /dev/null +++ b/components/mews/actions/get-bill-pdf/get-bill-pdf.mjs @@ -0,0 +1,87 @@ +import app from "../../mews.app.mjs"; + +export default { + name: "Get Bill PDF", + description: "Get a bill PDF by bill ID. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/bills#get-bill-pdf)", + key: "mews-get-bill-pdf", + version: "0.0.1", + type: "action", + props: { + app, + billId: { + optional: false, + propDefinition: [ + app, + "billId", + () => ({ + data: { + State: "Closed", + }, + }), + ], + description: "Unique identifier of the Bill.", + }, + billPrintEventId: { + type: "string", + label: "Bill Print Event ID", + description: "Unique identifier of the Bill print event returned by previous invocation.", + optional: true, + }, + pdfTemplate: { + type: "string", + label: "PDF Template", + description: "Bill PDF template type. If not specified, the default template is used.", + optional: true, + options: [ + { + label: "Detailed - Detailed overview. Items are grouped by the reservation, item type and price, and consumption date.", + value: "Detailed", + }, + { + label: "Consumption - Overview by date (no reservation details). Items of the same type and price are grouped by consumption date.", + value: "Consumption", + }, + { + label: "Reservation - Overview by reservation (no date). Items of the same type and price are grouped by reservation.", + value: "Reservation", + }, + { + label: "OrderItem - Consumption overview (not fiscal document). Items are grouped by the item type and price without reservation details and consumption date.", + value: "OrderItem", + }, + { + label: "Guest - Overview by guest. Items are grouped by guest, reservation, consumption date, and item type.", + value: "Guest", + }, + ], + }, + printReason: { + type: "string", + label: "Print Reason", + description: "The reason for reprinting the bill with different template. Required for France LE. Max length 255 characters.", + optional: true, + }, + }, + async run({ $ }) { + const { + app, + billId, + billPrintEventId, + pdfTemplate, + printReason, + } = this; + + const response = await app.billsGetPdf({ + $, + data: { + BillId: billId, + BillPrintEventId: billPrintEventId, + PdfTemplate: pdfTemplate, + PrintReason: printReason, + }, + }); + + $.export("$summary", `Successfully retrieved PDF for bill ${billId}`); + return response; + }, +}; diff --git a/components/mews/actions/get-rate-prices/get-rate-prices.mjs b/components/mews/actions/get-rate-prices/get-rate-prices.mjs new file mode 100644 index 0000000000000..99f0e78c43357 --- /dev/null +++ b/components/mews/actions/get-rate-prices/get-rate-prices.mjs @@ -0,0 +1,60 @@ +import app from "../../mews.app.mjs"; + +export default { + name: "Get Rate Prices", + description: "Get rate pricing information for a specific rate and time period. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/rates#get-rate-pricing)", + key: "mews-get-rate-prices", + version: "0.0.1", + type: "action", + props: { + app, + rateId: { + propDefinition: [ + app, + "rateId", + ], + description: "Unique identifier of the Rate.", + }, + productId: { + propDefinition: [ + app, + "productId", + ], + description: "Unique identifier of the Product.", + optional: true, + }, + firstTimeUnitStartUtc: { + type: "string", + label: "First Time Unit Start (UTC)", + description: "Start of the time interval, expressed as the timestamp for the start of the first time unit, in UTC timezone ISO 8601 format.", + }, + lastTimeUnitStartUtc: { + type: "string", + label: "Last Time Unit Start (UTC)", + description: "End of the time interval, expressed as the timestamp for the start of the last time unit, in UTC timezone ISO 8601 format. The maximum size of time interval depends on the service's time unit: 367 hours if hours, 367 days if days, or 24 months if months.", + }, + }, + async run({ $ }) { + const { + app, + rateId, + productId, + firstTimeUnitStartUtc, + lastTimeUnitStartUtc, + } = this; + + const response = await app.ratesGetPricing({ + $, + data: { + RateId: rateId, + ProductId: productId, + FirstTimeUnitStartUtc: firstTimeUnitStartUtc, + LastTimeUnitStartUtc: lastTimeUnitStartUtc, + }, + }); + + $.export("$summary", "Successfully retrieved pricing for rate"); + + return response; + }, +}; diff --git a/components/mews/actions/update-customer/update-customer.mjs b/components/mews/actions/update-customer/update-customer.mjs new file mode 100644 index 0000000000000..2b75fa2711f32 --- /dev/null +++ b/components/mews/actions/update-customer/update-customer.mjs @@ -0,0 +1,242 @@ +import { ConfigurationError } from "@pipedream/platform"; +import app from "../../mews.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + name: "Update Customer", + description: "Update an existing customer in Mews. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/customers#update-customer)", + key: "mews-update-customer", + version: "0.0.1", + type: "action", + props: { + app, + customerId: { + propDefinition: [ + app, + "customerId", + ], + description: "Unique identifier of the Customer to be updated.", + }, + title: { + propDefinition: [ + app, + "title", + ], + }, + lastName: { + propDefinition: [ + app, + "lastName", + ], + }, + firstName: { + propDefinition: [ + app, + "firstName", + ], + }, + secondLastName: { + propDefinition: [ + app, + "secondLastName", + ], + }, + nationalityCode: { + label: "Nationality Code", + description: "New nationality code as ISO 3166-1 code of the Country.", + propDefinition: [ + app, + "countryCode", + ], + }, + sex: { + propDefinition: [ + app, + "sex", + ], + }, + birthDate: { + propDefinition: [ + app, + "birthDate", + ], + }, + birthPlace: { + propDefinition: [ + app, + "birthPlace", + ], + }, + occupation: { + propDefinition: [ + app, + "occupation", + ], + }, + email: { + propDefinition: [ + app, + "email", + ], + }, + phone: { + propDefinition: [ + app, + "phone", + ], + }, + loyaltyCode: { + propDefinition: [ + app, + "loyaltyCode", + ], + }, + notes: { + description: "Internal notes about the customer", + propDefinition: [ + app, + "notes", + ], + }, + carRegistrationNumber: { + propDefinition: [ + app, + "carRegistrationNumber", + ], + }, + dietaryRequirements: { + propDefinition: [ + app, + "dietaryRequirements", + ], + }, + taxIdentificationNumber: { + propDefinition: [ + app, + "taxIdentificationNumber", + ], + }, + companyId: { + propDefinition: [ + app, + "companyId", + ], + description: "Unique identifier of Company the customer is associated with.", + optional: true, + }, + address: { + propDefinition: [ + app, + "address", + ], + }, + classifications: { + propDefinition: [ + app, + "classifications", + ], + }, + options: { + propDefinition: [ + app, + "options", + ], + }, + italianDestinationCode: { + propDefinition: [ + app, + "italianDestinationCode", + ], + }, + italianFiscalCode: { + propDefinition: [ + app, + "italianFiscalCode", + ], + }, + }, + async run({ $ }) { + const { + app, + customerId, + title, + firstName, + lastName, + secondLastName, + nationalityCode, + sex, + birthDate, + birthPlace, + occupation, + email, + phone, + loyaltyCode, + notes, + carRegistrationNumber, + dietaryRequirements, + taxIdentificationNumber, + companyId, + address, + classifications, + options, + italianDestinationCode, + italianFiscalCode, + } = this; + + const parsedClassifications = classifications + ? utils.parseArray(classifications) + : undefined; + + if (parsedClassifications && !Array.isArray(parsedClassifications)) { + throw new ConfigurationError("**Classifications** must be an array when provided"); + } + + const parsedAddress = address + ? utils.parseJson(address) + : undefined; + + if (parsedAddress && typeof parsedAddress !== "object") { + throw new ConfigurationError("**Address** must be a valid address object"); + } + + const response = await app.customersUpdate({ + $, + data: { + CustomerId: customerId, + Title: title, + FirstName: firstName, + LastName: lastName, + SecondLastName: secondLastName, + NationalityCode: nationalityCode, + Sex: sex, + BirthDate: birthDate, + BirthPlace: birthPlace, + Occupation: occupation, + Email: email, + Phone: phone, + LoyaltyCode: loyaltyCode, + Notes: notes, + CarRegistrationNumber: carRegistrationNumber, + DietaryRequirements: dietaryRequirements, + TaxIdentificationNumber: taxIdentificationNumber, + CompanyId: companyId, + Address: parsedAddress, + Classifications: parsedClassifications, + Options: options, + ...(italianDestinationCode && { + ItalianDestinationCode: { + Value: italianDestinationCode, + }, + }), + ...(italianFiscalCode && { + ItalianFiscalCode: { + Value: italianFiscalCode, + }, + }), + }, + }); + + $.export("$summary", `Successfully updated customer with ID \`${response.Id}\``); + return response; + }, +}; diff --git a/components/mews/actions/update-reservation/update-reservation.mjs b/components/mews/actions/update-reservation/update-reservation.mjs new file mode 100644 index 0000000000000..9b73060666f37 --- /dev/null +++ b/components/mews/actions/update-reservation/update-reservation.mjs @@ -0,0 +1,363 @@ +import { ConfigurationError } from "@pipedream/platform"; +import app from "../../mews.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + name: "Update Reservation", + description: "Update an existing reservation in Mews. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/reservations#update-reservations)", + key: "mews-update-reservation", + version: "0.0.2", + type: "action", + props: { + app, + reason: { + type: "string", + label: "Reason", + description: "Reason for updating the reservation. Required when updating the price of the reservation.", + optional: true, + }, + reprice: { + type: "boolean", + label: "Reprice", + description: "Whether the price should be updated to latest value for date/rate/category combination set in Mews. If not specified, the reservation price is updated.", + optional: true, + }, + applyCancellationFee: { + type: "boolean", + label: "Apply Cancellation Fee", + description: "Whether the cancellation fees should be applied according to rate cancellation policies. If not specified, the cancellation fees are applied.", + optional: true, + }, + reservationId: { + propDefinition: [ + app, + "reservationId", + ], + description: "Unique identifier of the reservation.", + }, + channelNumber: { + type: "string", + label: "Channel Number", + description: "Number of the reservation within the Channel (i.e. OTA, GDS, CRS, etc) in case the reservation group originates there (e.g. Booking.com confirmation number)", + optional: true, + }, + startUtc: { + type: "string", + label: "Start UTC", + description: "Reservation start in UTC timezone in ISO 8601 format", + optional: true, + }, + endUtc: { + type: "string", + label: "End UTC", + description: "Reservation end in UTC timezone in ISO 8601 format", + optional: true, + }, + releasedUtc: { + type: "string", + label: "Released UTC", + description: "Date when the optional reservation is released in UTC timezone in ISO 8601 format", + optional: true, + }, + personCounts: { + type: "string[]", + label: "Person Counts", + description: `Number of people per age category the reservation is for. If supplied, the person counts will be replaced. Each item should contain: +- \`AgeCategoryId\` (string, required): Unique identifier of the Age category +- \`Count\` (integer, required): Number of people of a given age category. Only positive value is accepted + +Pass an array of person counts or null if the person counts should not be updated. + +**Example:** +\`\`\`json +[ + { + "AgeCategoryId": "12345678-1234-1234-1234-123456789012", + "Count": 2 + }, + { + "AgeCategoryId": "87654321-4321-4321-4321-210987654321", + "Count": 1 + } +] +\`\`\``, + optional: true, + }, + assignedResourceId: { + type: "string", + label: "Assigned Resource ID", + description: "Identifier of the assigned Resource. If the assigned resource is locked, see AssignedResourceLocked for updating the assigned resource.", + optional: true, + }, + requestedCategoryId: { + type: "string", + label: "Requested Category ID", + description: "Identifier of the requested ResourceCategory", + optional: true, + }, + travelAgencyId: { + label: "Travel Agency ID", + description: "Identifier of the Travel Agency. (Company with a TravelAgencyContract)", + propDefinition: [ + app, + "companyId", + () => ({ + filter: (company) => { + return company.NchClassifications?.OnlineTravelAgency === true; + }, + }), + ], + optional: true, + }, + companyId: { + propDefinition: [ + app, + "companyId", + ], + description: "Unique identifier of Company.", + optional: true, + }, + businessSegmentId: { + propDefinition: [ + app, + "businessSegmentId", + ], + description: "Unique identifier of BusinessSegment.", + optional: true, + }, + purpose: { + type: "string", + label: "Purpose", + description: "Purpose of the reservation", + optional: true, + }, + rateId: { + propDefinition: [ + app, + "rateId", + ], + }, + creditCardId: { + propDefinition: [ + app, + "creditCardId", + ], + }, + timeUnitPrices: { + type: "string[]", + label: "Time Unit Prices", + description: `Prices for time units of the reservation. Each unit should contain: +- \`Index\` (integer, required): Index of the unit starting with 0 (e.g., first night has index 0) +- \`Amount\` (object, optional): Amount parameters including: + - \`GrossValue\` (decimal, optional): Amount including tax (required for Gross Pricing environments) + - \`NetValue\` (decimal, optional): Amount excluding tax (required for Net Pricing environments) + - \`Currency\` (string, required): \`ISO-4217\` code of the currency + - \`TaxCodes\` (array of strings, required): Codes of tax rates to be applied (note: only one tax when using \`GrossValue\`, multiple taxes with \`NetValue\`) + +Pass an array of price units or null if the unit amounts should not be updated. + +**Example:** +\`\`\`json +[ + { + "Index": 0, + "Amount": { + "GrossValue": 100.00, + "Currency": "EUR", + "TaxCodes": ["VAT"] + } + }, + { + "Index": 1, + "Amount": { + "NetValue": 85.00, + "Currency": "EUR", + "TaxCodes": ["VAT", "CityTax"] + } + } +] +\`\`\``, + optional: true, + }, + bookerId: { + label: "Booker ID", + description: "Identifier of the Customer on whose behalf the reservation was made.", + propDefinition: [ + app, + "customerId", + ], + }, + assignedResourceLocked: { + type: "boolean", + label: "Assigned Resource Locked", + description: "Whether the reservation should be locked to the assigned Resource. To reassign the reservation to a new Resource, first set AssignedResourceLocked to false to unlock the resource. Then, assign the reservation to a new Resource by setting AssignedResourceId to the new resource ID.", + optional: true, + }, + availabilityBlockId: { + propDefinition: [ + app, + "availabilityBlockId", + ], + }, + optionsOwnerCheckedIn: { + type: "boolean", + label: "Options Owner Checked In", + description: "Whether the owner of the reservation has checked in.", + optional: true, + }, + }, + async run({ $ }) { + const { + app, + reason, + reprice, + applyCancellationFee, + reservationId, + channelNumber, + startUtc, + endUtc, + releasedUtc, + personCounts, + assignedResourceId, + requestedCategoryId, + travelAgencyId, + companyId, + businessSegmentId, + purpose, + rateId, + creditCardId, + timeUnitPrices, + bookerId, + assignedResourceLocked, + availabilityBlockId, + optionsOwnerCheckedIn, + } = this; + + // Parse arrays + const parsedPersonCounts = personCounts + ? utils.parseArray(personCounts) + : undefined; + const parsedTimeUnitPrices = timeUnitPrices + ? utils.parseArray(timeUnitPrices) + : undefined; + + // Validate arrays + if (parsedPersonCounts && !Array.isArray(parsedPersonCounts)) { + throw new ConfigurationError("**Person Counts** must be an array when provided"); + } + + if (parsedTimeUnitPrices && !Array.isArray(parsedTimeUnitPrices)) { + throw new ConfigurationError("**Time Unit Prices** must be an array when provided"); + } + + const response = await app.reservationsUpdate({ + $, + data: { + Reason: reason, + Reprice: reprice, + ApplyCancellationFee: applyCancellationFee, + ReservationUpdates: [ + { + ReservationId: reservationId, + ...(channelNumber && { + ChannelNumber: { + Value: channelNumber, + }, + }), + ...(startUtc && { + StartUtc: { + Value: startUtc, + }, + }), + ...(endUtc && { + EndUtc: { + Value: endUtc, + }, + }), + ...(releasedUtc && { + ReleasedUtc: { + Value: releasedUtc, + }, + }), + ...(parsedPersonCounts && { + PersonCounts: { + Value: parsedPersonCounts, + }, + }), + ...(assignedResourceId && { + AssignedResourceId: { + Value: assignedResourceId, + }, + }), + ...(requestedCategoryId && { + RequestedCategoryId: { + Value: requestedCategoryId, + }, + }), + ...(travelAgencyId && { + TravelAgencyId: { + Value: travelAgencyId, + }, + }), + ...(companyId && { + CompanyId: { + Value: companyId, + }, + }), + ...(businessSegmentId && { + BusinessSegmentId: { + Value: businessSegmentId, + }, + }), + ...(purpose && { + Purpose: { + Value: purpose, + }, + }), + ...(rateId && { + RateId: { + Value: rateId, + }, + }), + ...(creditCardId && { + CreditCardId: { + Value: creditCardId, + }, + }), + ...(parsedTimeUnitPrices && { + TimeUnitPrices: { + Value: parsedTimeUnitPrices, + }, + }), + ...(bookerId && { + BookerId: { + Value: bookerId, + }, + }), + ...(assignedResourceLocked !== undefined && { + AssignedResourceLocked: { + Value: assignedResourceLocked, + }, + }), + ...(availabilityBlockId && { + AvailabilityBlockId: { + Value: availabilityBlockId, + }, + }), + ...(optionsOwnerCheckedIn !== undefined && { + Options: { + OwnerCheckedIn: { + Value: optionsOwnerCheckedIn, + }, + }, + }), + }, + ], + }, + }); + + $.export("$summary", `Successfully updated reservation ${reservationId}`); + return response; + }, +}; + diff --git a/components/mews/common/utils.mjs b/components/mews/common/utils.mjs new file mode 100644 index 0000000000000..d6e46512c7b6a --- /dev/null +++ b/components/mews/common/utils.mjs @@ -0,0 +1,86 @@ +import { getFileStream } from "@pipedream/platform"; + +const parseJson = (input, maxDepth = 100) => { + const seen = new WeakSet(); + const parse = (value) => { + if (maxDepth <= 0) { + return value; + } + if (typeof(value) === "string") { + // Only parse if the string looks like a JSON object or array + const trimmed = value.trim(); + if ( + (trimmed.startsWith("{") && trimmed.endsWith("}")) || + (trimmed.startsWith("[") && trimmed.endsWith("]")) + ) { + try { + return parseJson(JSON.parse(value), maxDepth - 1); + } catch (e) { + return value; + } + } + return value; + } else if (typeof(value) === "object" && value !== null && !Array.isArray(value)) { + if (seen.has(value)) { + return value; + } + seen.add(value); + return Object.entries(value) + .reduce((acc, [ + key, + val, + ]) => Object.assign(acc, { + [key]: parse(val), + }), {}); + } else if (Array.isArray(value)) { + return value.map((item) => parse(item)); + } + return value; + }; + + return parse(input); +}; + +function parseArray (input, maxDepth = 100) { + if (typeof input === "string") { + const trimmed = input.trim(); + if (trimmed.startsWith("[") && trimmed.endsWith("]")) { + try { + const parsed = JSON.parse(trimmed); + if (Array.isArray(parsed)) { + return parsed.map((item) => parseArray(item, maxDepth - 1)); + } + } catch (e) { + throw new Error(`Invalid JSON array format: ${e.message}`); + } + } + return parseJson(input, maxDepth); + } + + if (Array.isArray(input)) { + return input.map((item) => parseArray(item, maxDepth)); + } + + return input; +} + +async function fromStreamToBase64(stream) { + const chunks = []; + for await (const chunk of stream) { + chunks.push(chunk); + } + const buffer = Buffer.concat(chunks); + return buffer.toString("base64"); +}; + +async function fromFilePathToBase64(filePath) { + const stream = await getFileStream(filePath); + return fromStreamToBase64(stream); +} + +export default { + parseJson, + parseArray, + fromStreamToBase64, + fromFilePathToBase64, +}; diff --git a/components/mews/mews.app.mjs b/components/mews/mews.app.mjs index bd82aacdc9e33..b39f09a53b52a 100644 --- a/components/mews/mews.app.mjs +++ b/components/mews/mews.app.mjs @@ -1,11 +1,1453 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "mews", - propDefinitions: {}, + propDefinitions: { + additionalFields: { + type: "object", + label: "Additional Fields", + description: "Raw payload fields to include in the request (e.g. filters).", + optional: true, + }, + reservationId: { + type: "string", + label: "Reservation ID", + description: "The ID of the reservation to fetch.", + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + Reservations: reservations, + Cursor: nextCursor, + } = await this.reservationsGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: reservations.map(({ + Id: value, + Number: label, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + serviceId: { + type: "string", + label: "Service ID", + description: "Identifier of the Service (bookable service). [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/services#get-services)", + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + Services: services, + Cursor: nextCursor, + } = await this.servicesGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: services.map(({ + Name: label, + Id: value, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + customerId: { + type: "string", + label: "Customer ID", + description: "Identifier of the Customer who owns the reservation. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/customers#get-customers)", + async options({ + prevContext: { cursor }, + data = { + CreatedUtc: { + StartUtc: new Date(new Date().setMonth(new Date().getMonth() - 3)).toISOString(), + EndUtc: new Date().toISOString(), + }, + Extent: { + Customers: true, + Addresses: false, + }, + }, + mapper = ({ + FirstName, + LastName, + Id: value, + }) => ({ + label: FirstName + ? `${FirstName} ${LastName}` + : LastName, + value, + }), + }) { + if (cursor === null) { + return []; + } + + const { + Customers: customers, + Cursor: nextCursor, + } = await this.customersGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: customers.map(mapper), + context: { + cursor: nextCursor, + }, + }; + }, + }, + startUtc: { + type: "string", + label: "Start (UTC)", + description: "Start of the reservation in ISO 8601 (UTC). Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + endUtc: { + type: "string", + label: "End (UTC)", + description: "End of the reservation in ISO 8601 (UTC). Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + state: { + type: "string", + label: "State", + description: "State of the reservation.", + options: [ + "Optional", + "Enquired", + "Confirmed", + ], + }, + resourceId: { + type: "string", + label: "Resource ID", + description: "Identifier of the Resource (bookable resource). [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/resources#get-resources)", + optional: true, + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + Resources: resources, + Cursor: nextCursor, + } = await this.resourcesGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: resources.map(({ + Name: label, + Id: value, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + number: { + type: "string", + label: "Reservation Number", + description: "Number of the reservation.", + optional: true, + }, + notes: { + type: "string", + label: "Notes", + description: "Notes of the reservation.", + optional: true, + }, + rateId: { + type: "string", + label: "Rate ID", + description: "Identifier of the Rate. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/rates#get-rates)", + optional: true, + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + Rates: rates, + Cursor: nextCursor, + } = await this.ratesGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: rates.map(({ + Name: label, + Id: value, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + companyId: { + type: "string", + label: "Company ID", + description: "Identifier of the Company. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/companies#get-companies)", + optional: true, + async options({ + prevContext: { cursor }, + data, + filter = () => true, + }) { + if (cursor === null) { + return []; + } + + const { + Companies: companies, + Cursor: nextCursor, + } = await this.companiesGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: companies + .filter(filter) + .map(({ + Name: label, + Id: value, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + travelAgencyId: { + type: "string", + label: "Travel Agency ID", + description: "Identifier of the Travel Agency.", + optional: true, + }, + businessSegmentId: { + type: "string", + label: "Business Segment ID", + description: "Identifier of the Business Segment. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/business-segments#get-business-segments)", + optional: true, + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + BusinessSegments: businessSegments, + Cursor: nextCursor, + } = await this.businessSegmentsGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: businessSegments.map(({ + Name: label, + Id: value, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + productId: { + type: "string", + label: "Product ID", + description: "Identifier of the Product. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/products#get-products)", + async options({ + prevContext: { cursor }, + data, + }) { + const { + Products: products, + Cursor: nextCursor, + } = await this.productsGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: products.map(({ + Name: label, + Id: value, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + currency: { + type: "string", + label: "Currency", + description: "Currency of the product. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/currencies#currency)", + optional: true, + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + Currencies: currencies, + Cursor: nextCursor, + } = await this.currenciesGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: currencies.map(({ Code: value }) => value), + context: { + cursor: nextCursor, + }, + }; + }, + }, + taxRate: { + type: "string", + label: "Tax Rate", + description: "Tax rate of the product.", + optional: true, + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + TaxRates: taxRates, + Cursor: nextCursor, + } = await this.taxationsGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: taxRates.map(({ Code: value }) => value), + context: { + cursor: nextCursor, + }, + }; + }, + }, + departmentId: { + type: "string", + label: "Department ID", + description: "Unique identifier of the Department.", + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + Departments: departments, + Cursor: nextCursor, + } = await this.departmentsGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: departments.map(({ + Name: label, + Id: value, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + productServiceOrderId: { + type: "string", + label: "Product Service Order ID", + description: "Unique identifier of the Product Service Order.", + optional: true, + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + ProductServiceOrders: productServiceOrders, + Cursor: nextCursor, + } = await this.productServiceOrdersGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: productServiceOrders.map(({ + Number: label, + Id: value, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + accountType: { + type: "string", + label: "Account Type", + description: "Type of account to be charged", + options: [ + "customer", + "company", + ], + }, + accountId: { + type: "string", + label: "Account ID", + description: "Identifier of the Customer or Company to be charged. Company billing may not be enabled for your integration.", + async options({ + accountType, + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + if (accountType === "company") { + const { + Companies: companies, + Cursor: nextCursor, + } = await this.companiesGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: companies.map(({ + Name: label, + Id: value, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + } + + const { + Customers: customers, + Cursor: nextCursor, + } = await this.customersGetAll({ + data: { + ...data, + CreatedUtc: { + StartUtc: new Date(new Date().setMonth(new Date().getMonth() - 3)).toISOString(), + EndUtc: new Date().toISOString(), + }, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: customers.map(({ + FirstName, + LastName, + Id: value, + }) => ({ + label: FirstName + ? `${FirstName} ${LastName}` + : LastName, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + billId: { + type: "string", + label: "Bill ID", + description: "Identifier of the Bill to which the created order will be assigned. The bill needs to be issued to the same account as the order.", + optional: true, + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + Bills: bills, + Cursor: nextCursor, + } = await this.billsGetAll({ + data: { + ...data, + UpdatedUtc: { + StartUtc: new Date(new Date().setMonth(new Date().getMonth() - 3)).toISOString(), + EndUtc: new Date().toISOString(), + }, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: bills.map(({ + Number, + Name, + Id: value, + }) => ({ + label: Name || Number, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + countryCode: { + type: "string", + label: "Country Code", + description: "ISO 3166-1 Alpha-2 country code.", + optional: true, + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + Countries: countries, + Cursor: nextCursor, + } = await this.countriesGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: countries.map(({ + EnglishName: label, + Code: value, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + creditCardId: { + type: "string", + label: "Credit Card ID", + description: "Identifier of CreditCard belonging to Customer who owns the reservation", + optional: true, + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + CreditCards: creditCards, + Cursor: nextCursor, + } = await this.creditCardsGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: creditCards.map(({ + ObfuscatedNumber: obfuscatedNumber, + Type: type, + Id: value, + }) => ({ + label: `${type} ${obfuscatedNumber}`, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + availabilityBlockId: { + type: "string", + label: "Availability Block ID", + description: "Unique identifier of the AvailabilityBlock the reservation is assigned to.", + optional: true, + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + AvailabilityBlocks: availabilityBlocks, + Cursor: nextCursor, + } = await this.availabilityBlocksGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: availabilityBlocks.map(({ + Id: value, + Name: label, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + enterpriseIds: { + type: "string[]", + label: "Enterprise IDs", + description: "Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token. Max 1000 items.", + optional: true, + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + Enterprises: enterprises, + Cursor: nextCursor, + } = await this.enterprisesGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: enterprises.map(({ + Name: label, + Id: value, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + orderItemIds: { + type: "string[]", + label: "Order Item IDs", + description: "Unique identifiers of the Order items. Required if no other filter is provided. Max 1000 items.", + optional: true, + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + OrderItems: orderItems, + Cursor: nextCursor, + } = await this.orderItemsGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: orderItems.map(({ + Number: label, + Id: value, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + reservationGroupIds: { + type: "string[]", + label: "Reservation Group IDs", + description: "Unique identifiers of Reservation groups. Max 1000 items.", + optional: true, + async options({ + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + ReservationGroups: reservationGroups, + Cursor: nextCursor, + } = await this.reservationGroupsGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: reservationGroups.map(({ + Name: label, + Id: value, + }) => ({ + label, + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + sex: { + type: "string", + label: "Sex", + description: "Sex of the customer.", + optional: true, + options: [ + "Male", + "Female", + ], + }, + title: { + type: "string", + label: "Title", + description: "Title prefix of the customer", + optional: true, + options: [ + { + label: "Mister - Mr.", + value: "Mister", + }, + { + label: "Miss - Ms.", + value: "Miss", + }, + { + label: "Misses - Mrs.", + value: "Misses", + }, + ], + }, + firstName: { + type: "string", + label: "First Name", + description: "New first name.", + optional: true, + }, + lastName: { + type: "string", + label: "Last Name", + description: "New last name.", + optional: true, + }, + secondLastName: { + type: "string", + label: "Second Last Name", + description: "New second last name.", + optional: true, + }, + birthDate: { + type: "string", + label: "Birth Date", + description: "Date of birth in ISO 8601 format (e.g., 1985-09-30)", + optional: true, + }, + birthPlace: { + type: "string", + label: "Birth Place", + description: "Place of birth", + optional: true, + }, + occupation: { + type: "string", + label: "Occupation", + description: "Occupation of the customer", + optional: true, + }, + email: { + type: "string", + label: "Email", + description: "Email address of the customer", + optional: true, + }, + phone: { + type: "string", + label: "Phone", + description: "Phone number of the customer (possibly mobile)", + optional: true, + }, + loyaltyCode: { + type: "string", + label: "Loyalty Code", + description: "Loyalty code of the customer.", + optional: true, + }, + carRegistrationNumber: { + type: "string", + label: "Car Registration Number", + description: "Registration number of the customer's car (max 255 characters)", + optional: true, + }, + dietaryRequirements: { + type: "string", + label: "Dietary Requirements", + description: "Customer's dietary requirements, e.g. Vegan, Halal (max 255 characters)", + optional: true, + }, + taxIdentificationNumber: { + type: "string", + label: "Tax Identification Number", + description: "Tax identification number of the customer", + optional: true, + }, + address: { + type: "object", + label: "Address", + description: `New address details in JSON format with the following properties: +- **Line1** (string, optional): First line of the address +- **Line2** (string, optional): Second line of the address +- **City** (string, optional): The city +- **PostalCode** (string, optional): Postal code +- **CountryCode** (string, optional): ISO 3166-1 code of the Country +- **CountrySubdivisionCode** (string, optional): ISO 3166-2 code of the administrative division, e.g. \`DE-BW\` + +**Example:** +\`\`\`json +{ + "Line1": "123 Main Street", + "Line2": "Apt 4B", + "City": "New York", + "PostalCode": "10001", + "CountryCode": "US", + "CountrySubdivisionCode": "US-NY" +} +\`\`\``, + optional: true, + }, + classifications: { + type: "string[]", + label: "Classifications", + description: "New classifications of the customer", + optional: true, + options: [ + "None", + "PaymasterAccount", + "Blacklist", + "Media", + "LoyaltyProgram", + "PreviousComplaint", + "Returning", + "Staff", + "FriendOrFamily", + "TopManagement", + "Important", + "VeryImportant", + "Problematic", + "Cashlist", + "DisabledPerson", + "Military", + "Airline", + "HealthCompliant", + "InRoom", + "WaitingForRoom", + "Student", + ], + }, + options: { + type: "string[]", + label: "Options", + description: "Options of the customer.", + optional: true, + options: [ + "None", + "SendMarketingEmails", + "Invoiceable", + "BillAddressObjection", + "SendMarketingPostalMail", + "SendPartnerMarketingEmails", + "SendPartnerMarketingPostalMail", + "WithdrawCardConsent", + "GuestPhotoConsent", + "IdPhotosConsent", + ], + }, + italianDestinationCode: { + type: "string", + label: "Italian Destination Code", + description: "New Italian destination code of customer", + optional: true, + }, + italianFiscalCode: { + type: "string", + label: "Italian Fiscal Code", + description: "New Italian fiscal code of customer.", + optional: true, + }, + createdStartUtc: { + type: "string", + label: "Created Start (UTC)", + description: "Start of the interval in which Customer was created. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + createdEndUtc: { + type: "string", + label: "Created End (UTC)", + description: "End of the interval in which Customer was created. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + updatedStartUtc: { + type: "string", + label: "Updated Start (UTC)", + description: "Start of the interval in which Customer was updated. ISO 8601 format. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + updatedEndUtc: { + type: "string", + label: "Updated End (UTC)", + description: "End of the interval in which Customer was updated. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + deletedStartUtc: { + type: "string", + label: "Deleted Start (UTC)", + description: "Start of the interval in which Customer was deleted. ISO 8601 format. ActivityStates value 'Deleted' should be provided with this filter. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + deletedEndUtc: { + type: "string", + label: "Deleted End (UTC)", + description: "End of the interval in which Customer was deleted. ISO 8601 format. Max 3 months interval. Eg. `2025-01-01T00:00:00Z`", + optional: true, + }, + filePath: { + type: "string", + label: "File Path Or URL", + description: "Provide either a file URL or a path to a file in the `/tmp` directory (for example, `/tmp/myFile.pdf`)", + }, + resourceCategoryId: { + type: "string", + label: "Category ID", + description: "Identifier of the category", + optional: true, + async options({ + defaultLanguage = "en-US", + prevContext: { cursor }, + data, + }) { + if (cursor === null) { + return []; + } + + const { + ResourceCategories: categories, + Cursor: nextCursor, + } = await this.resourceCategoriesGetAll({ + data: { + ...data, + Limitation: { + Count: 100, + Cursor: cursor, + }, + }, + }); + + return { + options: categories.map(({ + Names: names, + Id: value, + }) => ({ + label: names[defaultLanguage], + value, + })), + context: { + cursor: nextCursor, + }, + }; + }, + }, + activityStates: { + type: "string[]", + label: "Activity States", + description: "Whether to return only active, only deleted or both records", + optional: true, + options: [ + "Active", + "Deleted", + ], + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + getUrl(path) { + return `https://${this.$auth.platform_url}/api/connector/v1${path}`; + }, + getAuthData(data) { + const { + ClientToken: clientToken, + AccessToken: accessToken, + Client: client, + } = this.$auth; + return { + ...data, + ClientToken: clientToken, + AccessToken: accessToken, + Client: client, + }; + }, + _makeRequest({ + $ = this, path, data, ...args + } = {}) { + return axios($, { + method: "POST", + url: this.getUrl(path), + data: this.getAuthData(data), + ...args, + }); + }, + reservationsGetAll(args = {}) { + return this._makeRequest({ + path: "/reservations/getAll/2023-06-06", + ...args, + }); + }, + reservationsCreate(args = {}) { + return this._makeRequest({ + path: "/reservations/create", + ...args, + }); + }, + reservationsUpdate(args = {}) { + return this._makeRequest({ + path: "/reservations/update", + ...args, + }); + }, + reservationsCancel(args = {}) { + return this._makeRequest({ + path: "/reservations/cancel", + ...args, + }); + }, + reservationsAddCompanion(args = {}) { + return this._makeRequest({ + path: "/reservations/addCompanion", + ...args, + }); + }, + reservationsAddProduct(args = {}) { + return this._makeRequest({ + path: "/reservations/addProduct", + ...args, + }); + }, + orderItemsGetAll(args = {}) { + return this._makeRequest({ + path: "/orderItems/getAll", + ...args, + }); + }, + productsGetAll(args = {}) { + return this._makeRequest({ + path: "/products/getAll", + ...args, + }); + }, + customersGetAll(args = {}) { + return this._makeRequest({ + path: "/customers/getAll", + ...args, + }); + }, + customersAdd(args = {}) { + return this._makeRequest({ + path: "/customers/add", + ...args, + }); + }, + customersAddFile(args = {}) { + return this._makeRequest({ + path: "/customers/addFile", + ...args, + }); + }, + customersUpdate(args = {}) { + return this._makeRequest({ + path: "/customers/update", + ...args, + }); + }, + customersSearch(args = {}) { + return this._makeRequest({ + path: "/customers/search", + ...args, + }); + }, + productServiceOrdersGetAll(args = {}) { + return this._makeRequest({ + path: "/productServiceOrders/getAll", + ...args, + }); + }, + servicesGetAll(args = {}) { + return this._makeRequest({ + path: "/services/getAll", + ...args, + }); + }, + resourcesGetAll(args = {}) { + return this._makeRequest({ + path: "/resources/getAll", + ...args, + }); + }, + ratesGetAll(args = {}) { + return this._makeRequest({ + path: "/rates/getAll", + ...args, + }); + }, + ratesGetPricing(args = {}) { + return this._makeRequest({ + path: "/rates/getPricing", + ...args, + }); + }, + companiesGetAll(args = {}) { + return this._makeRequest({ + path: "/companies/getAll", + ...args, + }); + }, + businessSegmentsGetAll(args = {}) { + return this._makeRequest({ + path: "/businessSegments/getAll", + ...args, + }); + }, + currenciesGetAll(args = {}) { + return this._makeRequest({ + path: "/currencies/getAll", + ...args, + }); + }, + taxationsGetAll(args = {}) { + return this._makeRequest({ + path: "/taxations/getAll", + ...args, + }); + }, + availabilityBlocksCreate(args = {}) { + return this._makeRequest({ + path: "/availabilityBlocks/add", + ...args, + }); + }, + tasksCreate(args = {}) { + return this._makeRequest({ + path: "/tasks/add", + ...args, + }); + }, + departmentsGetAll(args = {}) { + return this._makeRequest({ + path: "/departments/getAll", + ...args, + }); + }, + ordersCreate(args = {}) { + return this._makeRequest({ + path: "/orders/add", + ...args, + }); + }, + billsGetAll(args = {}) { + return this._makeRequest({ + path: "/bills/getAll", + ...args, + }); + }, + billsGetPdf(args = {}) { + return this._makeRequest({ + path: "/bills/getPdf", + ...args, + }); + }, + countriesGetAll(args = {}) { + return this._makeRequest({ + path: "/countries/getAll", + ...args, + }); + }, + creditCardsGetAll(args = {}) { + return this._makeRequest({ + path: "/creditCards/getAll", + ...args, + }); + }, + availabilityBlocksGetAll(args = {}) { + return this._makeRequest({ + path: "/availabilityBlocks/getAll", + ...args, + }); + }, + enterprisesGetAll(args = {}) { + return this._makeRequest({ + path: "/enterprises/getAll", + ...args, + }); + }, + reservationGroupsGetAll(args = {}) { + return this._makeRequest({ + path: "/reservationGroups/getAll", + ...args, + }); + }, + resourceCategoriesGetAll(args = {}) { + return this._makeRequest({ + path: "/resourceCategories/getAll", + ...args, + }); + }, + ageCategoriesGetAll(args = {}) { + return this._makeRequest({ + path: "/ageCategories/getAll", + ...args, + }); + }, + async paginate({ + requester, + requesterArgs = {}, + resultKey, + count = 100, + maxRequests = 3, + } = {}) { + const items = []; + let next; + let requestCount = 0; + + while (true) { + if (requestCount >= maxRequests) { + break; + } + + const response = await requester({ + ...requesterArgs, + data: { + ...requesterArgs?.data, + Limitation: { + Cursor: next, + Count: count, + }, + }, + }); + + items.push(...(response?.[resultKey] || [])); + + next = response?.Limitation?.Cursor ?? null; + requestCount += 1; + + if (!next) { + break; + } + } + + return items; }, }, }; diff --git a/components/mews/package.json b/components/mews/package.json index 017f397007a40..c9d67905178ac 100644 --- a/components/mews/package.json +++ b/components/mews/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/mews", - "version": "0.6.0", + "version": "0.7.1", "description": "Pipedream mews Components", "main": "mews.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.0.0" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/mews/sources/bill-closed/bill-closed.mjs b/components/mews/sources/bill-closed/bill-closed.mjs new file mode 100644 index 0000000000000..b12945977339a --- /dev/null +++ b/components/mews/sources/bill-closed/bill-closed.mjs @@ -0,0 +1,37 @@ +import base from "../common/polling.mjs"; + +export default { + ...base, + name: "New Closed Bill", + description: "Emit new event when a bill is closed", + key: "mews-bill-closed", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...base.methods, + getRequester() { + return this.app.billsGetAll; + }, + getResultKey() { + return "Bills"; + }, + getResourceName() { + return "Bill"; + }, + getId(resource) { + return resource?.Id || resource?.id; + }, + getDateField() { + return "ClosedUtc"; + }, + getDateFilterField() { + return "ClosedUtc"; + }, + getStaticFilters() { + return { + State: "Closed", + }; + }, + }, +}; diff --git a/components/mews/sources/common/polling.mjs b/components/mews/sources/common/polling.mjs new file mode 100644 index 0000000000000..71fbff4e9154f --- /dev/null +++ b/components/mews/sources/common/polling.mjs @@ -0,0 +1,131 @@ +import { + ConfigurationError, + DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, +} from "@pipedream/platform"; +import app from "../../mews.app.mjs"; + +export default { + props: { + app, + db: "$.service.db", + timer: { + type: "$.interface.timer", + label: "Polling Schedule", + description: "How often to poll the API", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + hooks: { + deploy() { + const { + getLastDateAt, + setLastDateAt, + getInitialLookbackMs, + } = this; + if (!getLastDateAt()) { + const initial = new Date(Date.now() - getInitialLookbackMs()).toISOString(); + setLastDateAt(initial); + } + }, + }, + methods: { + // Override these in concrete sources + getRequester() { + throw new ConfigurationError("getRequester is not implemented"); + }, + getResultKey() { + throw new ConfigurationError("getResultKey is not implemented"); + }, + getResourceName() { + return "Resource"; + }, + getId(resource) { + return resource?.Id || resource?.id; + }, + getDateField() { + throw new ConfigurationError("getDateField is not implemented"); + }, + getDateFilterField() { + // e.g. "CreatedUtc" | "UpdatedUtc" | "CanceledUtc" + throw new ConfigurationError("getDateFilterField is not implemented"); + }, + getStaticFilters() { + // e.g. { States: ["Cancelled"] } + return {}; + }, + getInitialLookbackMs() { + // three months ago + return 3 * 30 * 24 * 60 * 60 * 1000; + }, + getMaxRequests() { + return 3; + }, + setLastDateAt(value) { + this.db.set("lastDateAt", value); + }, + getLastDateAt() { + return this.db.get("lastDateAt"); + }, + generateMeta(resource) { + const id = this.getId(resource); + const dateField = this.getDateField(); + const tsStr = resource?.[dateField] || new Date().toISOString(); + return { + id, + summary: `${this.getResourceName()} ${id}`, + ts: Date.parse(tsStr), + }; + }, + }, + async run() { + const { + app, + getRequester, + getResultKey, + getDateField, + getDateFilterField, + getStaticFilters, + getLastDateAt, + setLastDateAt, + generateMeta, + getMaxRequests, + } = this; + + const lastDateAt = getLastDateAt() || new Date(0).toISOString(); + + const items = await app.paginate({ + requester: getRequester(), + requesterArgs: { + data: { + ...getStaticFilters(), + [getDateFilterField()]: { + StartUtc: lastDateAt, + EndUtc: new Date().toISOString(), + }, + }, + }, + resultKey: getResultKey(), + maxRequests: getMaxRequests(), + }); + + if (!items?.length) { + return; + } + + let maxTs = lastDateAt; + items.forEach((resource) => { + const meta = generateMeta(resource); + const tsStr = resource?.[getDateField()] || new Date().toISOString(); + + if (tsStr > maxTs) { + maxTs = tsStr; + } + + this.$emit(resource, meta); + }); + + setLastDateAt(maxTs); + }, +}; diff --git a/components/mews/sources/company-created/company-created.mjs b/components/mews/sources/company-created/company-created.mjs new file mode 100644 index 0000000000000..42923e3d4c69d --- /dev/null +++ b/components/mews/sources/company-created/company-created.mjs @@ -0,0 +1,32 @@ +import base from "../common/polling.mjs"; + +export default { + ...base, + name: "New Company", + description: "Emit new event when a company is created. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/companies#get-all-companies)", + key: "mews-company-created", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...base.methods, + getRequester() { + return this.app.companiesGetAll; + }, + getResultKey() { + return "Companies"; + }, + getResourceName() { + return "Company"; + }, + getId(resource) { + return resource?.Id || resource?.id; + }, + getDateField() { + return "CreatedUtc"; + }, + getDateFilterField() { + return "CreatedUtc"; + }, + }, +}; diff --git a/components/mews/sources/customer-created/customer-created.mjs b/components/mews/sources/customer-created/customer-created.mjs new file mode 100644 index 0000000000000..ad495f349c11e --- /dev/null +++ b/components/mews/sources/customer-created/customer-created.mjs @@ -0,0 +1,32 @@ +import base from "../common/polling.mjs"; + +export default { + ...base, + name: "New Customer", + description: "Emit new event when a customer is created. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/customers#get-all-customers)", + key: "mews-customer-created", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...base.methods, + getRequester() { + return this.app.customersGetAll; + }, + getResultKey() { + return "Customers"; + }, + getResourceName() { + return "Customer"; + }, + getId(resource) { + return resource?.Id || resource?.id; + }, + getDateField() { + return "CreatedUtc"; + }, + getDateFilterField() { + return "CreatedUtc"; + }, + }, +}; diff --git a/components/mews/sources/order-item-created/order-item-created.mjs b/components/mews/sources/order-item-created/order-item-created.mjs new file mode 100644 index 0000000000000..a0303f10b13c1 --- /dev/null +++ b/components/mews/sources/order-item-created/order-item-created.mjs @@ -0,0 +1,33 @@ +import base from "../common/polling.mjs"; + +export default { + ...base, + name: "New Order Item Created", + description: "Emit new order items as they are created (polling). [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/orderitems#get-all-order-items)", + key: "mews-order-item-created", + version: "0.0.2", + type: "source", + dedupe: "unique", + methods: { + ...base.methods, + getRequester() { + return this.app.orderItemsGetAll; + }, + getResultKey() { + return "OrderItems"; + }, + getResourceName() { + return "Order Item"; + }, + getId(resource) { + return resource?.Id || resource?.id; + }, + getDateField() { + return "CreatedUtc"; + }, + getDateFilterField() { + return "CreatedUtc"; + }, + }, +}; + diff --git a/components/mews/sources/order-item-updated/order-item-updated.mjs b/components/mews/sources/order-item-updated/order-item-updated.mjs new file mode 100644 index 0000000000000..165849323500d --- /dev/null +++ b/components/mews/sources/order-item-updated/order-item-updated.mjs @@ -0,0 +1,33 @@ +import base from "../common/polling.mjs"; + +export default { + ...base, + name: "Order Item Updated", + description: "Emit new order items as they are updated (polling). [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/orderitems#get-all-order-items)", + key: "mews-order-item-updated", + version: "0.0.2", + type: "source", + dedupe: "unique", + methods: { + ...base.methods, + getRequester() { + return this.app.orderItemsGetAll; + }, + getResultKey() { + return "OrderItems"; + }, + getResourceName() { + return "Order Item"; + }, + getId(resource) { + return resource?.Id || resource?.id; + }, + getDateField() { + return "UpdatedUtc"; + }, + getDateFilterField() { + return "UpdatedUtc"; + }, + }, +}; + diff --git a/components/mews/sources/product-service-order-created/product-service-order-created.mjs b/components/mews/sources/product-service-order-created/product-service-order-created.mjs new file mode 100644 index 0000000000000..f10a60fd321e3 --- /dev/null +++ b/components/mews/sources/product-service-order-created/product-service-order-created.mjs @@ -0,0 +1,50 @@ +import base from "../common/polling.mjs"; + +export default { + ...base, + name: "New Product Service Order Created", + description: "Emit new product service orders as they are created (polling). [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/productserviceorders#get-all-product-service-orders)", + key: "mews-product-service-order-created", + version: "0.0.2", + type: "source", + dedupe: "unique", + props: { + ...base.props, + serviceIds: { + type: "string[]", + label: "Service IDs", + description: "Identifiers of the services for which the product is available.", + propDefinition: [ + base.props.app, + "serviceId", + ], + }, + }, + methods: { + ...base.methods, + getRequester() { + return this.app.productServiceOrdersGetAll; + }, + getResultKey() { + return "ProductServiceOrders"; + }, + getResourceName() { + return "Product Service Order"; + }, + getId(resource) { + return resource?.Id || resource?.id; + }, + getDateField() { + return "CreatedUtc"; + }, + getDateFilterField() { + return "CreatedUtc"; + }, + getStaticFilters() { + return { + ServiceIds: this.serviceIds, + }; + }, + }, +}; + diff --git a/components/mews/sources/reservation-cancelled/reservation-cancelled.mjs b/components/mews/sources/reservation-cancelled/reservation-cancelled.mjs new file mode 100644 index 0000000000000..17287f52fe991 --- /dev/null +++ b/components/mews/sources/reservation-cancelled/reservation-cancelled.mjs @@ -0,0 +1,40 @@ +import base from "../common/polling.mjs"; + +export default { + ...base, + name: "Reservation Cancelled", + description: "Emit new reservations as they are cancelled (polling). [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/reservations#get-all-reservations-ver-2023-06-06)", + key: "mews-reservation-cancelled", + version: "0.0.2", + type: "source", + dedupe: "unique", + methods: { + ...base.methods, + getRequester() { + return this.app.reservationsGetAll; + }, + getResultKey() { + return "Reservations"; + }, + getResourceName() { + return "Reservation"; + }, + getId(resource) { + return resource?.Id || resource?.id; + }, + getDateField() { + return "CanceledUtc"; + }, + getDateFilterField() { + return "CanceledUtc"; + }, + getStaticFilters() { + return { + States: [ + "Canceled", + ], + }; + }, + }, +}; + diff --git a/components/mews/sources/reservation-created/reservation-created.mjs b/components/mews/sources/reservation-created/reservation-created.mjs new file mode 100644 index 0000000000000..acf1702988c82 --- /dev/null +++ b/components/mews/sources/reservation-created/reservation-created.mjs @@ -0,0 +1,32 @@ +import base from "../common/polling.mjs"; + +export default { + ...base, + name: "New Reservation Created", + description: "Emit new reservations as they are created (polling). [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/reservations#get-all-reservations-ver-2023-06-06)", + key: "mews-reservation-created", + version: "0.0.2", + type: "source", + dedupe: "unique", + methods: { + ...base.methods, + getRequester() { + return this.app.reservationsGetAll; + }, + getResultKey() { + return "Reservations"; + }, + getResourceName() { + return "Reservation"; + }, + getId(resource) { + return resource?.Id || resource?.id; + }, + getDateField() { + return "CreatedUtc"; + }, + getDateFilterField() { + return "CreatedUtc"; + }, + }, +}; diff --git a/components/mews/sources/reservation-updated/reservation-updated.mjs b/components/mews/sources/reservation-updated/reservation-updated.mjs new file mode 100644 index 0000000000000..a35ee10ad86a2 --- /dev/null +++ b/components/mews/sources/reservation-updated/reservation-updated.mjs @@ -0,0 +1,33 @@ +import base from "../common/polling.mjs"; + +export default { + ...base, + name: "Reservation Updated", + description: "Emit new reservations as they are updated (polling). [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/reservations#get-all-reservations-ver-2023-06-06)", + key: "mews-reservation-updated", + version: "0.0.2", + type: "source", + dedupe: "unique", + methods: { + ...base.methods, + getRequester() { + return this.app.reservationsGetAll; + }, + getResultKey() { + return "Reservations"; + }, + getResourceName() { + return "Reservation"; + }, + getId(resource) { + return resource?.Id || resource?.id; + }, + getDateField() { + return "UpdatedUtc"; + }, + getDateFilterField() { + return "UpdatedUtc"; + }, + }, +}; + diff --git a/components/mexc/mexc.app.mjs b/components/mexc/mexc.app.mjs new file mode 100644 index 0000000000000..17ce31487e870 --- /dev/null +++ b/components/mexc/mexc.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mexc", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/mexc/package.json b/components/mexc/package.json new file mode 100644 index 0000000000000..564c1cab4d410 --- /dev/null +++ b/components/mexc/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/mexc", + "version": "0.0.1", + "description": "Pipedream MEXC Components", + "main": "mexc.app.mjs", + "keywords": [ + "pipedream", + "mexc" + ], + "homepage": "https://pipedream.com/apps/mexc", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/microsoft_dataverse/microsoft_dataverse.app.mjs b/components/microsoft_dataverse/microsoft_dataverse.app.mjs index 1866058d2a900..4919d2db2a745 100644 --- a/components/microsoft_dataverse/microsoft_dataverse.app.mjs +++ b/components/microsoft_dataverse/microsoft_dataverse.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/microsoft_onedrive/actions/create-folder/create-folder.mjs b/components/microsoft_onedrive/actions/create-folder/create-folder.mjs index 370e0eb6a5b43..f8683262fb636 100644 --- a/components/microsoft_onedrive/actions/create-folder/create-folder.mjs +++ b/components/microsoft_onedrive/actions/create-folder/create-folder.mjs @@ -5,7 +5,7 @@ export default { name: "Create Folder", description: "Create a new folder in a drive. [See the documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_post_children?view=odsp-graph-online)", key: "microsoft_onedrive-create-folder", - version: "0.1.1", + version: "0.1.2", type: "action", props: { onedrive, diff --git a/components/microsoft_onedrive/actions/create-link/create-link.mjs b/components/microsoft_onedrive/actions/create-link/create-link.mjs index a897d7a4d6cb8..5980027f99302 100644 --- a/components/microsoft_onedrive/actions/create-link/create-link.mjs +++ b/components/microsoft_onedrive/actions/create-link/create-link.mjs @@ -3,7 +3,7 @@ import constants from "../../common/constants.mjs"; export default { name: "Create Link", - version: "0.0.2", + version: "0.0.3", key: "microsoft_onedrive-create-link", type: "action", description: "Create a sharing link for a DriveItem. [See the documentation](https://docs.microsoft.com/en-us/graph/api/driveitem-createlink?view=graph-rest-1.0&tabs=http)", diff --git a/components/microsoft_onedrive/actions/download-file/download-file.mjs b/components/microsoft_onedrive/actions/download-file/download-file.mjs index 164e0d5734fe3..b0a633b14ec2d 100644 --- a/components/microsoft_onedrive/actions/download-file/download-file.mjs +++ b/components/microsoft_onedrive/actions/download-file/download-file.mjs @@ -9,7 +9,7 @@ export default { name: "Download File", description: "Download a file stored in OneDrive. [See the documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_get_content?view=odsp-graph-online)", key: "microsoft_onedrive-download-file", - version: "0.0.7", + version: "0.0.8", type: "action", props: { onedrive, diff --git a/components/microsoft_onedrive/actions/find-file-by-name/find-file-by-name.mjs b/components/microsoft_onedrive/actions/find-file-by-name/find-file-by-name.mjs index 891fcaccd1d00..4ee13d7564c0e 100644 --- a/components/microsoft_onedrive/actions/find-file-by-name/find-file-by-name.mjs +++ b/components/microsoft_onedrive/actions/find-file-by-name/find-file-by-name.mjs @@ -5,7 +5,7 @@ export default { key: "microsoft_onedrive-find-file-by-name", name: "Find File by Name", description: "Search for a file or folder by name. [See the documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_search)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { onedrive, diff --git a/components/microsoft_onedrive/actions/get-excel-table/get-excel-table.mjs b/components/microsoft_onedrive/actions/get-excel-table/get-excel-table.mjs index e3509db868570..c547af769210c 100644 --- a/components/microsoft_onedrive/actions/get-excel-table/get-excel-table.mjs +++ b/components/microsoft_onedrive/actions/get-excel-table/get-excel-table.mjs @@ -4,7 +4,7 @@ export default { name: "Get Table", description: "Retrieve a table from an Excel spreadsheet stored in OneDrive [See the documentation](https://learn.microsoft.com/en-us/graph/api/table-range?view=graph-rest-1.0&tabs=http)", key: "microsoft_onedrive-get-excel-table", - version: "0.0.5", + version: "0.0.6", type: "action", props: { onedrive, diff --git a/components/microsoft_onedrive/actions/get-file-by-id/get-file-by-id.mjs b/components/microsoft_onedrive/actions/get-file-by-id/get-file-by-id.mjs index 764176af965e6..2813f6b34fffc 100644 --- a/components/microsoft_onedrive/actions/get-file-by-id/get-file-by-id.mjs +++ b/components/microsoft_onedrive/actions/get-file-by-id/get-file-by-id.mjs @@ -4,7 +4,7 @@ export default { key: "microsoft_onedrive-get-file-by-id", name: "Get File by ID", description: "Retrieves a file by ID. [See the documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_get)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { onedrive, diff --git a/components/microsoft_onedrive/actions/list-files-in-folder/list-files-in-folder.mjs b/components/microsoft_onedrive/actions/list-files-in-folder/list-files-in-folder.mjs index 04c74358eadf3..1645b2854a02d 100644 --- a/components/microsoft_onedrive/actions/list-files-in-folder/list-files-in-folder.mjs +++ b/components/microsoft_onedrive/actions/list-files-in-folder/list-files-in-folder.mjs @@ -5,7 +5,7 @@ export default { key: "microsoft_onedrive-list-files-in-folder", name: "List Files in Folder", description: "Retrieves a list of the files and/or folders directly within a folder. [See the documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_list_children)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { onedrive, diff --git a/components/microsoft_onedrive/actions/upload-file/upload-file.mjs b/components/microsoft_onedrive/actions/upload-file/upload-file.mjs index 30911f608a394..b4804bedd8ee9 100644 --- a/components/microsoft_onedrive/actions/upload-file/upload-file.mjs +++ b/components/microsoft_onedrive/actions/upload-file/upload-file.mjs @@ -8,7 +8,7 @@ export default { name: "Upload File", description: "Upload a file to OneDrive. [See the documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_put_content?view=odsp-graph-online)", key: "microsoft_onedrive-upload-file", - version: "0.2.1", + version: "0.2.2", type: "action", props: { onedrive, diff --git a/components/microsoft_onedrive/microsoft_onedrive.app.mjs b/components/microsoft_onedrive/microsoft_onedrive.app.mjs index 8a33ce6951763..1cd6d50d04bba 100644 --- a/components/microsoft_onedrive/microsoft_onedrive.app.mjs +++ b/components/microsoft_onedrive/microsoft_onedrive.app.mjs @@ -27,37 +27,46 @@ export default { const firstLink = drivePath + driveItemPath + "/children"; const url = get(prevContext, "nextLink", firstLink); - const response = await this.client() - .api(url) - .select( - "folder", - "id", - "name", - ) - .orderby("name") - .get(); + try { + const response = await this.client() + .api(url) + .select( + "folder", + "id", + "name", + ) + .orderby("name") + .get(); - const { - "@odata.nextLink": nextLink, - "value": children, - } = response; + const { + "@odata.nextLink": nextLink, + "value": children, + } = response; - const folders = children.filter((child) => !!child.folder); + const folders = children.filter((child) => !!child.folder); - const options = folders.map((folder) => ({ - value: folder.id, - label: (label - ? `${label} > ` - : "") + folder.name, - })); + const options = folders.map((folder) => ({ + value: folder.id, + label: (label + ? `${label} > ` + : "") + folder.name, + })); - return { - options, - context: { - nextLink, + return { options, - }, - }; + context: { + nextLink, + options, + }, + }; + + } catch (error) { + console.error("Error listing folders:", error); + return { + options: [], + context: {}, + }; + } })); return { @@ -151,6 +160,49 @@ export default { description: "Set to `true` to return only files in the response. Defaults to `false`", optional: true, }, + drive: { + type: "string", + label: "Drive", + description: "Select a drive to monitor. Defaults to the personal OneDrive if not specified.", + optional: true, + async options() { + let options = []; + + try { + const { value: drives } = await this.listDrives(); + + options = drives + .filter((drive) => drive.owner?.user?.email) + .map(({ + id, description, name, driveType, + }) => ({ + label: `${description || name} (${driveType})`, + value: id, + })); + } catch (error) { + console.error("Error listing drives:", error); + } + + try { + const { value: sharedFiles } = await this.listSharedFiles(); + + const sharedDriveOptions = sharedFiles + .map(({ remoteItem }) => ({ + label: `${remoteItem.parentReference.driveId} (${remoteItem.parentReference.driveType})`, + value: remoteItem.parentReference.driveId, + })); + + options = [ + ...options, + ...sharedDriveOptions, + ]; + } catch (error) { + console.error("Error listing shared files:", error); + } + + return options; + }, + }, }, methods: { httpRequest, @@ -421,5 +473,19 @@ export default { .api("/me/drive/root/children") .get(args); }, + listDrives() { + const client = this.client(); + return client + .api("/drives") + .select("id", "description", "name", "driveType", "owner") + .get(); + }, + listSharedFiles() { + const client = this.client(); + return client + .api("/me/drive/sharedWithMe") + .select("name", "remoteItem", "folder") + .get(); + }, }, }; diff --git a/components/microsoft_onedrive/package.json b/components/microsoft_onedrive/package.json index a975308d0d00f..1974547c86686 100644 --- a/components/microsoft_onedrive/package.json +++ b/components/microsoft_onedrive/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/microsoft_onedrive", - "version": "1.7.1", + "version": "1.7.2", "description": "Pipedream Microsoft OneDrive components", "main": "microsoft_onedrive.app.mjs", "homepage": "https://pipedream.com/apps/microsoft-onedrive", diff --git a/components/microsoft_onedrive/sources/common/base.mjs b/components/microsoft_onedrive/sources/common/base.mjs index 7dc4aa604eb28..8695db00f8db5 100644 --- a/components/microsoft_onedrive/sources/common/base.mjs +++ b/components/microsoft_onedrive/sources/common/base.mjs @@ -84,8 +84,10 @@ const methods = { return new Date(nowTimestamp + expirationTimestampDelta); }, async _createNewSubscription() { + const deltaLinkParams = this.getDeltaLinkParams(); const hookOpts = { expirationDateTime: this._getNextExpirationDateTime(), + driveId: deltaLinkParams.driveId, }; const hookId = await this.onedrive.createHook(this.http.endpoint, hookOpts); this._setHookId(hookId); diff --git a/components/microsoft_onedrive/sources/new-file-created/new-file-created.mjs b/components/microsoft_onedrive/sources/new-file-created/new-file-created.mjs index a6f6d5d739f01..1be85bd11d248 100644 --- a/components/microsoft_onedrive/sources/new-file-created/new-file-created.mjs +++ b/components/microsoft_onedrive/sources/new-file-created/new-file-created.mjs @@ -8,14 +8,25 @@ export default { key: "microsoft_onedrive-new-file-created", name: "New File Created (Instant)", description: "Emit new event when a new file is created in a OneDrive drive", - version: "0.0.1", + version: "0.0.2", dedupe: "unique", props: { ...base.props, + drive: { + propDefinition: [ + onedrive, + "drive", + ], + description: "The drive to monitor for new files. If not specified, the personal OneDrive will be monitored.", + optional: true, + }, folder: { propDefinition: [ onedrive, "folder", + ({ drive }) => ({ + driveId: drive, + }), ], description: "The OneDrive folder to watch for new files (leave empty to watch the entire drive). Use the \"Load More\" button to load subfolders.", optional: true, @@ -30,11 +41,14 @@ export default { methods: { ...base.methods, getDeltaLinkParams() { - return this.folder - ? { - folderId: this.folder, - } - : {}; + const params = {}; + if (this.drive) { + params.driveId = this.drive; + } + if (this.folder) { + params.folderId = this.folder; + } + return params; }, isItemTypeRelevant(driveItem) { const fileType = driveItem?.file?.mimeType; diff --git a/components/microsoft_onedrive/sources/new-folder-created/new-folder-created.mjs b/components/microsoft_onedrive/sources/new-folder-created/new-folder-created.mjs index d19a2cbbadcc2..109b0c5c3367f 100644 --- a/components/microsoft_onedrive/sources/new-folder-created/new-folder-created.mjs +++ b/components/microsoft_onedrive/sources/new-folder-created/new-folder-created.mjs @@ -8,14 +8,25 @@ export default { key: "microsoft_onedrive-new-folder-created", name: "New Folder Created (Instant)", description: "Emit new event when a new folder is created in a OneDrive drive", - version: "0.0.1", + version: "0.0.2", dedupe: "unique", props: { ...base.props, + drive: { + propDefinition: [ + onedrive, + "drive", + ], + description: "The drive to monitor for new folders. If not specified, the personal OneDrive will be monitored.", + optional: true, + }, folder: { propDefinition: [ onedrive, "folder", + ({ drive }) => ({ + driveId: drive, + }), ], optional: true, }, @@ -23,11 +34,14 @@ export default { methods: { ...base.methods, getDeltaLinkParams() { - return this.folder - ? { - folderId: this.folder, - } - : {}; + const params = {}; + if (this.drive) { + params.driveId = this.drive; + } + if (this.folder) { + params.folderId = this.folder; + } + return params; }, isItemRelevant(driveItem) { return !!(driveItem.folder); diff --git a/components/microsoft_outlook/actions/find-email/find-email.mjs b/components/microsoft_outlook/actions/find-email/find-email.mjs index fbe7b74c65d9b..a6388a865e869 100644 --- a/components/microsoft_outlook/actions/find-email/find-email.mjs +++ b/components/microsoft_outlook/actions/find-email/find-email.mjs @@ -4,7 +4,7 @@ export default { key: "microsoft_outlook-find-email", name: "Find Email", description: "Search for an email in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/user-list-messages)", - version: "0.0.7", + version: "0.0.8", type: "action", props: { microsoftOutlook, @@ -13,6 +13,12 @@ export default { alertType: "info", content: "When you specify `$filter`, the service infers a sort order for the results. If you use both `$orderby` and `$filter` to get messages, because the server always infers a sort order for the results of a `$filter`, you must [specify properties in certain ways](https://learn.microsoft.com/en-us/graph/api/user-list-messages#using-filter-and-orderby-in-the-same-query).", }, + search: { + type: "string", + label: "Search", + description: "Search for an email in Microsoft Outlook. Can search for specific message properties such as `to:example@example.com` or `subject:example`. If the property is excluded, the search targets the default propertes `from`, `subject`, and `body`. For example, `pizza` will search for messages with the word `pizza` in the subject, body, or from address, but `to:example@example.com` will only search for messages to `example@example.com`.", + optional: true, + }, filter: { type: "string", label: "Filter", @@ -38,6 +44,7 @@ export default { args: { $, params: { + "$search": this.search, "$filter": this.filter, "$orderby": this.orderBy, }, diff --git a/components/microsoft_outlook/package.json b/components/microsoft_outlook/package.json index 715926db24b4b..b458099b0a14b 100644 --- a/components/microsoft_outlook/package.json +++ b/components/microsoft_outlook/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/microsoft_outlook", - "version": "1.5.3", + "version": "1.5.4", "description": "Pipedream Microsoft Outlook Components", "main": "microsoft_outlook.app.mjs", "keywords": [ diff --git a/components/microsoft_outlook_calendar/actions/create-calendar-event/create-calendar-event.mjs b/components/microsoft_outlook_calendar/actions/create-calendar-event/create-calendar-event.mjs index e6f7a43582f88..338e290e51e67 100644 --- a/components/microsoft_outlook_calendar/actions/create-calendar-event/create-calendar-event.mjs +++ b/components/microsoft_outlook_calendar/actions/create-calendar-event/create-calendar-event.mjs @@ -73,7 +73,7 @@ export default { async run({ $ }) { //RegExp to check time strings(yyyy-MM-ddThh:mm:ss) const re = /^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)$/; - if (!re.test(this.start) || !re.test(this.start)) { + if (!re.test(this.start) || !re.test(this.end)) { throw new Error("Please provide both start and end props in 'yyyy-MM-ddThh:mm:ss'"); } const data = { diff --git a/components/microsoft_outlook_calendar/actions/get-schedule/get-schedule.mjs b/components/microsoft_outlook_calendar/actions/get-schedule/get-schedule.mjs index 1538441a0298b..fc9428397a1d9 100644 --- a/components/microsoft_outlook_calendar/actions/get-schedule/get-schedule.mjs +++ b/components/microsoft_outlook_calendar/actions/get-schedule/get-schedule.mjs @@ -1,16 +1,18 @@ +import { ConfigurationError } from "@pipedream/platform"; import microsoftOutlook from "../../microsoft_outlook_calendar.app.mjs"; +import utils from "../../common/utils.mjs"; export default { key: "microsoft_outlook_calendar-get-schedule", name: "Get Free/Busy Schedule", description: "Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. [See the documentation](https://learn.microsoft.com/en-us/graph/api/calendar-getschedule)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { microsoftOutlook, schedules: { type: "string[]", - label: "Emails", + label: "Schedules", description: "A list of emails of users, distribution lists, or resources. For example: `[ \"adelev@contoso.com\" , \"meganb@contoso.com\" ]`", }, start: { @@ -48,10 +50,16 @@ export default { }, }, async run({ $ }) { + if (this.schedules === null || this.schedules === undefined || this.schedules?.length === 0) { + throw new ConfigurationError("The **Schedules** property is required"); + } + + const schedules = utils.parseArray(this.schedules); + const { value } = await this.getSchedule({ $, data: { - schedules: this.schedules, + schedules, startTime: { dateTime: this.start, timeZone: this.timeZone, @@ -64,7 +72,7 @@ export default { }, }); - $.export("$summary", `Successfully retrieved schedules for \`${this.schedules.join("`, `")}\``); + $.export("$summary", `Successfully retrieved schedules for \`${schedules.join("`, `")}\``); return value; }, diff --git a/components/microsoft_outlook_calendar/common/utils.mjs b/components/microsoft_outlook_calendar/common/utils.mjs new file mode 100644 index 0000000000000..3c558fbcd5bdf --- /dev/null +++ b/components/microsoft_outlook_calendar/common/utils.mjs @@ -0,0 +1,38 @@ +export default { + parseArray(input) { + if (!input) { + return []; + } + + if (typeof input === "string") { + try { + // Try to parse as JSON array first + const parsed = JSON.parse(input); + return Array.isArray(parsed) + ? parsed.map((item) => String(item)) + : [ + String(input), + ]; + } catch { + // If JSON parsing fails, treat as single string + return [ + input, + ]; + } + } + + if (Array.isArray(input)) { + return input.map((item) => String(item)); + } + + if (typeof input === "object") { + // Convert object to array of its values as strings + return Object.values(input).map((item) => String(item)); + } + + // For any other type, convert to string and wrap in array + return [ + String(input), + ]; + }, +}; diff --git a/components/microsoft_outlook_calendar/package.json b/components/microsoft_outlook_calendar/package.json index 2f8c6d0156821..3b8593bd5e0fb 100644 --- a/components/microsoft_outlook_calendar/package.json +++ b/components/microsoft_outlook_calendar/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/microsoft_outlook_calendar", - "version": "0.3.1", + "version": "0.3.2", "description": "Pipedream Microsoft Outlook Calendar Components", "main": "microsoft_outlook_calendar.app.mjs", "keywords": [ diff --git a/components/microsoft_power_bi/actions/get-reports/get-reports.mjs b/components/microsoft_power_bi/actions/get-reports/get-reports.mjs new file mode 100644 index 0000000000000..56a29082a27ab --- /dev/null +++ b/components/microsoft_power_bi/actions/get-reports/get-reports.mjs @@ -0,0 +1,29 @@ +import microsoftPowerBi from "../../microsoft_power_bi.app.mjs"; + +export default { + key: "microsoft_power_bi-get-reports", + name: "Get Reports", + description: "Get reports from a Power BI workspace. [See the documentation](https://learn.microsoft.com/en-us/rest/api/power-bi/reports/get-reports)", + version: "0.0.1", + type: "action", + props: { + microsoftPowerBi, + }, + methods: { + getReports(opts = {}) { + return this.microsoftPowerBi._makeRequest({ + path: "/reports", + ...opts, + }); + }, + }, + async run({ $ }) { + const { value } = await this.getReports({ + $, + }); + $.export("$summary", `Found ${value.length} report${value.length === 1 + ? "" + : "s"}`); + return value; + }, +}; diff --git a/components/microsoft_power_bi/package.json b/components/microsoft_power_bi/package.json index e2f0574bdc92e..07dab032d26e7 100644 --- a/components/microsoft_power_bi/package.json +++ b/components/microsoft_power_bi/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/microsoft_power_bi", - "version": "0.3.0", + "version": "0.4.0", "description": "Pipedream Microsoft Power BI Components", "main": "microsoft_power_bi.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.5.1" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/microsoft_teams_events/microsoft_teams_events.app.mjs b/components/microsoft_teams_events/microsoft_teams_events.app.mjs index 127120d06835f..ef875fe5740b1 100644 --- a/components/microsoft_teams_events/microsoft_teams_events.app.mjs +++ b/components/microsoft_teams_events/microsoft_teams_events.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/microsoft_word/microsoft_word.app.mjs b/components/microsoft_word/microsoft_word.app.mjs index e3a73e555167e..fb92939bb0526 100644 --- a/components/microsoft_word/microsoft_word.app.mjs +++ b/components/microsoft_word/microsoft_word.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/mindee/mindee.app.mjs b/components/mindee/mindee.app.mjs new file mode 100644 index 0000000000000..b427bc67ff89d --- /dev/null +++ b/components/mindee/mindee.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mindee", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/mindee/package.json b/components/mindee/package.json new file mode 100644 index 0000000000000..2727a4ba34ddc --- /dev/null +++ b/components/mindee/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/mindee", + "version": "0.0.1", + "description": "Pipedream Mindee Components", + "main": "mindee.app.mjs", + "keywords": [ + "pipedream", + "mindee" + ], + "homepage": "https://pipedream.com/apps/mindee", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/mindmeister/.gitignore b/components/mindmeister/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/mindmeister/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/mindmeister/app/mindmeister.app.ts b/components/mindmeister/app/mindmeister.app.ts deleted file mode 100644 index e7c701ecca452..0000000000000 --- a/components/mindmeister/app/mindmeister.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "mindmeister", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/mindmeister/mindmeister.app.mjs b/components/mindmeister/mindmeister.app.mjs new file mode 100644 index 0000000000000..3e7f0c4db8c5c --- /dev/null +++ b/components/mindmeister/mindmeister.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mindmeister", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/mindmeister/package.json b/components/mindmeister/package.json index ee8930340f8c5..aba472f3691f8 100644 --- a/components/mindmeister/package.json +++ b/components/mindmeister/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/mindmeister", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream MindMeister Components", - "main": "dist/app/mindmeister.app.mjs", + "main": "mindmeister.app.mjs", "keywords": [ "pipedream", "mindmeister" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/mindmeister", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mindstudio/mindstudio.app.mjs b/components/mindstudio/mindstudio.app.mjs index 6b53a172d4805..756feb2798e13 100644 --- a/components/mindstudio/mindstudio.app.mjs +++ b/components/mindstudio/mindstudio.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/minerstat/minerstat.app.mjs b/components/minerstat/minerstat.app.mjs index b6e5cfd6f50e4..80d5962c3213f 100644 --- a/components/minerstat/minerstat.app.mjs +++ b/components/minerstat/minerstat.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/minform/minform.app.mjs b/components/minform/minform.app.mjs new file mode 100644 index 0000000000000..0397285706ce2 --- /dev/null +++ b/components/minform/minform.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "minform", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/minform/package.json b/components/minform/package.json new file mode 100644 index 0000000000000..59291f302f41f --- /dev/null +++ b/components/minform/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/minform", + "version": "0.0.1", + "description": "Pipedream Minform Components", + "main": "minform.app.mjs", + "keywords": [ + "pipedream", + "minform" + ], + "homepage": "https://pipedream.com/apps/minform", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/miyn/miyn.app.mjs b/components/miyn/miyn.app.mjs index 9be2da977d89b..672136a542d53 100644 --- a/components/miyn/miyn.app.mjs +++ b/components/miyn/miyn.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/mobile_text_alerts/.gitignore b/components/mobile_text_alerts/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/mobile_text_alerts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/mobile_text_alerts/app/mobile_text_alerts.app.ts b/components/mobile_text_alerts/app/mobile_text_alerts.app.ts deleted file mode 100644 index 1a327c6faeeb7..0000000000000 --- a/components/mobile_text_alerts/app/mobile_text_alerts.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "mobile_text_alerts", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/mobile_text_alerts/mobile_text_alerts.app.mjs b/components/mobile_text_alerts/mobile_text_alerts.app.mjs new file mode 100644 index 0000000000000..d6fe12f71bcfc --- /dev/null +++ b/components/mobile_text_alerts/mobile_text_alerts.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mobile_text_alerts", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/mobile_text_alerts/package.json b/components/mobile_text_alerts/package.json index 04c508dd99229..30a414b9f3421 100644 --- a/components/mobile_text_alerts/package.json +++ b/components/mobile_text_alerts/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/mobile_text_alerts", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Mobile Text Alerts Components", - "main": "dist/app/mobile_text_alerts.app.mjs", + "main": "mobile_text_alerts.app.mjs", "keywords": [ "pipedream", "mobile_text_alerts" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/mobile_text_alerts", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mobilemonkey/.gitignore b/components/mobilemonkey/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/mobilemonkey/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/mobilemonkey/app/mobilemonkey.app.ts b/components/mobilemonkey/app/mobilemonkey.app.ts deleted file mode 100644 index d5d4362269923..0000000000000 --- a/components/mobilemonkey/app/mobilemonkey.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "mobilemonkey", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/mobilemonkey/mobilemonkey.app.mjs b/components/mobilemonkey/mobilemonkey.app.mjs new file mode 100644 index 0000000000000..62c60861e0587 --- /dev/null +++ b/components/mobilemonkey/mobilemonkey.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mobilemonkey", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/mobilemonkey/package.json b/components/mobilemonkey/package.json index a6cbc928f8e9d..5e2e90cc6b592 100644 --- a/components/mobilemonkey/package.json +++ b/components/mobilemonkey/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/mobilemonkey", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream MobileMonkey Components", - "main": "dist/app/mobilemonkey.app.mjs", + "main": "mobilemonkey.app.mjs", "keywords": [ "pipedream", "mobilemonkey" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/mobilemonkey", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/moco/.gitignore b/components/moco/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/moco/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/moco/app/moco.app.ts b/components/moco/app/moco.app.ts deleted file mode 100644 index 9923b825c8206..0000000000000 --- a/components/moco/app/moco.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "moco", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/moco/moco.app.mjs b/components/moco/moco.app.mjs new file mode 100644 index 0000000000000..76eb5c938da72 --- /dev/null +++ b/components/moco/moco.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "moco", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/moco/package.json b/components/moco/package.json index babd4b93867ac..2c6ee20a9fae9 100644 --- a/components/moco/package.json +++ b/components/moco/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/moco", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream MOCO Components", - "main": "dist/app/moco.app.mjs", + "main": "moco.app.mjs", "keywords": [ "pipedream", "moco" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/moco", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mode/.gitignore b/components/mode/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/mode/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/mode/app/mode.app.ts b/components/mode/app/mode.app.ts deleted file mode 100644 index 50829afadafe2..0000000000000 --- a/components/mode/app/mode.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "mode", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/mode/mode.app.mjs b/components/mode/mode.app.mjs new file mode 100644 index 0000000000000..4609382c5b9c0 --- /dev/null +++ b/components/mode/mode.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mode", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/mode/package.json b/components/mode/package.json index 956323be60ffe..8988218c4e8f8 100644 --- a/components/mode/package.json +++ b/components/mode/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/mode", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Mode Components", - "main": "dist/app/mode.app.mjs", + "main": "mode.app.mjs", "keywords": [ "pipedream", "mode" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/mode", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mollie/mollie.app.mjs b/components/mollie/mollie.app.mjs index 1360aa48c77d4..7c15b42fb0cec 100644 --- a/components/mollie/mollie.app.mjs +++ b/components/mollie/mollie.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/moonmail/.gitignore b/components/moonmail/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/moonmail/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/moonmail/app/moonmail.app.ts b/components/moonmail/app/moonmail.app.ts deleted file mode 100644 index 6a66b90961c2a..0000000000000 --- a/components/moonmail/app/moonmail.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "moonmail", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/moonmail/moonmail.app.mjs b/components/moonmail/moonmail.app.mjs new file mode 100644 index 0000000000000..85d6170d441d9 --- /dev/null +++ b/components/moonmail/moonmail.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "moonmail", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/moonmail/package.json b/components/moonmail/package.json index f37b1d9223d9f..9a82fe70ba329 100644 --- a/components/moonmail/package.json +++ b/components/moonmail/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/moonmail", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream MoonMail Components", - "main": "dist/app/moonmail.app.mjs", + "main": "moonmail.app.mjs", "keywords": [ "pipedream", "moonmail" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/moonmail", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mozilla_observatory/.gitignore b/components/mozilla_observatory/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/mozilla_observatory/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/mozilla_observatory/app/mozilla_observatory.app.ts b/components/mozilla_observatory/app/mozilla_observatory.app.ts deleted file mode 100644 index f6a69aaa7ee60..0000000000000 --- a/components/mozilla_observatory/app/mozilla_observatory.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "mozilla_observatory", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/mozilla_observatory/mozilla_observatory.app.mjs b/components/mozilla_observatory/mozilla_observatory.app.mjs new file mode 100644 index 0000000000000..182765ccf2ad6 --- /dev/null +++ b/components/mozilla_observatory/mozilla_observatory.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mozilla_observatory", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/mozilla_observatory/package.json b/components/mozilla_observatory/package.json index 36c32d6e103c5..d54523217527b 100644 --- a/components/mozilla_observatory/package.json +++ b/components/mozilla_observatory/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/mozilla_observatory", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Mozilla Observatory Components", - "main": "dist/app/mozilla_observatory.app.mjs", + "main": "mozilla_observatory.app.mjs", "keywords": [ "pipedream", "mozilla_observatory" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/mozilla_observatory", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mqtt/mqtt.app.mjs b/components/mqtt/mqtt.app.mjs new file mode 100644 index 0000000000000..559cc386e957d --- /dev/null +++ b/components/mqtt/mqtt.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mqtt", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/mqtt/package.json b/components/mqtt/package.json new file mode 100644 index 0000000000000..b74071c77e0fc --- /dev/null +++ b/components/mqtt/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/mqtt", + "version": "0.0.1", + "description": "Pipedream MQTT Components", + "main": "mqtt.app.mjs", + "keywords": [ + "pipedream", + "mqtt" + ], + "homepage": "https://pipedream.com/apps/mqtt", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/murlist/.gitignore b/components/murlist/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/murlist/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/murlist/app/murlist.app.ts b/components/murlist/app/murlist.app.ts deleted file mode 100644 index b46e464bb69fe..0000000000000 --- a/components/murlist/app/murlist.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "murlist", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/murlist/murlist.app.mjs b/components/murlist/murlist.app.mjs new file mode 100644 index 0000000000000..7c04bd9150690 --- /dev/null +++ b/components/murlist/murlist.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "murlist", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/murlist/package.json b/components/murlist/package.json index 9c1032cf7f925..d394482d34c86 100644 --- a/components/murlist/package.json +++ b/components/murlist/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/murlist", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream MurList Components", - "main": "dist/app/murlist.app.mjs", + "main": "murlist.app.mjs", "keywords": [ "pipedream", "murlist" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/murlist", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/mx_toolbox/.gitignore b/components/mx_toolbox/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/mx_toolbox/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/mx_toolbox/app/mx_toolbox.app.ts b/components/mx_toolbox/app/mx_toolbox.app.ts deleted file mode 100644 index b52af2f759cd7..0000000000000 --- a/components/mx_toolbox/app/mx_toolbox.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "mx_toolbox", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/mx_toolbox/mx_toolbox.app.mjs b/components/mx_toolbox/mx_toolbox.app.mjs new file mode 100644 index 0000000000000..5c6639547464b --- /dev/null +++ b/components/mx_toolbox/mx_toolbox.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "mx_toolbox", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/mx_toolbox/package.json b/components/mx_toolbox/package.json index fa60186e1c2f4..b0518e7aa9152 100644 --- a/components/mx_toolbox/package.json +++ b/components/mx_toolbox/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/mx_toolbox", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Mx Toolbox Components", - "main": "dist/app/mx_toolbox.app.mjs", + "main": "mx_toolbox.app.mjs", "keywords": [ "pipedream", "mx_toolbox" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/mx_toolbox", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/n8n_io/.gitignore b/components/n8n_io/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/n8n_io/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/n8n_io/app/n8n_io.app.ts b/components/n8n_io/app/n8n_io.app.ts deleted file mode 100644 index 05ea71ba27812..0000000000000 --- a/components/n8n_io/app/n8n_io.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "n8n_io", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/n8n_io/n8n_io.app.mjs b/components/n8n_io/n8n_io.app.mjs new file mode 100644 index 0000000000000..e367c00bed6d1 --- /dev/null +++ b/components/n8n_io/n8n_io.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "n8n_io", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/n8n_io/package.json b/components/n8n_io/package.json index b3623e56d4a20..681fa295e6d18 100644 --- a/components/n8n_io/package.json +++ b/components/n8n_io/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/n8n_io", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream n8n.io Components", - "main": "dist/app/n8n_io.app.mjs", + "main": "n8n_io.app.mjs", "keywords": [ "pipedream", "n8n_io" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/n8n_io", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/namely/tsconfig.json b/components/namely/tsconfig.json index a61206464b8c0..3a9389484d040 100644 --- a/components/namely/tsconfig.json +++ b/components/namely/tsconfig.json @@ -1,23 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/nano_nets/.gitignore b/components/nano_nets/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/nano_nets/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/nano_nets/app/nano_nets.app.ts b/components/nano_nets/app/nano_nets.app.ts deleted file mode 100644 index 4a4965a321642..0000000000000 --- a/components/nano_nets/app/nano_nets.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "nano_nets", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/nano_nets/nano_nets.app.mjs b/components/nano_nets/nano_nets.app.mjs new file mode 100644 index 0000000000000..9b8683cedf33f --- /dev/null +++ b/components/nano_nets/nano_nets.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "nano_nets", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/nano_nets/package.json b/components/nano_nets/package.json index 8094dababe61a..5e890d78dcf59 100644 --- a/components/nano_nets/package.json +++ b/components/nano_nets/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/nano_nets", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Nano Nets Components", - "main": "dist/app/nano_nets.app.mjs", + "main": "nano_nets.app.mjs", "keywords": [ "pipedream", "nano_nets" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/nano_nets", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/nasdaq_data_link_time_series_and_table_data_/.gitignore b/components/nasdaq_data_link_time_series_and_table_data_/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/nasdaq_data_link_time_series_and_table_data_/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/nasdaq_data_link_time_series_and_table_data_/actions/export-table/export-table.mjs b/components/nasdaq_data_link_time_series_and_table_data_/actions/export-table/export-table.mjs new file mode 100644 index 0000000000000..62430ce726279 --- /dev/null +++ b/components/nasdaq_data_link_time_series_and_table_data_/actions/export-table/export-table.mjs @@ -0,0 +1,91 @@ +import app from "../../nasdaq_data_link_time_series_and_table_data_.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + key: "nasdaq_data_link_time_series_and_table_data_-export-table", + name: "Export Table (Bulk Download)", + description: "Exports an entire table or a filtered subset as a zipped CSV file. Returns a download link for the data. Premium subscribers can use this feature up to 60 times per hour. [See the documentation](https://docs.data.nasdaq.com/docs/large-table-download)", + version: "0.0.1", + type: "action", + props: { + app, + publisher: { + propDefinition: [ + app, + "publisher", + ], + }, + table: { + propDefinition: [ + app, + "table", + ], + }, + columns: { + propDefinition: [ + app, + "columns", + ({ + publisher, table, + }) => ({ + publisher, + table, + }), + ], + }, + filters: { + type: "object", + label: "Row Filters", + description: "Filter rows based on column values. Use column names as keys and values to filter by. For example: `{ \"ticker\": \"SPY\", \"date\": \"2024-01-01\" }`. Only filterable columns can be used (check table metadata).", + optional: true, + }, + filterOperators: { + type: "object", + label: "Filter Operators", + description: "Apply operators to filters. Format: `{ \"column.operator\": \"value\" }`. Available operators: `.gt` (greater than), `.lt` (less than), `.gte` (greater than or equal), `.lte` (less than or equal). Example: `{ \"date.gte\": \"2024-01-01\", \"date.lte\": \"2024-12-31\" }`", + optional: true, + }, + }, + async run({ $ }) { + const { + app, + publisher, + table, + columns, + filters, + filterOperators, + } = this; + + const response = await app.tableData({ + $, + publisher, + table, + params: { + "qopts.export": true, + ...utils.parseJson(filters), + ...utils.parseJson(filterOperators), + ...(Array.isArray(columns) && columns?.length + ? { + "qopts.columns": columns.join(","), + } + : undefined + ), + }, + }); + + const status = response?.datatable_bulk_download?.file?.status; + const link = response?.datatable_bulk_download?.file?.link; + + if (status === "fresh" && link) { + $.export("$summary", `Table ${publisher}/${table} is ready for download. The download link is valid for 30 minutes.`); + + } else if (status === "creating" || status === "regenerating") { + $.export("$summary", `Export job for table ${publisher}/${table} is ${status}. Please retry in a few moments to get the download link.`); + + } else { + $.export("$summary", `Export initiated for table ${publisher}/${table}`); + } + + return response; + }, +}; diff --git a/components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-data/get-table-data.mjs b/components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-data/get-table-data.mjs new file mode 100644 index 0000000000000..9efb6de585240 --- /dev/null +++ b/components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-data/get-table-data.mjs @@ -0,0 +1,81 @@ +import app from "../../nasdaq_data_link_time_series_and_table_data_.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + key: "nasdaq_data_link_time_series_and_table_data_-get-table-data", + name: "Get Table Data", + description: "Retrieves data from a specific Nasdaq Data Link table with automatic pagination. Supports filtering by columns and rows. [See the documentation](https://docs.data.nasdaq.com/docs/tables-1)", + version: "0.0.1", + type: "action", + props: { + app, + publisher: { + propDefinition: [ + app, + "publisher", + ], + }, + table: { + propDefinition: [ + app, + "table", + ], + }, + columns: { + propDefinition: [ + app, + "columns", + ({ + publisher, table, + }) => ({ + publisher, + table, + }), + ], + }, + filters: { + type: "object", + label: "Row Filters", + description: "Filter rows based on column values. Use column names as keys and values to filter by. For example: `{ \"ticker\": \"SPY\", \"date\": \"2024-01-01\" }`. Only filterable columns can be used (check table metadata).", + optional: true, + }, + filterOperators: { + type: "object", + label: "Filter Operators", + description: "Apply operators to filters. Format: `{ \"column.operator\": \"value\" }`. Available operators: `.gt` (greater than), `.lt` (less than), `.gte` (greater than or equal), `.lte` (less than or equal). Example: `{ \"date.gte\": \"2024-01-01\", \"date.lte\": \"2024-12-31\" }`", + optional: true, + }, + }, + async run({ $ }) { + const { + app, + publisher, + table, + columns, + filters, + filterOperators, + } = this; + + const response = await app.paginate({ + fn: app.tableData, + args: { + $, + publisher, + table, + params: { + ...utils.parseJson(filters), + ...utils.parseJson(filterOperators), + ...(Array.isArray(columns) && columns?.length + ? { + "qopts.columns": columns.join(","), + } + : undefined + ), + }, + }, + }); + + $.export("$summary", `Successfully retrieved ${response.length} records`); + return response; + }, +}; diff --git a/components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-metadata/get-table-metadata.mjs b/components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-metadata/get-table-metadata.mjs new file mode 100644 index 0000000000000..68a9a91edec21 --- /dev/null +++ b/components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-metadata/get-table-metadata.mjs @@ -0,0 +1,40 @@ +import app from "../../nasdaq_data_link_time_series_and_table_data_.app.mjs"; + +export default { + key: "nasdaq_data_link_time_series_and_table_data_-get-table-metadata", + name: "Get Table Metadata", + description: "Retrieves metadata for a specific Nasdaq Data Link table, including column names, types, filterable columns, and primary keys. [See the documentation](https://docs.data.nasdaq.com/docs/tables-1)", + version: "0.0.1", + type: "action", + props: { + app, + publisher: { + propDefinition: [ + app, + "publisher", + ], + }, + table: { + propDefinition: [ + app, + "table", + ], + }, + }, + async run({ $ }) { + const { + app, + publisher, + table, + } = this; + + const response = await app.tableMetadata({ + $, + publisher, + table, + }); + + $.export("$summary", `Successfully retrieved metadata for table \`${publisher}/${table}\``); + return response; + }, +}; diff --git a/components/nasdaq_data_link_time_series_and_table_data_/app/nasdaq_data_link_time_series_and_table_data_.app.ts b/components/nasdaq_data_link_time_series_and_table_data_/app/nasdaq_data_link_time_series_and_table_data_.app.ts deleted file mode 100644 index 9e4401efa5062..0000000000000 --- a/components/nasdaq_data_link_time_series_and_table_data_/app/nasdaq_data_link_time_series_and_table_data_.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "nasdaq_data_link_time_series_and_table_data_", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/nasdaq_data_link_time_series_and_table_data_/common/utils.mjs b/components/nasdaq_data_link_time_series_and_table_data_/common/utils.mjs new file mode 100644 index 0000000000000..2adf04343104f --- /dev/null +++ b/components/nasdaq_data_link_time_series_and_table_data_/common/utils.mjs @@ -0,0 +1,44 @@ +const parseJson = (input, maxDepth = 100) => { + const seen = new WeakSet(); + const parse = (value) => { + if (maxDepth <= 0) { + return value; + } + if (typeof(value) === "string") { + // Only parse if the string looks like a JSON object or array + const trimmed = value.trim(); + if ( + (trimmed.startsWith("{") && trimmed.endsWith("}")) || + (trimmed.startsWith("[") && trimmed.endsWith("]")) + ) { + try { + return parseJson(JSON.parse(value), maxDepth - 1); + } catch (e) { + return value; + } + } + return value; + } else if (typeof(value) === "object" && value !== null && !Array.isArray(value)) { + if (seen.has(value)) { + return value; + } + seen.add(value); + return Object.entries(value) + .reduce((acc, [ + key, + val, + ]) => Object.assign(acc, { + [key]: parse(val), + }), {}); + } else if (Array.isArray(value)) { + return value.map((item) => parse(item)); + } + return value; + }; + + return parse(input); +}; + +export default { + parseJson, +}; diff --git a/components/nasdaq_data_link_time_series_and_table_data_/nasdaq_data_link_time_series_and_table_data_.app.mjs b/components/nasdaq_data_link_time_series_and_table_data_/nasdaq_data_link_time_series_and_table_data_.app.mjs new file mode 100644 index 0000000000000..1c868409a4d91 --- /dev/null +++ b/components/nasdaq_data_link_time_series_and_table_data_/nasdaq_data_link_time_series_and_table_data_.app.mjs @@ -0,0 +1,106 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "nasdaq_data_link_time_series_and_table_data_", + propDefinitions: { + publisher: { + type: "string", + label: "Publisher Code", + description: "The publisher code (e.g., `MER`, `ETFG`, `AR`, `NDAQ`). This is the first part of the datatable code. If the code is `MER/F1`, then `MER` is the publisher code and `F1` is the table code.", + }, + table: { + type: "string", + label: "Table Code", + description: "The table code (e.g., `F1`, `FUND`, `MWCS`, `RTAT10`). This is the second part of the datatable code. If the code is `MER/F1`, then `F1` is the table code.", + }, + columns: { + type: "string[]", + label: "Columns", + description: "Request data from specific columns. If you want to query for multiple columns, include the column names as array items", + optional: true, + async options({ + publisher, table, + }) { + if (!publisher || !table) { + return []; + } + const { datatable: { columns } } = await this.tableMetadata({ + publisher, + table, + }); + return columns.map(({ name }) => name); + }, + }, + }, + methods: { + getUrl(path) { + return `https://data.nasdaq.com/api/v3${path}`; + }, + getHeaders(headers) { + return { + ...headers, + "Accept": "application/json", + "X-Api-Token": this.$auth.api_key, + }; + }, + makeRequest({ + $ = this, path, headers, ...args + } = {}) { + return axios($, { + ...args, + url: this.getUrl(path), + headers: this.getHeaders(headers), + }); + }, + tableMetadata({ + publisher, table, ...args + }) { + return this.makeRequest({ + path: `/datatables/${publisher}/${table}/metadata.json`, + ...args, + }); + }, + tableData({ + publisher, table, ...args + }) { + return this.makeRequest({ + path: `/datatables/${publisher}/${table}.json`, + ...args, + }); + }, + async paginate({ + fn, args = {}, maxRequests = 3, + } = {}) { + let allData = []; + let cursorId = null; + let requestCount = 0; + let hasMorePages = true; + + while (hasMorePages && requestCount < maxRequests) { + const response = await fn({ + ...args, + params: { + ...args.params, + "qopts.per_page": 100, + ...(cursorId + ? { + "qopts.cursor_id": cursorId, + } + : undefined + ), + }, + }); + + const pageData = response?.datatable?.data || []; + allData = allData.concat(pageData); + + cursorId = response?.meta?.next_cursor_id; + hasMorePages = !!cursorId; + requestCount++; + } + + return allData; + }, + }, +}; diff --git a/components/nasdaq_data_link_time_series_and_table_data_/package.json b/components/nasdaq_data_link_time_series_and_table_data_/package.json index e4974918b9307..20c415d3addab 100644 --- a/components/nasdaq_data_link_time_series_and_table_data_/package.json +++ b/components/nasdaq_data_link_time_series_and_table_data_/package.json @@ -1,16 +1,18 @@ { "name": "@pipedream/nasdaq_data_link_time_series_and_table_data_", - "version": "0.0.2", + "version": "0.1.0", "description": "Pipedream Nasdaq Data Link (Time Series and Table data) Components", - "main": "dist/app/nasdaq_data_link_time_series_and_table_data_.app.mjs", + "main": "nasdaq_data_link_time_series_and_table_data_.app.mjs", "keywords": [ "pipedream", "nasdaq_data_link_time_series_and_table_data_" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/nasdaq_data_link_time_series_and_table_data_", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/nectar_crm/package.json b/components/nectar_crm/package.json index e7dcc5f91e5f0..2942466a53752 100644 --- a/components/nectar_crm/package.json +++ b/components/nectar_crm/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/nectar_crm", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Nectar CRM Components", "main": "dist/app/nectar_crm.app.mjs", "keywords": [ @@ -16,6 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.1" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/nectar_crm/tsconfig.json b/components/nectar_crm/tsconfig.json index a61206464b8c0..3a9389484d040 100644 --- a/components/nectar_crm/tsconfig.json +++ b/components/nectar_crm/tsconfig.json @@ -1,23 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/netcore/netcore.app.mjs b/components/netcore/netcore.app.mjs index 27c59418168bd..9be9aed387163 100644 --- a/components/netcore/netcore.app.mjs +++ b/components/netcore/netcore.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/netlify/actions/get-site/get-site.mjs b/components/netlify/actions/get-site/get-site.mjs index 75815a06f249b..011c7deb023ed 100644 --- a/components/netlify/actions/get-site/get-site.mjs +++ b/components/netlify/actions/get-site/get-site.mjs @@ -4,7 +4,7 @@ export default { key: "netlify-get-site", name: "Get Site", description: "Get a specified site. [See docs](https://docs.netlify.com/api/get-started/#get-sites)", - version: "0.1.0", + version: "0.1.1", type: "action", props: { netlify, @@ -16,7 +16,7 @@ export default { }, }, async run({ $ }) { - const response = this.netlify.getSite(this.siteId); + const response = await this.netlify.getSite(this.siteId); $.export("$summary", `Got site ${response.name}`); return response; }, diff --git a/components/netlify/actions/list-files/list-files.mjs b/components/netlify/actions/list-files/list-files.mjs index d494b06f23751..160cb528fe1b9 100644 --- a/components/netlify/actions/list-files/list-files.mjs +++ b/components/netlify/actions/list-files/list-files.mjs @@ -4,7 +4,7 @@ export default { key: "netlify-list-files", name: "List Files", description: "Returns a list of all the files in the current deploy. [See docs](https://docs.netlify.com/api/get-started/#get-files)", - version: "0.1.0", + version: "0.1.1", type: "action", props: { netlify, @@ -16,7 +16,7 @@ export default { }, }, async run({ $ }) { - const response = this.netlify.listFiles(this.siteId); + const response = await this.netlify.listFiles(this.siteId); $.export("$summary", "Got files for site"); return response; }, diff --git a/components/netlify/actions/list-site-deploys/list-site-deploys.mjs b/components/netlify/actions/list-site-deploys/list-site-deploys.mjs index 76078a55b1d2f..69383f9e4055d 100644 --- a/components/netlify/actions/list-site-deploys/list-site-deploys.mjs +++ b/components/netlify/actions/list-site-deploys/list-site-deploys.mjs @@ -4,7 +4,7 @@ export default { key: "netlify-list-site-deploys", name: "List Site Deploys", description: "Returns a list of all deploys for a specific site. [See docs](https://docs.netlify.com/api/get-started/#get-deploys)", - version: "0.1.0", + version: "0.1.1", type: "action", props: { netlify, diff --git a/components/netlify/actions/rollback-deploy/rollback-deploy.mjs b/components/netlify/actions/rollback-deploy/rollback-deploy.mjs index d8c155a497018..77c2eb5eecc3b 100644 --- a/components/netlify/actions/rollback-deploy/rollback-deploy.mjs +++ b/components/netlify/actions/rollback-deploy/rollback-deploy.mjs @@ -4,7 +4,7 @@ export default { key: "netlify-rollback-deploy", name: "Rollback Deploy", description: "Restores an old deploy and makes it the live version of the site. [See docs](https://docs.netlify.com/api/get-started/#restore-deploy-rollback)", - version: "0.1.0", + version: "0.1.1", type: "action", props: { netlify, @@ -25,7 +25,7 @@ export default { }, }, async run({ $ }) { - const response = this.netlify.rollbackDeploy(this.siteId, this.deployId); + const response = await this.netlify.rollbackDeploy(this.siteId, this.deployId); $.export("$summary", "Rolling back deploy"); return response; }, diff --git a/components/netlify/package.json b/components/netlify/package.json index e6a0a7e98a0b4..f7ec815b62816 100644 --- a/components/netlify/package.json +++ b/components/netlify/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/netlify", - "version": "0.4.1", + "version": "0.4.2", "description": "Pipedream Netlify Components", "main": "netlify.app.mjs", "keywords": [ @@ -10,9 +10,9 @@ "homepage": "https://pipedream.com/apps/netlify", "author": "Pipedream (https://pipedream.com/)", "dependencies": { - "@pipedream/platform": "^1.4.0", + "@pipedream/platform": "^3.1.0", "jwt-simple": "^0.5.6", - "netlify": "^6.0.9", + "netlify": "^23.0.0", "parse-link-header": "^2.0.0" }, "gitHead": "e12480b94cc03bed4808ebc6b13e7fdb3a1ba535", diff --git a/components/netlify/sources/new-deploy-failure/new-deploy-failure.mjs b/components/netlify/sources/new-deploy-failure/new-deploy-failure.mjs index c54632654b799..639ae305c3a8d 100644 --- a/components/netlify/sources/new-deploy-failure/new-deploy-failure.mjs +++ b/components/netlify/sources/new-deploy-failure/new-deploy-failure.mjs @@ -7,16 +7,15 @@ export default { name: "New Deploy Failure (Instant)", description: "Emit new event when a new deployment fails", type: "source", - version: "0.1.0", + version: "0.1.1", dedupe: "unique", methods: { ...webhook.methods, getHookEvent() { return deployHooks.DEPLOY_FAILED; }, - getMetaSummary(data) { - const { commit_ref: commitRef } = data; - return `Deploy failed for commit ${commitRef}`; + getMetaSummary() { + return "New Deployment Failure"; }, }, }; diff --git a/components/netlify/sources/new-deploy-start/new-deploy-start.mjs b/components/netlify/sources/new-deploy-start/new-deploy-start.mjs index 04224bc60baa2..357229fe2d9ef 100644 --- a/components/netlify/sources/new-deploy-start/new-deploy-start.mjs +++ b/components/netlify/sources/new-deploy-start/new-deploy-start.mjs @@ -7,16 +7,15 @@ export default { name: "New Deploy Start (Instant)", description: "Emit new event when a new deployment is started", type: "source", - version: "0.1.0", + version: "0.1.1", dedupe: "unique", methods: { ...webhook.methods, getHookEvent() { return deployHooks.DEPLOY_BUILDING; }, - getMetaSummary(data) { - const { commit_ref: commitRef } = data; - return `Deploy started for commit ${commitRef}`; + getMetaSummary() { + return "New Deployment Started"; }, }, }; diff --git a/components/netlify/sources/new-deploy-success/new-deploy-success.mjs b/components/netlify/sources/new-deploy-success/new-deploy-success.mjs index 9041575ecda5d..b89587c0705ad 100644 --- a/components/netlify/sources/new-deploy-success/new-deploy-success.mjs +++ b/components/netlify/sources/new-deploy-success/new-deploy-success.mjs @@ -7,16 +7,15 @@ export default { name: "New Deploy Success (Instant)", description: "Emit new event when a new deployment is completed", type: "source", - version: "0.1.0", + version: "0.1.1", dedupe: "unique", methods: { ...webhook.methods, getHookEvent() { return deployHooks.DEPLOY_CREATED; }, - getMetaSummary(data) { - const { commit_ref: commitRef } = data; - return `Deploy succeeded for commit ${commitRef}`; + getMetaSummary() { + return "New Deployment Success"; }, }, }; diff --git a/components/netlify/sources/new-form-submission/new-form-submission.mjs b/components/netlify/sources/new-form-submission/new-form-submission.mjs index 0d1d1f3299c87..1ba5d38c5573c 100644 --- a/components/netlify/sources/new-form-submission/new-form-submission.mjs +++ b/components/netlify/sources/new-form-submission/new-form-submission.mjs @@ -7,7 +7,7 @@ export default { name: "New Form Submission (Instant)", description: "Emit new event when a user submits a form", type: "source", - version: "0.1.0", + version: "0.1.1", dedupe: "unique", methods: { ...webhook.methods, diff --git a/components/neutrino/.gitignore b/components/neutrino/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/neutrino/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/neutrino/app/neutrino.app.ts b/components/neutrino/app/neutrino.app.ts deleted file mode 100644 index 88183c8f1eb81..0000000000000 --- a/components/neutrino/app/neutrino.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "neutrino", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/neutrino/neutrino.app.mjs b/components/neutrino/neutrino.app.mjs new file mode 100644 index 0000000000000..223572dd9f838 --- /dev/null +++ b/components/neutrino/neutrino.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "neutrino", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/neutrino/package.json b/components/neutrino/package.json index 9340715ed6a4c..40ed0fbd69b96 100644 --- a/components/neutrino/package.json +++ b/components/neutrino/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/neutrino", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Neutrino Components", - "main": "dist/app/neutrino.app.mjs", + "main": "neutrino.app.mjs", "keywords": [ "pipedream", "neutrino" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/neutrino", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/neverbounce/package.json b/components/neverbounce/package.json index e849ed8e6697b..e560f8d895433 100644 --- a/components/neverbounce/package.json +++ b/components/neverbounce/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/neverbounce", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream NeverBounce Components", "main": "dist/app/neverbounce.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/neverbounce/tsconfig.json b/components/neverbounce/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/neverbounce/tsconfig.json +++ b/components/neverbounce/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/newsletter/.gitignore b/components/newsletter/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/newsletter/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/newsletter/app/newsletter.app.ts b/components/newsletter/app/newsletter.app.ts deleted file mode 100644 index 1b95e8d92839b..0000000000000 --- a/components/newsletter/app/newsletter.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "newsletter", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/newsletter/newsletter.app.mjs b/components/newsletter/newsletter.app.mjs new file mode 100644 index 0000000000000..d8ff102e4b793 --- /dev/null +++ b/components/newsletter/newsletter.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "newsletter", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/newsletter/package.json b/components/newsletter/package.json index 5053ba72844e9..2d93efe7d2441 100644 --- a/components/newsletter/package.json +++ b/components/newsletter/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/newsletter", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Newsletter Components", - "main": "dist/app/newsletter.app.mjs", + "main": "newsletter.app.mjs", "keywords": [ "pipedream", "newsletter" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/newsletter", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/newslit/.gitignore b/components/newslit/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/newslit/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/newslit/app/newslit.app.ts b/components/newslit/app/newslit.app.ts deleted file mode 100644 index 41d2f0523d1a5..0000000000000 --- a/components/newslit/app/newslit.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "newslit", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/newslit/newslit.app.mjs b/components/newslit/newslit.app.mjs new file mode 100644 index 0000000000000..f4b1071001eec --- /dev/null +++ b/components/newslit/newslit.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "newslit", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/newslit/package.json b/components/newslit/package.json index e0c47e690e04b..dd64c91b86217 100644 --- a/components/newslit/package.json +++ b/components/newslit/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/newslit", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Newslit Components", - "main": "dist/app/newslit.app.mjs", + "main": "newslit.app.mjs", "keywords": [ "pipedream", "newslit" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/newslit", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/nextdns/.gitignore b/components/nextdns/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/nextdns/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/nextdns/app/nextdns.app.ts b/components/nextdns/app/nextdns.app.ts deleted file mode 100644 index 937d26940ce32..0000000000000 --- a/components/nextdns/app/nextdns.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "nextdns", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/nextdns/nextdns.app.mjs b/components/nextdns/nextdns.app.mjs new file mode 100644 index 0000000000000..c44e37115f637 --- /dev/null +++ b/components/nextdns/nextdns.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "nextdns", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/nextdns/package.json b/components/nextdns/package.json index 987b16eca948f..72d002d183b51 100644 --- a/components/nextdns/package.json +++ b/components/nextdns/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/nextdns", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream NextDNS Components", - "main": "dist/app/nextdns.app.mjs", + "main": "nextdns.app.mjs", "keywords": [ "pipedream", "nextdns" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/nextdns", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/niftyimages/package.json b/components/niftyimages/package.json index 3b1eb5a53bec8..0f36a5703f65e 100644 --- a/components/niftyimages/package.json +++ b/components/niftyimages/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/niftyimages", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream NiftyImages Components", "main": "dist/app/niftyimages.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/niftyimages/tsconfig.json b/components/niftyimages/tsconfig.json index 910b87fc8266a..3a9389484d040 100644 --- a/components/niftyimages/tsconfig.json +++ b/components/niftyimages/tsconfig.json @@ -1,24 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/nightfall_ai/.gitignore b/components/nightfall_ai/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/nightfall_ai/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/nightfall_ai/app/nightfall_ai.app.ts b/components/nightfall_ai/app/nightfall_ai.app.ts deleted file mode 100644 index b7d4f1d4c2b3b..0000000000000 --- a/components/nightfall_ai/app/nightfall_ai.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "nightfall_ai", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/nightfall_ai/nightfall_ai.app.mjs b/components/nightfall_ai/nightfall_ai.app.mjs new file mode 100644 index 0000000000000..055d84b672cf1 --- /dev/null +++ b/components/nightfall_ai/nightfall_ai.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "nightfall_ai", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/nightfall_ai/package.json b/components/nightfall_ai/package.json index 1d28b78e234d0..d990206adf225 100644 --- a/components/nightfall_ai/package.json +++ b/components/nightfall_ai/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/nightfall_ai", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Nightfall.ai Components", - "main": "dist/app/nightfall_ai.app.mjs", + "main": "nightfall_ai.app.mjs", "keywords": [ "pipedream", "nightfall_ai" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/nightfall_ai", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/ninox/package.json b/components/ninox/package.json index 4ea1b81c45c8c..154e2f1b84736 100644 --- a/components/ninox/package.json +++ b/components/ninox/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/ninox", - "version": "0.0.5", + "version": "0.0.6", "description": "Pipedream Ninox Components", "main": "dist/app/ninox.app.mjs", "keywords": [ @@ -16,6 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.0" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/ninox/tsconfig.json b/components/ninox/tsconfig.json index 335fa6f1cf6ec..3a9389484d040 100644 --- a/components/ninox/tsconfig.json +++ b/components/ninox/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/notiff/actions/create-notification/create-notification.mjs b/components/notiff/actions/create-notification/create-notification.mjs index 3622a6cd5da4e..89ba849c5d6d2 100644 --- a/components/notiff/actions/create-notification/create-notification.mjs +++ b/components/notiff/actions/create-notification/create-notification.mjs @@ -1,4 +1,4 @@ -import common from "../../../notiff_io/actions/create-notification/create-notification.mjs"; +import common from "@pipedream/notiff_io/actions/create-notification/create-notification.mjs"; import { adjustPropDefinitions } from "../../common/utils.mjs"; import app from "../../notiff.app.mjs"; @@ -9,7 +9,7 @@ export default { key: "notiff-create-notification", name: "Create Notification", description: "Send a new notification to a user or system via notiff.io. [See the documentation](https://notiff.io/articles/welcome-to-notiff-getting-started-with-your-notification-center)", - version: "0.0.1", + version: "0.0.3", type: "action", methods: { getNotificationSourceId() { diff --git a/components/notiff/notiff.app.mjs b/components/notiff/notiff.app.mjs index 05595f8f2dbaf..bbf0c2e5f0c29 100644 --- a/components/notiff/notiff.app.mjs +++ b/components/notiff/notiff.app.mjs @@ -1,4 +1,4 @@ -import notiffIo from "../notiff_io/notiff_io.app.mjs"; +import notiffIo from "@pipedream/notiff_io"; export default { ...notiffIo, diff --git a/components/notiff/package.json b/components/notiff/package.json index 514cf9d005b4e..7c7fdd71e65f1 100644 --- a/components/notiff/package.json +++ b/components/notiff/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/notiff", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Notiff Components", "main": "notiff.app.mjs", "keywords": [ @@ -13,6 +13,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.0.3" + "@pipedream/platform": "^3.0.3", + "@pipedream/notiff_io": "^0.1.0" } } diff --git a/components/notion/actions/append-block/append-block.mjs b/components/notion/actions/append-block/append-block.mjs index db39e16b6cd70..f37c28ef07e99 100644 --- a/components/notion/actions/append-block/append-block.mjs +++ b/components/notion/actions/append-block/append-block.mjs @@ -7,7 +7,7 @@ export default { name: "Append Block to Parent", description: "Append new and/or existing blocks to the specified parent. [See the documentation](https://developers.notion.com/reference/patch-block-children)", - version: "0.3.4", + version: "0.3.6", type: "action", props: { notion, diff --git a/components/notion/actions/common/base-page-builder.mjs b/components/notion/actions/common/base-page-builder.mjs index 145c6099b086f..418d9ebd08c93 100644 --- a/components/notion/actions/common/base-page-builder.mjs +++ b/components/notion/actions/common/base-page-builder.mjs @@ -84,7 +84,7 @@ export default { .map((property) => ({ type: properties[property]?.type ?? property, label: property, - value: this[property] || this.properties[property], + value: this[property] || this.properties?.[property], })); }, /** diff --git a/components/notion/actions/complete-file-upload/complete-file-upload.mjs b/components/notion/actions/complete-file-upload/complete-file-upload.mjs new file mode 100644 index 0000000000000..db4b112acb6a9 --- /dev/null +++ b/components/notion/actions/complete-file-upload/complete-file-upload.mjs @@ -0,0 +1,31 @@ +import notion from "../../notion.app.mjs"; +import base from "../common/base-page-builder.mjs"; + +export default { + ...base, + key: "notion-complete-file-upload", + name: "Complete File Upload", + description: "Use this action to finalize a `mode=multi_part` file upload after all of the parts have been sent successfully. [See the documentation](https://developers.notion.com/reference/complete-a-file-upload)", + version: "0.0.1", + type: "action", + props: { + notion, + fileUploadId: { + propDefinition: [ + notion, + "fileUploadId", + () => ({ + status: "pending", + }), + ], + }, + }, + async run({ $ }) { + const response = await this.notion.completeFileUpload({ + file_upload_id: this.fileUploadId, + }); + + $.export("$summary", `Successfully completed file upload with ID ${this.fileUploadId}`); + return response; + }, +}; diff --git a/components/notion/actions/create-comment/create-comment.mjs b/components/notion/actions/create-comment/create-comment.mjs index 7e5801728ada9..7a9bbafd3bcaf 100644 --- a/components/notion/actions/create-comment/create-comment.mjs +++ b/components/notion/actions/create-comment/create-comment.mjs @@ -1,11 +1,11 @@ -import notion from "../../notion.app.mjs"; import { ConfigurationError } from "@pipedream/platform"; +import notion from "../../notion.app.mjs"; export default { key: "notion-create-comment", name: "Create Comment", description: "Create a comment in a page or existing discussion thread. [See the documentation](https://developers.notion.com/reference/create-a-comment)", - version: "0.0.4", + version: "0.0.6", type: "action", props: { notion, diff --git a/components/notion/actions/create-database/create-database.mjs b/components/notion/actions/create-database/create-database.mjs new file mode 100644 index 0000000000000..cec0be4d25774 --- /dev/null +++ b/components/notion/actions/create-database/create-database.mjs @@ -0,0 +1,54 @@ +import utils from "../../common/utils.mjs"; +import notion from "../../notion.app.mjs"; +import base from "../common/base-page-builder.mjs"; + +export default { + ...base, + key: "notion-create-database", + name: "Create Database", + description: "Create a database. [See the documentation](https://developers.notion.com/reference/create-a-database)", + version: "0.0.1", + type: "action", + props: { + notion, + parent: { + propDefinition: [ + notion, + "pageId", + ], + label: "Parent Page ID", + description: "Select a parent page or provide a page ID", + }, + title: { + type: "string", + label: "Title", + description: "Title of database as it appears in Notion. An array of [rich text objects](https://developers.notion.com/reference/rich-text).", + optional: true, + }, + properties: { + type: "object", + label: "Properties", + description: "Property schema of database. The keys are the names of properties as they appear in Notion and the values are [property schema objects](https://developers.notion.com/reference/property-schema-object).", + }, + }, + async run({ $ }) { + const response = await this.notion.createDatabase({ + parent: { + type: "page_id", + page_id: this.parent, + }, + title: [ + { + type: "text", + text: { + content: this.title, + }, + }, + ], + properties: utils.parseObject(this.properties), + }); + + $.export("$summary", `Successfully created database with ID ${response.id}`); + return response; + }, +}; diff --git a/components/notion/actions/create-file-upload/create-file-upload.mjs b/components/notion/actions/create-file-upload/create-file-upload.mjs new file mode 100644 index 0000000000000..907e8d73f6345 --- /dev/null +++ b/components/notion/actions/create-file-upload/create-file-upload.mjs @@ -0,0 +1,70 @@ +import notion from "../../notion.app.mjs"; +import base from "../common/base-page-builder.mjs"; + +export default { + ...base, + key: "notion-create-file-upload", + name: "Create File Upload", + description: "Create a file upload. [See the documentation](https://developers.notion.com/reference/create-a-file-upload)", + version: "0.0.1", + type: "action", + props: { + notion, + mode: { + type: "string", + label: "Mode", + description: "How the file is being sent. Use `Multi Part` for files larger than 20MB. Use `External URL` for files that are temporarily hosted publicly elsewhere.", + options: [ + { + label: "Single Part", + value: "single_part", + }, + { + label: "Multi Part", + value: "multi_part", + }, + { + label: "External URL", + value: "external_url", + }, + ], + optional: true, + }, + filename: { + type: "string", + label: "Filename", + description: "Name of the file to be created. Required when mode is multi_part or external_url. Otherwise optional, and used to override the filename. Must include an extension.", + optional: true, + }, + contentType: { + type: "string", + label: "Content Type", + description: "MIME type of the file to be created. Recommended when sending the file in multiple parts. Must match the content type of the file that's sent, and the extension of the `filename` parameter if any.", + optional: true, + }, + numberOfParts: { + type: "integer", + label: "Number of Parts", + description: "When mode is `Multi Part`, the number of parts you are uploading. Must be between 1 and 1,000. This must match the number of parts as well as the final part_number you send.", + optional: true, + }, + externalUrl: { + type: "string", + label: "External URL", + description: "When mode is `External URL`, provide the HTTPS URL of a publicly accessible file to import into your workspace.", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.notion.createFileUpload({ + mode: this.mode, + filename: this.filename, + content_type: this.contentType, + number_of_parts: this.numberOfParts, + external_url: this.externalUrl, + }); + + $.export("$summary", `Successfully created file upload with ID ${response.id}`); + return response; + }, +}; diff --git a/components/notion/actions/create-page-from-database/create-page-from-database.mjs b/components/notion/actions/create-page-from-database/create-page-from-database.mjs index aa98d676b4e50..b08e5c32bfe3f 100644 --- a/components/notion/actions/create-page-from-database/create-page-from-database.mjs +++ b/components/notion/actions/create-page-from-database/create-page-from-database.mjs @@ -1,14 +1,14 @@ -import notion from "../../notion.app.mjs"; -import base from "../common/base-page-builder.mjs"; import NOTION_ICONS from "../../common/notion-icons.mjs"; import utils from "../../common/utils.mjs"; +import notion from "../../notion.app.mjs"; +import base from "../common/base-page-builder.mjs"; export default { ...base, key: "notion-create-page-from-database", name: "Create Page from Database", description: "Create a page from a database. [See the documentation](https://developers.notion.com/reference/post-page)", - version: "0.2.1", + version: "0.2.3", type: "action", props: { notion, diff --git a/components/notion/actions/create-page/create-page.mjs b/components/notion/actions/create-page/create-page.mjs index 38cd14b3899f1..45bdeb80a61e1 100644 --- a/components/notion/actions/create-page/create-page.mjs +++ b/components/notion/actions/create-page/create-page.mjs @@ -7,7 +7,7 @@ export default { key: "notion-create-page", name: "Create Page", description: "Create a page from a parent page. [See the documentation](https://developers.notion.com/reference/post-page)", - version: "0.2.17", + version: "0.2.19", type: "action", props: { notion, diff --git a/components/notion/actions/delete-block/delete-block.mjs b/components/notion/actions/delete-block/delete-block.mjs new file mode 100644 index 0000000000000..43145174ff9a0 --- /dev/null +++ b/components/notion/actions/delete-block/delete-block.mjs @@ -0,0 +1,29 @@ +import notion from "../../notion.app.mjs"; +import base from "../common/base-page-builder.mjs"; + +export default { + ...base, + key: "notion-delete-block", + name: "Delete Block", + description: "Sets a Block object, including page blocks, to archived: true using the ID specified. [See the documentation](https://developers.notion.com/reference/delete-a-block)", + version: "0.0.1", + type: "action", + props: { + notion, + infoLabel: { + type: "alert", + alertType: "info", + content: "**Note:** In the Notion UI application, this moves the block to the \"Trash\" where it can still be accessed and restored.", + }, + blockId: { + type: "string", + label: "Block ID", + description: "Block ID retrieved from the **Retrieve Page Content** action", + }, + }, + async run({ $ }) { + const response = await this.notion.deleteBlock(this.blockId); + $.export("$summary", `Successfully deleted block with ID ${this.blockId}`); + return response; + }, +}; diff --git a/components/notion/actions/duplicate-page/duplicate-page.mjs b/components/notion/actions/duplicate-page/duplicate-page.mjs index 20253b9866c0e..008fbe604e949 100644 --- a/components/notion/actions/duplicate-page/duplicate-page.mjs +++ b/components/notion/actions/duplicate-page/duplicate-page.mjs @@ -1,13 +1,13 @@ +import utils from "../../common/utils.mjs"; import notion from "../../notion.app.mjs"; import base from "../common/base-page-builder.mjs"; -import utils from "../../common/utils.mjs"; export default { ...base, key: "notion-duplicate-page", name: "Duplicate Page", description: "Create a new page copied from an existing page block. [See the documentation](https://developers.notion.com/reference/post-page)", - version: "0.0.14", + version: "0.0.16", type: "action", props: { notion, diff --git a/components/notion/actions/list-all-users/list-all-users.mjs b/components/notion/actions/list-all-users/list-all-users.mjs new file mode 100644 index 0000000000000..058409303dfe1 --- /dev/null +++ b/components/notion/actions/list-all-users/list-all-users.mjs @@ -0,0 +1,23 @@ +import notion from "../../notion.app.mjs"; + +export default { + key: "notion-list-all-users", + name: "List All Users", + description: "Returns all users in the workspace. [See the documentation](https://developers.notion.com/reference/get-users)", + version: "0.0.1", + type: "action", + props: { + notion, + }, + async run({ $ }) { + const response = this.notion.paginate({ + fn: this.notion.getUsers, + }); + const users = []; + for await (const user of response) { + users.push(user); + } + $.export("$summary", `Successfully retrieved ${users.length} users`); + return users; + }, +}; diff --git a/components/notion/actions/list-file-uploads/list-file-uploads.mjs b/components/notion/actions/list-file-uploads/list-file-uploads.mjs new file mode 100644 index 0000000000000..133d77acd041c --- /dev/null +++ b/components/notion/actions/list-file-uploads/list-file-uploads.mjs @@ -0,0 +1,28 @@ +import notion from "../../notion.app.mjs"; +import base from "../common/base-page-builder.mjs"; + +export default { + ...base, + key: "notion-list-file-uploads", + name: "List File Uploads", + description: "Use this action to list file uploads. [See the documentation](https://developers.notion.com/reference/list-file-uploads)", + version: "0.0.1", + type: "action", + props: { + notion, + }, + async run({ $ }) { + const response = this.notion.paginate({ + fn: this.notion.listFileUploads, + }); + + const responseArray = []; + + for await (const item of response) { + responseArray.push(item); + } + + $.export("$summary", `Successfully retrieved ${responseArray.length} file uploads`); + return responseArray; + }, +}; diff --git a/components/notion/actions/query-database/query-database.mjs b/components/notion/actions/query-database/query-database.mjs index 485ca973a746c..a5b977b740f1b 100644 --- a/components/notion/actions/query-database/query-database.mjs +++ b/components/notion/actions/query-database/query-database.mjs @@ -1,11 +1,11 @@ -import notion from "../../notion.app.mjs"; import utils from "../../common/utils.mjs"; +import notion from "../../notion.app.mjs"; export default { key: "notion-query-database", name: "Query Database", description: "Query a database with a specified filter. [See the documentation](https://developers.notion.com/reference/post-database-query)", - version: "0.0.12", + version: "0.1.0", type: "action", props: { notion, @@ -20,12 +20,20 @@ export default { description: "The filter to apply, as a JSON-stringified object. [See the documentation for available filters](https://developers.notion.com/reference/post-database-query-filter). Example: `{ \"property\": \"Name\", \"title\": { \"contains\": \"title to search for\" } }`", type: "string", }, + sorts: { + label: "Sorts", + description: "The sort order for the query. [See the documentation for available sorts](https://developers.notion.com/reference/post-database-query-sort). Example: `[ { \"property\": \"Name\", \"direction\": \"ascending\" } ]`", + type: "string[]", + }, }, async run({ $ }) { - const { filter } = this; + const { + filter, sorts, + } = this; const response = await this.notion.queryDatabase(this.databaseId, { filter: utils.parseStringToJSON(filter), + sorts: utils.parseObject(sorts), }); const length = response?.results?.length; diff --git a/components/notion/actions/retrieve-block/retrieve-block.mjs b/components/notion/actions/retrieve-block/retrieve-block.mjs index 75b4eff23bca6..8b05ad5146082 100644 --- a/components/notion/actions/retrieve-block/retrieve-block.mjs +++ b/components/notion/actions/retrieve-block/retrieve-block.mjs @@ -4,7 +4,7 @@ export default { key: "notion-retrieve-block", name: "Retrieve Page Content", description: "Get page content as block objects or markdown. Blocks can be text, lists, media, a page, among others. [See the documentation](https://developers.notion.com/reference/retrieve-a-block)", - version: "0.2.2", + version: "0.2.4", type: "action", props: { notion, diff --git a/components/notion/actions/retrieve-database-content/retrieve-database-content.mjs b/components/notion/actions/retrieve-database-content/retrieve-database-content.mjs index f467afc3fd274..967e82788f05a 100644 --- a/components/notion/actions/retrieve-database-content/retrieve-database-content.mjs +++ b/components/notion/actions/retrieve-database-content/retrieve-database-content.mjs @@ -4,7 +4,7 @@ export default { key: "notion-retrieve-database-content", name: "Retrieve Database Content", description: "Get all content of a database. [See the documentation](https://developers.notion.com/reference/post-database-query)", - version: "0.0.6", + version: "0.0.8", type: "action", props: { notion, diff --git a/components/notion/actions/retrieve-database-schema/retrieve-database-schema.mjs b/components/notion/actions/retrieve-database-schema/retrieve-database-schema.mjs index 7b89670fab886..b188548f5e3e5 100644 --- a/components/notion/actions/retrieve-database-schema/retrieve-database-schema.mjs +++ b/components/notion/actions/retrieve-database-schema/retrieve-database-schema.mjs @@ -4,7 +4,7 @@ export default { key: "notion-retrieve-database-schema", name: "Retrieve Database Schema", description: "Get the property schema of a database in Notion. [See the documentation](https://developers.notion.com/reference/retrieve-a-database)", - version: "0.0.8", + version: "0.0.10", type: "action", props: { notion, diff --git a/components/notion/actions/retrieve-file-upload/retrieve-file-upload.mjs b/components/notion/actions/retrieve-file-upload/retrieve-file-upload.mjs new file mode 100644 index 0000000000000..90614ba8b120a --- /dev/null +++ b/components/notion/actions/retrieve-file-upload/retrieve-file-upload.mjs @@ -0,0 +1,28 @@ +import notion from "../../notion.app.mjs"; +import base from "../common/base-page-builder.mjs"; + +export default { + ...base, + key: "notion-retrieve-file-upload", + name: "Retrieve File Upload", + description: "Use this action to retrieve a file upload. [See the documentation](https://developers.notion.com/reference/retrieve-a-file-upload)", + version: "0.0.1", + type: "action", + props: { + notion, + fileUploadId: { + propDefinition: [ + notion, + "fileUploadId", + ], + }, + }, + async run({ $ }) { + const response = await this.notion.retrieveFileUpload({ + file_upload_id: this.fileUploadId, + }); + + $.export("$summary", `Successfully retrieved file upload with ID ${this.fileUploadId}`); + return response; + }, +}; diff --git a/components/notion/actions/retrieve-page-property-item/retrieve-page-property-item.mjs b/components/notion/actions/retrieve-page-property-item/retrieve-page-property-item.mjs index ccb9ed8fe4395..ee2ce6da66b97 100644 --- a/components/notion/actions/retrieve-page-property-item/retrieve-page-property-item.mjs +++ b/components/notion/actions/retrieve-page-property-item/retrieve-page-property-item.mjs @@ -4,7 +4,7 @@ export default { key: "notion-retrieve-page-property-item", name: "Retrieve Page Property Item", description: "Get a Property Item object for a selected page and property. [See the documentation](https://developers.notion.com/reference/retrieve-a-page-property)", - version: "0.0.7", + version: "0.0.9", type: "action", props: { notion, diff --git a/components/notion/actions/retrieve-page/retrieve-page.mjs b/components/notion/actions/retrieve-page/retrieve-page.mjs index fd9330b973e69..9b51d32e1e64e 100644 --- a/components/notion/actions/retrieve-page/retrieve-page.mjs +++ b/components/notion/actions/retrieve-page/retrieve-page.mjs @@ -4,7 +4,7 @@ export default { key: "notion-retrieve-page", name: "Retrieve Page Metadata", description: "Get details of a page. [See the documentation](https://developers.notion.com/reference/retrieve-a-page)", - version: "0.0.8", + version: "0.0.10", type: "action", props: { notion, diff --git a/components/notion/actions/retrieve-user/retrieve-user.mjs b/components/notion/actions/retrieve-user/retrieve-user.mjs new file mode 100644 index 0000000000000..af6836035361f --- /dev/null +++ b/components/notion/actions/retrieve-user/retrieve-user.mjs @@ -0,0 +1,23 @@ +import notion from "../../notion.app.mjs"; + +export default { + key: "notion-retrieve-user", + name: "Retrieve User", + description: "Returns a user using the ID specified. [See the documentation](https://developers.notion.com/reference/get-user)", + version: "0.0.1", + type: "action", + props: { + notion, + userId: { + propDefinition: [ + notion, + "userId", + ], + }, + }, + async run({ $ }) { + const response = await this.notion.getUser(this.userId); + $.export("$summary", `Successfully retrieved user with ID ${this.userId}`); + return response; + }, +}; diff --git a/components/notion/actions/search/search.mjs b/components/notion/actions/search/search.mjs index e9d6bb04cea7f..f1a02f940c942 100644 --- a/components/notion/actions/search/search.mjs +++ b/components/notion/actions/search/search.mjs @@ -5,7 +5,7 @@ export default { key: "notion-search", name: "Find Pages or Databases", description: "Searches for a page or database. [See the documentation](https://developers.notion.com/reference/post-search)", - version: "0.0.7", + version: "0.0.9", type: "action", props: { ...common.props, diff --git a/components/notion/actions/send-file-upload/send-file-upload.mjs b/components/notion/actions/send-file-upload/send-file-upload.mjs new file mode 100644 index 0000000000000..c5a892fc8fd21 --- /dev/null +++ b/components/notion/actions/send-file-upload/send-file-upload.mjs @@ -0,0 +1,62 @@ +import { getFileStreamAndMetadata } from "@pipedream/platform"; +import { Blob } from "buffer"; +import notion from "../../notion.app.mjs"; +import base from "../common/base-page-builder.mjs"; + +export default { + ...base, + key: "notion-send-file-upload", + name: "Send File Upload", + description: "Send a file upload. [See the documentation](https://developers.notion.com/reference/send-a-file-upload)", + version: "0.0.1", + type: "action", + props: { + notion, + fileUploadId: { + propDefinition: [ + notion, + "fileUploadId", + () => ({ + status: "pending", + }), + ], + }, + file: { + type: "string", + label: "Image File Path or URL", + description: "The image to process. Provide either a file URL or a path to a file in the `/tmp` directory (for example, `/tmp/myImage.jpg`).", + }, + syncDir: { + type: "dir", + accessMode: "read", + sync: true, + }, + }, + async run({ $ }) { + const { + stream, metadata, + } = await getFileStreamAndMetadata(this.file); + + const fileBinary = await new Promise((resolve, reject) => { + const chunks = []; + stream.on("data", (chunk) => chunks.push(chunk)); + stream.on("end", () => resolve(Buffer.concat(chunks))); + stream.on("error", reject); + }); + + const response = await this.notion.sendFileUpload({ + file_upload_id: this.fileUploadId, + file: { + data: new Blob([ + fileBinary, + ], { + type: metadata.contentType, + }), + filename: metadata.name, + }, + }); + + $.export("$summary", `Successfully created file upload with ID ${response.id}`); + return response; + }, +}; diff --git a/components/notion/actions/update-block/update-block.mjs b/components/notion/actions/update-block/update-block.mjs new file mode 100644 index 0000000000000..da88064e6e841 --- /dev/null +++ b/components/notion/actions/update-block/update-block.mjs @@ -0,0 +1,38 @@ +import utils from "../../common/utils.mjs"; +import notion from "../../notion.app.mjs"; +import base from "../common/base-page-builder.mjs"; + +export default { + ...base, + key: "notion-update-block", + name: "Update Child Block", + description: "Updates a child block object. [See the documentation](https://developers.notion.com/reference/update-a-block)", + version: "0.0.1", + type: "action", + props: { + notion, + blockId: { + type: "string", + label: "Block ID", + description: "Block ID retrieved from the **Retrieve Page Content** action", + }, + infoLabel: { + type: "alert", + alertType: "info", + content: "**Note:** The update replaces the entire value for a given field. If a field is omitted (ex: omitting checked when updating a to_do block), the value will not be changed.", + }, + content: { + type: "string", + label: "Content", + description: "The content of the block. **E.g. {\"code\": {\"rich_text\":[{\"type\":\"text\",\"text\":{\"content\":\"Updated content\"}}]}}** [See the documentation](https://developers.notion.com/reference/update-a-block)", + }, + }, + async run({ $ }) { + const response = await this.notion.updateBlock({ + block_id: this.blockId, + ...utils.parseObject(this.content), + }); + $.export("$summary", `Successfully updated block with ID ${this.blockId}`); + return response; + }, +}; diff --git a/components/notion/actions/update-database/update-database.mjs b/components/notion/actions/update-database/update-database.mjs new file mode 100644 index 0000000000000..17d16abcad626 --- /dev/null +++ b/components/notion/actions/update-database/update-database.mjs @@ -0,0 +1,79 @@ +import utils from "../../common/utils.mjs"; +import notion from "../../notion.app.mjs"; +import base from "../common/base-page-builder.mjs"; + +export default { + ...base, + key: "notion-update-database", + name: "Update Database", + description: "Update a database. [See the documentation](https://developers.notion.com/reference/update-a-database)", + version: "0.0.1", + type: "action", + props: { + notion, + databaseId: { + propDefinition: [ + notion, + "databaseId", + ], + reloadProps: true, + }, + title: { + type: "string", + label: "Title", + description: "Title of database as it appears in Notion. An array of [rich text objects](https://developers.notion.com/reference/rich-text).", + optional: true, + }, + description: { + type: "string", + label: "Description", + description: "An array of [rich text objects](https://developers.notion.com/reference/rich-text) that represents the description of the database that is displayed in the Notion UI. If omitted, then the database description remains unchanged.", + optional: true, + }, + properties: { + type: "object", + label: "Properties", + description: "The properties of a database to be changed in the request, in the form of a JSON object. If updating an existing property, then the keys are the names or IDs of the properties as they appear in Notion, and the values are [property schema objects](https://developers.notion.com/reference/rich-text). If adding a new property, then the key is the name of the new database property and the value is a [property schema object](https://developers.notion.com/reference/property-schema-object).", + optional: true, + }, + }, + async additionalProps(props) { + if (this.databaseId) { + const database = await this.notion.retrieveDatabase(this.databaseId); + + props.title.default = database.title.map((text) => text.text.content).join(" "); + props.description.default = database.description.map((text) => text.plain_text).join(" "); + props.properties.default = Object.entries(database.properties).reduce((acc, [ + key, + value, + ]) => { + acc[key] = JSON.stringify(value); + return acc; + }, {}); + return {}; + } + }, + async run({ $ }) { + const response = await this.notion.updateDatabase({ + database_id: this.databaseId, + title: [ + { + text: { + content: this.title, + }, + }, + ], + description: [ + { + text: { + content: this.description, + }, + }, + ], + properties: utils.parseObject(this.properties), + }); + + $.export("$summary", `Successfully updated database with ID ${response.id}`); + return response; + }, +}; diff --git a/components/notion/actions/update-page/update-page.mjs b/components/notion/actions/update-page/update-page.mjs index 5e810862b00d5..652a393a0b7eb 100644 --- a/components/notion/actions/update-page/update-page.mjs +++ b/components/notion/actions/update-page/update-page.mjs @@ -1,13 +1,13 @@ +import pick from "lodash-es/pick.js"; import notion from "../../notion.app.mjs"; import base from "../common/base-page-builder.mjs"; -import pick from "lodash-es/pick.js"; export default { ...base, key: "notion-update-page", name: "Update Page", description: "Update a page's property values. To append page content, use the *Append Block* action instead. [See the documentation](https://developers.notion.com/reference/patch-page)", - version: "1.1.7", + version: "1.1.9", type: "action", props: { notion, diff --git a/components/notion/common/utils.mjs b/components/notion/common/utils.mjs index 3f726e81dc095..358052ec01f3f 100644 --- a/components/notion/common/utils.mjs +++ b/components/notion/common/utils.mjs @@ -32,7 +32,7 @@ function parseArray(value) { function parseObject(obj) { if (!obj) { - return {}; + return null; } if (typeof obj === "string") { try { diff --git a/components/notion/notion.app.mjs b/components/notion/notion.app.mjs index 2ad068034c625..b831c907d8299 100644 --- a/components/notion/notion.app.mjs +++ b/components/notion/notion.app.mjs @@ -1,7 +1,7 @@ import notion from "@notionhq/client"; -import NOTION_META from "./common/notion-meta-selection.mjs"; import { ConfigurationError } from "@pipedream/platform"; import { NotionToMarkdown } from "notion-to-md"; +import NOTION_META from "./common/notion-meta-selection.mjs"; export default { type: "app", @@ -127,12 +127,12 @@ export default { description: "The page title (defaults to `Untitled`)", optional: true, }, - userIds: { - type: "string[]", - label: "Users", - description: "Select one or more users, or provide user IDs", + userId: { + type: "string", + label: "User ID", + description: "Select a user, or provide a user ID", async options() { - const users = await this.getUsers(); + const { results: users } = await this.getUsers(); return users.map((user) => ({ label: user.name, @@ -140,6 +140,34 @@ export default { })); }, }, + fileUploadId: { + type: "string", + label: "File Upload ID", + description: "The ID of the file upload to send.", + async options({ + prevContext, status, + }) { + const { + results, next_cursor: nextCursor, + } = await this.listFileUploads({ + status, + page_size: 100, + start_cursor: prevContext.nextPageParameters ?? undefined, + }); + + return { + options: results.map(({ + id: value, filename: label, + }) => ({ + label, + value, + })), + context: { + nextPageParameters: nextCursor, + }, + }; + }, + }, sortDirection: { type: "string", label: "Sort Direction", @@ -258,6 +286,35 @@ export default { database_id: databaseId, }); }, + async createDatabase(database) { + return this._getNotionClient().databases.create(database); + }, + async updateDatabase(database) { + return this._getNotionClient().databases.update(database); + }, + async createFileUpload(file) { + return this._getNotionClient().fileUploads.create(file); + }, + async listFileUploads(params = {}) { + return this._getNotionClient().fileUploads.list(params); + }, + async sendFileUpload(file) { + return this._getNotionClient().fileUploads.send(file); + }, + async completeFileUpload(file) { + return this._getNotionClient().fileUploads.complete(file); + }, + async retrieveFileUpload(params) { + return this._getNotionClient().fileUploads.retrieve(params); + }, + async updateBlock(block) { + return this._getNotionClient().blocks.update(block); + }, + async deleteBlock(blockId) { + return this._getNotionClient().blocks.delete({ + block_id: blockId, + }); + }, async createPage(page) { return this._getNotionClient().pages.create(page); }, @@ -352,10 +409,13 @@ export default { block_id: blockId, }); }, - async getUsers() { - const response = await this._getNotionClient().users.list(); - - return response.results; + async getUsers(opts = {}) { + return this._getNotionClient().users.list(opts); + }, + async getUser(userId) { + return this._getNotionClient().users.retrieve({ + user_id: userId, + }); }, async getPageAsMarkdown(pageId, shouldRetrieveChildren) { const notion = this._getNotionClient(); @@ -364,6 +424,7 @@ export default { notionClient: notion, config: { separateChildPage: true, + parseChildPages: shouldRetrieveChildren, }, }); const blocks = await n2m.pageToMarkdown(pageId); @@ -372,5 +433,36 @@ export default { ? output : output.parent; }, + async *paginate({ + fn, params = {}, maxResults = null, ...opts + }) { + let hasMore = false; + let count = 0; + let cursor = null; + + do { + params.start_cursor = cursor; + const { + results, + next_cursor: nextCursor, + has_more: hasMoreResults, + } = await fn({ + params, + ...opts, + }); + + for (const d of results) { + yield d; + + if (maxResults && ++count === maxResults) { + return count; + } + } + + hasMore = hasMoreResults; + cursor = nextCursor; + + } while (hasMore); + }, }, }; diff --git a/components/notion/package.json b/components/notion/package.json index b4335b5880bb0..e2487a63a8fa1 100644 --- a/components/notion/package.json +++ b/components/notion/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/notion", - "version": "0.7.1", + "version": "0.10.0", "description": "Pipedream Notion Components", "main": "notion.app.mjs", "keywords": [ @@ -10,8 +10,8 @@ "homepage": "https://pipedream.com/apps/notion", "author": "Pipedream (https://pipedream.com/)", "dependencies": { - "@notionhq/client": "^2.2.3", - "@pipedream/platform": "^3.0.3", + "@notionhq/client": "^4.0.1", + "@pipedream/platform": "^3.1.0", "@tryfabric/martian": "^1.2.4", "lodash-es": "^4.17.21", "notion-to-md": "3.1.8" diff --git a/components/notion/sources/common/base-webhook.mjs b/components/notion/sources/common/base-webhook.mjs new file mode 100644 index 0000000000000..5bd3cd1704fb5 --- /dev/null +++ b/components/notion/sources/common/base-webhook.mjs @@ -0,0 +1,58 @@ +import notion from "../../notion.app.mjs"; +import { + createHmac, timingSafeEqual, +} from "crypto"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + props: { + notion, + db: "$.service.db", + http: "$.interface.http", + info: { + type: "alert", + alertType: "info", + content: `1. Create this Pipedream source and copy the Source Endpoint URL. +2. In Notion, create a webhook subscription and paste the Source Endpoint URL as the webhook URL. See Notion's guide: https://developers.notion.com/reference/webhooks#step-1-creating-a-webhook-subscription +3. After adding the subscription in Notion, you'll be prompted to verify the webhook using a secret. Open the Source Logs tab in this Pipedream source to find the verification secret (token) and enter it in Notion to complete verification.`, + }, + }, + methods: { + _getToken() { + return this.db.get("token"); + }, + _setToken(token) { + this.db.set("token", token); + }, + verifyWebhook(token, body, headers) { + const calculatedSignature = `sha256=${createHmac("sha256", token).update(JSON.stringify(body)) + .digest("hex")}`; + return timingSafeEqual( + Buffer.from(calculatedSignature), + Buffer.from(headers["x-notion-signature"]), + ); + }, + processEvent() { + throw new ConfigurationError("processEvent must be implemented in the source"); + }, + }, + async run(event) { + const { + body, headers, + } = event; + if (!body) { + return; + } + const token = this._getToken(); + if (body.verification_token && !token) { + this._setToken(body.verification_token); + console.log(`Verification token: ${body.verification_token}. Enter this in your Notion webhook settings.`); + return; + } + if (!this.verifyWebhook(token, body, headers)) { + throw new Error("Invalid webhook signature"); + } + + await this.processEvent(body); + }, +}; diff --git a/components/notion/sources/new-comment-created/new-comment-created.mjs b/components/notion/sources/new-comment-created/new-comment-created.mjs index 207e7143afc73..a3eeb5bbd206a 100644 --- a/components/notion/sources/new-comment-created/new-comment-created.mjs +++ b/components/notion/sources/new-comment-created/new-comment-created.mjs @@ -5,7 +5,7 @@ export default { key: "notion-new-comment-created", name: "New Comment Created", description: "Emit new event when a new comment is created in a page or block. [See the documentation](https://developers.notion.com/reference/retrieve-a-comment)", - version: "0.0.4", + version: "0.0.6", type: "source", dedupe: "unique", props: { diff --git a/components/notion/sources/new-database/new-database.mjs b/components/notion/sources/new-database/new-database.mjs index c10dbd418dc8d..0fefa0b6f2eac 100644 --- a/components/notion/sources/new-database/new-database.mjs +++ b/components/notion/sources/new-database/new-database.mjs @@ -1,13 +1,13 @@ import base from "../common/base.mjs"; -import sampleEmit from "./test-event.mjs"; import constants from "../common/constants.mjs"; +import sampleEmit from "./test-event.mjs"; export default { ...base, key: "notion-new-database", name: "New Database Created", description: "Emit new event when a database is created. [See the documentation](https://developers.notion.com/reference/database)", - version: "0.0.11", + version: "0.0.13", type: "source", props: { ...base.props, diff --git a/components/notion/sources/new-page/new-page.mjs b/components/notion/sources/new-page/new-page.mjs index 6c6dc2cfbae27..25e590ddc8ffb 100644 --- a/components/notion/sources/new-page/new-page.mjs +++ b/components/notion/sources/new-page/new-page.mjs @@ -1,14 +1,14 @@ import notion from "../../notion.app.mjs"; -import sampleEmit from "./test-event.mjs"; import base from "../common/base.mjs"; import constants from "../common/constants.mjs"; +import sampleEmit from "./test-event.mjs"; export default { ...base, key: "notion-new-page", name: "New Page in Database", description: "Emit new event when a page is created in the selected database. [See the documentation](https://developers.notion.com/reference/page)", - version: "0.0.13", + version: "0.0.15", type: "source", props: { ...base.props, diff --git a/components/notion/sources/new-webhook-event-instant/new-webhook-event-instant.mjs b/components/notion/sources/new-webhook-event-instant/new-webhook-event-instant.mjs new file mode 100644 index 0000000000000..c4bf8ec8225cb --- /dev/null +++ b/components/notion/sources/new-webhook-event-instant/new-webhook-event-instant.mjs @@ -0,0 +1,27 @@ +import common from "../common/base-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "notion-new-webhook-event-instant", + name: "New Webhook Event (Instant)", + description: "Emit new event each time a webhook event is received. Webhook must be setup in Notion. [See the documentation](https://developers.notion.com/reference/webhooks#step-1-creating-a-webhook-subscription)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + _generateMeta(event) { + return { + id: event.id, + summary: `Webhook event: ${event.type}`, + ts: Date.now(), + }; + }, + processEvent(event) { + const meta = this._generateMeta(event); + this.$emit(event, meta); + }, + }, + sampleEmit, +}; diff --git a/components/notion/sources/new-webhook-event-instant/test-event.mjs b/components/notion/sources/new-webhook-event-instant/test-event.mjs new file mode 100644 index 0000000000000..73c6a1188a313 --- /dev/null +++ b/components/notion/sources/new-webhook-event-instant/test-event.mjs @@ -0,0 +1,31 @@ +export default { + "id": "555831bd-c1d6-400b-873e-42b10fb7f7e8", + "timestamp": "2025-08-27T20:51:19.356Z", + "workspace_id": "e0f732bd-e43f-4db3-b923-8a12ffdbfcce", + "workspace_name": "Notion", + "subscription_id": "25cd872b-594c-8181-982c-009998a96535", + "integration_id": "1ded872b-594c-804e-88d9-0037511f15c1", + "authors": [ + { + "id": "22da95d5-0f61-4b51-963d-63c4cf51ae19", + "type": "person" + } + ], + "attempt_number": 1, + "api_version": "2022-06-28", + "entity": { + "id": "10773a03-a25e-8061-8256-f26813633a59", + "type": "page" + }, + "type": "page.properties_updated", + "data": { + "parent": { + "id": "9813bf8c-a429-4d63-b73b-f476783ff448", + "type": "database", + "data_source_id": "dabbe504-b5ff-48f1-a1fa-d5fea5ef9ac4" + }, + "updated_properties": [ + "title" + ] + } +} \ No newline at end of file diff --git a/components/notion/sources/page-or-subpage-updated/page-or-subpage-updated.mjs b/components/notion/sources/page-or-subpage-updated/page-or-subpage-updated.mjs index ad97c51a88474..3ecf3158baeec 100644 --- a/components/notion/sources/page-or-subpage-updated/page-or-subpage-updated.mjs +++ b/components/notion/sources/page-or-subpage-updated/page-or-subpage-updated.mjs @@ -1,13 +1,13 @@ import base from "../common/base.mjs"; -import sampleEmit from "./test-event.mjs"; import constants from "../common/constants.mjs"; +import sampleEmit from "./test-event.mjs"; export default { ...base, key: "notion-page-or-subpage-updated", name: "Page or Subpage Updated", /* eslint-disable-line pipedream/source-name */ description: "Emit new event when the selected page or one of its sub-pages is updated. [See the documentation](https://developers.notion.com/reference/page)", - version: "0.0.9", + version: "0.0.11", type: "source", dedupe: "unique", props: { diff --git a/components/notion/sources/page-properties-updated-instant/page-properties-updated-instant.mjs b/components/notion/sources/page-properties-updated-instant/page-properties-updated-instant.mjs new file mode 100644 index 0000000000000..c0dfecb251f9e --- /dev/null +++ b/components/notion/sources/page-properties-updated-instant/page-properties-updated-instant.mjs @@ -0,0 +1,89 @@ +import common from "../common/base-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "notion-page-properties-updated-instant", + name: "Page Properties Updated (Instant)", + description: "Emit new event each time a page property is updated in a database. For use with Page Properties Updated event type. Webhook must be set up in Notion. [See the documentation](https://developers.notion.com/reference/webhooks#step-1-creating-a-webhook-subscription)", + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + ...common.props, + databaseId: { + propDefinition: [ + common.props.notion, + "databaseId", + ], + }, + properties: { + type: "string[]", + label: "Properties", + description: "Only emit events when one or more of the selected properties have changed", + optional: true, + async options() { + try { + const { properties } = await this.notion.retrieveDatabase(this.databaseId); + const propEntries = Object.entries(properties); + return propEntries.map((prop) => ({ + label: prop[1].name, + value: prop[1].id, + })); + } catch (error) { + console.log(error); + return []; + } + }, + }, + }, + methods: { + ...common.methods, + _generateMeta(page) { + const { id } = page; + const title = this.notion.extractPageTitle(page); + const ts = Date.now(); + return { + id: `${id}-${ts}`, + summary: `Page updated: ${title}`, + ts, + }; + }, + async processEvent(event) { + if (event?.type !== "page.properties_updated") { + console.log(`Skipping event type: ${event?.type}`); + return; + } + + if (event.data.parent.id !== this.databaseId) { + console.log(`Skipping event for database: ${event.data.parent.id}`); + return; + } + + const updatedProperties = event.data.updated_properties; + if (!updatedProperties?.length) { + return; + } + + let propertyHasChanged = false; + for (const propertyName of updatedProperties) { + if (!this.properties || this.properties.includes(propertyName)) { + propertyHasChanged = true; + } + } + + if (!propertyHasChanged) { + return; + } + + const page = await this.notion.retrievePage(event.entity.id); + + const meta = this._generateMeta(page); + this.$emit({ + ...event, + page, + }, meta); + }, + }, + sampleEmit, +}; diff --git a/components/notion/sources/page-properties-updated-instant/test-event.mjs b/components/notion/sources/page-properties-updated-instant/test-event.mjs new file mode 100644 index 0000000000000..8fc730221c4a4 --- /dev/null +++ b/components/notion/sources/page-properties-updated-instant/test-event.mjs @@ -0,0 +1,37 @@ +export default { + "id": "1782edd6-a853-4d4a-b02c-9c8c16f28e53", + "timestamp": "2024-12-05T23:57:05.379Z", + "workspace_id": "13950b26-c203-4f3b-b97d-93ec06319565", + "workspace_name": "Quantify Labs", + "subscription_id": "29d75c0d-5546-4414-8459-7b7a92f1fc4b", + "integration_id": "0ef2e755-4912-8096-91c1-00376a88a5ca", + "type": "page.properties_updated", + "authors": [ + { + "id": "c7c11cca-1d73-471d-9b6e-bdef51470190", + "type": "person" + } + ], + "accessible_by": [ + { + "id": "556a1abf-4f08-40c6-878a-75890d2a88ba", + "type": "person" + }, + { + "id": "1edc05f6-2702-81b5-8408-00279347f034", + "type": "bot" + } + ], + "attempt_number": 1, + "entity": { + "id": "153104cd-477e-809d-8dc4-ff2d96ae3090", + "type": "page" + }, + "data": { + "parent": { + "id": "13950b26-c203-4f3b-b97d-93ec06319565", + "type": "space" + }, + "updated_properties": ["XGe%40", "bDf%5B", "DbAu"] + } +} \ No newline at end of file diff --git a/components/notion/sources/updated-page-by-timestamp/test-event.mjs b/components/notion/sources/updated-page-by-timestamp/test-event.mjs new file mode 100644 index 0000000000000..a88c4999c8314 --- /dev/null +++ b/components/notion/sources/updated-page-by-timestamp/test-event.mjs @@ -0,0 +1,59 @@ +export default { + "object": "page", + "id": "15e73a03-a25e-811d-8ff0-e99f0561c344", + "created_time": "2024-12-16T22:15:00.000Z", + "last_edited_time": "2025-07-23T17:00:00.000Z", + "created_by": { + "object": "user", + "id": "a697c2ad-539d-4523-a9e8-66f855e6caef" + }, + "last_edited_by": { + "object": "user", + "id": "a697c2ad-539d-4523-a9e8-66f855e6caef" + }, + "cover": null, + "icon": null, + "parent": { + "type": "database_id", + "database_id": "9813bf8c-a429-4d63-b73b-f476783ff448" + }, + "archived": false, + "in_trash": false, + "properties": { + "Created": { + "id": "GsAx", + "type": "created_time", + "created_time": "2024-12-16T22:15:00.000Z" + }, + "Tags": { + "id": "h~%7Da", + "type": "multi_select", + "multi_select": [] + }, + "Name": { + "id": "title", + "type": "title", + "title": [ + { + "type": "text", + "text": { + "content": "TestPage", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "TestPage", + "href": null + } + ] + } + }, + "url": "https://www.notion.so/TestPage-15e73a03a25e811d8ff0e99f0561c344", + "public_url": "https://held-danger-051.notion.site/TestPage-15e73a03a25e811d8ff0e99f0561c344" +} \ No newline at end of file diff --git a/components/notion/sources/updated-page-by-timestamp/updated-page-by-timestamp.mjs b/components/notion/sources/updated-page-by-timestamp/updated-page-by-timestamp.mjs new file mode 100644 index 0000000000000..88c4a551a6e66 --- /dev/null +++ b/components/notion/sources/updated-page-by-timestamp/updated-page-by-timestamp.mjs @@ -0,0 +1,87 @@ +import notion from "../../notion.app.mjs"; +import base from "../common/base.mjs"; +import constants from "../common/constants.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...base, + key: "notion-updated-page-by-timestamp", + name: "New or Updated Page in Database (By Timestamp)", + description: "Emit new event when a page is created or updated in the selected database. [See the documentation](https://developers.notion.com/reference/page)", + version: "0.0.3", + type: "source", + dedupe: "unique", + props: { + ...base.props, + databaseId: { + propDefinition: [ + notion, + "databaseId", + ], + }, + includeNewPages: { + type: "boolean", + label: "Include New Pages", + description: "Set to `false` to emit events only for updates, not for new pages.", + default: true, + }, + }, + methods: { + ...base.methods, + _generateMeta(obj, summary) { + const { id } = obj; + const title = this.notion.extractPageTitle(obj); + const ts = Date.parse(obj.last_edited_time); + return { + id: `${id}-${ts}`, + summary: `${summary}: ${title}`, + ts, + }; + }, + _emitEvent(page, isNewPage = true) { + const meta = isNewPage + ? this._generateMeta(page, constants.summaries.PAGE_ADDED) + : this._generateMeta(page, constants.summaries.PAGE_UPDATED); + this.$emit(page, meta); + }, + }, + async run() { + const lastUpdatedTimestamp = this.getLastUpdatedTimestamp(); + let newLastUpdatedTimestamp = lastUpdatedTimestamp; + + const params = { + ...this.lastUpdatedSortParam(), + filter: { + timestamp: "last_edited_time", + last_edited_time: { + on_or_after: new Date(lastUpdatedTimestamp).toISOString(), + }, + }, + }; + + const pagesStream = this.notion.getPages(this.databaseId, params); + + for await (const page of pagesStream) { + if (lastUpdatedTimestamp > Date.parse(page.last_edited_time)) { + break; + } + + newLastUpdatedTimestamp = Math.max( + newLastUpdatedTimestamp, + Date.parse(page.last_edited_time), + ); + + const isNewPage = page.last_edited_time === page.created_time; + + if (isNewPage && !this.includeNewPages) { + console.log(`Ignoring new page: ${page.id}`); + continue; + } + + this._emitEvent(page, isNewPage); + } + + this.setLastUpdatedTimestamp(newLastUpdatedTimestamp); + }, + sampleEmit, +}; diff --git a/components/notion/sources/updated-page-id/updated-page-id.mjs b/components/notion/sources/updated-page-id/updated-page-id.mjs index 1f8680827da86..a620aa922576d 100644 --- a/components/notion/sources/updated-page-id/updated-page-id.mjs +++ b/components/notion/sources/updated-page-id/updated-page-id.mjs @@ -7,7 +7,7 @@ export default { key: "notion-updated-page-id", name: "Page Updated", /* eslint-disable-line pipedream/source-name */ description: "Emit new event when a selected page is updated. [See the documentation](https://developers.notion.com/reference/page)", - version: "0.0.8", + version: "0.0.10", type: "source", dedupe: "unique", props: { diff --git a/components/notion/sources/updated-page/updated-page.mjs b/components/notion/sources/updated-page/updated-page.mjs index 668fdbc4ff220..e3382c44ad4fe 100644 --- a/components/notion/sources/updated-page/updated-page.mjs +++ b/components/notion/sources/updated-page/updated-page.mjs @@ -1,15 +1,15 @@ +import zlib from "zlib"; import notion from "../../notion.app.mjs"; -import sampleEmit from "./test-event.mjs"; import base from "../common/base.mjs"; import constants from "../common/constants.mjs"; -import zlib from "zlib"; +import sampleEmit from "./test-event.mjs"; export default { ...base, key: "notion-updated-page", - name: "New or Updated Page in Database", /* eslint-disable-line pipedream/source-name */ + name: "New or Updated Page in Database (By Property)", description: "Emit new event when a page is created or updated in the selected database. [See the documentation](https://developers.notion.com/reference/page)", - version: "0.1.7", + version: "0.1.11", type: "source", dedupe: "unique", props: { @@ -166,6 +166,10 @@ export default { break; } + // Check if this is a new page first + const pageExistsInDB = propertyValues[page.id] != null; + isNewPage = !pageExistsInDB; + for (const propertyName of propertiesToCheck) { const previousValue = structuredClone(propertyValues[page.id]?.[propertyName]); // value used to compare and to save to this.db @@ -173,7 +177,6 @@ export default { // (unmodified) value that should be emitted const currentValueToEmit = page.properties[propertyName]; - const pageExistsInDB = propertyValues[page.id] != null; const propertyChanged = JSON.stringify(previousValue) !== JSON.stringify(currentValueToSave); @@ -191,25 +194,28 @@ export default { } if (!pageExistsInDB) { - isNewPage = true; - propertyHasChanged = true; - propertyValues[page.id] = { - [propertyName]: currentValueToSave, - }; - changes.push({ - property: propertyName, - previousValue, - currentValue: currentValueToEmit, - }); - } - } + // For new pages, always track the properties + if (!propertyValues[page.id]) { + propertyValues[page.id] = {}; + } + propertyValues[page.id][propertyName] = currentValueToSave; - if (isNewPage && !this.includeNewPages) { - console.log(`Ignoring new page: ${page.id}`); - continue; + // Only mark as changed (to emit event) if includeNewPages is true + if (this.includeNewPages) { + propertyHasChanged = true; + changes.push({ + property: propertyName, + previousValue, + currentValue: currentValueToEmit, + }); + } + } } - if (propertyHasChanged) { + // Only emit events if: + // 1. It's an existing page with changes, OR + // 2. It's a new page and includeNewPages is true + if (propertyHasChanged && (!isNewPage || this.includeNewPages)) { this._emitEvent(page, changes, isNewPage); } } diff --git a/components/nozbe_teams/.gitignore b/components/nozbe_teams/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/nozbe_teams/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/nozbe_teams/app/nozbe_teams.app.ts b/components/nozbe_teams/app/nozbe_teams.app.ts deleted file mode 100644 index ac4561edfd716..0000000000000 --- a/components/nozbe_teams/app/nozbe_teams.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "nozbe_teams", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/nozbe_teams/nozbe_teams.app.mjs b/components/nozbe_teams/nozbe_teams.app.mjs new file mode 100644 index 0000000000000..a9b63733f14f9 --- /dev/null +++ b/components/nozbe_teams/nozbe_teams.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "nozbe_teams", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/nozbe_teams/package.json b/components/nozbe_teams/package.json index 045b0455dd708..e7b16c181fde8 100644 --- a/components/nozbe_teams/package.json +++ b/components/nozbe_teams/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/nozbe_teams", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Nozbe Teams Components", - "main": "dist/app/nozbe_teams.app.mjs", + "main": "nozbe_teams.app.mjs", "keywords": [ "pipedream", "nozbe_teams" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/nozbe_teams", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/nusii_proposals/.gitignore b/components/nusii_proposals/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/nusii_proposals/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/nusii_proposals/app/nusii_proposals.app.ts b/components/nusii_proposals/app/nusii_proposals.app.ts deleted file mode 100644 index d3af666fefe12..0000000000000 --- a/components/nusii_proposals/app/nusii_proposals.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "nusii_proposals", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/nusii_proposals/nusii_proposals.app.mjs b/components/nusii_proposals/nusii_proposals.app.mjs new file mode 100644 index 0000000000000..fa4932dc646a9 --- /dev/null +++ b/components/nusii_proposals/nusii_proposals.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "nusii_proposals", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/nusii_proposals/package.json b/components/nusii_proposals/package.json index 17e2c92451157..17da32e99188a 100644 --- a/components/nusii_proposals/package.json +++ b/components/nusii_proposals/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/nusii_proposals", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Nusii Proposals Components", - "main": "dist/app/nusii_proposals.app.mjs", + "main": "nusii_proposals.app.mjs", "keywords": [ "pipedream", "nusii_proposals" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/nusii_proposals", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/nutrient_document_web_services_api/nutrient_document_web_services_api.app.mjs b/components/nutrient_document_web_services_api/nutrient_document_web_services_api.app.mjs index 464201bc6638a..994ac5c9f412e 100644 --- a/components/nutrient_document_web_services_api/nutrient_document_web_services_api.app.mjs +++ b/components/nutrient_document_web_services_api/nutrient_document_web_services_api.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/oauth_app_demo/.gitignore b/components/oauth_app_demo/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/oauth_app_demo/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/oauth_app_demo/app/oauth_app_demo.app.ts b/components/oauth_app_demo/app/oauth_app_demo.app.ts deleted file mode 100644 index 7258d44893246..0000000000000 --- a/components/oauth_app_demo/app/oauth_app_demo.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "oauth_app_demo", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/oauth_app_demo/oauth_app_demo.app.mjs b/components/oauth_app_demo/oauth_app_demo.app.mjs new file mode 100644 index 0000000000000..b98174ac3770f --- /dev/null +++ b/components/oauth_app_demo/oauth_app_demo.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "oauth_app_demo", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/oauth_app_demo/package.json b/components/oauth_app_demo/package.json index f00ea0d13241a..ff92e781a3c9d 100644 --- a/components/oauth_app_demo/package.json +++ b/components/oauth_app_demo/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/oauth_app_demo", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream OAuth App Demo Components", - "main": "dist/app/oauth_app_demo.app.mjs", + "main": "oauth_app_demo.app.mjs", "keywords": [ "pipedream", "oauth_app_demo" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/oauth_app_demo", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/oauth_app_demo_1/.gitignore b/components/oauth_app_demo_1/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/oauth_app_demo_1/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/oauth_app_demo_1/app/oauth_app_demo_1.app.ts b/components/oauth_app_demo_1/app/oauth_app_demo_1.app.ts deleted file mode 100644 index 723e39084a2e5..0000000000000 --- a/components/oauth_app_demo_1/app/oauth_app_demo_1.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "oauth_app_demo_1", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/oauth_app_demo_1/oauth_app_demo_1.app.mjs b/components/oauth_app_demo_1/oauth_app_demo_1.app.mjs new file mode 100644 index 0000000000000..7f12b71417aef --- /dev/null +++ b/components/oauth_app_demo_1/oauth_app_demo_1.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "oauth_app_demo_1", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/oauth_app_demo_1/package.json b/components/oauth_app_demo_1/package.json index b4847e3cd1f8a..d60d106f273c6 100644 --- a/components/oauth_app_demo_1/package.json +++ b/components/oauth_app_demo_1/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/oauth_app_demo_1", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream OAuth App Demo 1 Components", - "main": "dist/app/oauth_app_demo_1.app.mjs", + "main": "oauth_app_demo_1.app.mjs", "keywords": [ "pipedream", "oauth_app_demo_1" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/oauth_app_demo_1", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/octopus_deploy/.gitignore b/components/octopus_deploy/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/octopus_deploy/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/octopus_deploy/app/octopus_deploy.app.ts b/components/octopus_deploy/app/octopus_deploy.app.ts deleted file mode 100644 index 07f5ccf43358b..0000000000000 --- a/components/octopus_deploy/app/octopus_deploy.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "octopus_deploy", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/octopus_deploy/octopus_deploy.app.mjs b/components/octopus_deploy/octopus_deploy.app.mjs new file mode 100644 index 0000000000000..d6b1b3c90ffee --- /dev/null +++ b/components/octopus_deploy/octopus_deploy.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "octopus_deploy", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/octopus_deploy/package.json b/components/octopus_deploy/package.json index 05cbc6d0f3597..d50b9ae9912f8 100644 --- a/components/octopus_deploy/package.json +++ b/components/octopus_deploy/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/octopus_deploy", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Octopus Deploy Components", - "main": "dist/app/octopus_deploy.app.mjs", + "main": "octopus_deploy.app.mjs", "keywords": [ "pipedream", "octopus_deploy" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/octopus_deploy", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/oksign/.gitignore b/components/oksign/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/oksign/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/oksign/app/oksign.app.ts b/components/oksign/app/oksign.app.ts deleted file mode 100644 index 4e9ca47ef31f4..0000000000000 --- a/components/oksign/app/oksign.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "oksign", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/oksign/oksign.app.mjs b/components/oksign/oksign.app.mjs new file mode 100644 index 0000000000000..d73fd7b77be4f --- /dev/null +++ b/components/oksign/oksign.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "oksign", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/oksign/package.json b/components/oksign/package.json index 7544e8d19680f..134ced017f171 100644 --- a/components/oksign/package.json +++ b/components/oksign/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/oksign", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream OKSign Components", - "main": "dist/app/oksign.app.mjs", + "main": "oksign.app.mjs", "keywords": [ "pipedream", "oksign" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/oksign", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/omnivore/package.json b/components/omnivore/package.json index f9b3fb93679cb..f38e66a9c7bf4 100644 --- a/components/omnivore/package.json +++ b/components/omnivore/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/omnivore", - "version": "0.2.0", + "version": "0.2.1", "description": "Pipedream Omnivore Components", "main": "omnivore.app.mjs", "keywords": [ @@ -10,8 +10,9 @@ "homepage": "https://pipedream.com/apps/omnivore", "author": "Pipedream (https://pipedream.com/)", "dependencies": { - "@pipedream/platform": "^1.6.0", - "uuid": "^9.0.1" + "@pipedream/platform": "^3.1.0", + "uuid": "^9.0.1", + "graphql-request": "^6.0.0" }, "publishConfig": { "access": "public" diff --git a/components/one_ai/package.json b/components/one_ai/package.json index cb812d68a0a00..3c84ea21f8218 100644 --- a/components/one_ai/package.json +++ b/components/one_ai/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/one_ai", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream One AI Components", "main": "one_ai.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/onelogin/actions/create-user/create-user.mjs b/components/onelogin/actions/create-user/create-user.mjs new file mode 100644 index 0000000000000..7d6acd63cabec --- /dev/null +++ b/components/onelogin/actions/create-user/create-user.mjs @@ -0,0 +1,280 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { parseObject } from "../../common/utils.mjs"; +import onelogin from "../../onelogin.app.mjs"; + +export default { + key: "onelogin-create-user", + name: "Create User", + description: "Create a new user in OneLogin with details. [See the documentation](https://developers.onelogin.com/api-docs/2/users/create-user)", + version: "0.0.1", + type: "action", + props: { + onelogin, + username: { + propDefinition: [ + onelogin, + "username", + ], + optional: true, + }, + email: { + propDefinition: [ + onelogin, + "email", + ], + optional: true, + }, + firstname: { + propDefinition: [ + onelogin, + "firstname", + ], + optional: true, + }, + lastname: { + propDefinition: [ + onelogin, + "lastname", + ], + optional: true, + }, + password: { + propDefinition: [ + onelogin, + "password", + ], + optional: true, + }, + passwordConfirmation: { + propDefinition: [ + onelogin, + "passwordConfirmation", + ], + optional: true, + }, + passwordAlgorithm: { + propDefinition: [ + onelogin, + "passwordAlgorithm", + ], + optional: true, + }, + salt: { + propDefinition: [ + onelogin, + "salt", + ], + optional: true, + }, + title: { + propDefinition: [ + onelogin, + "title", + ], + optional: true, + }, + department: { + propDefinition: [ + onelogin, + "department", + ], + optional: true, + }, + company: { + propDefinition: [ + onelogin, + "company", + ], + optional: true, + }, + comment: { + propDefinition: [ + onelogin, + "comment", + ], + optional: true, + }, + groupId: { + propDefinition: [ + onelogin, + "groupId", + ], + optional: true, + }, + roleIds: { + propDefinition: [ + onelogin, + "roleIds", + ], + optional: true, + }, + phone: { + propDefinition: [ + onelogin, + "phone", + ], + optional: true, + }, + state: { + propDefinition: [ + onelogin, + "state", + ], + optional: true, + }, + status: { + propDefinition: [ + onelogin, + "status", + ], + optional: true, + }, + directoryId: { + propDefinition: [ + onelogin, + "directoryId", + ], + optional: true, + }, + trustedIdpId: { + propDefinition: [ + onelogin, + "trustedIdpId", + ], + optional: true, + }, + managerUserId: { + propDefinition: [ + onelogin, + "userId", + ], + label: "Manager User ID", + description: "The OneLogin User ID for the user's manager", + optional: true, + }, + samaccountname: { + propDefinition: [ + onelogin, + "samaccountname", + ], + optional: true, + }, + memberOf: { + propDefinition: [ + onelogin, + "memberOf", + ], + optional: true, + }, + userPrincipalName: { + propDefinition: [ + onelogin, + "userPrincipalName", + ], + optional: true, + }, + distinguishedName: { + propDefinition: [ + onelogin, + "distinguishedName", + ], + optional: true, + }, + externalId: { + propDefinition: [ + onelogin, + "externalId", + ], + optional: true, + }, + openidName: { + propDefinition: [ + onelogin, + "openidName", + ], + optional: true, + }, + invalidLoginAttempts: { + propDefinition: [ + onelogin, + "invalidLoginAttempts", + ], + optional: true, + }, + preferredLocaleCode: { + propDefinition: [ + onelogin, + "preferredLocaleCode", + ], + optional: true, + }, + customAttributes: { + propDefinition: [ + onelogin, + "customAttributes", + ], + optional: true, + }, + mappings: { + propDefinition: [ + onelogin, + "mappings", + ], + optional: true, + }, + validatePolicy: { + propDefinition: [ + onelogin, + "validatePolicy", + ], + optional: true, + }, + }, + async run({ $ }) { + if (!this.email && !this.username) { + throw new ConfigurationError("You must provide at least `Email` or `Username` property."); + } + + const response = await this.onelogin.createUser({ + $, + data: { + email: this.email, + username: this.username, + firstname: this.firstname, + lastname: this.lastname, + password: this.password, + password_confirmation: this.passwordConfirmation, + password_algorithm: this.passwordAlgorithm, + salt: this.salt, + title: this.title, + department: this.department, + company: this.company, + comment: this.comment, + group_id: this.groupId, + role_ids: parseObject(this.roleIds), + phone: this.phone, + state: this.state && parseInt(this.state), + status: this.status && parseInt(this.status), + directory_id: this.directoryId, + trusted_idp_id: this.trustedIdpId, + manager_user_id: this.managerUserId, + samaccountname: this.samaccountname, + member_of: this.memberOf, + userprincipalname: this.userPrincipalName, + distinguished_name: this.distinguishedName, + external_id: this.externalId, + openid_name: this.openidName, + invalid_login_attempts: this.invalidLoginAttempts, + preferred_locale_code: this.preferredLocaleCode, + custom_attributes: this.customAttributes, + }, + params: { + mappings: this.mappings, + validate_policy: this.validatePolicy, + }, + }); + + $.export("$summary", `Successfully created user with ID: ${response.id}`); + return response; + }, +}; diff --git a/components/onelogin/actions/revoke-user-sessions/revoke-user-sessions.mjs b/components/onelogin/actions/revoke-user-sessions/revoke-user-sessions.mjs new file mode 100644 index 0000000000000..d05e2503eabee --- /dev/null +++ b/components/onelogin/actions/revoke-user-sessions/revoke-user-sessions.mjs @@ -0,0 +1,30 @@ +import onelogin from "../../onelogin.app.mjs"; + +export default { + key: "onelogin-revoke-user-sessions", + name: "Revoke User Sessions", + description: "Revoke all active sessions for a specified user in OneLogin. [See the documentation](https://developers.onelogin.com/api-docs/2/users/update-user)", + version: "0.0.1", + type: "action", + props: { + onelogin, + userId: { + propDefinition: [ + onelogin, + "userId", + ], + }, + }, + async run({ $ }) { + const response = await this.onelogin.updateUser({ + $, + userId: this.userId, + data: { + status: 0, + }, + }); + + $.export("$summary", `Successfully revoked all sessions for user with ID: ${this.userId}`); + return response; + }, +}; diff --git a/components/onelogin/actions/update-user/update-user.mjs b/components/onelogin/actions/update-user/update-user.mjs new file mode 100644 index 0000000000000..41e6be016d6f8 --- /dev/null +++ b/components/onelogin/actions/update-user/update-user.mjs @@ -0,0 +1,284 @@ +import { parseObject } from "../../common/utils.mjs"; +import onelogin from "../../onelogin.app.mjs"; + +export default { + key: "onelogin-update-user", + name: "Update User", + description: "Update an existing user's details in OneLogin. [See the documentation](https://developers.onelogin.com/api-docs/2/users/update-user)", + version: "0.0.1", + type: "action", + props: { + onelogin, + userId: { + propDefinition: [ + onelogin, + "userId", + ], + }, + username: { + propDefinition: [ + onelogin, + "username", + ], + description: "The user's username", + optional: true, + }, + email: { + propDefinition: [ + onelogin, + "email", + ], + description: "The user's email address", + optional: true, + }, + firstname: { + propDefinition: [ + onelogin, + "firstname", + ], + optional: true, + }, + lastname: { + propDefinition: [ + onelogin, + "lastname", + ], + optional: true, + }, + password: { + propDefinition: [ + onelogin, + "password", + ], + optional: true, + }, + passwordConfirmation: { + propDefinition: [ + onelogin, + "passwordConfirmation", + ], + optional: true, + }, + passwordAlgorithm: { + propDefinition: [ + onelogin, + "passwordAlgorithm", + ], + optional: true, + }, + salt: { + propDefinition: [ + onelogin, + "salt", + ], + optional: true, + }, + title: { + propDefinition: [ + onelogin, + "title", + ], + optional: true, + }, + department: { + propDefinition: [ + onelogin, + "department", + ], + optional: true, + }, + company: { + propDefinition: [ + onelogin, + "company", + ], + optional: true, + }, + comment: { + propDefinition: [ + onelogin, + "comment", + ], + optional: true, + }, + groupId: { + propDefinition: [ + onelogin, + "groupId", + ], + optional: true, + }, + roleIds: { + propDefinition: [ + onelogin, + "roleIds", + ], + optional: true, + }, + phone: { + propDefinition: [ + onelogin, + "phone", + ], + optional: true, + }, + state: { + propDefinition: [ + onelogin, + "state", + ], + optional: true, + }, + status: { + propDefinition: [ + onelogin, + "status", + ], + optional: true, + }, + directoryId: { + propDefinition: [ + onelogin, + "directoryId", + ], + optional: true, + }, + trustedIdpId: { + propDefinition: [ + onelogin, + "trustedIdpId", + ], + optional: true, + }, + managerUserId: { + propDefinition: [ + onelogin, + "userId", + ], + label: "Manager User ID", + description: "The OneLogin User ID for the user's manager", + optional: true, + }, + samaccountname: { + propDefinition: [ + onelogin, + "samaccountname", + ], + optional: true, + }, + memberOf: { + propDefinition: [ + onelogin, + "memberOf", + ], + optional: true, + }, + userPrincipalName: { + propDefinition: [ + onelogin, + "userPrincipalName", + ], + optional: true, + }, + distinguishedName: { + propDefinition: [ + onelogin, + "distinguishedName", + ], + optional: true, + }, + externalId: { + propDefinition: [ + onelogin, + "externalId", + ], + optional: true, + }, + openidName: { + propDefinition: [ + onelogin, + "openidName", + ], + optional: true, + }, + invalidLoginAttempts: { + propDefinition: [ + onelogin, + "invalidLoginAttempts", + ], + optional: true, + }, + preferredLocaleCode: { + propDefinition: [ + onelogin, + "preferredLocaleCode", + ], + optional: true, + }, + customAttributes: { + propDefinition: [ + onelogin, + "customAttributes", + ], + optional: true, + }, + mappings: { + propDefinition: [ + onelogin, + "mappings", + ], + optional: true, + }, + validatePolicy: { + propDefinition: [ + onelogin, + "validatePolicy", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.onelogin.updateUser({ + $, + userId: this.userId, + data: { + email: this.email, + username: this.username, + firstname: this.firstname, + lastname: this.lastname, + password: this.password, + password_confirmation: this.passwordConfirmation, + password_algorithm: this.passwordAlgorithm, + salt: this.salt, + title: this.title, + department: this.department, + company: this.company, + comment: this.comment, + group_id: this.groupId, + role_ids: parseObject(this.roleIds), + phone: this.phone, + state: this.state && parseInt(this.state), + status: this.status && parseInt(this.status), + directory_id: this.directoryId, + trusted_idp_id: this.trustedIdpId, + manager_user_id: this.managerUserId, + samaccountname: this.samaccountname, + member_of: this.memberOf, + userprincipalname: this.userPrincipalName, + distinguished_name: this.distinguishedName, + external_id: this.externalId, + openid_name: this.openidName, + invalid_login_attempts: this.invalidLoginAttempts, + preferred_locale_code: this.preferredLocaleCode, + custom_attributes: this.customAttributes, + }, + params: { + mappings: this.mappings, + validate_policy: this.validatePolicy, + }, + }); + + $.export("$summary", `Successfully updated user with ID: ${this.userId}`); + return response; + }, +}; diff --git a/components/onelogin/common/constants.mjs b/components/onelogin/common/constants.mjs new file mode 100644 index 0000000000000..619c41bb003b8 --- /dev/null +++ b/components/onelogin/common/constants.mjs @@ -0,0 +1,114 @@ +export const MAPPINGS_OPTIONS = [ + { + label: "Async - Mappings run after the API returns a response", + value: "async", + }, + { + label: "Sync - Mappings run before the API returns a response", + value: "sync", + }, + { + label: "Disabled - Mappings don't run for this user", + value: "disabled", + }, +]; + +export const PASSWORD_ALGORITHM_OPTIONS = [ + "salt+sha256", + "sha256+salt", + "bcrypt", +]; + +export const STATE_OPTIONS = [ + { + label: "Unapproved", + value: "0", + }, + { + label: "Approved", + value: "1", + }, + { + label: "Rejected", + value: "2", + }, + { + label: "Unlicensed", + value: "3", + }, +]; + +export const STATUS_OPTIONS = [ + { + label: "Unactivated", + value: "0", + }, + { + label: "Active", + value: "1", + }, + { + label: "Suspended", + value: "2", + }, + { + label: "Locked", + value: "3", + }, + { + label: "Password Expired", + value: "4", + }, + { + label: "Awaiting Password Reset", + value: "5", + }, + { + label: "Password Pending", + value: "7", + }, + { + label: "Security Questions Required", + value: "8", + }, +]; + +export const EVENT_TYPES = { + USER_CREATED: 1, + LOGIN_ATTEMPT: 2, + DIRECTORY_SYNC: 3, +}; + +export const LOGIN_STATUS_OPTIONS = [ + { + label: "All", + value: "", + }, + { + label: "Successful", + value: "success", + }, + { + label: "Failed", + value: "failed", + }, +]; + +export const SYNC_STATUS_OPTIONS = [ + { + label: "All", + value: "", + }, + { + label: "Success", + value: "success", + }, + { + label: "Failed", + value: "failed", + }, + { + label: "In Progress", + value: "in_progress", + }, +]; diff --git a/components/onelogin/common/utils.mjs b/components/onelogin/common/utils.mjs new file mode 100644 index 0000000000000..94c2fdf11f26e --- /dev/null +++ b/components/onelogin/common/utils.mjs @@ -0,0 +1,30 @@ +export const parseObject = (obj) => { + if (!obj) return undefined; + + if (Array.isArray(obj)) { + return obj.map((item) => { + if (typeof item === "string") { + try { + return JSON.parse(item); + } catch (e) { + return item; + } + } + return item; + }); + } + if (typeof obj === "string") { + try { + return JSON.parse(obj); + } catch (e) { + return obj; + } + } + return obj; +}; + +export const snakeCaseToTitleCase = (s) => + s.toLowerCase() + .replace(/^_*(.)|_+(.)/g, (s, c, d) => c + ? c.toUpperCase() + : " " + d.toUpperCase()); diff --git a/components/onelogin/onelogin.app.mjs b/components/onelogin/onelogin.app.mjs index bc625b9d09792..009ac7d8bff1e 100644 --- a/components/onelogin/onelogin.app.mjs +++ b/components/onelogin/onelogin.app.mjs @@ -1,11 +1,342 @@ +import { axios } from "@pipedream/platform"; +import { + MAPPINGS_OPTIONS, + PASSWORD_ALGORITHM_OPTIONS, + STATE_OPTIONS, + STATUS_OPTIONS, +} from "./common/constants.mjs"; +import { snakeCaseToTitleCase } from "./common/utils.mjs"; + export default { type: "app", app: "onelogin", - propDefinitions: {}, + propDefinitions: { + groupId: { + type: "integer", + label: "Group ID", + description: "The ID of the Group in OneLogin that the user will be assigned to", + async options({ prevContext }) { + const { + data, pagination, + } = await this.listGroups({ + params: { + after_cursor: prevContext?.nextCursor, + }, + }); + + return { + options: data.map(({ + id: value, name: label, + }) => ({ + label, + value, + })), + context: { + nextCursor: pagination?.after_cursor, + }, + }; + }, + }, + roleIds: { + type: "integer[]", + label: "Role IDs", + description: "A list of OneLogin Role IDs the user will be assigned to", + async options({ prevContext }) { + const { + data, pagination, + } = await this.listRoles({ + params: { + after_cursor: prevContext?.nextCursor, + }, + }); + + return { + options: data.map(({ + id: value, name: label, + }) => ({ + label, + value, + })), + context: { + nextCursor: pagination?.after_cursor, + }, + }; + }, + }, + userId: { + type: "string", + label: "User ID", + description: "The ID of the user", + async options({ page }) { + const data = await this.listUsers({ + params: { + page: page + 1, + }, + }); + + return data.map(({ + id: value, username, email, + }) => ({ + label: `${username || email}`, + value, + })); + }, + }, + eventType: { + type: "string", + label: "Event Type", + description: "The type of event to emit", + async options({ page }) { + const { data } = await this.listEventTypes({ + params: { + page, + }, + }); + + return data.map(({ + id: value, name, description, + }) => ({ + label: `${snakeCaseToTitleCase(name)}: ${description}`, + value, + })); + }, + }, + username: { + type: "string", + label: "Username", + description: "The user's username (required if email is not provided)", + }, + email: { + type: "string", + label: "Email", + description: "The user's email address (required if username is not provided)", + }, + firstname: { + type: "string", + label: "First Name", + description: "The user's first name", + }, + lastname: { + type: "string", + label: "Last Name", + description: "The user's last name", + }, + password: { + type: "string", + label: "Password", + description: "The password to set for the user", + secret: true, + }, + passwordConfirmation: { + type: "string", + label: "Password Confirmation", + description: "Required if the password is being set", + secret: true, + }, + passwordAlgorithm: { + type: "string", + label: "Password Algorithm", + description: "Use this when importing a password that's already hashed. [See the documentation](https://developers.onelogin.com/api-docs/2/users/create-user) for further information", + options: PASSWORD_ALGORITHM_OPTIONS, + }, + salt: { + type: "string", + label: "Salt", + description: "The salt value used with the `Password Algorithm`", + }, + title: { + type: "string", + label: "Title", + description: "The user's job title", + }, + department: { + type: "string", + label: "Department", + description: "The user's department", + }, + company: { + type: "string", + label: "Company", + description: "The user's company", + }, + comment: { + type: "string", + label: "Comment", + description: "Free text related to the user", + }, + phone: { + type: "string", + label: "Phone", + description: "The [E.164](https://en.wikipedia.org/wiki/E.164) format phone number for a user", + }, + state: { + type: "string", + label: "State", + description: "The user's state", + options: STATE_OPTIONS, + }, + status: { + type: "string", + label: "Status", + description: "The user's status", + options: STATUS_OPTIONS, + }, + directoryId: { + type: "integer", + label: "Directory ID", + description: "The ID of the OneLogin Directory the user will be assigned to", + }, + trustedIdpId: { + type: "integer", + label: "Trusted IDP ID", + description: "The ID of the OneLogin Trusted IDP the user will be assigned to", + }, + samaccountname: { + type: "string", + label: "SAM Account Name", + description: "The user's Active Directory username", + }, + memberOf: { + type: "string", + label: "Member Of", + description: "The user's directory membership", + }, + userPrincipalName: { + type: "string", + label: "User Principal Name", + description: "The principle name of the user", + }, + distinguishedName: { + type: "string", + label: "Distinguished Name", + description: "The distinguished name of the user", + }, + externalId: { + type: "string", + label: "External ID", + description: "The ID of the user in an external directory", + }, + openidName: { + type: "string", + label: "OpenID Name", + description: "The name configured for use in other applications that accept OpenID for sign-in", + }, + invalidLoginAttempts: { + type: "integer", + label: "Invalid Login Attempts", + description: "The number of sequential invalid login attempts the user has made", + }, + preferredLocaleCode: { + type: "string", + label: "Preferred Locale Code", + description: "The 2-character language locale for the user, such as `en` for English or `es` for Spanish.", + }, + customAttributes: { + type: "object", + label: "Custom Attributes", + description: "An object to contain any other custom attributes you have configured", + }, + mappings: { + type: "string", + label: "Mappings", + description: "Controls how mappings will be applied to the user on creation.", + options: MAPPINGS_OPTIONS, + }, + validatePolicy: { + type: "boolean", + label: "Validate Policy", + description: "Will passwords validate against the User Policy?", + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return `https://${this.$auth.subdomain}.onelogin.com/api`; + }, + _headers() { + return { + Authorization: `Bearer ${this.$auth.oauth_access_token}`, + }; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: this._baseUrl() + path, + headers: this._headers(), + ...opts, + }); + }, + listGroups(opts = {}) { + return this._makeRequest({ + path: "/1/groups", + ...opts, + }); + }, + listRoles(opts = {}) { + return this._makeRequest({ + path: "/1/roles", + ...opts, + }); + }, + listUsers(opts = {}) { + return this._makeRequest({ + path: "/2/users", + ...opts, + }); + }, + createUser(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/2/users", + ...opts, + }); + }, + updateUser({ + userId, ...opts + }) { + return this._makeRequest({ + method: "PUT", + path: `/2/users/${userId}`, + ...opts, + }); + }, + listEvents(opts = {}) { + return this._makeRequest({ + path: "/1/events", + ...opts, + }); + }, + listEventTypes(opts = {}) { + return this._makeRequest({ + path: "/1/events/types", + ...opts, + }); + }, + async *paginate({ + fn, params = {}, maxResults = null, ...opts + }) { + let count = 0; + let nextCursor = null; + + do { + params.after_cursor = nextCursor; + const { + data, + pagination: { after_cursor }, + } = await fn({ + params, + ...opts, + }); + for (const d of data) { + yield d; + + if (maxResults && ++count === maxResults) { + return count; + } + } + + nextCursor = after_cursor; + } while (nextCursor); }, }, }; diff --git a/components/onelogin/package.json b/components/onelogin/package.json index 0945197d47fa2..e7b36a0463c9d 100644 --- a/components/onelogin/package.json +++ b/components/onelogin/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/onelogin", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream OneLogin Components", "main": "onelogin.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/onelogin/sources/common/base.mjs b/components/onelogin/sources/common/base.mjs new file mode 100644 index 0000000000000..1f5d0d2c95d46 --- /dev/null +++ b/components/onelogin/sources/common/base.mjs @@ -0,0 +1,61 @@ +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import onelogin from "../../onelogin.app.mjs"; + +export default { + props: { + onelogin, + db: "$.service.db", + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + methods: { + _getLastDate() { + return this.db.get("lastDate") || "1970-01-01T00:00:00Z"; + }, + _setLastDate(lastDate) { + this.db.set("lastDate", lastDate); + }, + async emitEvent(maxResults = false) { + const lastDate = this._getLastDate(); + + const response = this.onelogin.paginate({ + fn: this.onelogin.listEvents, + maxResults, + params: { + since: lastDate, + sort: "-created_at", + event_type_id: this.getEventType(), + }, + }); + + let responseArray = []; + for await (const item of response) { + responseArray.push(item); + } + + if (responseArray.length) { + this._setLastDate(responseArray[0].created_at); + } + + for (const item of responseArray.reverse()) { + this.$emit(item, { + id: item.id, + summary: this.getSummary(item), + ts: Date.parse(item.created_at), + }); + } + }, + }, + hooks: { + async deploy() { + await this.emitEvent(25); + }, + }, + async run() { + await this.emitEvent(); + }, +}; diff --git a/components/onelogin/sources/new-directory-sync-event/new-directory-sync-event.mjs b/components/onelogin/sources/new-directory-sync-event/new-directory-sync-event.mjs new file mode 100644 index 0000000000000..fc1644dc306a9 --- /dev/null +++ b/components/onelogin/sources/new-directory-sync-event/new-directory-sync-event.mjs @@ -0,0 +1,22 @@ +import common from "../common/base.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "onelogin-new-directory-sync-event", + name: "New Directory Sync Event", + description: "Emit new event when a directory sync event is triggered in OneLogin. [See the documentation](https://developers.onelogin.com/api-docs/1/events/get-events)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getEventType() { + return 117; + }, + getSummary(item) { + return `Directory sync event: ${item.directory_sync_run_id}`; + }, + }, + sampleEmit, +}; diff --git a/components/onelogin/sources/new-directory-sync-event/test-event.mjs b/components/onelogin/sources/new-directory-sync-event/test-event.mjs new file mode 100644 index 0000000000000..fdcb45e3921f3 --- /dev/null +++ b/components/onelogin/sources/new-directory-sync-event/test-event.mjs @@ -0,0 +1,37 @@ +export default { + "id": 999999999, + "created_at": "2014-12-19T02:02:39.276Z", + "account_id": 55555, + "user_id": 88888888, + "event_type_id": 117, + "notes": null, + "ipaddr": "11.111.11.111", + "actor_user_id": 7777777, + "assuming_acting_user_id": null, + "role_id": null, + "app_id": null, + "group_id": null, + "otp_device_id": null, + "policy_id": null, + "actor_system": "", + "custom_message": null, + "role_name": null, + "app_name": null, + "group_name": null, + "actor_user_name": "Xavier Wong", + "user_name": "Xavier Wong", + "policy_name": null, + "otp_device_name": null, + "operation_name": null, + "directory_sync_run_id": 123, + "directory_id": null, + "resolution": null, + "client_id": null, + "resource_type_id": null, + "error_description": null, + "proxy_ip": null, + "risk_score": null, + "risk_reasons": null, + "risk_cookie_id": null, + "browser_fingerprint": null +} \ No newline at end of file diff --git a/components/onelogin/sources/new-event/new-event.mjs b/components/onelogin/sources/new-event/new-event.mjs new file mode 100644 index 0000000000000..af68457de8409 --- /dev/null +++ b/components/onelogin/sources/new-event/new-event.mjs @@ -0,0 +1,32 @@ +import common from "../common/base.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "onelogin-new-event", + name: "New Event", + description: "Emit new event when a selected event occurs in OneLogin. [See the documentation](https://developers.onelogin.com/api-docs/1/events/get-events)", + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + ...common.props, + eventType: { + propDefinition: [ + common.props.onelogin, + "eventType", + ], + withLabel: true, + }, + }, + methods: { + ...common.methods, + getEventType() { + return this.eventType.value; + }, + getSummary() { + return `New event: ${this.eventType.label}`; + }, + }, + sampleEmit, +}; diff --git a/components/onelogin/sources/new-event/test-event.mjs b/components/onelogin/sources/new-event/test-event.mjs new file mode 100644 index 0000000000000..ac608920d5ed9 --- /dev/null +++ b/components/onelogin/sources/new-event/test-event.mjs @@ -0,0 +1,37 @@ +export default { + "id":36114558381, + "created_at":"2025-07-21T17:30:44.190Z", + "account_id":452500, + "user_id":279115532, + "event_type_id":111, + "notes":null, + "ipaddr":"98.80.221.195", + "actor_user_id":null, + "assuming_acting_user_id":null, + "role_id":null, + "app_id":null, + "group_id":null, + "otp_device_id":null, + "policy_id":null, + "actor_system":"API", + "custom_message":null, + "role_name":null, + "app_name":null, + "group_name":null, + "actor_user_name":"API", + "user_name":"Username", + "policy_name":null, + "otp_device_name":null, + "operation_name":null, + "directory_sync_run_id":null, + "directory_id":null, + "resolution":null, + "client_id":"1e87e84576a77d999e89e3ba110df9461decc2b1564bb1b9aa3e05fcbafb5918", + "resource_type_id":null, + "error_description":null, + "proxy_ip":null, + "risk_score":null, + "risk_reasons":null, + "risk_cookie_id":null, + "browser_fingerprint":null, +}; \ No newline at end of file diff --git a/components/onelogin/sources/new-user/new-user.mjs b/components/onelogin/sources/new-user/new-user.mjs new file mode 100644 index 0000000000000..c7c70fc1e9f39 --- /dev/null +++ b/components/onelogin/sources/new-user/new-user.mjs @@ -0,0 +1,22 @@ +import common from "../common/base.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "onelogin-new-user", + name: "New User Created", + description: "Emit new event when a user is created in OneLogin. [See the documentation](https://developers.onelogin.com/api-docs/1/events/get-events)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getEventType() { + return 13; + }, + getSummary(item) { + return `New user created with ID: ${item.user_id}`; + }, + }, + sampleEmit, +}; diff --git a/components/onelogin/sources/new-user/test-event.mjs b/components/onelogin/sources/new-user/test-event.mjs new file mode 100644 index 0000000000000..8be0ea41bde98 --- /dev/null +++ b/components/onelogin/sources/new-user/test-event.mjs @@ -0,0 +1,37 @@ +export default { + "id":36114558381, + "created_at":"2025-07-21T17:30:44.190Z", + "account_id":452500, + "user_id":279115532, + "event_type_id":13, + "notes":null, + "ipaddr":"98.80.221.195", + "actor_user_id":null, + "assuming_acting_user_id":null, + "role_id":null, + "app_id":null, + "group_id":null, + "otp_device_id":null, + "policy_id":null, + "actor_system":"API", + "custom_message":null, + "role_name":null, + "app_name":null, + "group_name":null, + "actor_user_name":"API", + "user_name":"Username", + "policy_name":null, + "otp_device_name":null, + "operation_name":null, + "directory_sync_run_id":null, + "directory_id":null, + "resolution":null, + "client_id":"1e87e84576a77d999e89e3ba110df9461decc2b1564bb1b9aa3e05fcbafb5918", + "resource_type_id":null, + "error_description":null, + "proxy_ip":null, + "risk_score":null, + "risk_reasons":null, + "risk_cookie_id":null, + "browser_fingerprint":null, +}; \ No newline at end of file diff --git a/components/onepage/.gitignore b/components/onepage/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/onepage/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/onepage/app/onepage.app.ts b/components/onepage/app/onepage.app.ts deleted file mode 100644 index e06a54435a098..0000000000000 --- a/components/onepage/app/onepage.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "onepage", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/onepage/onepage.app.mjs b/components/onepage/onepage.app.mjs new file mode 100644 index 0000000000000..44378cc0ab87f --- /dev/null +++ b/components/onepage/onepage.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "onepage", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/onepage/package.json b/components/onepage/package.json index def2f9f7e9e10..77abfb71cef7d 100644 --- a/components/onepage/package.json +++ b/components/onepage/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/onepage", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Onepage Components", - "main": "dist/app/onepage.app.mjs", + "main": "onepage.app.mjs", "keywords": [ "pipedream", "onepage" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/onepage", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/ones2u/.gitignore b/components/ones2u/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/ones2u/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/ones2u/app/ones2u.app.ts b/components/ones2u/app/ones2u.app.ts deleted file mode 100644 index 5ebb344e3de77..0000000000000 --- a/components/ones2u/app/ones2u.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "ones2u", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/ones2u/ones2u.app.mjs b/components/ones2u/ones2u.app.mjs new file mode 100644 index 0000000000000..7075f94e0295e --- /dev/null +++ b/components/ones2u/ones2u.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "ones2u", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/ones2u/package.json b/components/ones2u/package.json index e90eaa8897448..43391fc5ae1c8 100644 --- a/components/ones2u/package.json +++ b/components/ones2u/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/ones2u", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream 1S2U Components", - "main": "dist/app/ones2u.app.mjs", + "main": "ones2u.app.mjs", "keywords": [ "pipedream", "ones2u" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/ones2u", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/onesaas/.gitignore b/components/onesaas/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/onesaas/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/onesaas/app/onesaas.app.ts b/components/onesaas/app/onesaas.app.ts deleted file mode 100644 index aca05ff95770d..0000000000000 --- a/components/onesaas/app/onesaas.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "onesaas", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/onesaas/onesaas.app.mjs b/components/onesaas/onesaas.app.mjs new file mode 100644 index 0000000000000..37b02d066fbd1 --- /dev/null +++ b/components/onesaas/onesaas.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "onesaas", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/onesaas/package.json b/components/onesaas/package.json index 537b9a8974334..5974a787935e2 100644 --- a/components/onesaas/package.json +++ b/components/onesaas/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/onesaas", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream 1SaaS Components", - "main": "dist/app/onesaas.app.mjs", + "main": "onesaas.app.mjs", "keywords": [ "pipedream", "onesaas" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/onesaas", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/onesec_mail/.gitignore b/components/onesec_mail/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/onesec_mail/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/onesec_mail/app/onesec_mail.app.ts b/components/onesec_mail/app/onesec_mail.app.ts deleted file mode 100644 index aee9fc5dd20f6..0000000000000 --- a/components/onesec_mail/app/onesec_mail.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "onesec_mail", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/onesec_mail/onesec_mail.app.mjs b/components/onesec_mail/onesec_mail.app.mjs new file mode 100644 index 0000000000000..6190131bc68d3 --- /dev/null +++ b/components/onesec_mail/onesec_mail.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "onesec_mail", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/onesec_mail/package.json b/components/onesec_mail/package.json index ef04c918ce592..dc38f6fd69fa7 100644 --- a/components/onesec_mail/package.json +++ b/components/onesec_mail/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/onesec_mail", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream 1sec Mail Components", - "main": "dist/app/onesec_mail.app.mjs", + "main": "onesec_mail.app.mjs", "keywords": [ "pipedream", "onesec_mail" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/onesec_mail", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/onesimpleapi/onesimpleapi.app.mjs b/components/onesimpleapi/onesimpleapi.app.mjs new file mode 100644 index 0000000000000..673d86b1c4984 --- /dev/null +++ b/components/onesimpleapi/onesimpleapi.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "onesimpleapi", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/onesimpleapi/package.json b/components/onesimpleapi/package.json new file mode 100644 index 0000000000000..fff6bfd99f902 --- /dev/null +++ b/components/onesimpleapi/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/onesimpleapi", + "version": "0.0.1", + "description": "Pipedream OneSimpleApi Components", + "main": "onesimpleapi.app.mjs", + "keywords": [ + "pipedream", + "onesimpleapi" + ], + "homepage": "https://pipedream.com/apps/onesimpleapi", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/oneuptime/.gitignore b/components/oneuptime/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/oneuptime/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/oneuptime/app/oneuptime.app.ts b/components/oneuptime/app/oneuptime.app.ts deleted file mode 100644 index 9a8cba35309c6..0000000000000 --- a/components/oneuptime/app/oneuptime.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "oneuptime", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/oneuptime/oneuptime.app.mjs b/components/oneuptime/oneuptime.app.mjs new file mode 100644 index 0000000000000..9e79289ca9da1 --- /dev/null +++ b/components/oneuptime/oneuptime.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "oneuptime", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/oneuptime/package.json b/components/oneuptime/package.json index 6ee0562f8b080..262bdbaa6e001 100644 --- a/components/oneuptime/package.json +++ b/components/oneuptime/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/oneuptime", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream OneUptime Components", - "main": "dist/app/oneuptime.app.mjs", + "main": "oneuptime.app.mjs", "keywords": [ "pipedream", "oneuptime" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/oneuptime", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/onfleet/package.json b/components/onfleet/package.json index 0ed8d848b3790..883967ca8b758 100644 --- a/components/onfleet/package.json +++ b/components/onfleet/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/onfleet", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Onfleet Components", "main": "dist/app/onfleet.app.mjs", "keywords": [ @@ -17,6 +17,10 @@ }, "dependencies": { "@onfleet/node-onfleet": "^1.3.3", - "moment": "^2.29.4" + "moment": "^2.29.4", + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/onfleet/tsconfig.json b/components/onfleet/tsconfig.json index a61206464b8c0..3a9389484d040 100644 --- a/components/onfleet/tsconfig.json +++ b/components/onfleet/tsconfig.json @@ -1,23 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/open_exchange_rates/package.json b/components/open_exchange_rates/package.json index dbc9e55b6b996..ab37a9c03c4d0 100644 --- a/components/open_exchange_rates/package.json +++ b/components/open_exchange_rates/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/open_exchange_rates", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Open Exchange Rates Components", "main": "open_exchange_rates.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/openai/actions/analyze-image-content/analyze-image-content.mjs b/components/openai/actions/analyze-image-content/analyze-image-content.mjs index f8f831efcf796..a78b265fee19b 100644 --- a/components/openai/actions/analyze-image-content/analyze-image-content.mjs +++ b/components/openai/actions/analyze-image-content/analyze-image-content.mjs @@ -8,7 +8,7 @@ export default { key: "openai-analyze-image-content", name: "Analyze Image Content", description: "Send a message or question about an image and receive a response. [See the documentation](https://platform.openai.com/docs/api-reference/runs/createThreadAndRun)", - version: "1.0.1", + version: "1.0.2", type: "action", props: { openai, diff --git a/components/openai/actions/cancel-run/cancel-run.mjs b/components/openai/actions/cancel-run/cancel-run.mjs index 3a7d47c2b2886..bab67710ca3ec 100644 --- a/components/openai/actions/cancel-run/cancel-run.mjs +++ b/components/openai/actions/cancel-run/cancel-run.mjs @@ -4,7 +4,7 @@ export default { key: "openai-cancel-run", name: "Cancel Run (Assistants)", description: "Cancels a run that is in progress. [See the documentation](https://platform.openai.com/docs/api-reference/runs/cancelRun)", - version: "0.0.15", + version: "0.0.16", type: "action", props: { openai, diff --git a/components/openai/actions/chat-using-file-search/chat-using-file-search.mjs b/components/openai/actions/chat-using-file-search/chat-using-file-search.mjs index 1c5fa0a7b6add..a5a427ca007c3 100644 --- a/components/openai/actions/chat-using-file-search/chat-using-file-search.mjs +++ b/components/openai/actions/chat-using-file-search/chat-using-file-search.mjs @@ -5,7 +5,7 @@ import constants from "../../common/constants.mjs"; export default { ...common, name: "Chat using File Search", - version: "0.0.6", + version: "0.0.7", key: "openai-chat-using-file-search", description: "Chat with your files knowledge base (vector stores). [See the documentation](https://platform.openai.com/docs/guides/tools-file-search)", type: "action", diff --git a/components/openai/actions/chat-using-functions/chat-using-functions.mjs b/components/openai/actions/chat-using-functions/chat-using-functions.mjs index 668cd73527b8e..b7230f83537f1 100644 --- a/components/openai/actions/chat-using-functions/chat-using-functions.mjs +++ b/components/openai/actions/chat-using-functions/chat-using-functions.mjs @@ -5,7 +5,7 @@ import constants from "../../common/constants.mjs"; export default { ...common, name: "Chat using Functions", - version: "0.0.7", + version: "0.0.8", key: "openai-chat-using-functions", description: "Chat with your models and allow them to invoke functions. Optionally, you can build and invoke workflows as functions. [See the documentation](https://platform.openai.com/docs/guides/function-calling)", type: "action", diff --git a/components/openai/actions/chat-using-web-search/chat-using-web-search.mjs b/components/openai/actions/chat-using-web-search/chat-using-web-search.mjs index b65d0d5d666ce..fb13d7d94186f 100644 --- a/components/openai/actions/chat-using-web-search/chat-using-web-search.mjs +++ b/components/openai/actions/chat-using-web-search/chat-using-web-search.mjs @@ -1,11 +1,12 @@ import openai from "../../openai.app.mjs"; import common from "../common/common.mjs"; import constants from "../../common/constants.mjs"; +import { WEB_SEARCH_CHAT_MODELS } from "../../common/models.mjs"; export default { ...common, name: "Chat using Web Search", - version: "0.0.6", + version: "0.0.7", key: "openai-chat-using-web-search", description: "Chat using the web search tool. [See the documentation](https://platform.openai.com/docs/guides/tools-web-search)", type: "action", @@ -15,11 +16,8 @@ export default { type: "string", label: "Model", description: "Model used to generate the response", - default: "gpt-4o", - options: [ - "gpt-4o", - "gpt-4o-mini", - ], + default: WEB_SEARCH_CHAT_MODELS[0], + options: WEB_SEARCH_CHAT_MODELS, }, input: { type: "string", diff --git a/components/openai/actions/chat-with-assistant/chat-with-assistant.mjs b/components/openai/actions/chat-with-assistant/chat-with-assistant.mjs index 2e9df6fbc8314..75c0640d984fa 100644 --- a/components/openai/actions/chat-with-assistant/chat-with-assistant.mjs +++ b/components/openai/actions/chat-with-assistant/chat-with-assistant.mjs @@ -6,7 +6,7 @@ export default { key: "openai-chat-with-assistant", name: "Chat with Assistant", description: "Sends a message and generates a response, storing the message history for a continuous conversation. [See the documentation](https://platform.openai.com/docs/api-reference/runs/createThreadAndRun)", - version: "0.0.11", + version: "0.0.12", type: "action", props: { openai, diff --git a/components/openai/actions/chat-with-responses-api/chat-with-responses-api.mjs b/components/openai/actions/chat-with-responses-api/chat-with-responses-api.mjs index 265c0a4b3c8bd..5dfc4231eff4f 100644 --- a/components/openai/actions/chat-with-responses-api/chat-with-responses-api.mjs +++ b/components/openai/actions/chat-with-responses-api/chat-with-responses-api.mjs @@ -10,7 +10,7 @@ export default { ...common, key: "openai-chat-with-responses-api", name: "Chat With Responses API", - version: "0.0.1", + version: "0.0.2", description: "Send a chat via the Responses API, mixing built-in tools and MCP server tools. [See the documentation](https://platform.openai.com/docs/guides/tools?api-mode=responses).", type: "action", props: { diff --git a/components/openai/actions/chat/chat.mjs b/components/openai/actions/chat/chat.mjs index a74cf78cbc933..a6e82e8d5d524 100644 --- a/components/openai/actions/chat/chat.mjs +++ b/components/openai/actions/chat/chat.mjs @@ -5,7 +5,7 @@ import constants from "../../common/constants.mjs"; export default { ...common, name: "Chat", - version: "0.3.2", + version: "0.3.3", key: "openai-chat", description: "The Chat API, using the `gpt-3.5-turbo` or `gpt-4` model. [See the documentation](https://platform.openai.com/docs/api-reference/chat)", type: "action", diff --git a/components/openai/actions/classify-items-into-categories/classify-items-into-categories.mjs b/components/openai/actions/classify-items-into-categories/classify-items-into-categories.mjs index ec8bb2e91bc3b..a2fc3da14ee1e 100644 --- a/components/openai/actions/classify-items-into-categories/classify-items-into-categories.mjs +++ b/components/openai/actions/classify-items-into-categories/classify-items-into-categories.mjs @@ -3,7 +3,7 @@ import common from "../common/common-helper.mjs"; export default { ...common, name: "Classify Items into Categories", - version: "0.1.8", + version: "0.1.9", key: "openai-classify-items-into-categories", description: "Classify items into specific categories using the Chat API. [See the documentation](https://platform.openai.com/docs/api-reference/chat)", type: "action", diff --git a/components/openai/actions/convert-text-to-speech/convert-text-to-speech.mjs b/components/openai/actions/convert-text-to-speech/convert-text-to-speech.mjs index 8ea5b0aafa0d0..28ba3f27987da 100644 --- a/components/openai/actions/convert-text-to-speech/convert-text-to-speech.mjs +++ b/components/openai/actions/convert-text-to-speech/convert-text-to-speech.mjs @@ -5,7 +5,7 @@ export default { key: "openai-convert-text-to-speech", name: "Convert Text to Speech (TTS)", description: "Generates audio from the input text. [See the documentation](https://platform.openai.com/docs/api-reference/audio/createSpeech)", - version: "0.0.15", + version: "0.0.16", type: "action", props: { openai, diff --git a/components/openai/actions/create-assistant/create-assistant.mjs b/components/openai/actions/create-assistant/create-assistant.mjs index f118a5a86909d..d57fa1472628c 100644 --- a/components/openai/actions/create-assistant/create-assistant.mjs +++ b/components/openai/actions/create-assistant/create-assistant.mjs @@ -6,7 +6,7 @@ export default { key: "openai-create-assistant", name: "Create Assistant", description: "Creates an assistant with a model and instructions. [See the documentation](https://platform.openai.com/docs/api-reference/assistants/createAssistant)", - version: "0.1.13", + version: "0.1.14", type: "action", props: { openai, diff --git a/components/openai/actions/create-batch/create-batch.mjs b/components/openai/actions/create-batch/create-batch.mjs index 490c8318dc575..1396eb9f99ced 100644 --- a/components/openai/actions/create-batch/create-batch.mjs +++ b/components/openai/actions/create-batch/create-batch.mjs @@ -9,7 +9,7 @@ export default { key: "openai-create-batch", name: "Create Batch", description: "Creates and executes a batch from an uploaded file of requests. [See the documentation](https://platform.openai.com/docs/api-reference/batch/create)", - version: "0.1.1", + version: "0.1.2", type: "action", props: { openai, diff --git a/components/openai/actions/create-embeddings/create-embeddings.mjs b/components/openai/actions/create-embeddings/create-embeddings.mjs index 4c317981d8f1c..7bf6ec270b938 100644 --- a/components/openai/actions/create-embeddings/create-embeddings.mjs +++ b/components/openai/actions/create-embeddings/create-embeddings.mjs @@ -4,7 +4,7 @@ import common from "../common/common.mjs"; export default { name: "Create Embeddings", - version: "0.0.20", + version: "0.0.21", key: "openai-create-embeddings", description: "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. [See the documentation](https://platform.openai.com/docs/api-reference/embeddings)", type: "action", diff --git a/components/openai/actions/create-fine-tuning-job/create-fine-tuning-job.mjs b/components/openai/actions/create-fine-tuning-job/create-fine-tuning-job.mjs index 15bc048d7a9ab..4d067b3580c7a 100644 --- a/components/openai/actions/create-fine-tuning-job/create-fine-tuning-job.mjs +++ b/components/openai/actions/create-fine-tuning-job/create-fine-tuning-job.mjs @@ -4,7 +4,7 @@ export default { key: "openai-create-fine-tuning-job", name: "Create Fine Tuning Job", description: "Creates a job that fine-tunes a specified model from a given dataset. [See the documentation](https://platform.openai.com/docs/api-reference/fine-tuning/create)", - version: "0.0.14", + version: "0.0.15", type: "action", props: { openai, diff --git a/components/openai/actions/create-image/create-image.mjs b/components/openai/actions/create-image/create-image.mjs index ac6f8d571d46a..7adf6f05dfbdb 100644 --- a/components/openai/actions/create-image/create-image.mjs +++ b/components/openai/actions/create-image/create-image.mjs @@ -1,10 +1,11 @@ import openai from "../../openai.app.mjs"; import constants from "../../common/constants.mjs"; import fs from "fs"; +import { IMAGE_MODELS } from "../../common/models.mjs"; export default { name: "Create Image (Dall-E)", - version: "0.1.23", + version: "0.1.24", key: "openai-create-image", description: "Creates an image given a prompt returning a URL to the image. [See the documentation](https://platform.openai.com/docs/api-reference/images)", type: "action", @@ -14,7 +15,7 @@ export default { label: "Model", description: "Choose the DALLยทE models to generate image(s) with.", type: "string", - options: constants.IMAGE_MODELS, + options: IMAGE_MODELS, reloadProps: true, }, prompt: { diff --git a/components/openai/actions/create-moderation/create-moderation.mjs b/components/openai/actions/create-moderation/create-moderation.mjs index 555d7774230cb..d25d50505f718 100644 --- a/components/openai/actions/create-moderation/create-moderation.mjs +++ b/components/openai/actions/create-moderation/create-moderation.mjs @@ -1,11 +1,11 @@ import openai from "../../openai.app.mjs"; -import constants from "../../common/constants.mjs"; +import { MODERATION_MODELS } from "../../common/models.mjs"; export default { key: "openai-create-moderation", name: "Create Moderation", description: "Classifies if text is potentially harmful. [See the documentation](https://platform.openai.com/docs/api-reference/moderations/create)", - version: "0.0.9", + version: "0.0.10", type: "action", props: { openai, @@ -18,7 +18,7 @@ export default { type: "string", label: "Model", description: "The model to use", - options: constants.MODERATION_MODELS, + options: MODERATION_MODELS, }, }, async run({ $ }) { diff --git a/components/openai/actions/create-thread/create-thread.mjs b/components/openai/actions/create-thread/create-thread.mjs index d7e7d7e69cfa4..76c11cbda9b81 100644 --- a/components/openai/actions/create-thread/create-thread.mjs +++ b/components/openai/actions/create-thread/create-thread.mjs @@ -6,7 +6,7 @@ export default { key: "openai-create-thread", name: "Create Thread (Assistants)", description: "Creates a thread with optional messages and metadata, and optionally runs the thread using the specified assistant. [See the documentation](https://platform.openai.com/docs/api-reference/threads/createThread)", - version: "0.0.15", + version: "0.0.16", type: "action", props: { openai, @@ -88,7 +88,7 @@ export default { })); }, async getAssistantModelPropOptions() { - const models = (await this.openai.models({})).filter(({ id }) => (id.includes("gpt-3.5-turbo") || id.includes("gpt-4-turbo")) && (id !== "gpt-3.5-turbo-0301")); + const models = await this.openai.getAssistantsModels({}); return models.map(({ id }) => id); }, }, diff --git a/components/openai/actions/create-transcription/create-transcription.mjs b/components/openai/actions/create-transcription/create-transcription.mjs index faca0170d927d..e513eff403f0b 100644 --- a/components/openai/actions/create-transcription/create-transcription.mjs +++ b/components/openai/actions/create-transcription/create-transcription.mjs @@ -1,12 +1,13 @@ import { getFileStreamAndMetadata } from "@pipedream/platform"; import openai from "../../openai.app.mjs"; import FormData from "form-data"; +import { TRANSCRIPTION_MODELS } from "../../common/models.mjs"; export default { key: "openai-create-transcription", name: "Create Transcription", description: "Transcribes audio into the input language. [See the documentation](https://platform.openai.com/docs/api-reference/audio/createTranscription)", - version: "0.3.1", + version: "0.3.2", type: "action", props: { openai, @@ -20,11 +21,7 @@ export default { type: "string", label: "Model", description: "ID of the model to use", - options: [ - "gpt-4o-transcribe", - "gpt-4o-mini-transcribe", - "whisper-1", - ], + options: TRANSCRIPTION_MODELS, }, include: { type: "string[]", diff --git a/components/openai/actions/create-vector-store-file/create-vector-store-file.mjs b/components/openai/actions/create-vector-store-file/create-vector-store-file.mjs index 32c3875c0b3cb..2830dbe4e3322 100644 --- a/components/openai/actions/create-vector-store-file/create-vector-store-file.mjs +++ b/components/openai/actions/create-vector-store-file/create-vector-store-file.mjs @@ -4,7 +4,7 @@ export default { key: "openai-create-vector-store-file", name: "Create Vector Store File", description: "Create a vector store file. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores-files/createFile)", - version: "0.0.5", + version: "0.0.6", type: "action", props: { openai, diff --git a/components/openai/actions/create-vector-store/create-vector-store.mjs b/components/openai/actions/create-vector-store/create-vector-store.mjs index 8eefa39f39ec1..c4584accbede6 100644 --- a/components/openai/actions/create-vector-store/create-vector-store.mjs +++ b/components/openai/actions/create-vector-store/create-vector-store.mjs @@ -4,7 +4,7 @@ export default { key: "openai-create-vector-store", name: "Create Vector Store", description: "Create a vector store. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores/create)", - version: "0.0.5", + version: "0.0.6", type: "action", props: { openai, diff --git a/components/openai/actions/delete-file/delete-file.mjs b/components/openai/actions/delete-file/delete-file.mjs index 4b5c8a1f5c72b..60ba597988d3c 100644 --- a/components/openai/actions/delete-file/delete-file.mjs +++ b/components/openai/actions/delete-file/delete-file.mjs @@ -4,7 +4,7 @@ export default { key: "openai-delete-file", name: "Delete File", description: "Deletes a specified file from OpenAI. [See the documentation](https://platform.openai.com/docs/api-reference/files/delete)", - version: "0.0.15", + version: "0.0.16", type: "action", props: { openai, diff --git a/components/openai/actions/delete-vector-store-file/delete-vector-store-file.mjs b/components/openai/actions/delete-vector-store-file/delete-vector-store-file.mjs index f69ac32a122af..929d348cbc5ee 100644 --- a/components/openai/actions/delete-vector-store-file/delete-vector-store-file.mjs +++ b/components/openai/actions/delete-vector-store-file/delete-vector-store-file.mjs @@ -4,7 +4,7 @@ export default { key: "openai-delete-vector-store-file", name: "Delete Vector Store File", description: "Deletes a vector store file. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores-files/deleteFile)", - version: "0.0.5", + version: "0.0.6", type: "action", props: { openai, diff --git a/components/openai/actions/delete-vector-store/delete-vector-store.mjs b/components/openai/actions/delete-vector-store/delete-vector-store.mjs index 40139e145ff4c..b0f7ce3cd9707 100644 --- a/components/openai/actions/delete-vector-store/delete-vector-store.mjs +++ b/components/openai/actions/delete-vector-store/delete-vector-store.mjs @@ -4,7 +4,7 @@ export default { key: "openai-delete-vector-store", name: "Delete Vector Store", description: "Delete a vector store. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores/delete)", - version: "0.0.5", + version: "0.0.6", type: "action", props: { openai, diff --git a/components/openai/actions/list-files/list-files.mjs b/components/openai/actions/list-files/list-files.mjs index 5c83589485f81..4477054351437 100644 --- a/components/openai/actions/list-files/list-files.mjs +++ b/components/openai/actions/list-files/list-files.mjs @@ -4,7 +4,7 @@ export default { key: "openai-list-files", name: "List Files", description: "Returns a list of files that belong to the user's organization. [See the documentation](https://platform.openai.com/docs/api-reference/files/list)", - version: "0.0.15", + version: "0.0.16", type: "action", props: { openai, diff --git a/components/openai/actions/list-messages/list-messages.mjs b/components/openai/actions/list-messages/list-messages.mjs index 915a6617171d6..674982fe7d188 100644 --- a/components/openai/actions/list-messages/list-messages.mjs +++ b/components/openai/actions/list-messages/list-messages.mjs @@ -4,7 +4,7 @@ export default { key: "openai-list-messages", name: "List Messages (Assistants)", description: "Lists the messages for a given thread. [See the documentation](https://platform.openai.com/docs/api-reference/messages/listMessages)", - version: "0.0.16", + version: "0.0.17", type: "action", props: { openai, diff --git a/components/openai/actions/list-run-steps/list-run-steps.mjs b/components/openai/actions/list-run-steps/list-run-steps.mjs index 9f5996a0e95c6..8a16f4c8d8428 100644 --- a/components/openai/actions/list-run-steps/list-run-steps.mjs +++ b/components/openai/actions/list-run-steps/list-run-steps.mjs @@ -4,7 +4,7 @@ export default { key: "openai-list-run-steps", name: "List Run Steps (Assistants)", description: "Returns a list of run steps belonging to a run. [See the documentation](https://platform.openai.com/docs/api-reference/runs/list-run-steps)", - version: "0.0.15", + version: "0.0.16", type: "action", props: { openai, diff --git a/components/openai/actions/list-runs/list-runs.mjs b/components/openai/actions/list-runs/list-runs.mjs index b3c197f81a027..421664861c27b 100644 --- a/components/openai/actions/list-runs/list-runs.mjs +++ b/components/openai/actions/list-runs/list-runs.mjs @@ -4,7 +4,7 @@ export default { key: "openai-list-runs", name: "List Runs (Assistants)", description: "Returns a list of runs belonging to a thread. [See the documentation](https://platform.openai.com/docs/api-reference/runs/list)", - version: "0.0.16", + version: "0.0.17", type: "action", props: { openai, diff --git a/components/openai/actions/list-vector-store-files/list-vector-store-files.mjs b/components/openai/actions/list-vector-store-files/list-vector-store-files.mjs index 0b7f62f834e57..2d7de55c5ea43 100644 --- a/components/openai/actions/list-vector-store-files/list-vector-store-files.mjs +++ b/components/openai/actions/list-vector-store-files/list-vector-store-files.mjs @@ -4,7 +4,7 @@ export default { key: "openai-list-vector-store-files", name: "List Vector Store Files", description: "Returns a list of vector store file. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores-files/listFiles)", - version: "0.0.5", + version: "0.0.6", type: "action", props: { openai, diff --git a/components/openai/actions/list-vector-stores/list-vector-stores.mjs b/components/openai/actions/list-vector-stores/list-vector-stores.mjs index 48ab545b32ca3..635c7db27bcf5 100644 --- a/components/openai/actions/list-vector-stores/list-vector-stores.mjs +++ b/components/openai/actions/list-vector-stores/list-vector-stores.mjs @@ -4,7 +4,7 @@ export default { key: "openai-list-vector-stores", name: "List Vector Stores", description: "Returns a list of vector stores. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores/list)", - version: "0.0.5", + version: "0.0.6", type: "action", props: { openai, diff --git a/components/openai/actions/modify-assistant/modify-assistant.mjs b/components/openai/actions/modify-assistant/modify-assistant.mjs index 2d0a193e16420..5e5705dbc2e7b 100644 --- a/components/openai/actions/modify-assistant/modify-assistant.mjs +++ b/components/openai/actions/modify-assistant/modify-assistant.mjs @@ -6,7 +6,7 @@ export default { key: "openai-modify-assistant", name: "Modify an Assistant", description: "Modifies an existing OpenAI assistant. [See the documentation](https://platform.openai.com/docs/api-reference/assistants/modifyAssistant)", - version: "0.1.13", + version: "0.1.14", type: "action", props: { openai, diff --git a/components/openai/actions/retrieve-file-content/retrieve-file-content.mjs b/components/openai/actions/retrieve-file-content/retrieve-file-content.mjs index bfcbd7b28e69c..80188d771b5f2 100644 --- a/components/openai/actions/retrieve-file-content/retrieve-file-content.mjs +++ b/components/openai/actions/retrieve-file-content/retrieve-file-content.mjs @@ -5,7 +5,7 @@ export default { key: "openai-retrieve-file-content", name: "Retrieve File Content", description: "Retrieves the contents of the specified file. [See the documentation](https://platform.openai.com/docs/api-reference/files/retrieve-content)", - version: "0.0.16", + version: "0.0.17", type: "action", props: { openai, diff --git a/components/openai/actions/retrieve-file/retrieve-file.mjs b/components/openai/actions/retrieve-file/retrieve-file.mjs index d8bf03f09adc8..1c4a92e6a18d0 100644 --- a/components/openai/actions/retrieve-file/retrieve-file.mjs +++ b/components/openai/actions/retrieve-file/retrieve-file.mjs @@ -4,7 +4,7 @@ export default { key: "openai-retrieve-file", name: "Retrieve File", description: "Retrieves a specific file from OpenAI. [See the documentation](https://platform.openai.com/docs/api-reference/files/retrieve)", - version: "0.0.15", + version: "0.0.16", type: "action", props: { openai, diff --git a/components/openai/actions/retrieve-run-step/retrieve-run-step.mjs b/components/openai/actions/retrieve-run-step/retrieve-run-step.mjs index c4cc4f1fb0a64..44150af438f88 100644 --- a/components/openai/actions/retrieve-run-step/retrieve-run-step.mjs +++ b/components/openai/actions/retrieve-run-step/retrieve-run-step.mjs @@ -4,7 +4,7 @@ export default { key: "openai-retrieve-run-step", name: "Retrieve Run Step (Assistants)", description: "Retrieve a specific run step in a thread. [See the documentation](https://platform.openai.com/docs/api-reference/runs/getRunStep)", - version: "0.0.15", + version: "0.0.16", type: "action", props: { openai, diff --git a/components/openai/actions/retrieve-run/retrieve-run.mjs b/components/openai/actions/retrieve-run/retrieve-run.mjs index a6945ec0e9d2b..c77952cf7ea12 100644 --- a/components/openai/actions/retrieve-run/retrieve-run.mjs +++ b/components/openai/actions/retrieve-run/retrieve-run.mjs @@ -4,7 +4,7 @@ export default { key: "openai-retrieve-run", name: "Retrieve Run (Assistants)", description: "Retrieves a specific run within a thread. [See the documentation](https://platform.openai.com/docs/api-reference/runs/getRun)", - version: "0.0.15", + version: "0.0.16", type: "action", props: { openai, diff --git a/components/openai/actions/retrieve-vector-store-file/retrieve-vector-store-file.mjs b/components/openai/actions/retrieve-vector-store-file/retrieve-vector-store-file.mjs index 4825767defe31..762844671f50c 100644 --- a/components/openai/actions/retrieve-vector-store-file/retrieve-vector-store-file.mjs +++ b/components/openai/actions/retrieve-vector-store-file/retrieve-vector-store-file.mjs @@ -4,7 +4,7 @@ export default { key: "openai-retrieve-vector-store-file", name: "Retrieve Vector Store File", description: "Retrieve a vector store file. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores-files/getFile)", - version: "0.0.5", + version: "0.0.6", type: "action", props: { openai, diff --git a/components/openai/actions/retrieve-vector-store/retrieve-vector-store.mjs b/components/openai/actions/retrieve-vector-store/retrieve-vector-store.mjs index 18c09362c9348..45c2997edc737 100644 --- a/components/openai/actions/retrieve-vector-store/retrieve-vector-store.mjs +++ b/components/openai/actions/retrieve-vector-store/retrieve-vector-store.mjs @@ -4,7 +4,7 @@ export default { key: "openai-retrieve-vector-store", name: "Retrieve Vector Store", description: "Retrieve a vector store. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores/retrieve)", - version: "0.0.5", + version: "0.0.6", type: "action", props: { openai, diff --git a/components/openai/actions/send-prompt/send-prompt.mjs b/components/openai/actions/send-prompt/send-prompt.mjs index 506c02110bbdb..07a373cc8b631 100644 --- a/components/openai/actions/send-prompt/send-prompt.mjs +++ b/components/openai/actions/send-prompt/send-prompt.mjs @@ -4,7 +4,7 @@ import common from "../common/common.mjs"; export default { ...common, name: "Create Completion (Send Prompt)", - version: "0.1.19", + version: "0.1.20", key: "openai-send-prompt", description: "OpenAI recommends using the **Chat** action for the latest `gpt-3.5-turbo` API, since it's faster and 10x cheaper. This action creates a completion for the provided prompt and parameters using the older `/completions` API. [See the documentation](https://beta.openai.com/docs/api-reference/completions/create)", type: "action", diff --git a/components/openai/actions/submit-tool-outputs-to-run/submit-tool-outputs-to-run.mjs b/components/openai/actions/submit-tool-outputs-to-run/submit-tool-outputs-to-run.mjs index 3779f6edb5378..823ecdef9563c 100644 --- a/components/openai/actions/submit-tool-outputs-to-run/submit-tool-outputs-to-run.mjs +++ b/components/openai/actions/submit-tool-outputs-to-run/submit-tool-outputs-to-run.mjs @@ -5,7 +5,7 @@ export default { key: "openai-submit-tool-outputs-to-run", name: "Submit Tool Outputs to Run (Assistants)", description: "Submits tool outputs to a run that requires action. [See the documentation](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs)", - version: "0.0.15", + version: "0.0.16", type: "action", props: { openai, diff --git a/components/openai/actions/summarize/summarize.mjs b/components/openai/actions/summarize/summarize.mjs index b420f446c7898..0c1c105c02883 100644 --- a/components/openai/actions/summarize/summarize.mjs +++ b/components/openai/actions/summarize/summarize.mjs @@ -4,7 +4,7 @@ import constants from "../../common/constants.mjs"; export default { ...common, name: "Summarize Text", - version: "0.1.8", + version: "0.1.9", key: "openai-summarize", description: "Summarizes text using the Chat API. [See the documentation](https://platform.openai.com/docs/api-reference/chat)", type: "action", diff --git a/components/openai/actions/translate-text/translate-text.mjs b/components/openai/actions/translate-text/translate-text.mjs index aedeb22df631a..672147ec647be 100644 --- a/components/openai/actions/translate-text/translate-text.mjs +++ b/components/openai/actions/translate-text/translate-text.mjs @@ -9,7 +9,7 @@ const langOptions = lang.LANGUAGES.map((l) => ({ export default { ...common, name: "Translate Text (Whisper)", - version: "0.1.8", + version: "0.1.9", key: "openai-translate-text", description: "Translate text from one language to another using the Chat API. [See the documentation](https://platform.openai.com/docs/api-reference/chat)", type: "action", diff --git a/components/openai/actions/upload-file/upload-file.mjs b/components/openai/actions/upload-file/upload-file.mjs index 420bcdcd0be07..d181415a1340d 100644 --- a/components/openai/actions/upload-file/upload-file.mjs +++ b/components/openai/actions/upload-file/upload-file.mjs @@ -6,7 +6,7 @@ export default { key: "openai-upload-file", name: "Upload File", description: "Upload a file that can be used across various endpoints/features. The size of individual files can be a maximum of 512mb. [See the documentation](https://platform.openai.com/docs/api-reference/files/create)", - version: "0.1.1", + version: "0.1.2", type: "action", props: { openai, diff --git a/components/openai/common/constants.mjs b/components/openai/common/constants.mjs index c6b3fe86b313b..22bcd2e6a9df1 100644 --- a/components/openai/common/constants.mjs +++ b/components/openai/common/constants.mjs @@ -1,49 +1,3 @@ -const FINE_TUNING_MODEL_OPTIONS = [ - { - label: "gpt-3.5-turbo-1106 (recommended)", - value: "gpt-3.5-turbo-1106", - }, - { - label: "gpt-3.5-turbo-0613", - value: "gpt-3.5-turbo-0613", - }, - { - label: "babbage-002", - value: "babbage-002", - }, - { - label: "davinci-002", - value: "davinci-002", - }, - { - label: "gpt-4-0613 (experimental โ€” eligible users will be presented with an option to request access in the fine-tuning UI)", - value: "gpt-4-0613", - }, - { - label: "gpt-4.1-mini-2025-04-14", - value: "gpt-4.1-mini-2025-04-14", - }, - { - label: "gpt-4.1-2025-04-14", - value: "gpt-4.1-2025-04-14", - }, -]; - -const TTS_MODELS = [ - "tts-1", - "tts-1-hd", -]; - -const IMAGE_MODELS = [ - "dall-e-2", - "dall-e-3", -]; - -const MODERATION_MODELS = [ - "text-moderation-stable", - "text-moderation-latest", -]; - const AUDIO_RESPONSE_FORMATS = [ "mp3", "opus", @@ -175,10 +129,6 @@ const BATCH_ENDPOINTS = [ ]; export default { - FINE_TUNING_MODEL_OPTIONS, - TTS_MODELS, - IMAGE_MODELS, - MODERATION_MODELS, AUDIO_RESPONSE_FORMATS, CHAT_RESPONSE_FORMAT, IMAGE_RESPONSE_FORMATS, diff --git a/components/openai/common/models.mjs b/components/openai/common/models.mjs new file mode 100644 index 0000000000000..f0a92442237e2 --- /dev/null +++ b/components/openai/common/models.mjs @@ -0,0 +1,74 @@ +export const FINE_TUNING_MODEL_OPTIONS = [ + { + label: "gpt-3.5-turbo-1106 (recommended)", + value: "gpt-3.5-turbo-1106", + }, + { + label: "gpt-3.5-turbo-0613", + value: "gpt-3.5-turbo-0613", + }, + { + label: "babbage-002", + value: "babbage-002", + }, + { + label: "davinci-002", + value: "davinci-002", + }, + { + label: "gpt-4-0613 (experimental โ€” eligible users will be presented with an option to request access in the fine-tuning UI)", + value: "gpt-4-0613", + }, + { + label: "gpt-4.1-mini-2025-04-14", + value: "gpt-4.1-mini-2025-04-14", + }, + { + label: "gpt-4.1-2025-04-14", + value: "gpt-4.1-2025-04-14", + }, +]; + +export const TTS_MODELS = [ + "tts-1", + "tts-1-hd", +]; + +export const IMAGE_MODELS = [ + "dall-e-2", + "dall-e-3", +]; + +export const MODERATION_MODELS = [ + "text-moderation-stable", + "text-moderation-latest", +]; + +// Models that are eligible for Assistants API usage when selecting an Assistant model +export const ASSISTANTS_MODEL_INCLUDE_SUBSTRINGS = [ + "gpt-3.5-turbo", + "gpt-4-turbo", + "gpt-4o", + "gpt-4.1", + "gpt-5", + "gpt-5-mini", + "gpt-5-nano", +]; + +// Exact model IDs to exclude from Assistants model options +export const ASSISTANTS_MODEL_EXCLUDED = [ + "gpt-3.5-turbo-0301", +]; + +// Supported models in the "Chat using Web Search" action +export const WEB_SEARCH_CHAT_MODELS = [ + "gpt-4o", + "gpt-4o-mini", +]; + +// Supported models in the "Create Transcription" action +export const TRANSCRIPTION_MODELS = [ + "gpt-4o-transcribe", + "gpt-4o-mini-transcribe", + "whisper-1", +]; diff --git a/components/openai/openai.app.mjs b/components/openai/openai.app.mjs index cc9fcb7df4c5f..2d1949ce0f164 100644 --- a/components/openai/openai.app.mjs +++ b/components/openai/openai.app.mjs @@ -1,5 +1,10 @@ import { axios } from "@pipedream/platform"; import constants from "./common/constants.mjs"; +import { + ASSISTANTS_MODEL_EXCLUDED, + ASSISTANTS_MODEL_INCLUDE_SUBSTRINGS, + FINE_TUNING_MODEL_OPTIONS, TTS_MODELS, +} from "./common/models.mjs"; export default { type: "app", @@ -21,7 +26,7 @@ export default { async options() { return (await this.getChatCompletionModels({})).map((model) => model.id); }, - default: "gpt-4o-mini", + default: "gpt-5-mini", }, embeddingsModelId: { label: "Model", @@ -268,13 +273,13 @@ export default { type: "string", label: "Model", description: "One of the available [TTS models](https://platform.openai.com/docs/models/tts). `tts-1` is optimized for speed, while `tts-1-hd` is optimized for quality.", - options: constants.TTS_MODELS, + options: TTS_MODELS, }, fineTuningModel: { type: "string", label: "Fine Tuning Model", description: "The name of the model to fine-tune. [See the supported models](https://platform.openai.com/docs/guides/fine-tuning/what-models-can-be-fine-tuned).", - options: constants.FINE_TUNING_MODEL_OPTIONS, + options: FINE_TUNING_MODEL_OPTIONS, }, input: { type: "string", @@ -346,13 +351,13 @@ export default { $, path: "/models", }); - return models.sort((a, b) => a?.id.localeCompare(b?.id)); + return models.sort((a, b) => b?.created - a?.created); }, async getChatCompletionModels({ $ }) { const models = await this.models({ $, }); - return models.filter((model) => model.id.match(/4o|o[1-9]|4\.1/gi)); + return models.filter((model) => model.id.match(/4o|o[1-9]|4\.1|gpt-5/gi)); }, async getCompletionModels({ $ }) { const models = await this.models({ @@ -380,7 +385,10 @@ export default { const models = await this.models({ $, }); - return models.filter(({ id }) => (id.includes("gpt-3.5-turbo") || id.includes("gpt-4-turbo") || id.includes("gpt-4o") || id.includes("gpt-4.1")) && (id !== "gpt-3.5-turbo-0301")); + return models.filter(({ id }) => ( + ASSISTANTS_MODEL_INCLUDE_SUBSTRINGS.some((substring) => id.includes(substring)) + && !ASSISTANTS_MODEL_EXCLUDED.includes(id) + )); }, async _makeCompletion({ path, ...args diff --git a/components/openai/package.json b/components/openai/package.json index 58e4ff80f0113..85d29c0f16812 100644 --- a/components/openai/package.json +++ b/components/openai/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/openai", - "version": "1.1.0", + "version": "1.2.0", "description": "Pipedream OpenAI Components", "main": "openai.app.mjs", "keywords": [ @@ -15,13 +15,13 @@ }, "dependencies": { "@pipedream/platform": "^3.1.0", - "@pipedream/types": "^0.1.4", "bottleneck": "^2.19.5", "form-data": "^4.0.0", "got": "^12.6.0", "openai": "^4.77.0" }, "devDependencies": { + "@pipedream/types": "^0.3.2", "@types/node": "^17.0.45" } } diff --git a/components/openai/sources/new-batch-completed/new-batch-completed.mjs b/components/openai/sources/new-batch-completed/new-batch-completed.mjs index 6a4c83fe47602..223cf0f8d563f 100644 --- a/components/openai/sources/new-batch-completed/new-batch-completed.mjs +++ b/components/openai/sources/new-batch-completed/new-batch-completed.mjs @@ -6,7 +6,7 @@ export default { key: "openai-new-batch-completed", name: "New Batch Completed", description: "Emit new event when a new batch is completed in OpenAI. [See the documentation](https://platform.openai.com/docs/api-reference/batch/list)", - version: "0.0.9", + version: "0.0.10", type: "source", dedupe: "unique", methods: { diff --git a/components/openai/sources/new-file-created/new-file-created.mjs b/components/openai/sources/new-file-created/new-file-created.mjs index 5c5c94f7795f3..f503e531f3d6d 100644 --- a/components/openai/sources/new-file-created/new-file-created.mjs +++ b/components/openai/sources/new-file-created/new-file-created.mjs @@ -6,7 +6,7 @@ export default { key: "openai-new-file-created", name: "New File Created", description: "Emit new event when a new file is created in OpenAI. [See the documentation](https://platform.openai.com/docs/api-reference/files/list)", - version: "0.0.14", + version: "0.0.15", type: "source", dedupe: "unique", props: { diff --git a/components/openai/sources/new-fine-tuning-job-created/new-fine-tuning-job-created.mjs b/components/openai/sources/new-fine-tuning-job-created/new-fine-tuning-job-created.mjs index ceaf091685500..a164e8457742a 100644 --- a/components/openai/sources/new-fine-tuning-job-created/new-fine-tuning-job-created.mjs +++ b/components/openai/sources/new-fine-tuning-job-created/new-fine-tuning-job-created.mjs @@ -6,7 +6,7 @@ export default { key: "openai-new-fine-tuning-job-created", name: "New Fine Tuning Job Created", description: "Emit new event when a new fine-tuning job is created in OpenAI. [See the documentation](https://platform.openai.com/docs/api-reference/fine-tuning/list)", - version: "0.0.14", + version: "0.0.15", type: "source", dedupe: "unique", methods: { diff --git a/components/openai/sources/new-run-state-changed/new-run-state-changed.mjs b/components/openai/sources/new-run-state-changed/new-run-state-changed.mjs index 6f28511b6d333..83906b33c7a66 100644 --- a/components/openai/sources/new-run-state-changed/new-run-state-changed.mjs +++ b/components/openai/sources/new-run-state-changed/new-run-state-changed.mjs @@ -6,7 +6,7 @@ export default { key: "openai-new-run-state-changed", name: "New Run State Changed", description: "Emit new event every time a run changes its status. [See the documentation](https://platform.openai.com/docs/api-reference/runs/listRuns)", - version: "0.0.10", + version: "0.0.11", type: "source", dedupe: "unique", props: { diff --git a/components/openum/openum.app.mjs b/components/openum/openum.app.mjs new file mode 100644 index 0000000000000..adda6fc6f2b9d --- /dev/null +++ b/components/openum/openum.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "openum", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/openum/package.json b/components/openum/package.json new file mode 100644 index 0000000000000..8fa07f532af31 --- /dev/null +++ b/components/openum/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/openum", + "version": "0.0.1", + "description": "Pipedream Openum Components", + "main": "openum.app.mjs", + "keywords": [ + "pipedream", + "openum" + ], + "homepage": "https://pipedream.com/apps/openum", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/orbisx/.gitignore b/components/orbisx/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/orbisx/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/orbisx/app/orbisx.app.ts b/components/orbisx/app/orbisx.app.ts deleted file mode 100644 index 67262f80eb98b..0000000000000 --- a/components/orbisx/app/orbisx.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "orbisx", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/orbisx/orbisx.app.mjs b/components/orbisx/orbisx.app.mjs new file mode 100644 index 0000000000000..949169541b20e --- /dev/null +++ b/components/orbisx/orbisx.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "orbisx", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/orbisx/package.json b/components/orbisx/package.json index ae00cf3d1fbb4..14555477fc581 100644 --- a/components/orbisx/package.json +++ b/components/orbisx/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/orbisx", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream OrbisX Components", - "main": "dist/app/orbisx.app.mjs", + "main": "orbisx.app.mjs", "keywords": [ "pipedream", "orbisx" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/orbisx", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/order_desk/package.json b/components/order_desk/package.json index 8d8f85806339b..f284ecfe96df2 100644 --- a/components/order_desk/package.json +++ b/components/order_desk/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/order_desk", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Order Desk Components", - "main": "dist/app/order_desk.app.mjs", + "main": "order_desk.app.mjs", "keywords": [ "pipedream", "order_desk" diff --git a/components/orufy_bookings/orufy_bookings.app.mjs b/components/orufy_bookings/orufy_bookings.app.mjs new file mode 100644 index 0000000000000..aacfcfbe66435 --- /dev/null +++ b/components/orufy_bookings/orufy_bookings.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "orufy_bookings", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/orufy_bookings/package.json b/components/orufy_bookings/package.json new file mode 100644 index 0000000000000..4e2521db458ae --- /dev/null +++ b/components/orufy_bookings/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/orufy_bookings", + "version": "0.0.1", + "description": "Pipedream Orufy Bookings Components", + "main": "orufy_bookings.app.mjs", + "keywords": [ + "pipedream", + "orufy_bookings" + ], + "homepage": "https://pipedream.com/apps/orufy_bookings", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/outlign/outlign.app.mjs b/components/outlign/outlign.app.mjs new file mode 100644 index 0000000000000..12e314e84932b --- /dev/null +++ b/components/outlign/outlign.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "outlign", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/outlign/package.json b/components/outlign/package.json new file mode 100644 index 0000000000000..145da9e168f00 --- /dev/null +++ b/components/outlign/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/outlign", + "version": "0.0.1", + "description": "Pipedream Outlign Components", + "main": "outlign.app.mjs", + "keywords": [ + "pipedream", + "outlign" + ], + "homepage": "https://pipedream.com/apps/outlign", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/outline/outline.app.mjs b/components/outline/outline.app.mjs index b8cfb9d189c9a..7c1fb1d0c675d 100644 --- a/components/outline/outline.app.mjs +++ b/components/outline/outline.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/oxford_dictionaries/.gitignore b/components/oxford_dictionaries/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/oxford_dictionaries/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/oxford_dictionaries/app/oxford_dictionaries.app.ts b/components/oxford_dictionaries/app/oxford_dictionaries.app.ts deleted file mode 100644 index f665a0bf6f527..0000000000000 --- a/components/oxford_dictionaries/app/oxford_dictionaries.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "oxford_dictionaries", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/oxford_dictionaries/oxford_dictionaries.app.mjs b/components/oxford_dictionaries/oxford_dictionaries.app.mjs new file mode 100644 index 0000000000000..5468a04714178 --- /dev/null +++ b/components/oxford_dictionaries/oxford_dictionaries.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "oxford_dictionaries", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/oxford_dictionaries/package.json b/components/oxford_dictionaries/package.json index dcb316dba8763..2decf7bced69a 100644 --- a/components/oxford_dictionaries/package.json +++ b/components/oxford_dictionaries/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/oxford_dictionaries", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Oxford Dictionaries Components", - "main": "dist/app/oxford_dictionaries.app.mjs", + "main": "oxford_dictionaries.app.mjs", "keywords": [ "pipedream", "oxford_dictionaries" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/oxford_dictionaries", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/oxylabs/actions/create-proxy-session/create-proxy-session.mjs b/components/oxylabs/actions/create-proxy-session/create-proxy-session.mjs index f9132714c7b9e..89292fb3ec49c 100644 --- a/components/oxylabs/actions/create-proxy-session/create-proxy-session.mjs +++ b/components/oxylabs/actions/create-proxy-session/create-proxy-session.mjs @@ -5,7 +5,7 @@ export default { key: "oxylabs-create-proxy-session", name: "Create Proxy Session", description: "Establish a proxy session using the Residential Proxy endpoint. [See the documentation](https://developers.oxylabs.io/proxies/residential-proxies/session-control#establishing-session)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { oxylabs, diff --git a/components/oxylabs/actions/create-schedule/create-schedule.mjs b/components/oxylabs/actions/create-schedule/create-schedule.mjs index 3289ffd9c6eaf..fc79e24cdd4f8 100644 --- a/components/oxylabs/actions/create-schedule/create-schedule.mjs +++ b/components/oxylabs/actions/create-schedule/create-schedule.mjs @@ -5,7 +5,7 @@ export default { key: "oxylabs-create-schedule", name: "Create Schedule", description: "Create a schedule for a scraping job. [See the documentation](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/features/scheduler#create-a-new-schedule)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { oxylabs, diff --git a/components/oxylabs/actions/scrape-url/scrape-url.mjs b/components/oxylabs/actions/scrape-url/scrape-url.mjs index 7a1dd4adb0367..04b9cb7422029 100644 --- a/components/oxylabs/actions/scrape-url/scrape-url.mjs +++ b/components/oxylabs/actions/scrape-url/scrape-url.mjs @@ -5,7 +5,7 @@ export default { key: "oxylabs-scrape-url", name: "Scrape URL", description: "Scrape a URL. [See the documentation](https://developers.oxylabs.io/scraping-solutions/web-scraper-api)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { oxylabs, @@ -27,6 +27,18 @@ export default { "geoLocation", ], }, + parse: { + propDefinition: [ + oxylabs, + "parse", + ], + }, + render: { + propDefinition: [ + oxylabs, + "render", + ], + }, }, async run({ $ }) { const response = await this.oxylabs.scrape({ @@ -35,6 +47,8 @@ export default { source: this.source, url: this.url, geo_location: this.geoLocation, + parse: this.parse, + render: this.render, }, }); $.export("$summary", `Successfully scraped URL: ${this.url}`); diff --git a/components/oxylabs/actions/scrape-with-query/scrape-with-query.mjs b/components/oxylabs/actions/scrape-with-query/scrape-with-query.mjs index 01397af648a91..cb21028b13659 100644 --- a/components/oxylabs/actions/scrape-with-query/scrape-with-query.mjs +++ b/components/oxylabs/actions/scrape-with-query/scrape-with-query.mjs @@ -5,7 +5,7 @@ export default { key: "oxylabs-scrape-with-query", name: "Scrape with Query", description: "Extract data using a search query. [See the documentation](https://developers.oxylabs.io/scraping-solutions/web-scraper-api)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { oxylabs, @@ -26,6 +26,18 @@ export default { "geoLocation", ], }, + parse: { + propDefinition: [ + oxylabs, + "parse", + ], + }, + render: { + propDefinition: [ + oxylabs, + "render", + ], + }, }, async run({ $ }) { const response = await this.oxylabs.scrape({ @@ -34,6 +46,8 @@ export default { source: this.source, query: this.query, geo_location: this.geoLocation, + parse: this.parse, + render: this.render, }, }); $.export("$summary", `Successfully scraped using query: ${this.query}`); diff --git a/components/oxylabs/common/constants.mjs b/components/oxylabs/common/constants.mjs index cebcb1f1bdf41..a5527d5c119dd 100644 --- a/components/oxylabs/common/constants.mjs +++ b/components/oxylabs/common/constants.mjs @@ -12,11 +12,8 @@ const QUERY_SOURCES = [ "amazon_pricing", "amazon_sellers", "amazon_bestsellers", - "amazon_reviews", - "amazon_questions", "google_search", "google_ads", - "google_images", "google_lens", "google_maps", "google_travel_hotels", diff --git a/components/oxylabs/oxylabs.app.mjs b/components/oxylabs/oxylabs.app.mjs index da2556a6b55aa..bae85fbb7cc49 100644 --- a/components/oxylabs/oxylabs.app.mjs +++ b/components/oxylabs/oxylabs.app.mjs @@ -20,6 +20,21 @@ export default { description: "The geo location to scrape from. [See the guide](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/features/localization/e-commerce-localization) for using this property.", optional: true, }, + parse: { + type: "boolean", + label: "Parse", + description: "Set to `true` to receive structured data", + optional: true, + }, + render: { + type: "string", + label: "Render", + description: "Set to `html` to get the raw output of the rendered page", + options: [ + "html", + ], + optional: true, + }, }, methods: { _getBaseUrl() { diff --git a/components/oxylabs/package.json b/components/oxylabs/package.json index 8f4c393fde633..239360476550d 100644 --- a/components/oxylabs/package.json +++ b/components/oxylabs/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/oxylabs", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Oxylabs Components", "main": "oxylabs.app.mjs", "keywords": [ diff --git a/components/oxylabs/sources/new-scheduled-run-completed/new-scheduled-run-completed.mjs b/components/oxylabs/sources/new-scheduled-run-completed/new-scheduled-run-completed.mjs index 0ce8a5424fc47..93229f8ef998f 100644 --- a/components/oxylabs/sources/new-scheduled-run-completed/new-scheduled-run-completed.mjs +++ b/components/oxylabs/sources/new-scheduled-run-completed/new-scheduled-run-completed.mjs @@ -6,7 +6,7 @@ export default { key: "oxylabs-new-scheduled-run-completed", name: "New Scheduled Run Completed", description: "Emit new event when a new scheduled run is completed. [See the documentation](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/features/scheduler#get-runs-information)", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", props: { diff --git a/components/paazl/paazl.app.mjs b/components/paazl/paazl.app.mjs new file mode 100644 index 0000000000000..bb36a60897dd3 --- /dev/null +++ b/components/paazl/paazl.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "paazl", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/paazl/package.json b/components/paazl/package.json new file mode 100644 index 0000000000000..b65f780294e92 --- /dev/null +++ b/components/paazl/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/paazl", + "version": "0.0.1", + "description": "Pipedream Paazl Components", + "main": "paazl.app.mjs", + "keywords": [ + "pipedream", + "paazl" + ], + "homepage": "https://pipedream.com/apps/paazl", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/pandadoc/actions/create-document-from-template/create-document-from-template.mjs b/components/pandadoc/actions/create-document-from-template/create-document-from-template.mjs index 54a508d562b12..308cfe733acaf 100644 --- a/components/pandadoc/actions/create-document-from-template/create-document-from-template.mjs +++ b/components/pandadoc/actions/create-document-from-template/create-document-from-template.mjs @@ -5,7 +5,7 @@ export default { name: "Create Document From Template", description: "Create a Document from a PandaDoc Template. [See the documentation here](https://developers.pandadoc.com/reference/create-document-from-pandadoc-template)", type: "action", - version: "0.0.7", + version: "0.0.8", props: { app, name: { @@ -52,7 +52,12 @@ export default { }, async additionalProps() { const props = {}; - const { fields } = await this.app.getTemplate({ + if (!this.templateId) { + return props; + } + const { + fields, images, + } = await this.app.getTemplate({ templateId: this.templateId, }); for (const field of fields) { @@ -65,6 +70,15 @@ export default { optional: true, }; } + if (images?.length) { + for (const image of images) { + props[image.block_uuid] = { + type: "string", + label: `${image.name} URL`, + optional: true, + }; + } + } return props; }, methods: { @@ -91,7 +105,9 @@ export default { } = this; const fields = {}; - const { fields: items } = await this.app.getTemplate({ + const { + fields: items, images: templateImages, + } = await this.app.getTemplate({ templateId: this.templateId, }); for (const field of items) { @@ -103,6 +119,20 @@ export default { }; } + const images = []; + if (templateImages?.length) { + for (const image of templateImages) { + if (this[image.block_uuid]) { + images.push({ + name: image.name, + urls: [ + this[image.block_uuid], + ], + }); + } + } + } + const response = await this.app.createDocument({ $, data: { @@ -113,6 +143,7 @@ export default { recipients: this.parseToAnyArray(recipients), tokens: this.parseToAnyArray(tokens), fields, + images, }, }); diff --git a/components/pandadoc/package.json b/components/pandadoc/package.json index e3b3c5da1fd05..4f275335e994b 100644 --- a/components/pandadoc/package.json +++ b/components/pandadoc/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/pandadoc", - "version": "1.0.1", + "version": "1.0.2", "description": "Pipedream PandaDoc Components", "main": "pandadoc.app.mjs", "keywords": [ diff --git a/components/paypro/.gitignore b/components/paypro/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/paypro/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/paypro/app/paypro.app.ts b/components/paypro/app/paypro.app.ts deleted file mode 100644 index 4338e585114c6..0000000000000 --- a/components/paypro/app/paypro.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "paypro", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/paypro/package.json b/components/paypro/package.json index 768cbc1459b1a..e6bd268e88dd0 100644 --- a/components/paypro/package.json +++ b/components/paypro/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/paypro", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream PayPro Components", - "main": "dist/app/paypro.app.mjs", + "main": "paypro.app.mjs", "keywords": [ "pipedream", "paypro" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/paypro", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/paypro/paypro.app.mjs b/components/paypro/paypro.app.mjs new file mode 100644 index 0000000000000..0b4111b8993ff --- /dev/null +++ b/components/paypro/paypro.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "paypro", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/paystack/actions/charge-authorization/charge-authorization.mjs b/components/paystack/actions/charge-authorization/charge-authorization.mjs index fa550ef9d9474..0c9d61507f374 100644 --- a/components/paystack/actions/charge-authorization/charge-authorization.mjs +++ b/components/paystack/actions/charge-authorization/charge-authorization.mjs @@ -4,7 +4,7 @@ export default { key: "paystack-charge-authorization", name: "Charge Authorization", description: "Charge a reusable authorization. [See the documentation](https://paystack.com/docs/api/transaction/#charge-authorization)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { paystack, diff --git a/components/paystack/actions/export-transactions/export-transactions.mjs b/components/paystack/actions/export-transactions/export-transactions.mjs new file mode 100644 index 0000000000000..52084435992db --- /dev/null +++ b/components/paystack/actions/export-transactions/export-transactions.mjs @@ -0,0 +1,48 @@ +import paystack from "../../paystack.app.mjs"; + +export default { + key: "paystack-export-transactions", + name: "Export Transactions", + description: "Export transactions from Paystack. See the documentation (https://paystack.com/docs/api/transaction/#export)", + version: "0.0.1", + type: "action", + props: { + paystack, + from: { + propDefinition: [ + paystack, + "from", + ], + optional: true, + }, + to: { + propDefinition: [ + paystack, + "to", + ], + optional: true, + }, + status: { + propDefinition: [ + paystack, + "status", + ], + optional: true, + }, + }, + async run({ $ }) { + const params = { + from: this.from, + to: this.to, + status: this.status, + }; + + const response = await this.paystack.exportTransactions({ + $, + params, + }); + + $.export("$summary", "Successfully requested transaction export"); + return response; + }, +}; diff --git a/components/paystack/actions/fetch-transaction/fetch-transaction.mjs b/components/paystack/actions/fetch-transaction/fetch-transaction.mjs index 0a16d0b0812d2..d1f01638f660a 100644 --- a/components/paystack/actions/fetch-transaction/fetch-transaction.mjs +++ b/components/paystack/actions/fetch-transaction/fetch-transaction.mjs @@ -4,7 +4,7 @@ export default { key: "paystack-fetch-transaction", name: "Fetch Transaction", description: "Fetch a single transaction. [See the documentation](https://paystack.com/docs/api/transaction/#fetch)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { paystack, diff --git a/components/paystack/actions/initialize-transaction/initialize-transaction.mjs b/components/paystack/actions/initialize-transaction/initialize-transaction.mjs index 3e0c2a6ed9819..3830509e46601 100644 --- a/components/paystack/actions/initialize-transaction/initialize-transaction.mjs +++ b/components/paystack/actions/initialize-transaction/initialize-transaction.mjs @@ -4,7 +4,7 @@ export default { key: "paystack-initialize-transaction", name: "Initialize Transaction", description: "Initializes a new transaction on Paystack. [See the documentation](https://paystack.com/docs/api/transaction/#initialize)", - version: "0.1.1", + version: "0.1.2", type: "action", props: { paystack, diff --git a/components/paystack/actions/list-transactions/list-transactions.mjs b/components/paystack/actions/list-transactions/list-transactions.mjs index d06d2a0cf163f..ad5091e451877 100644 --- a/components/paystack/actions/list-transactions/list-transactions.mjs +++ b/components/paystack/actions/list-transactions/list-transactions.mjs @@ -4,7 +4,7 @@ export default { key: "paystack-list-transactions", name: "List Transactions", description: "List transactions carried out on your integration. [See the documentation](https://paystack.com/docs/api/transaction/#list)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { paystack, diff --git a/components/paystack/actions/verify-transaction/verify-transaction.mjs b/components/paystack/actions/verify-transaction/verify-transaction.mjs index dab38b293d3a1..3a486480c6b53 100644 --- a/components/paystack/actions/verify-transaction/verify-transaction.mjs +++ b/components/paystack/actions/verify-transaction/verify-transaction.mjs @@ -4,7 +4,7 @@ export default { key: "paystack-verify-transaction", name: "Verify Transaction", description: "Confirm the status of a transaction. [See the documentation](https://paystack.com/docs/api/transaction/#verify)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { paystack, diff --git a/components/paystack/package.json b/components/paystack/package.json index 338ca51435613..9cda2081181fc 100644 --- a/components/paystack/package.json +++ b/components/paystack/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/paystack", - "version": "0.2.1", + "version": "0.3.0", "description": "Pipedream Paystack Components", "main": "paystack.app.mjs", "keywords": [ diff --git a/components/paystack/paystack.app.mjs b/components/paystack/paystack.app.mjs index b35caf89e0d8f..8170715c36583 100644 --- a/components/paystack/paystack.app.mjs +++ b/components/paystack/paystack.app.mjs @@ -240,6 +240,12 @@ export default { ...args, }); }, + exportTransactions(args = {}) { + return this._makeRequest({ + path: "/transaction/export", + ...args, + }); + }, async *paginate({ resourceFn, args, max, }) { diff --git a/components/pdf_munk/package.json b/components/pdf_munk/package.json new file mode 100644 index 0000000000000..2011c7a757ef0 --- /dev/null +++ b/components/pdf_munk/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/pdf_munk", + "version": "0.0.1", + "description": "Pipedream PDF Munk Components", + "main": "pdf_munk.app.mjs", + "keywords": [ + "pipedream", + "pdf_munk" + ], + "homepage": "https://pipedream.com/apps/pdf_munk", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/pdf_munk/pdf_munk.app.mjs b/components/pdf_munk/pdf_munk.app.mjs new file mode 100644 index 0000000000000..f079b11571e9a --- /dev/null +++ b/components/pdf_munk/pdf_munk.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "pdf_munk", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/pdfless/actions/generate-pdf/generate-pdf.mjs b/components/pdfless/actions/generate-pdf/generate-pdf.mjs index db455380945cd..998e195f832bb 100644 --- a/components/pdfless/actions/generate-pdf/generate-pdf.mjs +++ b/components/pdfless/actions/generate-pdf/generate-pdf.mjs @@ -2,7 +2,7 @@ import app from "../../pdfless.app.mjs"; export default { name: "Create a PDF document", - version: "0.0.1", + version: "0.1.0", key: "pdfless-generate-pdf", description: "Create a PDF document based on selected template identifier and defined payload. [See the documentation](https://github.com/Pdfless/pdfless-js)", type: "action", @@ -21,14 +21,27 @@ export default { }, }, async run({ $ }) { - const result = await this.app.generate({ - templateId: this.templateId, - payload: this.payload, + const { + app, + templateId, + payload, + } = this; + + const response = await app.generate({ + $, + data: { + template_id: templateId, + payload, + }, }); - if (result?.status === "success") { + if (response?.status === "success") { $.export("$summary", "Successfully generated PDF"); + + } else { + $.export("$summary", "Failed to generate PDF"); } - return result; + + return response; }, }; diff --git a/components/pdfless/package.json b/components/pdfless/package.json index 1018f73c9cb5c..d6724503831e9 100644 --- a/components/pdfless/package.json +++ b/components/pdfless/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/pdfless", - "version": "0.1.0", + "version": "0.2.0", "description": "Pipedream Pdfless Components", "main": "pdfless.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pdfless/pdfless-js": "^1.0.510" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/pdfless/pdfless.app.mjs b/components/pdfless/pdfless.app.mjs index 2946d4e041708..7dc297e2c1016 100644 --- a/components/pdfless/pdfless.app.mjs +++ b/components/pdfless/pdfless.app.mjs @@ -1,7 +1,4 @@ -import { - PdfService, - TemplateService, -} from "@pdfless/pdfless-js"; +import { axios } from "@pipedream/platform"; export default { type: "app", @@ -11,36 +8,55 @@ export default { type: "string", label: "Template ID", description: "The unique identifier of the template.", - async options({ prevContext }) { - const page = prevContext?.page || 1; - return { - options: await this.listTemplatesOpts(page), - context: { + async options({ page }) { + const templates = await this.listTemplates({ + params: { page: page + 1, }, - }; + }); + return templates.map((template) => ({ + label: template.name, + value: template.id, + })); }, }, }, methods: { - async listTemplatesOpts(page) { - const templateService = new TemplateService(this.$auth.api_key); - const templates = await templateService.list(page); - return templates.map((template) => ({ - label: template.name, - value: template.id, - })); + getUrl(path) { + return `https://api.pdfless.com/v1${path}`; }, - generate({ - templateId, - payload, - }) { - const pdfService = new PdfService(this.$auth.api_key); - const generatePDFCommand = { - template_id: templateId, - payload: JSON.stringify(payload), + getHeaders() { + return { + "apikey": this.$auth.api_key, + "Content-Type": "application/json", }; - return pdfService.generate(generatePDFCommand); + }, + makeRequest({ + $ = this, path, ...args + } = {}) { + return axios($, { + url: this.getUrl(path), + headers: this.getHeaders(), + ...args, + }); + }, + post(args = {}) { + return this.makeRequest({ + method: "POST", + ...args, + }); + }, + listTemplates(args = {}) { + return this.makeRequest({ + path: "/document-templates", + ...args, + }); + }, + generate(args = {}) { + return this.post({ + path: "/pdfs", + ...args, + }); }, }, }; diff --git a/components/pendo/.gitignore b/components/pendo/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/pendo/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/pendo/app/pendo.app.ts b/components/pendo/app/pendo.app.ts deleted file mode 100644 index ccca5160abed9..0000000000000 --- a/components/pendo/app/pendo.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "pendo", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/pendo/package.json b/components/pendo/package.json index 8a08eb00de242..732824820c337 100644 --- a/components/pendo/package.json +++ b/components/pendo/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/pendo", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Pendo Components", - "main": "dist/app/pendo.app.mjs", + "main": "pendo.app.mjs", "keywords": [ "pipedream", "pendo" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/pendo", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/pendo/pendo.app.mjs b/components/pendo/pendo.app.mjs new file mode 100644 index 0000000000000..f93f7513cc300 --- /dev/null +++ b/components/pendo/pendo.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "pendo", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/perry_github_test/.gitignore b/components/perry_github_test/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/perry_github_test/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/perry_github_test/app/perry_github_test.app.ts b/components/perry_github_test/app/perry_github_test.app.ts deleted file mode 100644 index 721985a907bf6..0000000000000 --- a/components/perry_github_test/app/perry_github_test.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "perry_github_test", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/perry_github_test/package.json b/components/perry_github_test/package.json index c78b22cd0c695..31f91d2a1df40 100644 --- a/components/perry_github_test/package.json +++ b/components/perry_github_test/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/perry_github_test", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream github test app Components", - "main": "dist/app/perry_github_test.app.mjs", + "main": "perry_github_test.app.mjs", "keywords": [ "pipedream", "perry_github_test" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/perry_github_test", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/perry_github_test/perry_github_test.app.mjs b/components/perry_github_test/perry_github_test.app.mjs new file mode 100644 index 0000000000000..d3583f94c74c5 --- /dev/null +++ b/components/perry_github_test/perry_github_test.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "perry_github_test", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/persanaai/persanaai.app.mjs b/components/persanaai/persanaai.app.mjs index 86dd4c98f80da..849b6ed05e66b 100644 --- a/components/persanaai/persanaai.app.mjs +++ b/components/persanaai/persanaai.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/persistiq/package.json b/components/persistiq/package.json index 3585db4ec18cf..f4b33605637b9 100644 --- a/components/persistiq/package.json +++ b/components/persistiq/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/persistiq", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream PersistIQ Components", "main": "dist/app/persistiq.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/persistiq/tsconfig.json b/components/persistiq/tsconfig.json index e4f6e612b50bf..3a9389484d040 100644 --- a/components/persistiq/tsconfig.json +++ b/components/persistiq/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/phone_com/.gitignore b/components/phone_com/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/phone_com/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/phone_com/app/phone_com.app.ts b/components/phone_com/app/phone_com.app.ts deleted file mode 100644 index ef40bac02037f..0000000000000 --- a/components/phone_com/app/phone_com.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "phone_com", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/phone_com/package.json b/components/phone_com/package.json index fea40ea8081e9..3ffd4fb1c3348 100644 --- a/components/phone_com/package.json +++ b/components/phone_com/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/phone_com", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Phone.com Components", - "main": "dist/app/phone_com.app.mjs", + "main": "phone_com.app.mjs", "keywords": [ "pipedream", "phone_com" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/phone_com", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/phone_com/phone_com.app.mjs b/components/phone_com/phone_com.app.mjs new file mode 100644 index 0000000000000..ec21a4c094bd6 --- /dev/null +++ b/components/phone_com/phone_com.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "phone_com", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/pikaso/package.json b/components/pikaso/package.json index a292a9e4881a0..fa73755b741ed 100644 --- a/components/pikaso/package.json +++ b/components/pikaso/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/pikaso", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Pikaso Components", "main": "dist/app/pikaso.app.mjs", "keywords": [ @@ -17,5 +17,8 @@ }, "dependencies": { "@pipedream/platform": "^1.1.1" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/pikaso/tsconfig.json b/components/pikaso/tsconfig.json index 335fa6f1cf6ec..3a9389484d040 100644 --- a/components/pikaso/tsconfig.json +++ b/components/pikaso/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/pilvio/.gitignore b/components/pilvio/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/pilvio/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/pilvio/app/pilvio.app.ts b/components/pilvio/app/pilvio.app.ts deleted file mode 100644 index bd9d7025631ec..0000000000000 --- a/components/pilvio/app/pilvio.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "pilvio", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/pilvio/package.json b/components/pilvio/package.json index d7b3f662c0b68..f5530587a4511 100644 --- a/components/pilvio/package.json +++ b/components/pilvio/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/pilvio", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Pilvio Components", - "main": "dist/app/pilvio.app.mjs", + "main": "pilvio.app.mjs", "keywords": [ "pipedream", "pilvio" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/pilvio", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/pilvio/pilvio.app.mjs b/components/pilvio/pilvio.app.mjs new file mode 100644 index 0000000000000..e9e78cf1d348b --- /dev/null +++ b/components/pilvio/pilvio.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "pilvio", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/pingback/actions/add-subscriber-to-segmentation-lists/add-subscriber-to-segmentation-lists.mjs b/components/pingback/actions/add-subscriber-to-segmentation-lists/add-subscriber-to-segmentation-lists.mjs new file mode 100644 index 0000000000000..451e38cafbad7 --- /dev/null +++ b/components/pingback/actions/add-subscriber-to-segmentation-lists/add-subscriber-to-segmentation-lists.mjs @@ -0,0 +1,37 @@ +import { parseObject } from "../../common/utils.mjs"; +import pingback from "../../pingback.app.mjs"; + +export default { + name: "Add Subscriber To Segmentation Lists", + description: "Add a subscriber to segmentation lists by email [See the documentation](https://developer.pingback.com/docs/api/add-subscriber-to-segment)", + key: "pingback-add-subscriber-to-segmentation-lists", + version: "0.0.1", + type: "action", + props: { + pingback, + email: { + propDefinition: [ + pingback, + "email", + ], + }, + segmentationLists: { + propDefinition: [ + pingback, + "segmentationLists", + ], + }, + }, + async run({ $ }) { + const response = await this.pingback.addSubscriberToSegmentationLists({ + $, + email: this.email, + data: { + segmentationLists: parseObject(this.segmentationLists), + }, + }); + + $.export("$summary", `Subscriber ${this.email} added to segmentation list(s) successfully`); + return response; + }, +}; diff --git a/components/pingback/actions/create-subscriber/create-subscriber.mjs b/components/pingback/actions/create-subscriber/create-subscriber.mjs new file mode 100644 index 0000000000000..4ea178158bf1f --- /dev/null +++ b/components/pingback/actions/create-subscriber/create-subscriber.mjs @@ -0,0 +1,71 @@ +import { + parseCustomFields, + parseObject, +} from "../../common/utils.mjs"; +import pingback from "../../pingback.app.mjs"; + +export default { + name: "Create Subscriber", + description: "Create a new subscriber [See the documentation](https://developer.pingback.com/docs/api/create-subscriber)", + key: "pingback-create-subscriber", + version: "0.0.1", + type: "action", + props: { + pingback, + email: { + propDefinition: [ + pingback, + "email", + ], + }, + phone: { + propDefinition: [ + pingback, + "phone", + ], + }, + name: { + propDefinition: [ + pingback, + "name", + ], + }, + status: { + propDefinition: [ + pingback, + "status", + ], + }, + customFields: { + propDefinition: [ + pingback, + "customFields", + ], + }, + segmentationLists: { + propDefinition: [ + pingback, + "segmentationLists", + ], + }, + }, + async run({ $ }) { + const data = { + email: this.email, + phone: this.phone, + name: this.name, + status: this.status, + segmentationLists: parseObject(this.segmentationLists), + }; + + data.customFields = parseCustomFields(this.customFields); + + const response = await this.pingback.createSubscriber({ + $, + data, + }); + + $.export("$summary", `Subscriber created successfully with ID: ${response.data.data.id}`); + return response; + }, +}; diff --git a/components/pingback/actions/get-subscriber/get-subscriber.mjs b/components/pingback/actions/get-subscriber/get-subscriber.mjs new file mode 100644 index 0000000000000..b7bf2083be23a --- /dev/null +++ b/components/pingback/actions/get-subscriber/get-subscriber.mjs @@ -0,0 +1,32 @@ +import { ConfigurationError } from "@pipedream/platform"; +import pingback from "../../pingback.app.mjs"; + +export default { + name: "Get Subscriber", + description: "Get a subscriber by email [See the documentation](https://developer.pingback.com/docs/api/get-subscriber)", + key: "pingback-get-subscriber", + version: "0.0.1", + type: "action", + props: { + pingback, + email: { + propDefinition: [ + pingback, + "email", + ], + }, + }, + async run({ $ }) { + try { + const response = await this.pingback.getSubscriber({ + $, + email: this.email, + }); + + $.export("$summary", `Subscriber retrieved successfully with email: ${response.data.data.email}`); + return response; + } catch ({ response }) { + throw new ConfigurationError(response.data.error); + } + }, +}; diff --git a/components/pingback/actions/remove-subscriber-from-segmentation-list/remove-subscriber-from-segmentation-list.mjs b/components/pingback/actions/remove-subscriber-from-segmentation-list/remove-subscriber-from-segmentation-list.mjs new file mode 100644 index 0000000000000..c7adaf2d34a21 --- /dev/null +++ b/components/pingback/actions/remove-subscriber-from-segmentation-list/remove-subscriber-from-segmentation-list.mjs @@ -0,0 +1,37 @@ +import pingback from "../../pingback.app.mjs"; + +export default { + name: "Remove Subscriber From Segmentation List", + description: "Remove a subscriber from a segmentation list by email [See the documentation](https://developer.pingback.com/docs/api/remove-subscriber-from-segment)", + key: "pingback-remove-subscriber-from-segmentation-list", + version: "0.0.1", + type: "action", + props: { + pingback, + email: { + propDefinition: [ + pingback, + "email", + ], + }, + segmentationListId: { + propDefinition: [ + pingback, + "segmentationLists", + ], + type: "string[]", + label: "Segmentation Lists", + description: "Segmentation list ID to remove the subscriber from. You can get the ID by clicking audience and lists at Pingback dashboard.", + }, + }, + async run({ $ }) { + const response = await this.pingback.removeSubscriberFromSegmentationList({ + $, + email: this.email, + segmentationListId: this.segmentationListId, + }); + + $.export("$summary", `Subscriber ${this.email} removed from segmentation list ${this.segmentationListId} successfully`); + return response; + }, +}; diff --git a/components/pingback/actions/update-subscriber/update-subscriber.mjs b/components/pingback/actions/update-subscriber/update-subscriber.mjs new file mode 100644 index 0000000000000..0bcec71c63e22 --- /dev/null +++ b/components/pingback/actions/update-subscriber/update-subscriber.mjs @@ -0,0 +1,61 @@ +import { parseCustomFields } from "../../common/utils.mjs"; +import pingback from "../../pingback.app.mjs"; + +export default { + name: "Update Subscriber", + description: "Update a specific subscriber by email [See the documentation](https://developer.pingback.com/docs/api/update-subscriber)", + key: "pingback-update-subscriber", + version: "0.0.1", + type: "action", + props: { + pingback, + email: { + propDefinition: [ + pingback, + "email", + ], + }, + phone: { + propDefinition: [ + pingback, + "phone", + ], + }, + name: { + propDefinition: [ + pingback, + "name", + ], + }, + status: { + propDefinition: [ + pingback, + "status", + ], + }, + customFields: { + propDefinition: [ + pingback, + "customFields", + ], + }, + }, + async run({ $ }) { + const data = { + phone: this.phone, + name: this.name, + status: this.status, + }; + + data.customFields = parseCustomFields(this.customFields); + + const response = await this.pingback.updateSubscriber({ + $, + email: this.email, + data, + }); + + $.export("$summary", `Subscriber updated successfully with ID: ${response.data.data.id}`); + return response; + }, +}; diff --git a/components/pingback/common/constants.mjs b/components/pingback/common/constants.mjs new file mode 100644 index 0000000000000..3531e58d57972 --- /dev/null +++ b/components/pingback/common/constants.mjs @@ -0,0 +1,14 @@ +export const STATUS_OPTIONS = [ + { + label: "Free Subscriber", + value: "free_subscriber", + }, + { + label: "Paid Subscriber", + value: "paid_subscriber", + }, + { + label: "Unsubscribed Subscriber", + value: "unsubscribed_subscriber", + }, +]; diff --git a/components/pingback/common/utils.mjs b/components/pingback/common/utils.mjs new file mode 100644 index 0000000000000..04b1bed4e2330 --- /dev/null +++ b/components/pingback/common/utils.mjs @@ -0,0 +1,37 @@ +export const parseObject = (obj) => { + if (!obj) return undefined; + + if (Array.isArray(obj)) { + return obj.map((item) => { + if (typeof item === "string") { + try { + return JSON.parse(item); + } catch (e) { + return item; + } + } + return item; + }); + } + if (typeof obj === "string") { + try { + return JSON.parse(obj); + } catch (e) { + return obj; + } + } + return obj; +}; + +export const parseCustomFields = (customFields) => { + const parsedCustomFields = Object.entries(parseObject(customFields) || {}); + if (parsedCustomFields.length) { + return parsedCustomFields.map(([ + key, + value, + ]) => ({ + label: key, + value, + })); + } +}; diff --git a/components/pingback/package.json b/components/pingback/package.json index 77806c463f007..19c2fc4e095bf 100644 --- a/components/pingback/package.json +++ b/components/pingback/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/pingback", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream Pingback Components", "main": "pingback.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } -} \ No newline at end of file +} diff --git a/components/pingback/pingback.app.mjs b/components/pingback/pingback.app.mjs index 812a7e5b65d6f..798f9380fb320 100644 --- a/components/pingback/pingback.app.mjs +++ b/components/pingback/pingback.app.mjs @@ -1,11 +1,106 @@ +import { axios } from "@pipedream/platform"; +import { STATUS_OPTIONS } from "./common/constants.mjs"; + export default { type: "app", app: "pingback", - propDefinitions: {}, + propDefinitions: { + email: { + type: "string", + label: "Email", + description: "The email address of the subscriber", + }, + phone: { + type: "string", + label: "Phone", + description: "The phone number of the subscriber. Must be in E.164 format. E.g. +1234567890", + optional: true, + }, + name: { + type: "string", + label: "Name", + description: "The name of the subscriber", + optional: true, + }, + status: { + type: "string", + label: "Status", + description: "The status of the subscriber", + options: STATUS_OPTIONS, + optional: true, + }, + customFields: { + type: "object", + label: "Custom Fields", + description: "Custom fields for the subscriber", + optional: true, + }, + segmentationLists: { + type: "string[]", + label: "Segmentation Lists", + description: "Segmentation lists to add the subscriber to. You can get the ID by clicking audience and lists at Pingback dashboard.", + optional: true, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://connect.pingback.com/v1"; + }, + _headers() { + return { + "x-api-key": `${this.$auth.api_key}`, + }; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: this._baseUrl() + path, + headers: this._headers(), + ...opts, + }); + }, + createSubscriber(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/subscriber", + ...opts, + }); + }, + getSubscriber({ + email, ...opts + }) { + return this._makeRequest({ + path: `/subscriber/${email}`, + ...opts, + }); + }, + updateSubscriber({ + email, ...opts + }) { + return this._makeRequest({ + method: "PUT", + path: `/subscriber/${email}`, + ...opts, + }); + }, + addSubscriberToSegmentationLists({ + email, ...opts + }) { + return this._makeRequest({ + method: "POST", + path: `/segmentation/add-subscriber/${email}`, + ...opts, + }); + }, + removeSubscriberFromSegmentationList({ + email, segmentationListId, ...opts + }) { + return this._makeRequest({ + method: "DELETE", + path: `/segmentation/${segmentationListId}/remove-subscriber/${email}`, + ...opts, + }); }, }, }; diff --git a/components/pirate_weather/.gitignore b/components/pirate_weather/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/pirate_weather/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/pirate_weather/app/pirate_weather.app.ts b/components/pirate_weather/app/pirate_weather.app.ts deleted file mode 100644 index 7cd3b5759f43b..0000000000000 --- a/components/pirate_weather/app/pirate_weather.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "pirate_weather", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/pirate_weather/package.json b/components/pirate_weather/package.json index 8326af7b61c20..821829bd4a272 100644 --- a/components/pirate_weather/package.json +++ b/components/pirate_weather/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/pirate_weather", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Pirate Weather Components", - "main": "dist/app/pirate_weather.app.mjs", + "main": "pirate_weather.app.mjs", "keywords": [ "pipedream", "pirate_weather" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/pirate_weather", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/pirate_weather/pirate_weather.app.mjs b/components/pirate_weather/pirate_weather.app.mjs new file mode 100644 index 0000000000000..bae16120d17de --- /dev/null +++ b/components/pirate_weather/pirate_weather.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "pirate_weather", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/placetel/.gitignore b/components/placetel/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/placetel/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/placetel/app/placetel.app.ts b/components/placetel/app/placetel.app.ts deleted file mode 100644 index 069b0e481e304..0000000000000 --- a/components/placetel/app/placetel.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "placetel", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/placetel/package.json b/components/placetel/package.json index 561ed666b53de..a5c547dc3a76f 100644 --- a/components/placetel/package.json +++ b/components/placetel/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/placetel", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Placetel Components", - "main": "dist/app/placetel.app.mjs", + "main": "placetel.app.mjs", "keywords": [ "pipedream", "placetel" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/placetel", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/placetel/placetel.app.mjs b/components/placetel/placetel.app.mjs new file mode 100644 index 0000000000000..2be6ef539b210 --- /dev/null +++ b/components/placetel/placetel.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "placetel", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/placid/package.json b/components/placid/package.json index 825b7055cb667..e154928e558c6 100644 --- a/components/placid/package.json +++ b/components/placid/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/placid", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Placid Components", "main": "placid.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/planday/planday.app.mjs b/components/planday/planday.app.mjs index bc4b76ce0e48e..92c6edbed899f 100644 --- a/components/planday/planday.app.mjs +++ b/components/planday/planday.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/planso_forms/.gitignore b/components/planso_forms/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/planso_forms/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/planso_forms/app/planso_forms.app.ts b/components/planso_forms/app/planso_forms.app.ts deleted file mode 100644 index f0a2aaedad338..0000000000000 --- a/components/planso_forms/app/planso_forms.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "planso_forms", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/planso_forms/package.json b/components/planso_forms/package.json index 810caa27c7851..d5599fa5b1abb 100644 --- a/components/planso_forms/package.json +++ b/components/planso_forms/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/planso_forms", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream PlanSo Forms Components", - "main": "dist/app/planso_forms.app.mjs", + "main": "planso_forms.app.mjs", "keywords": [ "pipedream", "planso_forms" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/planso_forms", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/planso_forms/planso_forms.app.mjs b/components/planso_forms/planso_forms.app.mjs new file mode 100644 index 0000000000000..ead2842655111 --- /dev/null +++ b/components/planso_forms/planso_forms.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "planso_forms", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/plasmic/.gitignore b/components/plasmic/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/plasmic/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/plasmic/app/plasmic.app.ts b/components/plasmic/app/plasmic.app.ts deleted file mode 100644 index 0c4e48f2d040b..0000000000000 --- a/components/plasmic/app/plasmic.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "plasmic", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/plasmic/package.json b/components/plasmic/package.json index 7146fd0d12d47..0cd5a26580622 100644 --- a/components/plasmic/package.json +++ b/components/plasmic/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/plasmic", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Plasmic Components", - "main": "dist/app/plasmic.app.mjs", + "main": "plasmic.app.mjs", "keywords": [ "pipedream", "plasmic" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/plasmic", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/plasmic/plasmic.app.mjs b/components/plasmic/plasmic.app.mjs new file mode 100644 index 0000000000000..13c8811bd4e06 --- /dev/null +++ b/components/plasmic/plasmic.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "plasmic", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/platform_ly/.gitignore b/components/platform_ly/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/platform_ly/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/platform_ly/app/platform_ly.app.ts b/components/platform_ly/app/platform_ly.app.ts deleted file mode 100644 index 6d79fc2ee1b0f..0000000000000 --- a/components/platform_ly/app/platform_ly.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "platform_ly", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/platform_ly/package.json b/components/platform_ly/package.json index 00121b749d932..172925827c9a6 100644 --- a/components/platform_ly/package.json +++ b/components/platform_ly/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/platform_ly", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Platform.ly Components", - "main": "dist/app/platform_ly.app.mjs", + "main": "platform_ly.app.mjs", "keywords": [ "pipedream", "platform_ly" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/platform_ly", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/platform_ly/platform_ly.app.mjs b/components/platform_ly/platform_ly.app.mjs new file mode 100644 index 0000000000000..2f4cc1036ea6c --- /dev/null +++ b/components/platform_ly/platform_ly.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "platform_ly", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/playwright/actions/get-page-html/get-page-html.mjs b/components/playwright/actions/get-page-html/get-page-html.mjs index 20716ffc92395..bf543337c70bd 100644 --- a/components/playwright/actions/get-page-html/get-page-html.mjs +++ b/components/playwright/actions/get-page-html/get-page-html.mjs @@ -4,7 +4,7 @@ export default { key: "playwright-get-page-html", name: "Get Page HTML", description: "Returns the page's html. [See the documentation](https://playwright.dev/docs/api/class-page#page-content)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { playwright, diff --git a/components/playwright/actions/get-page-title/get-page-title.mjs b/components/playwright/actions/get-page-title/get-page-title.mjs index 81a7b7d25d518..e90fef84e978f 100644 --- a/components/playwright/actions/get-page-title/get-page-title.mjs +++ b/components/playwright/actions/get-page-title/get-page-title.mjs @@ -4,7 +4,7 @@ export default { key: "playwright-get-page-title", name: "Get Page Title", description: "Returns the page's title. [See the documentation](https://playwright.dev/docs/api/class-page#page-title)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { playwright, diff --git a/components/playwright/actions/page-pdf/page-pdf.mjs b/components/playwright/actions/page-pdf/page-pdf.mjs index e26794a7c399d..7c342b643d417 100644 --- a/components/playwright/actions/page-pdf/page-pdf.mjs +++ b/components/playwright/actions/page-pdf/page-pdf.mjs @@ -4,7 +4,7 @@ export default { key: "playwright-page-pdf", name: "Page PDF", description: "Generates a pdf of the page and store it on /tmp directory. [See the documentation](https://playwright.dev/docs/api/class-page#page-pdf)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { playwright, diff --git a/components/playwright/actions/take-screenshot/take-screenshot.mjs b/components/playwright/actions/take-screenshot/take-screenshot.mjs index b4d02a45808de..f9bdcbda8eacb 100644 --- a/components/playwright/actions/take-screenshot/take-screenshot.mjs +++ b/components/playwright/actions/take-screenshot/take-screenshot.mjs @@ -4,7 +4,7 @@ export default { key: "playwright-take-screenshot", name: "Take Screenshot", description: "Store a new screenshot file on /tmp directory. [See the documentation](https://playwright.dev/docs/screenshots)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { playwright, diff --git a/components/playwright/package.json b/components/playwright/package.json index 0d4573cf16e12..72e97eda20eda 100644 --- a/components/playwright/package.json +++ b/components/playwright/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/playwright", - "version": "0.1.1", + "version": "0.1.2", "description": "Pipedream Playwright Components", "main": "playwright.app.mjs", "keywords": [ @@ -13,6 +13,7 @@ "access": "public" }, "dependencies": { + "@pipedream/types": "^0.3.2", "@sparticuz/chromium": "121.0.0", "playwright-core": "1.41.2" } diff --git a/components/playwright/playwright.app.mjs b/components/playwright/playwright.app.mjs index 70251b6e6baf5..0b29b267040ed 100644 --- a/components/playwright/playwright.app.mjs +++ b/components/playwright/playwright.app.mjs @@ -3,8 +3,8 @@ import { defineApp } from "@pipedream/types"; // can be found here: https://www.browserstack.com/docs/automate/playwright/browsers-and-os // The reason why playwright is locked to an old version is because // the latest Puppeeter Chromium version that works in a code step is chromium@112 -import { chromium as playwright } from "playwright-core@1.41.2"; -import chromium from "@sparticuz/chromium@121.0.0"; +import { chromium as playwright } from "playwright-core"; +import chromium from "@sparticuz/chromium"; export default defineApp({ type: "app", diff --git a/components/plecto/package.json b/components/plecto/package.json index d0f6b0a6c2c46..7c7a6f9654a98 100644 --- a/components/plecto/package.json +++ b/components/plecto/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/plecto", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Plecto Components", "main": "plecto.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/plentyone/actions/add-order-note/add-order-note.mjs b/components/plentyone/actions/add-order-note/add-order-note.mjs new file mode 100644 index 0000000000000..663f434b8edd7 --- /dev/null +++ b/components/plentyone/actions/add-order-note/add-order-note.mjs @@ -0,0 +1,42 @@ +import plentyone from "../../plentyone.app.mjs"; + +export default { + key: "plentyone-add-order-note", + name: "Add Order Note", + description: "Adds a note to an order in PlentyONE. [See the documentation](https://developers.plentymarkets.com/en-gb/plentymarkets-rest-api/index.html#/Comment/post_rest_comments)", + version: "0.0.1", + type: "action", + props: { + plentyone, + orderId: { + propDefinition: [ + plentyone, + "orderId", + ], + }, + text: { + type: "string", + label: "Note Text", + description: "The text of the note to add.", + }, + isVisibleForContact: { + type: "boolean", + label: "Is Visible for Contact", + description: "Whether the note is visible to the contact.", + }, + }, + async run({ $ }) { + const response = await this.plentyone.addOrderNote({ + $, + data: { + referenceType: "order", + referenceValue: this.orderId, + text: this.text, + isVisibleForContact: this.isVisibleForContact, + }, + }); + + $.export("$summary", `Successfully added note to order: ${this.orderId}`); + return response; + }, +}; diff --git a/components/plentyone/actions/create-order/create-order.mjs b/components/plentyone/actions/create-order/create-order.mjs new file mode 100644 index 0000000000000..2d2a62eeff836 --- /dev/null +++ b/components/plentyone/actions/create-order/create-order.mjs @@ -0,0 +1,97 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { + LOCK_STATUS_OPTIONS, + ORDER_TYPE_OPTIONS, +} from "../../common/constants.mjs"; +import { parseObject } from "../../common/utils.mjs"; +import plentyone from "../../plentyone.app.mjs"; + +export default { + key: "plentyone-create-order", + name: "Create Order", + description: "Creates a new order in PlentyONE. [See the documentation](https://developers.plentymarkets.com/en-gb/plentymarkets-rest-api/index.html#/Order/post_rest_orders)", + version: "0.0.1", + type: "action", + props: { + plentyone, + orderTypeId: { + type: "integer", + label: "Order Type ID", + description: "The ID of the order type.", + options: ORDER_TYPE_OPTIONS, + }, + plentyId: { + type: "integer", + label: "Plenty ID", + description: "The plenty ID of the client that the order belongs to.", + }, + statusId: { + propDefinition: [ + plentyone, + "statusId", + ], + optional: true, + }, + ownerId: { + type: "integer", + label: "Owner ID", + description: "The user ID of the order's owner.", + optional: true, + }, + lockStatus: { + type: "string", + label: "Lock Status", + description: "The lock status of the order.", + options: LOCK_STATUS_OPTIONS, + optional: true, + }, + orderItems: { + type: "string[]", + label: "Order Items", + description: "A list of objects of the order items. [See the documentation](https://developers.plentymarkets.com/en-gb/plentymarkets-rest-api/index.html#/Order/post_rest_orders) for more details.", + optional: true, + }, + properties: { + type: "string[]", + label: "Properties", + description: "A list of objects of the order properties. [See the documentation](https://developers.plentymarkets.com/en-gb/plentymarkets-rest-api/index.html#/Order/post_rest_orders) for more details.", + optional: true, + }, + addressRelations: { + type: "string[]", + label: "Address Relations", + description: "A list of objects of the order address relations. [See the documentation](https://developers.plentymarkets.com/en-gb/plentymarkets-rest-api/index.html#/Order/post_rest_orders) for more details.", + optional: true, + }, + relations: { + type: "string[]", + label: "Relations", + description: "A list of objects of the order relations. [See the documentation](https://developers.plentymarkets.com/en-gb/plentymarkets-rest-api/index.html#/Order/post_rest_orders) for more details.", + optional: true, + }, + }, + async run({ $ }) { + try { + const response = await this.plentyone.createOrder({ + $, + data: { + typeId: this.orderTypeId, + plentyId: this.plentyId, + statusId: this.statusId, + ownerId: this.ownerId, + lockStatus: this.lockStatus, + orderItems: parseObject(this.orderItems), + properties: parseObject(this.properties), + addressRelations: parseObject(this.addressRelations), + relations: parseObject(this.relations), + }, + }); + + $.export("$summary", `Successfully created order: ${response.id}`); + return response; + } catch (error) { + $.export("$summary", "Failed to create order"); + throw new ConfigurationError(error); + } + }, +}; diff --git a/components/plentyone/actions/get-order-documents/get-order-documents.mjs b/components/plentyone/actions/get-order-documents/get-order-documents.mjs new file mode 100644 index 0000000000000..3d2d63f46f679 --- /dev/null +++ b/components/plentyone/actions/get-order-documents/get-order-documents.mjs @@ -0,0 +1,29 @@ +import plentyone from "../../plentyone.app.mjs"; + +export default { + key: "plentyone-get-order-documents", + name: "Get Order Documents", + description: "Retrieves documents for a specific order from PlentyONE. [See the documentation](https://developers.plentymarkets.com/en-gb/plentymarkets-rest-api/index.html#/Document/get_rest_orders_documents_find)", + version: "0.0.1", + type: "action", + props: { + plentyone, + orderId: { + propDefinition: [ + plentyone, + "orderId", + ], + }, + }, + async run({ $ }) { + const response = await this.plentyone.getOrderDocuments({ + $, + params: { + orderId: this.orderId, + }, + }); + + $.export("$summary", `Successfully retrieved ${response.entries.length} documents for order: ${this.orderId}`); + return response; + }, +}; diff --git a/components/plentyone/actions/get-order-items/get-order-items.mjs b/components/plentyone/actions/get-order-items/get-order-items.mjs new file mode 100644 index 0000000000000..a1d02ab9fc706 --- /dev/null +++ b/components/plentyone/actions/get-order-items/get-order-items.mjs @@ -0,0 +1,35 @@ +import plentyone from "../../plentyone.app.mjs"; + +export default { + key: "plentyone-get-order-items", + name: "Get Order Items", + description: "Retrieves items for a specific order from PlentyONE [See the documentation](https://developers.plentymarkets.com/en-gb/plentymarkets-rest-api/index.html#/Order/get_rest_orders__orderId_)", + version: "0.0.1", + type: "action", + props: { + plentyone, + orderId: { + propDefinition: [ + plentyone, + "orderId", + ], + }, + }, + async run({ $ }) { + try { + const response = await this.plentyone.getOrder({ + $, + orderId: this.orderId, + params: { + addOrderItems: true, + }, + }); + + $.export("$summary", `Successfully retrieved ${response.orderItems.length} items for order: ${this.orderId}`); + return response.orderItems; + } catch (error) { + $.export("$summary", `No items found for order: ${this.orderId}`); + return {}; + } + }, +}; diff --git a/components/plentyone/actions/get-order-properties/get-order-properties.mjs b/components/plentyone/actions/get-order-properties/get-order-properties.mjs new file mode 100644 index 0000000000000..f4030a4665902 --- /dev/null +++ b/components/plentyone/actions/get-order-properties/get-order-properties.mjs @@ -0,0 +1,27 @@ +import plentyone from "../../plentyone.app.mjs"; + +export default { + key: "plentyone-get-order-properties", + name: "Get Order Properties", + description: "Retrieves properties for a specific order from PlentyONE [See the documentation](https://developers.plentymarkets.com/en-gb/plentymarkets-rest-api/index.html#/Order/get_rest_orders__orderId_)", + version: "0.0.1", + type: "action", + props: { + plentyone, + orderId: { + propDefinition: [ + plentyone, + "orderId", + ], + }, + }, + async run({ $ }) { + const response = await this.plentyone.getOrder({ + $, + orderId: this.orderId, + }); + + $.export("$summary", `Successfully retrieved properties for order with ID: ${this.orderId}`); + return response.properties; + }, +}; diff --git a/components/plentyone/actions/get-order/get-order.mjs b/components/plentyone/actions/get-order/get-order.mjs new file mode 100644 index 0000000000000..38c5b98b6577a --- /dev/null +++ b/components/plentyone/actions/get-order/get-order.mjs @@ -0,0 +1,32 @@ +import plentyone from "../../plentyone.app.mjs"; + +export default { + key: "plentyone-get-order", + name: "Get Order", + description: "Retrieves a specific order by ID from PlentyONE. [See the documentation](https://developers.plentymarkets.com/en-gb/plentymarkets-rest-api/index.html#/Order/get_rest_orders__orderId_)", + version: "0.0.1", + type: "action", + props: { + plentyone, + orderId: { + propDefinition: [ + plentyone, + "orderId", + ], + }, + }, + async run({ $ }) { + try { + const response = await this.plentyone.getOrder({ + $, + orderId: this.orderId, + }); + + $.export("$summary", `Successfully retrieved order: ${this.orderId}`); + return response; + } catch (error) { + $.export("$summary", `No order found with ID: ${this.orderId}`); + return {}; + } + }, +}; diff --git a/components/plentyone/actions/get-orders/get-orders.mjs b/components/plentyone/actions/get-orders/get-orders.mjs new file mode 100644 index 0000000000000..20c7c8bfe3a44 --- /dev/null +++ b/components/plentyone/actions/get-orders/get-orders.mjs @@ -0,0 +1,189 @@ +import { + ORDER_TYPE_OPTIONS, + ORDER_WITH_OPTIONS, + PAYMENT_STATUS_OPTIONS, +} from "../../common/constants.mjs"; +import { parseObject } from "../../common/utils.mjs"; +import plentyone from "../../plentyone.app.mjs"; + +export default { + key: "plentyone-get-orders", + name: "Get Orders", + description: "Retrieves a list of orders from PlentyONE. [See the documentation](https://developers.plentymarkets.com/en-gb/plentymarkets-rest-api/index.html#/Order/get_rest_orders)", + version: "0.0.1", + type: "action", + props: { + plentyone, + typeID: { + type: "integer", + label: "Order Type ID", + description: "Type of order to retrieve. If not provided, all order types will be retrieved.", + options: ORDER_TYPE_OPTIONS, + optional: true, + }, + contactId: { + propDefinition: [ + plentyone, + "contactId", + ], + optional: true, + }, + contactData: { + type: "string", + label: "Contact Data", + description: "Filter that restricts the search result to orders with a specific contact data.", + optional: true, + }, + referrerId: { + type: "integer", + label: "Referrer ID", + description: "Filter that restricts the search result to orders of a specific order referrer. The ID of the order referrer must be specified.", + optional: true, + }, + shippingProfileId: { + type: "integer", + label: "Shipping Profile ID", + description: "Filter that restricts the search result to orders with a specific shipping profile. The ID of shipping profile must be specified.", + optional: true, + }, + shippingServiceProviderId: { + type: "integer", + label: "Shipping Service Provider ID", + description: "Filter that restricts the search result to orders with a specific shipping service provider (like DHL, UPS, etc.). The ID of shipping service provider must be specified.", + optional: true, + }, + ownerUserId: { + type: "integer", + label: "Owner User ID", + description: "Filter that restricts the search result to orders with a specific owner. The user ID of the owner must be specified.", + optional: true, + }, + warehouseId: { + type: "integer", + label: "Warehouse ID", + description: "Filter that restricts the search result to orders with a specific main warehouse. The ID of the warehouse must be specified.", + optional: true, + }, + isEbayPlus: { + type: "boolean", + label: "Is eBay Plus", + description: "Filter that restricts the search result to orders with the referrer eBay PLUS.", + optional: true, + }, + includedVariation: { + type: "integer", + label: "Included Variation", + description: "Filter that restricts the search result to orders including a specific variation. The ID of the variation must be specified.", + optional: true, + }, + includedItem: { + type: "integer", + label: "Included Item", + description: "Filter that restricts the search result to orders including a specific item. The ID of the item must be specified.", + optional: true, + }, + orderIds: { + propDefinition: [ + plentyone, + "orderId", + ], + type: "string[]", + label: "Order IDs", + description: "Filter that restricts the search result to orders with a specific ID.", + optional: true, + }, + countryId: { + propDefinition: [ + plentyone, + "countryId", + ], + optional: true, + }, + orderItemName: { + type: "string", + label: "Order Item Name", + description: "Filter that restricts the search result to orders including a specific item name. The name of the item must be specified.", + optional: true, + }, + variationNumber: { + type: "integer", + label: "Variation Number", + description: "Filter that restricts the search result to orders including a specific variation number. The number of the variation must be specified.", + optional: true, + }, + packageNumber: { + type: "string", + label: "Package Number", + description: "Filter that restricts the search result to orders including a specific package number. The number of the package must be specified.", + optional: true, + }, + externalOrderId: { + type: "string", + label: "External Order ID", + description: "Filter that restricts the search result to orders including a specific external order ID. The external order ID must be specified.", + optional: true, + }, + clientId: { + type: "integer", + label: "Client ID", + description: "Filter that restricts the search result to orders belonging to a specific client. The ID of the client must be specified.", + optional: true, + }, + paymentStatus: { + type: "string", + label: "Payment Status", + description: "Filter that restricts the search result to orders with a specific payment status.", + options: PAYMENT_STATUS_OPTIONS, + optional: true, + }, + paymentMethodId: { + type: "integer", + label: "Payment Method ID", + description: "Filter that restricts the search result to orders with a specific payment method. The ID of the payment method must be specified.", + optional: true, + }, + with: { + type: "string[]", + label: "With", + description: "Load additional relations for an order.", + options: ORDER_WITH_OPTIONS, + optional: true, + }, + }, + async run({ $ }) { + try { + const response = await this.plentyone.getOrders({ + $, + params: { + typeID: this.typeID, + contactId: this.contactId, + contactData: this.contactData, + referrerId: this.referrerId, + shippingProfileId: this.shippingProfileId, + shippingServiceProviderId: this.shippingServiceProviderId, + ownerUserId: this.ownerUserId, + warehouseId: this.warehouseId, + isEbayPlus: this.isEbayPlus, + includedVariation: this.includedVariation, + includedItem: this.includedItem, + orderIds: parseObject(this.orderIds), + countryId: this.countryId, + orderItemName: this.orderItemName, + variationNumber: this.variationNumber, + packageNumber: this.packageNumber, + externalOrderId: this.externalOrderId, + clientId: this.clientId, + paymentStatus: this.paymentStatus, + paymentMethodId: this.paymentMethodId, + with: parseObject(this.with), + }, + }); + + $.export("$summary", `Successfully retrieved ${response.data?.length || 0} orders`); + return response; + } catch (error) { + $.export("$summary", "Successfully retrieved 0 orders"); + return {}; + } + }, +}; diff --git a/components/plentyone/common/constants.mjs b/components/plentyone/common/constants.mjs new file mode 100644 index 0000000000000..cda95dd8726ab --- /dev/null +++ b/components/plentyone/common/constants.mjs @@ -0,0 +1,327 @@ +const ORDER_TYPE_OPTIONS = [ + { + label: "Sales order", + value: 1, + }, + { + label: "Delivery", + value: 2, + }, + { + label: "Returns", + value: 3, + }, + { + label: "Credit note", + value: 4, + }, + { + label: "Warranty", + value: 5, + }, + { + label: "Repair", + value: 6, + }, + { + label: "Offer", + value: 7, + }, + { + label: "Advance order", + value: 8, + }, + { + label: "Multi-order", + value: 9, + }, + { + label: "Multi credit note", + value: 10, + }, + { + label: "Multi delivery", + value: 11, + }, + { + label: "Reorder", + value: 12, + }, + { + label: "Partial delivery", + value: 13, + }, + { + label: "Subscription", + value: 14, + }, + { + label: "Redistribution", + value: 15, + }, +]; + +const REASON_OPTIONS = [ + { + label: "Incoming items", + value: 101, + }, + { + label: "Booked in by stocktaking", + value: 102, + }, + { + label: "Rebooked into stock because no production errors were found", + value: 104, + }, + { + label: "Maculation canceled", + value: 106, + }, + { + label: "Packing error, items are re-booked", + value: 107, + }, + { + label: "Incoming items (logistics)", + value: 109, + }, + { + label: "Incoming items (second choice)", + value: 115, + }, + { + label: "Booked in by correction", + value: 116, + }, + { + label: "Unpacked item", + value: 117, + }, + { + label: "Incoming items (purchase order)", + value: 180, + }, + { + label: "Incoming items (warehousing)", + value: 181, + }, +]; + +const OUTGOING_REASON_OPTIONS = [ + { + label: "Outbound items", + value: 201, + }, + { + label: "Outbound inventur", + value: 202, + }, + { + label: "Outbound rubbish", + value: 205, + }, + { + label: "Outbound packing error", + value: 206, + }, + { + label: "Outbound defect", + value: 207, + }, + { + label: "Outbound complaint", + value: 208, + }, + { + label: "Outbound logistic", + value: 209, + }, + { + label: "Outbound warehouse movement", + value: 214, + }, + { + label: "Outbound second choise", + value: 215, + }, + { + label: "Outbound correction", + value: 216, + }, + { + label: "Outbound purchase order", + value: 280, + }, + { + label: "Outbound loss", + value: 281, + }, +]; + +const PAYMENT_STATUS_OPTIONS = [ + { + label: "Unpaid", + value: "unpaid", + }, + { + label: "Partly paid", + value: "partlyPaid", + }, + { + label: "Fully paid", + value: "fullyPaid", + }, + { + label: "Overpaid", + value: "overpaid", + }, +]; + +const ORDER_WITH_OPTIONS = [ + { + label: "Addresses - The address objects that are associated with the order.", + value: "addresses", + }, + { + label: "Relations - The order relation reference instances that are associated with the order. These instances contain information such as the the reference type, the ID of the reference and the relation itself.", + value: "relations", + }, + { + label: "Comments - The order comments.", + value: "comments", + }, + { + label: "Location - The accounting location of the order.", + value: "location", + }, + { + label: "Payments - The payments that are associated with the order.", + value: "payments", + }, + { + label: "Documents - The documents that are associated with the order.", + value: "documents", + }, + { + label: "Contact Sender - The associated contact for the contact-sender relation.", + value: "contactSender", + }, + { + label: "Contact Receiver - The associated contact for the contact-receiver relation.", + value: "contactReceiver", + }, + { + label: "Warehouse Sender - The associated warehouse for the warehouse-sender relation.", + value: "warehouseSender", + }, + { + label: "Warehouse Receiver - The associated warehouse for the warehouse-receiver relation.", + value: "warehouseReceiver", + }, + { + label: "Order Items Variation - The variation that is associated with the order item.", + value: "orderItems.variation", + }, + { + label: "Order Items Variation Properties - The properties belonging to the variation.", + value: "orderItems.variation.propertiesV2", + }, + { + label: "Order Items Gift Card Codes - The gift card codes that are associated with the order item.", + value: "orderItems.giftCardCodes", + }, + { + label: "Order Items Transactions - The transactions that are associated with the order item.", + value: "orderItems.transactions", + }, + { + label: "Order Items Serial Numbers - The serial numbers that are associated with the order item.", + value: "orderItems.serialNumbers", + }, + { + label: "Order Items Variation Barcodes - The barcodes that are associated with variation of the order item.", + value: "orderItems.variationBarcodes", + }, + { + label: "Order Items Comments - The comments that are associated with the order item.", + value: "orderItems.comments", + }, + { + label: "Origin Order References - The references to other orders, e.g. returns or credit notes, associated with this order.", + value: "originOrderReferences", + }, + { + label: "Shipping Packages - The shipping packages that are associated with the order.", + value: "shippingPackages", + }, + { + label: "Shipping Packages Items - The orderPackageItems associated with the package.", + value: "shippingPackages.items", + }, + { + label: "Shipping Information - The shipping information for the order.", + value: "shippingInformation", + }, + { + label: "Payment Terms - The payment terms that are associated with the order.", + value: "paymentTerms", + }, + { + label: "Order Items Warehouse Locations - The warehouse locations that are associated with the order item.", + value: "orderItems.warehouseLocations", + }, +]; + +const PAYMENT_TYPE_OPTIONS = [ + { + label: "Credit", + value: "credit", + }, + { + label: "Debit", + value: "debit", + }, +]; + +const TRANSACTION_TYPE_OPTIONS = [ + + { + label: "Interim transaction report", + value: 1, + }, + { + label: "Booked payment", + value: 2, + }, + { + label: "Split payment", + value: 3, + }, +]; + +const LOCK_STATUS_OPTIONS = [ + { + label: "Unlocked", + value: "unlocked", + }, + { + label: "Permanently locked", + value: "permanentlyLocked", + }, + { + label: "Reversible locked", + value: "reversibleLocked", + }, +]; +export { + LOCK_STATUS_OPTIONS, + ORDER_TYPE_OPTIONS, + ORDER_WITH_OPTIONS, + OUTGOING_REASON_OPTIONS, + PAYMENT_STATUS_OPTIONS, + PAYMENT_TYPE_OPTIONS, + REASON_OPTIONS, + TRANSACTION_TYPE_OPTIONS, +}; + diff --git a/components/plentyone/common/utils.mjs b/components/plentyone/common/utils.mjs new file mode 100644 index 0000000000000..dcc9cc61f6f41 --- /dev/null +++ b/components/plentyone/common/utils.mjs @@ -0,0 +1,24 @@ +export const parseObject = (obj) => { + if (!obj) return undefined; + + if (Array.isArray(obj)) { + return obj.map((item) => { + if (typeof item === "string") { + try { + return JSON.parse(item); + } catch (e) { + return item; + } + } + return item; + }); + } + if (typeof obj === "string") { + try { + return JSON.parse(obj); + } catch (e) { + return obj; + } + } + return obj; +}; diff --git a/components/plentyone/package.json b/components/plentyone/package.json new file mode 100644 index 0000000000000..99871fa2e9cf6 --- /dev/null +++ b/components/plentyone/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/plentyone", + "version": "0.1.0", + "description": "Pipedream PlentyONE Components", + "main": "plentyone.app.mjs", + "keywords": [ + "pipedream", + "plentyone" + ], + "homepage": "https://pipedream.com/apps/plentyone", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + } +} diff --git a/components/plentyone/plentyone.app.mjs b/components/plentyone/plentyone.app.mjs new file mode 100644 index 0000000000000..f38cf4b01d020 --- /dev/null +++ b/components/plentyone/plentyone.app.mjs @@ -0,0 +1,214 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "plentyone", + propDefinitions: { + warehouseId: { + type: "integer", + label: "Warehouse ID", + description: "The ID of the warehouse.", + async options() { + const data = await this.getWarehouses(); + + return data.map(({ + id: value, name: label, + }) => ({ + label, + value, + })); + }, + }, + contactId: { + type: "string", + label: "Contact ID", + description: "ID of the contact to retrieve orders for.", + async options({ page }) { + const { entries } = await this.getContacts({ + params: { + page: page + 1, + }, + }); + + return entries.map(({ + plentyId: value, title, firstName, lastName, + }) => ({ + label: `${title} ${firstName} ${lastName}`, + value, + })); + }, + }, + orderId: { + type: "string", + label: "Order ID", + description: "ID of the order to retrieve documents for.", + async options({ page }) { + const { entries } = await this.getOrders({ + params: { + page: page + 1, + }, + }); + + return entries.map(({ id }) => ({ + label: id, + value: id, + })); + }, + }, + countryId: { + type: "integer", + label: "Country ID", + description: "Filter that restricts the search result to orders with a specific delivery or invoice country.", + async options({ page }) { + const data = await this.getCountries({ + params: { + page: page + 1, + }, + }); + + return data.map(({ + id: value, name: label, + }) => ({ + label, + value, + })); + }, + }, + orderItemId: { + type: "string", + label: "Order Item ID", + description: "ID of the order item to delete.", + async options({ + page, orderId, + }) { + const { entries } = await this.getOrderItems({ + orderId, + params: { + page: page + 1, + }, + }); + + return entries.map(({ + itemVariationId: value, orderItemName: label, + }) => ({ + label, + value, + })); + }, + }, + statusId: { + type: "integer", + label: "Status ID", + description: "The ID of the order status.", + async options({ page }) { + const { entries } = await this.getOrderStatuses({ + params: { + page: page + 1, + }, + }); + + return entries.map(({ + statusId: value, names: { en: label }, + }) => ({ + label, + value, + })); + }, + }, + }, + methods: { + _headers() { + return { + "Authorization": `Bearer ${this.$auth.oauth_access_token}`, + "Content-Type": "application/json", + }; + }, + _baseUrl() { + return `https://p${this.$auth.id}.my.plentysystems.com/rest`; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: this._baseUrl() + path, + headers: this._headers(), + ...opts, + }); + }, + addOrderNote(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/comments", + ...opts, + }); + }, + getWarehouses(opts = {}) { + return this._makeRequest({ + path: "/stockmanagement/warehouses", + ...opts, + }); + }, + getOrders(opts = {}) { + return this._makeRequest({ + path: "/orders", + ...opts, + }); + }, + getOrder({ + orderId, ...opts + }) { + return this._makeRequest({ + path: `/orders/${orderId}`, + ...opts, + }); + }, + getOrderStatuses(opts = {}) { + return this._makeRequest({ + path: "/orders/statuses", + ...opts, + }); + }, + getContacts(opts = {}) { + return this._makeRequest({ + path: "/accounts/contacts", + ...opts, + }); + }, + getOrderDocuments(opts = {}) { + return this._makeRequest({ + path: "/orders/documents/find", + ...opts, + }); + }, + getCountries(opts = {}) { + return this._makeRequest({ + path: "/orders/shipping/countries", + ...opts, + }); + }, + getReturns({ + orderId, ...opts + }) { + return this._makeRequest({ + path: `/orders/${orderId}/shipping/returns`, + ...opts, + }); + }, + getOrderItems({ + orderId, ...opts + }) { + return this._makeRequest({ + method: "GET", + path: `/orders/${orderId}/items`, + ...opts, + }); + }, + createOrder(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/orders", + ...opts, + }); + }, + }, +}; diff --git a/components/plisio/.gitignore b/components/plisio/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/plisio/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/plisio/app/plisio.app.ts b/components/plisio/app/plisio.app.ts deleted file mode 100644 index b9b14fd7f60d6..0000000000000 --- a/components/plisio/app/plisio.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "plisio", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/plisio/package.json b/components/plisio/package.json index 05b23f70bdfe4..1d3220cf019c9 100644 --- a/components/plisio/package.json +++ b/components/plisio/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/plisio", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Plisio Components", - "main": "dist/app/plisio.app.mjs", + "main": "plisio.app.mjs", "keywords": [ "pipedream", "plisio" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/plisio", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/plisio/plisio.app.mjs b/components/plisio/plisio.app.mjs new file mode 100644 index 0000000000000..6f6ae3f9c724b --- /dev/null +++ b/components/plisio/plisio.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "plisio", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/pobuca_connect/.gitignore b/components/pobuca_connect/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/pobuca_connect/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/pobuca_connect/app/pobuca_connect.app.ts b/components/pobuca_connect/app/pobuca_connect.app.ts deleted file mode 100644 index 0e7df1021609c..0000000000000 --- a/components/pobuca_connect/app/pobuca_connect.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "pobuca_connect", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/pobuca_connect/package.json b/components/pobuca_connect/package.json index ce3c759141121..47d8d322e9ea2 100644 --- a/components/pobuca_connect/package.json +++ b/components/pobuca_connect/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/pobuca_connect", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Pobuca Connect Components", - "main": "dist/app/pobuca_connect.app.mjs", + "main": "pobuca_connect.app.mjs", "keywords": [ "pipedream", "pobuca_connect" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/pobuca_connect", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/pobuca_connect/pobuca_connect.app.mjs b/components/pobuca_connect/pobuca_connect.app.mjs new file mode 100644 index 0000000000000..ad4340848693d --- /dev/null +++ b/components/pobuca_connect/pobuca_connect.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "pobuca_connect", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/pointerpro/.gitignore b/components/pointerpro/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/pointerpro/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/pointerpro/app/pointerpro.app.ts b/components/pointerpro/app/pointerpro.app.ts deleted file mode 100644 index 71303d45b5dd2..0000000000000 --- a/components/pointerpro/app/pointerpro.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "pointerpro", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/pointerpro/package.json b/components/pointerpro/package.json index e356f6a3e9b99..7c6c9842c9a87 100644 --- a/components/pointerpro/package.json +++ b/components/pointerpro/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/pointerpro", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Pointerpro Components", - "main": "dist/app/pointerpro.app.mjs", + "main": "pointerpro.app.mjs", "keywords": [ "pipedream", "pointerpro" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/pointerpro", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/pointerpro/pointerpro.app.mjs b/components/pointerpro/pointerpro.app.mjs new file mode 100644 index 0000000000000..c4bc3a74393c4 --- /dev/null +++ b/components/pointerpro/pointerpro.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "pointerpro", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/polar/package.json b/components/polar/package.json new file mode 100644 index 0000000000000..097e84be6d639 --- /dev/null +++ b/components/polar/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/polar", + "version": "0.0.1", + "description": "Pipedream Polar Components", + "main": "polar.app.mjs", + "keywords": [ + "pipedream", + "polar" + ], + "homepage": "https://pipedream.com/apps/polar", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/polar/polar.app.mjs b/components/polar/polar.app.mjs new file mode 100644 index 0000000000000..8cc6f5fb64b06 --- /dev/null +++ b/components/polar/polar.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "polar", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/popupsmart/.gitignore b/components/popupsmart/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/popupsmart/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/popupsmart/app/popupsmart.app.ts b/components/popupsmart/app/popupsmart.app.ts deleted file mode 100644 index 3fc3702f30099..0000000000000 --- a/components/popupsmart/app/popupsmart.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "popupsmart", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/popupsmart/package.json b/components/popupsmart/package.json index fcfd4f61bea3f..eaf6b175c9712 100644 --- a/components/popupsmart/package.json +++ b/components/popupsmart/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/popupsmart", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Popupsmart Components", - "main": "dist/app/popupsmart.app.mjs", + "main": "popupsmart.app.mjs", "keywords": [ "pipedream", "popupsmart" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/popupsmart", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/popupsmart/popupsmart.app.mjs b/components/popupsmart/popupsmart.app.mjs new file mode 100644 index 0000000000000..2c948934f121d --- /dev/null +++ b/components/popupsmart/popupsmart.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "popupsmart", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/portfolio_optimizer/.gitignore b/components/portfolio_optimizer/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/portfolio_optimizer/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/portfolio_optimizer/app/portfolio_optimizer.app.ts b/components/portfolio_optimizer/app/portfolio_optimizer.app.ts deleted file mode 100644 index 33cbcbcb9a955..0000000000000 --- a/components/portfolio_optimizer/app/portfolio_optimizer.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "portfolio_optimizer", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/portfolio_optimizer/package.json b/components/portfolio_optimizer/package.json index 16984df446114..5c563ed236b46 100644 --- a/components/portfolio_optimizer/package.json +++ b/components/portfolio_optimizer/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/portfolio_optimizer", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Portfolio Optimizer Components", - "main": "dist/app/portfolio_optimizer.app.mjs", + "main": "portfolio_optimizer.app.mjs", "keywords": [ "pipedream", "portfolio_optimizer" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/portfolio_optimizer", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/portfolio_optimizer/portfolio_optimizer.app.mjs b/components/portfolio_optimizer/portfolio_optimizer.app.mjs new file mode 100644 index 0000000000000..f09848f200f90 --- /dev/null +++ b/components/portfolio_optimizer/portfolio_optimizer.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "portfolio_optimizer", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/postbin/package.json b/components/postbin/package.json new file mode 100644 index 0000000000000..189655a267668 --- /dev/null +++ b/components/postbin/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/postbin", + "version": "0.0.1", + "description": "Pipedream PostBin Components", + "main": "postbin.app.mjs", + "keywords": [ + "pipedream", + "postbin" + ], + "homepage": "https://pipedream.com/apps/postbin", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/postbin/postbin.app.mjs b/components/postbin/postbin.app.mjs new file mode 100644 index 0000000000000..0d23b284a7efd --- /dev/null +++ b/components/postbin/postbin.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "postbin", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/postnl/package.json b/components/postnl/package.json new file mode 100644 index 0000000000000..3452c58fef198 --- /dev/null +++ b/components/postnl/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/postnl", + "version": "0.0.1", + "description": "Pipedream PostNL Components", + "main": "postnl.app.mjs", + "keywords": [ + "pipedream", + "postnl" + ], + "homepage": "https://pipedream.com/apps/postnl", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/postnl/postnl.app.mjs b/components/postnl/postnl.app.mjs new file mode 100644 index 0000000000000..dcba1ab50ce9a --- /dev/null +++ b/components/postnl/postnl.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "postnl", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/practitest/package.json b/components/practitest/package.json index 98919c8e0422a..52fefa5db8b7d 100644 --- a/components/practitest/package.json +++ b/components/practitest/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/practitest", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream PractiTest Components", "main": "dist/app/practitest.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/practitest/tsconfig.json b/components/practitest/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/practitest/tsconfig.json +++ b/components/practitest/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/prisma_management_api/README.md b/components/prisma_management_api/README.md new file mode 100644 index 0000000000000..b6d9a3740daea --- /dev/null +++ b/components/prisma_management_api/README.md @@ -0,0 +1,131 @@ +# Prisma Management API + +The Prisma Management API interacts seamlessly with Pipedream, empowering you to craft customized automations and workflows for your Prisma Postgres databases. Create projects, manage databases, and handle connection strings with ease. + +## Overview + +The Prisma Management API provides programmatic access to manage Prisma Postgres database projects. This integration allows you to automate database lifecycle management, connection string generation, and resource provisioning within your Pipedream workflows. + +With this integration, you can: + +- **Automate Database Provisioning**: Automatically create new Postgres database projects with proper regional distribution +- **Manage Connection Strings**: Generate and manage secure connection strings for your applications +- **Monitor Resources**: List and inspect databases, projects, and connection details across your workspace +- **Streamline Cleanup**: Systematically remove databases and connection strings when no longer needed + +## Getting Started + +To use the Prisma Management API with Pipedream, you'll need to connect your Prisma account and obtain an API integration token. + +## Actions + +### Project Management + +#### Create Database +Creates a new Postgres database project via Prisma Management API. This action creates a complete project with database and provides connection string details in the response for immediate use. + +**Parameters:** +- `name` (string, required): The name of the Postgres database project to create +- `region` (string, optional): The region where the database should be created (default: us-east-1) + +**Available regions:** us-east-1, us-west-1, eu-west-3, eu-central-1, ap-northeast-1, ap-southeast-1 + +#### List Projects in Prisma Workspace +Retrieves all projects within your Prisma workspace. + +#### Get Project Details +Retrieves detailed information about a specific project including associated databases and configuration. + +**Parameters:** +- `projectId` (string, required): The ID of the project to retrieve + +#### Delete Database +Removes an entire Postgres database project and all associated resources. + +**Parameters:** +- `projectId` (string, required): The ID of the project to delete + +### Database Management + +#### Create New Database in Existing Project +Adds a new database to an existing Prisma project. + +**Parameters:** +- `projectId` (string, required): The ID of the project where the database should be created +- `region` (string, optional): The region for the database +- `isDefault` (boolean, optional): Whether to set this as the default database for the project + +#### List Databases from Project +Retrieves all databases within a specific project. + +**Parameters:** +- `projectId` (string, required): The ID of the project + +#### Get Database Details +Retrieves detailed information about a specific Prisma Postgres database. + +**Parameters:** +- `databaseId` (string, required): The ID of the database + +#### Delete Database by Database ID +Removes a specific database by its ID. + +**Parameters:** +- `databaseId` (string, required): The ID of the database to delete + +### Connection String Management + +#### Create Database Connection String +Generates a new connection string for database access. + +**Parameters:** +- `databaseId` (string, required): The ID of the database +- `name` (string, required): A descriptive name for the connection + +#### List Database Connection Strings +Retrieves all connection strings for a specific database. + +**Parameters:** +- `databaseId` (string, required): The ID of the database + +#### Delete Database Connection String +Removes a specific connection string. + +**Parameters:** +- `connectionId` (string, required): The ID of the connection to delete + +### Utilities + +#### Get Prisma Postgres Regions +Retrieves the list of available regions for Prisma Postgres deployment. + +## Authentication + +This integration uses API Token authentication. You'll need to provide your Prisma Management API Service token when configuring the connection in Pipedream. + +To obtain your API token: +1. Log in to your Prisma account +2. Navigate to your workspace settings +3. Generate a new Service Token +4. Copy the token for use in Pipedream + +## API Documentation + +For complete API documentation and additional details, visit the [Prisma Management API Documentation](https://www.prisma.io/docs/postgres/introduction/management-api). + +## Example Workflows + +### Automated Database Setup for New Projects +Trigger a workflow when a new project is created in your system, automatically provision a Prisma Postgres database, and store the connection details in your configuration management system. + +### Database Cleanup Automation +Schedule periodic cleanup of unused databases and connection strings to maintain security and reduce costs. + +### Multi-Region Database Deployment +Create databases across multiple regions for improved performance and redundancy based on your application's geographic distribution. + +## Support + +For issues specific to the Prisma Management API, refer to the [official documentation](https://www.prisma.io/docs/postgres/introduction/management-api). + +For Pipedream-related questions, visit the [Pipedream documentation](https://pipedream.com/docs) or community forums. \ No newline at end of file diff --git a/components/prisma_management_api/actions/create-database-connection-string/create-database-connection-string.mjs b/components/prisma_management_api/actions/create-database-connection-string/create-database-connection-string.mjs new file mode 100644 index 0000000000000..b3a01073e0f48 --- /dev/null +++ b/components/prisma_management_api/actions/create-database-connection-string/create-database-connection-string.mjs @@ -0,0 +1,37 @@ +import app from "../../prisma_management_api.app.mjs"; + +export default { + name: "Create Database Connection String", + version: "1.0.0", + key: "prisma_management_api-create-database-connection-string", + description: "Creates a new connection string for an existing database via Prisma Management API. [See docs here](https://www.prisma.io/docs/postgres/introduction/management-api)", + type: "action", + props: { + app, + databaseId: { + type: "string", + label: "Database ID", + description: "The ID of the database to create a connection string for", + }, + name: { + type: "string", + label: "Connection Name", + description: "A descriptive name for the connection string", + }, + }, + async run({ $ }) { + const response = await this.app.createConnectionString({ + $, + databaseId: this.databaseId, + data: { + name: this.name, + }, + }); + + if (response) { + $.export("$summary", `Successfully created connection string for database ${this.databaseId}${response.id ? ` with connection ID ${response.id}` : ""}`); + } + + return response; + }, +}; \ No newline at end of file diff --git a/components/prisma_management_api/actions/create-database/create-database.mjs b/components/prisma_management_api/actions/create-database/create-database.mjs new file mode 100644 index 0000000000000..ba861e95e8d0e --- /dev/null +++ b/components/prisma_management_api/actions/create-database/create-database.mjs @@ -0,0 +1,50 @@ +import app from "../../prisma_management_api.app.mjs"; + +export default { + name: "Create Database", + version: "1.0.0", + key: "prisma_management_api-create-database", + description: "Creates a new Postgres database project via Prisma Management API. [See docs here](https://www.prisma.io/docs/postgres/introduction/management-api)", + type: "action", + props: { + app, + name: { + type: "string", + label: "Project Name", + description: "The name of the Postgres database project to create", + }, + region: { + propDefinition: [ + app, + "region", + ], + default: "us-east-1", + }, + }, + async run({ $ }) { + const response = await this.app.createProject({ + $, + data: { + name: this.name, + region: this.region, + }, + }); + + if (response) { + const projectId = response.data?.id; + const databaseId = response.data?.database?.id; + + let summary = `Successfully created Postgres database project "${this.name}"`; + if (projectId) { + summary += ` with Project ID ${projectId}`; + } + if (databaseId) { + summary += ` and Database ID ${databaseId}`; + } + + $.export("$summary", summary); + } + + return response; + }, +}; \ No newline at end of file diff --git a/components/prisma_management_api/actions/create-new-database-in-existing-project/create-new-database-in-existing-project.mjs b/components/prisma_management_api/actions/create-new-database-in-existing-project/create-new-database-in-existing-project.mjs new file mode 100644 index 0000000000000..73b9e19530654 --- /dev/null +++ b/components/prisma_management_api/actions/create-new-database-in-existing-project/create-new-database-in-existing-project.mjs @@ -0,0 +1,52 @@ +import app from "../../prisma_management_api.app.mjs"; + +export default { + name: "Create New Database in Existing Project", + version: "1.0.0", + key: "prisma_management_api-create-new-database-in-existing-project", + description: "Create a new database in an existing Prisma project. Requires Project ID. [See docs here](https://www.prisma.io/docs/postgres/introduction/management-api)", + type: "action", + props: { + app, + projectId: { + type: "string", + label: "Project ID", + description: "The ID of the project where the database should be created", + }, + region: { + propDefinition: [ + app, + "region", + ], + }, + isDefault: { + type: "boolean", + label: "Set as Default Database", + description: "Whether to set this database as the default for the project", + optional: true, + default: false, + }, + }, + async run({ $ }) { + if (!this.region) { + throw new Error("Region is required for creating a database"); + } + + const data = { + region: this.region, + }; + if (this.isDefault !== undefined) data.default = this.isDefault; + + const response = await this.app.createDatabase({ + $, + projectId: this.projectId, + data, + }); + + if (response) { + $.export("$summary", `Successfully created database in project ${this.projectId}${response.id ? ` with ID ${response.id}` : ""}`); + } + + return response; + }, +}; \ No newline at end of file diff --git a/components/prisma_management_api/actions/delete-database-by-database-id/delete-database-by-database-id.mjs b/components/prisma_management_api/actions/delete-database-by-database-id/delete-database-by-database-id.mjs new file mode 100644 index 0000000000000..6abf13e5d175d --- /dev/null +++ b/components/prisma_management_api/actions/delete-database-by-database-id/delete-database-by-database-id.mjs @@ -0,0 +1,33 @@ +import app from "../../prisma_management_api.app.mjs"; + +export default { + name: "Delete Database by Database ID", + version: "1.0.0", + key: "prisma_management_api-delete-database-by-database-id", + description: "Delete a specific database by Database ID via Prisma Management API. This action is irreversible. [See docs here](https://www.prisma.io/docs/postgres/introduction/management-api)", + type: "action", + props: { + app, + databaseId: { + type: "string", + label: "Database ID", + description: "The ID of the database to delete", + }, + }, + async run({ $ }) { + const response = await this.app.deleteDatabase({ + $, + databaseId: this.databaseId, + }); + + if (response || response === null) { + $.export("$summary", `Successfully deleted database with ID ${this.databaseId}`); + } + + return { + success: true, + databaseId: this.databaseId, + message: "Database deleted successfully", + }; + }, +}; \ No newline at end of file diff --git a/components/prisma_management_api/actions/delete-database-connection-string/delete-database-connection-string.mjs b/components/prisma_management_api/actions/delete-database-connection-string/delete-database-connection-string.mjs new file mode 100644 index 0000000000000..eed0b5a4417a7 --- /dev/null +++ b/components/prisma_management_api/actions/delete-database-connection-string/delete-database-connection-string.mjs @@ -0,0 +1,33 @@ +import app from "../../prisma_management_api.app.mjs"; + +export default { + name: "Delete Database Connection String", + version: "1.0.0", + key: "prisma_management_api-delete-database-connection-string", + description: "Deletes a specific database connection string via Prisma Management API. This action is irreversible. [See docs here](https://www.prisma.io/docs/postgres/introduction/management-api)", + type: "action", + props: { + app, + connectionId: { + type: "string", + label: "Connection ID", + description: "The ID of the database connection to delete", + }, + }, + async run({ $ }) { + const response = await this.app.deleteConnectionString({ + $, + connectionId: this.connectionId, + }); + + if (response || response === null) { + $.export("$summary", `Successfully deleted database connection with ID ${this.connectionId}`); + } + + return { + success: true, + connectionId: this.connectionId, + message: "Database connection deleted successfully", + }; + }, +}; \ No newline at end of file diff --git a/components/prisma_management_api/actions/delete-database/delete-database.mjs b/components/prisma_management_api/actions/delete-database/delete-database.mjs new file mode 100644 index 0000000000000..8391c34143907 --- /dev/null +++ b/components/prisma_management_api/actions/delete-database/delete-database.mjs @@ -0,0 +1,33 @@ +import app from "../../prisma_management_api.app.mjs"; + +export default { + name: "Delete Database", + version: "1.0.0", + key: "prisma_management_api-delete-database", + description: "Deletes a Postgres database project via Prisma Management API. [See docs here](https://www.prisma.io/docs/postgres/introduction/management-api)", + type: "action", + props: { + app, + projectId: { + type: "string", + label: "Project ID", + description: "The ID of the Postgres database project to delete", + }, + }, + async run({ $ }) { + const response = await this.app.deleteProject({ + $, + projectId: this.projectId, + }); + + if (response || response === null) { + $.export("$summary", `Successfully deleted Postgres database project with ID ${this.projectId}`); + } + + return { + success: true, + projectId: this.projectId, + message: "Database project deleted successfully", + }; + }, +}; \ No newline at end of file diff --git a/components/prisma_management_api/actions/get-database-details/get-database-details.mjs b/components/prisma_management_api/actions/get-database-details/get-database-details.mjs new file mode 100644 index 0000000000000..996383f339c1e --- /dev/null +++ b/components/prisma_management_api/actions/get-database-details/get-database-details.mjs @@ -0,0 +1,29 @@ +import app from "../../prisma_management_api.app.mjs"; + +export default { + name: "Get Database details", + version: "1.0.0", + key: "prisma_management_api-get-database-details", + description: "Get database details of a particular Prisma Postgres database via Prisma Management API. [See docs here](https://www.prisma.io/docs/postgres/introduction/management-api)", + type: "action", + props: { + app, + databaseId: { + type: "string", + label: "Database ID", + description: "The ID of the database to retrieve information for", + }, + }, + async run({ $ }) { + const response = await this.app.getDatabase({ + $, + databaseId: this.databaseId, + }); + + if (response) { + $.export("$summary", `Successfully retrieved database information for ID ${this.databaseId}`); + } + + return response; + }, +}; \ No newline at end of file diff --git a/components/prisma_management_api/actions/get-postgres-regions/get-postgres-regions.mjs b/components/prisma_management_api/actions/get-postgres-regions/get-postgres-regions.mjs new file mode 100644 index 0000000000000..1ac6db5c5bf27 --- /dev/null +++ b/components/prisma_management_api/actions/get-postgres-regions/get-postgres-regions.mjs @@ -0,0 +1,24 @@ +import app from "../../prisma_management_api.app.mjs"; + +export default { + name: "Get Prisma Postgres Regions", + version: "1.0.0", + key: "prisma_management_api-get-postgres-regions", + description: "Retrieves a list of all available regions where Prisma Postgres databases can be deployed. [See docs here](https://www.prisma.io/docs/postgres/introduction/management-api)", + type: "action", + props: { + app, + }, + async run({ $ }) { + const response = await this.app.listRegions({ + $, + }); + + if (response) { + const count = response.data?.length || 0; + $.export("$summary", `Successfully retrieved ${count} available Postgres region${count !== 1 ? "s" : ""}`); + } + + return response; + }, +}; \ No newline at end of file diff --git a/components/prisma_management_api/actions/get-project-details/get-project-details.mjs b/components/prisma_management_api/actions/get-project-details/get-project-details.mjs new file mode 100644 index 0000000000000..2b760b9fd3380 --- /dev/null +++ b/components/prisma_management_api/actions/get-project-details/get-project-details.mjs @@ -0,0 +1,29 @@ +import app from "../../prisma_management_api.app.mjs"; + +export default { + name: "Get Project details", + version: "1.0.0", + key: "prisma_management_api-get-project-details", + description: "Get project details of a particular project in Prisma Workspace via Prisma Management API. [See docs here](https://www.prisma.io/docs/postgres/introduction/management-api)", + type: "action", + props: { + app, + projectId: { + type: "string", + label: "Project ID", + description: "The ID of the project to retrieve information for", + }, + }, + async run({ $ }) { + const response = await this.app.getProject({ + $, + projectId: this.projectId, + }); + + if (response) { + $.export("$summary", `Successfully retrieved project information for ID ${this.projectId}`); + } + + return response; + }, +}; \ No newline at end of file diff --git a/components/prisma_management_api/actions/list-database-connection-strings/list-database-connection-strings.mjs b/components/prisma_management_api/actions/list-database-connection-strings/list-database-connection-strings.mjs new file mode 100644 index 0000000000000..3b64745a1fc91 --- /dev/null +++ b/components/prisma_management_api/actions/list-database-connection-strings/list-database-connection-strings.mjs @@ -0,0 +1,30 @@ +import app from "../../prisma_management_api.app.mjs"; + +export default { + name: "List Database Connection Strings", + version: "1.0.0", + key: "prisma_management_api-list-database-connection-strings", + description: "Retrieves a list of all connection strings for a specific database via Prisma Management API. [See docs here](https://www.prisma.io/docs/postgres/introduction/management-api)", + type: "action", + props: { + app, + databaseId: { + type: "string", + label: "Database ID", + description: "The ID of the database to list connections for", + }, + }, + async run({ $ }) { + const response = await this.app.listConnectionStrings({ + $, + databaseId: this.databaseId, + }); + + if (response) { + const count = response.data?.length || 0; + $.export("$summary", `Successfully retrieved ${count} connection${count !== 1 ? "s" : ""} for database ${this.databaseId}`); + } + + return response; + }, +}; \ No newline at end of file diff --git a/components/prisma_management_api/actions/list-databases-from-project/list-databases-from-project.mjs b/components/prisma_management_api/actions/list-databases-from-project/list-databases-from-project.mjs new file mode 100644 index 0000000000000..55b65cfa68cbc --- /dev/null +++ b/components/prisma_management_api/actions/list-databases-from-project/list-databases-from-project.mjs @@ -0,0 +1,30 @@ +import app from "../../prisma_management_api.app.mjs"; + +export default { + name: "List Databases from Project", + version: "1.0.0", + key: "prisma_management_api-list-databases-from-project", + description: "Retrieves a list of all databases within a specific Prisma project. [See docs here](https://www.prisma.io/docs/postgres/introduction/management-api)", + type: "action", + props: { + app, + projectId: { + type: "string", + label: "Project ID", + description: "The ID of the project to list databases from", + }, + }, + async run({ $ }) { + const response = await this.app.listDatabases({ + $, + projectId: this.projectId, + }); + + if (response) { + const count = response.data?.length || 0; + $.export("$summary", `Successfully retrieved ${count} database${count !== 1 ? "s" : ""} from project ${this.projectId}`); + } + + return response; + }, +}; \ No newline at end of file diff --git a/components/prisma_management_api/actions/list-projects-in-prisma-workspace/list-projects-in-prisma-workspace.mjs b/components/prisma_management_api/actions/list-projects-in-prisma-workspace/list-projects-in-prisma-workspace.mjs new file mode 100644 index 0000000000000..0e0da4dc52d6a --- /dev/null +++ b/components/prisma_management_api/actions/list-projects-in-prisma-workspace/list-projects-in-prisma-workspace.mjs @@ -0,0 +1,29 @@ +import app from "../../prisma_management_api.app.mjs"; + +export default { + name: "List Projects in Prisma Workspace", + version: "1.0.0", + key: "prisma_management_api-list-projects-in-prisma-workspace", + description: "List Projects in a Prisma Workspace via Prisma Management API. [See docs here](https://www.prisma.io/docs/postgres/introduction/management-api)", + type: "action", + props: { + app, + }, + async run({ $ }) { + const response = await this.app.listProjects({ + $, + }); + + if (response) { + const items = Array.isArray(response) + ? response + : Array.isArray(response?.data) + ? response.data + : []; + const count = items.length; + $.export("$summary", `Successfully retrieved ${count} project${count !== 1 ? "s" : ""}`); + } + + return response; + }, +}; \ No newline at end of file diff --git a/components/prisma_management_api/package.json b/components/prisma_management_api/package.json new file mode 100644 index 0000000000000..fe03d28844e80 --- /dev/null +++ b/components/prisma_management_api/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/prisma_management_api", + "version": "0.0.1", + "description": "Pipedream Prisma Management API Components", + "main": "prisma_management_api.app.mjs", + "keywords": [ + "pipedream", + "prisma_management_api" + ], + "homepage": "https://pipedream.com/apps/prisma_management_api", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^1.5.1" + } +} \ No newline at end of file diff --git a/components/prisma_management_api/prisma_management_api.app.mjs b/components/prisma_management_api/prisma_management_api.app.mjs new file mode 100644 index 0000000000000..28dd9a2a71887 --- /dev/null +++ b/components/prisma_management_api/prisma_management_api.app.mjs @@ -0,0 +1,143 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "prisma_management_api", + propDefinitions: { + region: { + type: "string", + label: "Region", + description: "The region where the database should be created", + async options() { + const response = await this.listRegions(); + const regions = response?.data || []; + return regions + .filter((region) => !region.status || region.status === "available") + .map((region) => ({ + label: region.name || region.id, + value: region.id, + })); + }, + }, + }, + methods: { + _baseUrl() { + return "https://api.prisma.io/v1"; + }, + _makeRequest({ + $ = this, path, ...args + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: { + Authorization: `Bearer ${this.$auth.api_token}`, + "Content-Type": "application/json", + }, + ...args, + }); + }, + async createProject(args = {}) { + return this._makeRequest({ + path: "/projects", + method: "post", + ...args, + }); + }, + async deleteProject({ + projectId, ...args + }) { + return this._makeRequest({ + path: `/projects/${projectId}`, + method: "delete", + ...args, + }); + }, + async listProjects(args = {}) { + return this._makeRequest({ + path: "/projects", + method: "get", + ...args, + }); + }, + async getProject({ + projectId, ...args + }) { + return this._makeRequest({ + path: `/projects/${projectId}`, + method: "get", + ...args, + }); + }, + async createDatabase({ + projectId, ...args + }) { + return this._makeRequest({ + path: `/projects/${projectId}/databases`, + method: "post", + ...args, + }); + }, + async listDatabases({ + projectId, ...args + }) { + return this._makeRequest({ + path: `/projects/${projectId}/databases`, + method: "get", + ...args, + }); + }, + async getDatabase({ + databaseId, ...args + }) { + return this._makeRequest({ + path: `/databases/${databaseId}`, + method: "get", + ...args, + }); + }, + async deleteDatabase({ + databaseId, ...args + }) { + return this._makeRequest({ + path: `/databases/${databaseId}`, + method: "delete", + ...args, + }); + }, + async listConnectionStrings({ + databaseId, ...args + }) { + return this._makeRequest({ + path: `/databases/${databaseId}/connections`, + method: "get", + ...args, + }); + }, + async createConnectionString({ + databaseId, data, ...args + }) { + return this._makeRequest({ + path: `/databases/${databaseId}/connections`, + method: "post", + data: data || {}, + ...args, + }); + }, + async deleteConnectionString({ + connectionId, ...args + }) { + return this._makeRequest({ + path: `/connections/${connectionId}`, + method: "delete", + ...args, + }); + }, + async listRegions(args = {}) { + return this._makeRequest({ + path: "/regions/postgres", + method: "get", + ...args, + }); + }, + }, +}; \ No newline at end of file diff --git a/components/processplan/.gitignore b/components/processplan/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/processplan/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/processplan/app/processplan.app.ts b/components/processplan/app/processplan.app.ts deleted file mode 100644 index 4c4419eb88836..0000000000000 --- a/components/processplan/app/processplan.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "processplan", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/processplan/package.json b/components/processplan/package.json index 203b47b172d16..46df65ef2414c 100644 --- a/components/processplan/package.json +++ b/components/processplan/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/processplan", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream ProcessPlan Components", - "main": "dist/app/processplan.app.mjs", + "main": "processplan.app.mjs", "keywords": [ "pipedream", "processplan" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/processplan", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/processplan/processplan.app.mjs b/components/processplan/processplan.app.mjs new file mode 100644 index 0000000000000..0420150014ffb --- /dev/null +++ b/components/processplan/processplan.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "processplan", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/procore_sandbox/actions/create-incident/create-incident.mjs b/components/procore_sandbox/actions/create-incident/create-incident.mjs index 15f61d1bdc50b..316e65cf42fa6 100644 --- a/components/procore_sandbox/actions/create-incident/create-incident.mjs +++ b/components/procore_sandbox/actions/create-incident/create-incident.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/actions/create-incident/create-incident.mjs"; +import component from "@pipedream/procore/actions/create-incident/create-incident.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,5 +9,5 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-create-incident", description: "Create a new incident. [See the documentation](https://developers.procore.com/reference/rest/incidents?version=latest#create-incident).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/procore_sandbox/actions/create-manpower-log/create-manpower-log.mjs b/components/procore_sandbox/actions/create-manpower-log/create-manpower-log.mjs index 92e030c054ba8..7579ed77b67ec 100644 --- a/components/procore_sandbox/actions/create-manpower-log/create-manpower-log.mjs +++ b/components/procore_sandbox/actions/create-manpower-log/create-manpower-log.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/actions/create-manpower-log/create-manpower-log.mjs"; +import component from "@pipedream/procore/actions/create-manpower-log/create-manpower-log.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,5 +9,5 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-create-manpower-log", description: "Create a new manpower log. [See the documentation](https://developers.procore.com/reference/rest/manpower-logs?version=latest#create-manpower-log).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/procore_sandbox/actions/create-rfi/create-rfi.mjs b/components/procore_sandbox/actions/create-rfi/create-rfi.mjs index 7ff6e7c087bba..806ffcc332bee 100644 --- a/components/procore_sandbox/actions/create-rfi/create-rfi.mjs +++ b/components/procore_sandbox/actions/create-rfi/create-rfi.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/actions/create-rfi/create-rfi.mjs"; +import component from "@pipedream/procore/actions/create-rfi/create-rfi.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,5 +9,5 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-create-rfi", description: "Create a new RFI. [See the documentation](https://developers.procore.com/reference/rest/rfis?version=latest#create-rfi).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/procore_sandbox/actions/create-submittal/create-submittal.mjs b/components/procore_sandbox/actions/create-submittal/create-submittal.mjs index b062fae4fe080..926c854fd241d 100644 --- a/components/procore_sandbox/actions/create-submittal/create-submittal.mjs +++ b/components/procore_sandbox/actions/create-submittal/create-submittal.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/actions/create-submittal/create-submittal.mjs"; +import component from "@pipedream/procore/actions/create-submittal/create-submittal.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,5 +9,5 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-create-submittal", description: "Create a new submittal. [See the documentation](https://developers.procore.com/reference/rest/submittals?version=latest#create-submittal).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/procore_sandbox/actions/create-timesheet/create-timesheet.mjs b/components/procore_sandbox/actions/create-timesheet/create-timesheet.mjs index 9d6ff5912a8df..7f5e2bb74bc9e 100644 --- a/components/procore_sandbox/actions/create-timesheet/create-timesheet.mjs +++ b/components/procore_sandbox/actions/create-timesheet/create-timesheet.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/actions/create-timesheet/create-timesheet.mjs"; +import component from "@pipedream/procore/actions/create-timesheet/create-timesheet.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,5 +9,5 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-create-timesheet", description: "Create a new timesheet. [See the documentation](https://developers.procore.com/reference/rest/timesheets?version=latest#create-timesheet).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/procore_sandbox/package.json b/components/procore_sandbox/package.json index d50ff001797d3..b594be8065d3c 100644 --- a/components/procore_sandbox/package.json +++ b/components/procore_sandbox/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/procore_sandbox", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Procore Sandbox Components", "main": "procore_sandbox.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/procore": "^0.1.0" } } diff --git a/components/procore_sandbox/procore_sandbox.app.mjs b/components/procore_sandbox/procore_sandbox.app.mjs index 45a18b7aee753..cdc42d18b9a29 100644 --- a/components/procore_sandbox/procore_sandbox.app.mjs +++ b/components/procore_sandbox/procore_sandbox.app.mjs @@ -1,5 +1,5 @@ -import procore from "../procore/procore.app.mjs"; -import constants from "../procore/common/constants.mjs"; +import procore from "@pipedream/procore"; +import constants from "@pipedream/procore/common/constants.mjs"; export default { ...procore, diff --git a/components/procore_sandbox/sources/new-budget-snapshot-event-instant/new-budget-snapshot-event-instant.mjs b/components/procore_sandbox/sources/new-budget-snapshot-event-instant/new-budget-snapshot-event-instant.mjs index 9f891b2ab4de8..3b7adf78e52cb 100644 --- a/components/procore_sandbox/sources/new-budget-snapshot-event-instant/new-budget-snapshot-event-instant.mjs +++ b/components/procore_sandbox/sources/new-budget-snapshot-event-instant/new-budget-snapshot-event-instant.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/sources/new-budget-snapshot-event-instant/new-budget-snapshot-event-instant.mjs"; +import component from "@pipedream/procore/sources/new-budget-snapshot-event-instant/new-budget-snapshot-event-instant.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,6 +9,6 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-new-budget-snapshot-event-instant", description: "Emit new event when a new budget snapshot event is created. [See the documentation](https://developers.procore.com/reference/rest/hooks?version=latest).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/procore_sandbox/sources/new-change-order-package-event-instant/new-change-order-package-event-instant.mjs b/components/procore_sandbox/sources/new-change-order-package-event-instant/new-change-order-package-event-instant.mjs index 7098876618b8a..6c1f1c256af64 100644 --- a/components/procore_sandbox/sources/new-change-order-package-event-instant/new-change-order-package-event-instant.mjs +++ b/components/procore_sandbox/sources/new-change-order-package-event-instant/new-change-order-package-event-instant.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/sources/new-change-order-package-event-instant/new-change-order-package-event-instant.mjs"; +import component from "@pipedream/procore/sources/new-change-order-package-event-instant/new-change-order-package-event-instant.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,5 +9,5 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-new-change-order-package-event-instant", description: "Emit new event when a new change order package event is created. [See the documentation](https://developers.procore.com/reference/rest/hooks?version=latest).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/procore_sandbox/sources/new-commitment-change-order-event-instant/new-commitment-change-order-event-instant.mjs b/components/procore_sandbox/sources/new-commitment-change-order-event-instant/new-commitment-change-order-event-instant.mjs index 5a25fd65c80ad..b66f7833c4395 100644 --- a/components/procore_sandbox/sources/new-commitment-change-order-event-instant/new-commitment-change-order-event-instant.mjs +++ b/components/procore_sandbox/sources/new-commitment-change-order-event-instant/new-commitment-change-order-event-instant.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/sources/new-commitment-change-order-event-instant/new-commitment-change-order-event-instant.mjs"; +import component from "@pipedream/procore/sources/new-commitment-change-order-event-instant/new-commitment-change-order-event-instant.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,5 +9,5 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-new-commitment-change-order-event-instant", description: "Emit new event when a new commitment change order event is created. [See the documentation](https://developers.procore.com/reference/rest/hooks?version=latest).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/procore_sandbox/sources/new-event-instant/new-event-instant.mjs b/components/procore_sandbox/sources/new-event-instant/new-event-instant.mjs index a0827a58ae035..f7ed5451da129 100644 --- a/components/procore_sandbox/sources/new-event-instant/new-event-instant.mjs +++ b/components/procore_sandbox/sources/new-event-instant/new-event-instant.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/sources/new-event-instant/new-event-instant.mjs"; +import component from "@pipedream/procore/sources/new-event-instant/new-event-instant.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,5 +9,5 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-new-event-instant", description: "Emit new event depending on the resource name selected. [See the documentation](https://developers.procore.com/reference/rest/hooks?version=latest).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/procore_sandbox/sources/new-prime-contract-event-instant/new-prime-contract-event-instant.mjs b/components/procore_sandbox/sources/new-prime-contract-event-instant/new-prime-contract-event-instant.mjs index e9e5c06e54066..a661af0dce584 100644 --- a/components/procore_sandbox/sources/new-prime-contract-event-instant/new-prime-contract-event-instant.mjs +++ b/components/procore_sandbox/sources/new-prime-contract-event-instant/new-prime-contract-event-instant.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/sources/new-prime-contract-event-instant/new-prime-contract-event-instant.mjs"; +import component from "@pipedream/procore/sources/new-prime-contract-event-instant/new-prime-contract-event-instant.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,5 +9,5 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-new-prime-contract-event-instant", description: "Emit new event when a new prime contract event is created. [See the documentation](https://developers.procore.com/reference/rest/hooks?version=latest).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/procore_sandbox/sources/new-purchase-order-event-instant/new-purchase-order-event-instant.mjs b/components/procore_sandbox/sources/new-purchase-order-event-instant/new-purchase-order-event-instant.mjs index ff59388f0a539..4e5f51ccc7140 100644 --- a/components/procore_sandbox/sources/new-purchase-order-event-instant/new-purchase-order-event-instant.mjs +++ b/components/procore_sandbox/sources/new-purchase-order-event-instant/new-purchase-order-event-instant.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/sources/new-purchase-order-event-instant/new-purchase-order-event-instant.mjs"; +import component from "@pipedream/procore/sources/new-purchase-order-event-instant/new-purchase-order-event-instant.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,5 +9,5 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-new-purchase-order-event-instant", description: "Emit new event when a new purchase order event is created. [See the documentation](https://developers.procore.com/reference/rest/hooks?version=latest).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/procore_sandbox/sources/new-rfi-event-instant/new-rfi-event-instant.mjs b/components/procore_sandbox/sources/new-rfi-event-instant/new-rfi-event-instant.mjs index 331a39ce644a5..feef150e268cc 100644 --- a/components/procore_sandbox/sources/new-rfi-event-instant/new-rfi-event-instant.mjs +++ b/components/procore_sandbox/sources/new-rfi-event-instant/new-rfi-event-instant.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/sources/new-rfi-event-instant/new-rfi-event-instant.mjs"; +import component from "@pipedream/procore/sources/new-rfi-event-instant/new-rfi-event-instant.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,5 +9,5 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-new-rfi-event-instant", description: "Emit new event when a new RFI event is created. [See the documentation](https://developers.procore.com/reference/rest/hooks?version=latest).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/procore_sandbox/sources/new-submittal-event-instant/new-submittal-event-instant.mjs b/components/procore_sandbox/sources/new-submittal-event-instant/new-submittal-event-instant.mjs index 58c49db357525..f2f921e406f53 100644 --- a/components/procore_sandbox/sources/new-submittal-event-instant/new-submittal-event-instant.mjs +++ b/components/procore_sandbox/sources/new-submittal-event-instant/new-submittal-event-instant.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/sources/new-submittal-event-instant/new-submittal-event-instant.mjs"; +import component from "@pipedream/procore/sources/new-submittal-event-instant/new-submittal-event-instant.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,5 +9,5 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-new-submittal-event-instant", description: "Emit new event when a new submittal event is created. [See the documentation](https://developers.procore.com/reference/rest/hooks?version=latest).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/procore_sandbox/sources/new-timecard-entry-event-instant/new-timecard-entry-event-instant.mjs b/components/procore_sandbox/sources/new-timecard-entry-event-instant/new-timecard-entry-event-instant.mjs index 457afd3ea3ed1..dae13b67fd867 100644 --- a/components/procore_sandbox/sources/new-timecard-entry-event-instant/new-timecard-entry-event-instant.mjs +++ b/components/procore_sandbox/sources/new-timecard-entry-event-instant/new-timecard-entry-event-instant.mjs @@ -1,4 +1,4 @@ -import component from "../../../procore/sources/new-timecard-entry-event-instant/new-timecard-entry-event-instant.mjs"; +import component from "@pipedream/procore/sources/new-timecard-entry-event-instant/new-timecard-entry-event-instant.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -9,6 +9,6 @@ export default { ...utils.getAppProps(component), key: "procore_sandbox-new-timecard-entry-event-instant", description: "Emit new event when a new timecard entry is created. [See the documentation](https://developers.procore.com/reference/rest/hooks?version=latest).", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/profitwell/tsconfig.json b/components/profitwell/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/profitwell/tsconfig.json +++ b/components/profitwell/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/propelauth/.gitignore b/components/propelauth/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/propelauth/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/propelauth/app/propelauth.app.ts b/components/propelauth/app/propelauth.app.ts deleted file mode 100644 index f4f1592ab1386..0000000000000 --- a/components/propelauth/app/propelauth.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "propelauth", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/propelauth/package.json b/components/propelauth/package.json index e1b76cd3af76c..ea278aa80493c 100644 --- a/components/propelauth/package.json +++ b/components/propelauth/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/propelauth", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream PropelAuth Components", - "main": "dist/app/propelauth.app.mjs", + "main": "propelauth.app.mjs", "keywords": [ "pipedream", "propelauth" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/propelauth", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/propelauth/propelauth.app.mjs b/components/propelauth/propelauth.app.mjs new file mode 100644 index 0000000000000..2018c7d51772f --- /dev/null +++ b/components/propelauth/propelauth.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "propelauth", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/propeller/.gitignore b/components/propeller/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/propeller/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/propeller/app/propeller.app.ts b/components/propeller/app/propeller.app.ts deleted file mode 100644 index f322c9f5a75d0..0000000000000 --- a/components/propeller/app/propeller.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "propeller", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/propeller/package.json b/components/propeller/package.json index dc7c1f22b1bbf..d4fb2c203bd64 100644 --- a/components/propeller/package.json +++ b/components/propeller/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/propeller", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Propeller Components", - "main": "dist/app/propeller.app.mjs", + "main": "propeller.app.mjs", "keywords": [ "pipedream", "propeller" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/propeller", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/propeller/propeller.app.mjs b/components/propeller/propeller.app.mjs new file mode 100644 index 0000000000000..4caad6b470946 --- /dev/null +++ b/components/propeller/propeller.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "propeller", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/provesource/provesource.app.mjs b/components/provesource/provesource.app.mjs index e2ad1634be81c..6a428e8dd3ea3 100644 --- a/components/provesource/provesource.app.mjs +++ b/components/provesource/provesource.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/pulumi/package.json b/components/pulumi/package.json new file mode 100644 index 0000000000000..c9bbe2acb6fae --- /dev/null +++ b/components/pulumi/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/pulumi", + "version": "0.0.1", + "description": "Pipedream Pulumi Cloud Components", + "main": "pulumi.app.mjs", + "keywords": [ + "pipedream", + "pulumi" + ], + "homepage": "https://pipedream.com/apps/pulumi", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/pulumi/pulumi.app.mjs b/components/pulumi/pulumi.app.mjs new file mode 100644 index 0000000000000..f011b6a5193b2 --- /dev/null +++ b/components/pulumi/pulumi.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "pulumi", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/puppeteer/actions/get-html/get-html.mjs b/components/puppeteer/actions/get-html/get-html.mjs index b4af0c99cc5de..3f58db0c0a772 100644 --- a/components/puppeteer/actions/get-html/get-html.mjs +++ b/components/puppeteer/actions/get-html/get-html.mjs @@ -7,7 +7,7 @@ export default { name: "Get HTML", description: "Get the HTML of a webpage using Puppeteer. [See the documentation](https://pptr.dev/api/puppeteer.page.content) for details.", - version: "1.0.2", + version: "1.0.3", type: "action", props: { puppeteer, diff --git a/components/puppeteer/actions/get-page-title/get-page-title.mjs b/components/puppeteer/actions/get-page-title/get-page-title.mjs index b85ab74337be7..b3a70b8a7d704 100644 --- a/components/puppeteer/actions/get-page-title/get-page-title.mjs +++ b/components/puppeteer/actions/get-page-title/get-page-title.mjs @@ -7,7 +7,7 @@ export default { name: "Get Page Title", description: "Get the title of a webpage using Puppeteer. [See the documentation](https://pptr.dev/api/puppeteer.page.title)", - version: "1.0.2", + version: "1.0.3", type: "action", props: { puppeteer, diff --git a/components/puppeteer/actions/get-pdf/get-pdf.mjs b/components/puppeteer/actions/get-pdf/get-pdf.mjs index 0f4e3c9b015c5..6dec6eb1e334a 100644 --- a/components/puppeteer/actions/get-pdf/get-pdf.mjs +++ b/components/puppeteer/actions/get-pdf/get-pdf.mjs @@ -9,7 +9,7 @@ export default { name: "Get PDF", description: "Generate a PDF of a page using Puppeteer. [See the documentation](https://pptr.dev/api/puppeteer.page.pdf)", - version: "1.0.3", + version: "1.0.4", type: "action", props: { puppeteer, @@ -143,6 +143,7 @@ export default { }, }, methods: { + ...common.methods, async downloadToTMP(pdf) { const path = this.downloadPath.includes("/tmp") ? this.downloadPath @@ -193,10 +194,7 @@ export default { } return filePath - ? { - pdf, - filePath, - } + ? filePath : pdf; }, }; diff --git a/components/puppeteer/actions/screenshot-page/screenshot-page.mjs b/components/puppeteer/actions/screenshot-page/screenshot-page.mjs index ab1755321e51a..8a30f3c54129c 100644 --- a/components/puppeteer/actions/screenshot-page/screenshot-page.mjs +++ b/components/puppeteer/actions/screenshot-page/screenshot-page.mjs @@ -10,7 +10,7 @@ export default { name: "Screenshot a Page", description: "Captures a screenshot of a page using Puppeteer. [See the documentation](https://pptr.dev/api/puppeteer.page.screenshot)", - version: "1.0.3", + version: "1.0.4", type: "action", props: { puppeteer, @@ -118,8 +118,21 @@ export default { accessMode: "write", sync: true, }, + browserTimeout: { + type: "integer", + label: "Browser Timeout", + description: "Maximum time in seconds to wait for the browser to start. Default is `30` seconds.", + optional: true, + }, + pageTimeout: { + type: "integer", + label: "Page Timeout", + description: "Maximum time in seconds to wait for the page to load. Default is `30` seconds.", + optional: true, + }, }, methods: { + ...common.methods, async downloadToTMP(screenshot) { const path = this.downloadPath.includes("/tmp") ? this.downloadPath @@ -162,8 +175,21 @@ export default { }; const url = this.normalizeUrl(); - const browser = await this.puppeteer.launch(); + + const browserOptions = this.browserTimeout + ? { + timeout: this.browserTimeout * 1000, + } + : undefined; + + const browser = await this.puppeteer.launch(browserOptions); + const page = await browser.newPage(); + + if (this.pageTimeout) { + page.setDefaultTimeout(this.pageTimeout * 1000); + } + await page.goto(url); const screenshot = await page.screenshot(options); await browser.close(); @@ -178,10 +204,7 @@ export default { } return filePath - ? { - screenshot: screenshot.toString("base64"), - filePath, - } + ? filePath : screenshot.toString("base64"); }, }; diff --git a/components/puppeteer/package.json b/components/puppeteer/package.json index 07367cdd619bb..b279c2b26b16e 100644 --- a/components/puppeteer/package.json +++ b/components/puppeteer/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/puppeteer", - "version": "1.0.3", + "version": "1.0.4", "description": "Pipedream Puppeteer Components", "main": "puppeteer.app.mjs", "keywords": [ @@ -13,7 +13,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.5.1", + "@pipedream/platform": "^3.1.0", "@sparticuz/chromium": "121.0.0", "puppeteer-core": "21.11.0" } diff --git a/components/puppeteer/puppeteer.app.mjs b/components/puppeteer/puppeteer.app.mjs index 12726b5fed345..71b7917a647cd 100644 --- a/components/puppeteer/puppeteer.app.mjs +++ b/components/puppeteer/puppeteer.app.mjs @@ -1,8 +1,8 @@ // Table for Chromium <> Puppeteer version support here: https://pptr.dev/chromium-support // @note: this is locked to an old chromium version // because there's an unfulfilled promise bug in later version of puppeteer-core -import puppeteer from "puppeteer-core@21.11.0"; -import chromium from "@sparticuz/chromium@121.0.0"; +import puppeteer from "puppeteer-core"; +import chromium from "@sparticuz/chromium"; export default { type: "app", diff --git a/components/pushbullet/package.json b/components/pushbullet/package.json index fdc328eddaa1b..e9f1d5934e932 100644 --- a/components/pushbullet/package.json +++ b/components/pushbullet/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/pushbullet", - "version": "0.6.0", + "version": "0.6.1", "description": "Pipedream pushbullet Components", "main": "pushbullet.app.mjs", "keywords": [ @@ -13,6 +13,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.0.0" + "@pipedream/platform": "^3.1.0", + "form-data": "^4.0.0" } } diff --git a/components/qstash/package.json b/components/qstash/package.json index c097efa14b746..95d6f74fc627d 100644 --- a/components/qstash/package.json +++ b/components/qstash/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/qstash", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream qstash Components", "main": "qstash.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/questdb/package.json b/components/questdb/package.json new file mode 100644 index 0000000000000..4c1ed43c5d8c8 --- /dev/null +++ b/components/questdb/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/questdb", + "version": "0.0.1", + "description": "Pipedream QuestDB Components", + "main": "questdb.app.mjs", + "keywords": [ + "pipedream", + "questdb" + ], + "homepage": "https://pipedream.com/apps/questdb", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/questdb/questdb.app.mjs b/components/questdb/questdb.app.mjs new file mode 100644 index 0000000000000..0f0060461c772 --- /dev/null +++ b/components/questdb/questdb.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "questdb", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/questionpro/.gitignore b/components/questionpro/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/questionpro/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/questionpro/app/questionpro.app.ts b/components/questionpro/app/questionpro.app.ts deleted file mode 100644 index 8919a1c81c59e..0000000000000 --- a/components/questionpro/app/questionpro.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "questionpro", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/questionpro/package.json b/components/questionpro/package.json index 52dd504c4a76a..86e1ecc9df2fa 100644 --- a/components/questionpro/package.json +++ b/components/questionpro/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/questionpro", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream QuestionPro Components", - "main": "dist/app/questionpro.app.mjs", + "main": "questionpro.app.mjs", "keywords": [ "pipedream", "questionpro" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/questionpro", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/questionpro/questionpro.app.mjs b/components/questionpro/questionpro.app.mjs new file mode 100644 index 0000000000000..5c3302a2f9150 --- /dev/null +++ b/components/questionpro/questionpro.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "questionpro", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/quickbooks/actions/create-ap-aging-report/create-ap-aging-report.mjs b/components/quickbooks/actions/create-ap-aging-report/create-ap-aging-report.mjs index 34f20e82cea77..57f4b1ac13e66 100644 --- a/components/quickbooks/actions/create-ap-aging-report/create-ap-aging-report.mjs +++ b/components/quickbooks/actions/create-ap-aging-report/create-ap-aging-report.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-create-ap-aging-report", name: "Create AP Aging Detail Report", description: "Creates an AP aging report in Quickbooks Online. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/apagingdetail#query-a-report)", - version: "0.0.5", + version: "0.0.6", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-bill/create-bill.mjs b/components/quickbooks/actions/create-bill/create-bill.mjs index 1c5e660e5774d..c90ed57cc3678 100644 --- a/components/quickbooks/actions/create-bill/create-bill.mjs +++ b/components/quickbooks/actions/create-bill/create-bill.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-create-bill", name: "Create Bill", description: "Creates a bill. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/bill#create-a-bill)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-customer/create-customer.mjs b/components/quickbooks/actions/create-customer/create-customer.mjs index 40fae539fe4d3..bfbb98149aac1 100644 --- a/components/quickbooks/actions/create-customer/create-customer.mjs +++ b/components/quickbooks/actions/create-customer/create-customer.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-create-customer", name: "Create Customer", description: "Creates a customer. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/customer#create-a-customer)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-estimate/create-estimate.mjs b/components/quickbooks/actions/create-estimate/create-estimate.mjs index 8e82f286beef9..cd45ba0da0cf1 100644 --- a/components/quickbooks/actions/create-estimate/create-estimate.mjs +++ b/components/quickbooks/actions/create-estimate/create-estimate.mjs @@ -9,7 +9,7 @@ export default { key: "quickbooks-create-estimate", name: "Create Estimate", description: "Creates an estimate. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/estimate#create-an-estimate)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-invoice/create-invoice.mjs b/components/quickbooks/actions/create-invoice/create-invoice.mjs index 5c43230644429..1f5ad906e0a8d 100644 --- a/components/quickbooks/actions/create-invoice/create-invoice.mjs +++ b/components/quickbooks/actions/create-invoice/create-invoice.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-create-invoice", name: "Create Invoice", description: "Creates an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#create-an-invoice)", - version: "0.2.4", + version: "0.2.5", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-payment/create-payment.mjs b/components/quickbooks/actions/create-payment/create-payment.mjs index be15215d7ec98..9939f0930e418 100644 --- a/components/quickbooks/actions/create-payment/create-payment.mjs +++ b/components/quickbooks/actions/create-payment/create-payment.mjs @@ -4,7 +4,7 @@ export default { key: "quickbooks-create-payment", name: "Create Payment", description: "Creates a payment. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/payment#create-a-payment)", - version: "0.0.9", + version: "0.0.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-pl-report/create-pl-report.mjs b/components/quickbooks/actions/create-pl-report/create-pl-report.mjs index d6d7511816a6e..025902f7aa25b 100644 --- a/components/quickbooks/actions/create-pl-report/create-pl-report.mjs +++ b/components/quickbooks/actions/create-pl-report/create-pl-report.mjs @@ -7,7 +7,7 @@ export default { key: "quickbooks-create-pl-report", name: "Create Profit and Loss Detail Report", description: "Creates a profit and loss report in Quickbooks Online. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/profitandloss#query-a-report)", - version: "0.0.5", + version: "0.0.6", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-purchase-order/create-purchase-order.mjs b/components/quickbooks/actions/create-purchase-order/create-purchase-order.mjs index 66ce81832c590..2850c217b8aa1 100644 --- a/components/quickbooks/actions/create-purchase-order/create-purchase-order.mjs +++ b/components/quickbooks/actions/create-purchase-order/create-purchase-order.mjs @@ -9,7 +9,7 @@ export default { key: "quickbooks-create-purchase-order", name: "Create Purchase Order", description: "Creates a purchase order. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchaseorder#create-a-purchaseorder)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-purchase/create-purchase.mjs b/components/quickbooks/actions/create-purchase/create-purchase.mjs index eebe47052d2e9..52dbb408aa0f0 100644 --- a/components/quickbooks/actions/create-purchase/create-purchase.mjs +++ b/components/quickbooks/actions/create-purchase/create-purchase.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-create-purchase", name: "Create Purchase", description: "Creates a new purchase. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#create-a-purchase)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-sales-receipt/create-sales-receipt.mjs b/components/quickbooks/actions/create-sales-receipt/create-sales-receipt.mjs index 6dfdb4dc40012..2ef4307fec80b 100644 --- a/components/quickbooks/actions/create-sales-receipt/create-sales-receipt.mjs +++ b/components/quickbooks/actions/create-sales-receipt/create-sales-receipt.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-create-sales-receipt", name: "Create Sales Receipt", description: "Creates a sales receipt. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/salesreceipt#create-a-salesreceipt)", - version: "0.0.9", + version: "0.0.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/delete-purchase/delete-purchase.mjs b/components/quickbooks/actions/delete-purchase/delete-purchase.mjs index 7e8a3297cedf1..a33ffd5f34ede 100644 --- a/components/quickbooks/actions/delete-purchase/delete-purchase.mjs +++ b/components/quickbooks/actions/delete-purchase/delete-purchase.mjs @@ -4,7 +4,7 @@ export default { key: "quickbooks-delete-purchase", name: "Delete Purchase", description: "Delete a specific purchase. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#delete-a-purchase)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-bill/get-bill.mjs b/components/quickbooks/actions/get-bill/get-bill.mjs index 6847ca62b2867..0a6386f7004ce 100644 --- a/components/quickbooks/actions/get-bill/get-bill.mjs +++ b/components/quickbooks/actions/get-bill/get-bill.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-bill", name: "Get Bill", description: "Returns info about a bill. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/bill#read-a-bill)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-customer/get-customer.mjs b/components/quickbooks/actions/get-customer/get-customer.mjs index 10678c8c67031..fa61f8c78ea03 100644 --- a/components/quickbooks/actions/get-customer/get-customer.mjs +++ b/components/quickbooks/actions/get-customer/get-customer.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-customer", name: "Get Customer", description: "Returns info about a customer. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/customer#read-a-customer)", - version: "0.3.10", + version: "0.3.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-invoice/get-invoice.mjs b/components/quickbooks/actions/get-invoice/get-invoice.mjs index c9f39028e5eb0..ab2c88a92240e 100644 --- a/components/quickbooks/actions/get-invoice/get-invoice.mjs +++ b/components/quickbooks/actions/get-invoice/get-invoice.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-invoice", name: "Get Invoice", description: "Returns info about an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#read-an-invoice)", - version: "0.2.11", + version: "0.2.12", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-my-company/get-my-company.mjs b/components/quickbooks/actions/get-my-company/get-my-company.mjs index 6ac75ab5dc644..8b34b8a05250e 100644 --- a/components/quickbooks/actions/get-my-company/get-my-company.mjs +++ b/components/quickbooks/actions/get-my-company/get-my-company.mjs @@ -4,7 +4,7 @@ export default { key: "quickbooks-get-my-company", name: "Get My Company", description: "Gets info about a company. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/companyinfo)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-payment/get-payment.mjs b/components/quickbooks/actions/get-payment/get-payment.mjs index 150f8b9332104..6f6e7d0c08ccd 100644 --- a/components/quickbooks/actions/get-payment/get-payment.mjs +++ b/components/quickbooks/actions/get-payment/get-payment.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-payment", name: "Get Payment", description: "Returns info about a payment. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/payment#read-a-payment)", - version: "0.0.4", + version: "0.0.5", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-purchase-order/get-purchase-order.mjs b/components/quickbooks/actions/get-purchase-order/get-purchase-order.mjs index a2c80ec93ed13..33e092598d3ed 100644 --- a/components/quickbooks/actions/get-purchase-order/get-purchase-order.mjs +++ b/components/quickbooks/actions/get-purchase-order/get-purchase-order.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-purchase-order", name: "Get Purchase Order", description: "Returns details about a purchase order. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchaseorder#read-a-purchase-order)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-purchase/get-purchase.mjs b/components/quickbooks/actions/get-purchase/get-purchase.mjs index 736b06aa4aa29..13f77490e2223 100644 --- a/components/quickbooks/actions/get-purchase/get-purchase.mjs +++ b/components/quickbooks/actions/get-purchase/get-purchase.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-purchase", name: "Get Purchase", description: "Returns info about a purchase. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#read-a-purchase)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-sales-receipt/get-sales-receipt.mjs b/components/quickbooks/actions/get-sales-receipt/get-sales-receipt.mjs index 6ed7ec28ecab4..676fd3e3c4370 100644 --- a/components/quickbooks/actions/get-sales-receipt/get-sales-receipt.mjs +++ b/components/quickbooks/actions/get-sales-receipt/get-sales-receipt.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-sales-receipt", name: "Get Sales Receipt", description: "Returns details about a sales receipt. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/salesreceipt#read-a-salesreceipt)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-time-activity/get-time-activity.mjs b/components/quickbooks/actions/get-time-activity/get-time-activity.mjs index c8f9868ce917f..263bc5c691ed4 100644 --- a/components/quickbooks/actions/get-time-activity/get-time-activity.mjs +++ b/components/quickbooks/actions/get-time-activity/get-time-activity.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-time-activity", name: "Get Time Activity", description: "Returns info about an activity. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/timeactivity#read-a-timeactivity-object)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-accounts/search-accounts.mjs b/components/quickbooks/actions/search-accounts/search-accounts.mjs index ccede3b3fbfb1..5f5e25a29cc62 100644 --- a/components/quickbooks/actions/search-accounts/search-accounts.mjs +++ b/components/quickbooks/actions/search-accounts/search-accounts.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-accounts", name: "Search Accounts", description: "Search for accounts. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/account#query-an-account)", - version: "0.2.10", + version: "0.2.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-customers/search-customers.mjs b/components/quickbooks/actions/search-customers/search-customers.mjs index ad0203695d30a..553bfe23e869a 100644 --- a/components/quickbooks/actions/search-customers/search-customers.mjs +++ b/components/quickbooks/actions/search-customers/search-customers.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-customers", name: "Search Customers", description: "Searches for customers. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/customer#query-a-customer)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-invoices/search-invoices.mjs b/components/quickbooks/actions/search-invoices/search-invoices.mjs index bcc50fe1f586c..e1255d27411a4 100644 --- a/components/quickbooks/actions/search-invoices/search-invoices.mjs +++ b/components/quickbooks/actions/search-invoices/search-invoices.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-invoices", name: "Search Invoices", description: "Searches for invoices. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#query-an-invoice)", - version: "0.0.4", + version: "0.0.5", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-items/search-items.mjs b/components/quickbooks/actions/search-items/search-items.mjs index d6a91effa5da8..407ac5db543fc 100644 --- a/components/quickbooks/actions/search-items/search-items.mjs +++ b/components/quickbooks/actions/search-items/search-items.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-items", name: "Search Items", description: "Searches for items. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/item#query-an-item)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-products/search-products.mjs b/components/quickbooks/actions/search-products/search-products.mjs index a6de9b4e2cf83..3d19e49e5b64b 100644 --- a/components/quickbooks/actions/search-products/search-products.mjs +++ b/components/quickbooks/actions/search-products/search-products.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-products", name: "Search Products", description: "Search for products. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/item#query-an-item)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-purchases/search-purchases.mjs b/components/quickbooks/actions/search-purchases/search-purchases.mjs index b84768cc44570..d1eaf57857ad2 100644 --- a/components/quickbooks/actions/search-purchases/search-purchases.mjs +++ b/components/quickbooks/actions/search-purchases/search-purchases.mjs @@ -4,7 +4,7 @@ export default { key: "quickbooks-search-purchases", name: "Search Purchases", description: "Searches for purchases. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#query-a-purchase)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-query/search-query.mjs b/components/quickbooks/actions/search-query/search-query.mjs index b6d30dea2c581..4298727c15d0a 100644 --- a/components/quickbooks/actions/search-query/search-query.mjs +++ b/components/quickbooks/actions/search-query/search-query.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-query", name: "Search Query", description: "Performs a search query against a Quickbooks entity. [See the documentation](https://developer.intuit.com/app/develophttps://developer.intuit.com/app/developer/qbo/docs/develop/explore-the-quickbooks-online-api/data-queries)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-services/search-services.mjs b/components/quickbooks/actions/search-services/search-services.mjs index e8ef737065a7d..3c41b10e09598 100644 --- a/components/quickbooks/actions/search-services/search-services.mjs +++ b/components/quickbooks/actions/search-services/search-services.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-services", name: "Search Services", description: "Search for services. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/item#query-an-item)", - version: "0.0.4", + version: "0.0.5", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-time-activities/search-time-activities.mjs b/components/quickbooks/actions/search-time-activities/search-time-activities.mjs index 15f5bf179072e..0d9e63df7f2db 100644 --- a/components/quickbooks/actions/search-time-activities/search-time-activities.mjs +++ b/components/quickbooks/actions/search-time-activities/search-time-activities.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-time-activities", name: "Search Time Activities", description: "Searches for time activities. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/timeactivity#query-a-timeactivity-object)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-vendors/search-vendors.mjs b/components/quickbooks/actions/search-vendors/search-vendors.mjs index a1722b05a3309..cd05e30660f23 100644 --- a/components/quickbooks/actions/search-vendors/search-vendors.mjs +++ b/components/quickbooks/actions/search-vendors/search-vendors.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-vendors", name: "Search Vendors", description: "Searches for vendors. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/vendor#query-a-vendor)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, @@ -37,7 +37,7 @@ export default { }, async run({ $ }) { if (!this.whereClause) { - throw new ConfigurationError("Must provide includeClause, whereClause parameters."); + throw new ConfigurationError("Must provide whereClause parameter."); } const orderClause = this.orderClause diff --git a/components/quickbooks/actions/send-estimate/send-estimate.mjs b/components/quickbooks/actions/send-estimate/send-estimate.mjs index 2a10736fb484a..24feb6829564a 100644 --- a/components/quickbooks/actions/send-estimate/send-estimate.mjs +++ b/components/quickbooks/actions/send-estimate/send-estimate.mjs @@ -4,7 +4,7 @@ export default { key: "quickbooks-send-estimate", name: "Send Estimate", description: "Sends an estimate by email. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/estimate#send-an-estimate)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/send-invoice/send-invoice.mjs b/components/quickbooks/actions/send-invoice/send-invoice.mjs index dc24cc7181955..ce429f419ca55 100644 --- a/components/quickbooks/actions/send-invoice/send-invoice.mjs +++ b/components/quickbooks/actions/send-invoice/send-invoice.mjs @@ -4,7 +4,7 @@ export default { key: "quickbooks-send-invoice", name: "Send Invoice", description: "Sends an invoice by email. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#send-an-invoice)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/sparse-update-invoice/sparse-update-invoice.mjs b/components/quickbooks/actions/sparse-update-invoice/sparse-update-invoice.mjs index fbf7376ad93c4..3c08b967bda69 100644 --- a/components/quickbooks/actions/sparse-update-invoice/sparse-update-invoice.mjs +++ b/components/quickbooks/actions/sparse-update-invoice/sparse-update-invoice.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-sparse-update-invoice", name: "Sparse Update Invoice", description: "Sparse updating provides the ability to update a subset of properties for a given object; only elements specified in the request are updated. Missing elements are left untouched. The ID of the object to update is specified in the request body.โ€‹ [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#sparse-update-an-invoice)", - version: "0.1.8", + version: "0.1.9", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/update-customer/update-customer.mjs b/components/quickbooks/actions/update-customer/update-customer.mjs index 73bd5e647452d..7a76c453a17bc 100644 --- a/components/quickbooks/actions/update-customer/update-customer.mjs +++ b/components/quickbooks/actions/update-customer/update-customer.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-update-customer", name: "Update Customer", description: "Updates a customer. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/customer#full-update-a-customer)", - version: "0.1.10", + version: "0.1.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/update-estimate/update-estimate.mjs b/components/quickbooks/actions/update-estimate/update-estimate.mjs index 78302747d4380..14c7afe4a13a2 100644 --- a/components/quickbooks/actions/update-estimate/update-estimate.mjs +++ b/components/quickbooks/actions/update-estimate/update-estimate.mjs @@ -9,7 +9,7 @@ export default { key: "quickbooks-update-estimate", name: "Update Estimate", description: "Updates an estimate. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/estimate#update-an-estimate)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/update-invoice/update-invoice.mjs b/components/quickbooks/actions/update-invoice/update-invoice.mjs index 5df278ea7cdfc..151f5bba885cc 100644 --- a/components/quickbooks/actions/update-invoice/update-invoice.mjs +++ b/components/quickbooks/actions/update-invoice/update-invoice.mjs @@ -9,7 +9,7 @@ export default { key: "quickbooks-update-invoice", name: "Update Invoice", description: "Updates an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#update-an-invoice)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/update-item/update-item.mjs b/components/quickbooks/actions/update-item/update-item.mjs index d794095954668..77568aa452a7f 100644 --- a/components/quickbooks/actions/update-item/update-item.mjs +++ b/components/quickbooks/actions/update-item/update-item.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-update-item", name: "Update Item", description: "Updates an item. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/item#full-update-an-item)", - version: "0.0.4", + version: "0.0.5", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/void-invoice/void-invoice.mjs b/components/quickbooks/actions/void-invoice/void-invoice.mjs index 63a4e3f343786..a6b0fac2584e0 100644 --- a/components/quickbooks/actions/void-invoice/void-invoice.mjs +++ b/components/quickbooks/actions/void-invoice/void-invoice.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-void-invoice", name: "Void Invoice", description: "Voids an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#void-an-invoice)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { quickbooks, diff --git a/components/quickbooks/common/constants.mjs b/components/quickbooks/common/constants.mjs index bf001cba36632..9d965b2af1fbb 100644 --- a/components/quickbooks/common/constants.mjs +++ b/components/quickbooks/common/constants.mjs @@ -1,6 +1,6 @@ export const LIMIT = 100; export const MAX_RETRIES = 5; -export const INITIAL_BACKOFF_MILLISECONDS = 1500; +export const INITIAL_BACKOFF_MILLISECONDS = 2000; export const AP_AGING_REPORT_COLUMNS = [ "create_by", diff --git a/components/quickbooks/common/utils.mjs b/components/quickbooks/common/utils.mjs index 30aaba3ed910b..2d548beae6c6a 100644 --- a/components/quickbooks/common/utils.mjs +++ b/components/quickbooks/common/utils.mjs @@ -46,16 +46,35 @@ export function parseObject(obj) { } export async function retryWithExponentialBackoff( - requestFn, retries = MAX_RETRIES, backoff = INITIAL_BACKOFF_MILLISECONDS, + requestFn, + retries = MAX_RETRIES, + backoff = INITIAL_BACKOFF_MILLISECONDS, ) { try { return await requestFn(); } catch (error) { - if (retries > 0 && error.response?.status === 429) { - console.warn(`Rate limit exceeded. Retrying in ${backoff}ms...`); - await new Promise((resolve) => setTimeout(resolve, backoff)); - return retryWithExponentialBackoff(requestFn, retries - 1, backoff * 2); + const status = error.response?.status; + const errorCode = error.response?.data?.Fault?.Error?.[0]?.code; + const errorCodeStr = errorCode == null + ? undefined + : String(errorCode); + + const isRateLimit = status === 429 || + status === 503 || + errorCodeStr === "3200" || // Rate limit exceeded + errorCodeStr === "10001"; // Throttle limit exceeded + + if (retries > 0 && isRateLimit) { + const retryAfter = error.response?.headers?.["retry-after"]; + const delay = retryAfter + ? parseInt(retryAfter) * 1000 + : backoff; + + console.warn(`QuickBooks rate limit exceeded. Retrying in ${delay}ms... (${retries} retries left)`); + await new Promise((resolve) => setTimeout(resolve, delay)); + return retryWithExponentialBackoff(requestFn, retries - 1, Math.min(backoff * 2, 60000)); } + throw error; } } diff --git a/components/quickbooks/package.json b/components/quickbooks/package.json index d00273c3b6624..221e11a0b00ab 100644 --- a/components/quickbooks/package.json +++ b/components/quickbooks/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/quickbooks", - "version": "0.6.1", + "version": "0.7.1", "description": "Pipedream Quickbooks Components", "main": "quickbooks.app.mjs", "keywords": [ diff --git a/components/quickbooks/sources/new-customer-created/new-customer-created.mjs b/components/quickbooks/sources/new-customer-created/new-customer-created.mjs index 944c9d4b387fb..a7efc8fdb842d 100644 --- a/components/quickbooks/sources/new-customer-created/new-customer-created.mjs +++ b/components/quickbooks/sources/new-customer-created/new-customer-created.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-customer-created", name: "New Customer Created", description: "Emit new event when a new customer is created.", - version: "0.0.7", + version: "0.0.8", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-customer-updated/new-customer-updated.mjs b/components/quickbooks/sources/new-customer-updated/new-customer-updated.mjs index ed858ef24e65a..e2164a4e9447c 100644 --- a/components/quickbooks/sources/new-customer-updated/new-customer-updated.mjs +++ b/components/quickbooks/sources/new-customer-updated/new-customer-updated.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-customer-updated", name: "New Customer Updated", description: "Emit new event when a customer is updated.", - version: "0.0.7", + version: "0.0.8", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-employee-created/new-employee-created.mjs b/components/quickbooks/sources/new-employee-created/new-employee-created.mjs index 78504b6a97c32..f1a2a938ab6fa 100644 --- a/components/quickbooks/sources/new-employee-created/new-employee-created.mjs +++ b/components/quickbooks/sources/new-employee-created/new-employee-created.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-employee-created", name: "New Employee Created", description: "Emit new event when a new employee is created.", - version: "0.0.5", + version: "0.0.6", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-employee-updated/new-employee-updated.mjs b/components/quickbooks/sources/new-employee-updated/new-employee-updated.mjs index b6479ebd2b505..4113a3ba88066 100644 --- a/components/quickbooks/sources/new-employee-updated/new-employee-updated.mjs +++ b/components/quickbooks/sources/new-employee-updated/new-employee-updated.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-employee-updated", name: "New Employee Updated", description: "Emit new event when an employee is updated.", - version: "0.0.5", + version: "0.0.6", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-invoice-created/new-invoice-created.mjs b/components/quickbooks/sources/new-invoice-created/new-invoice-created.mjs index 5ffa6c087dab4..cf4e690b4c25e 100644 --- a/components/quickbooks/sources/new-invoice-created/new-invoice-created.mjs +++ b/components/quickbooks/sources/new-invoice-created/new-invoice-created.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-invoice-created", name: "New Invoice Created", description: "Emit new event when a new invoice is created.", - version: "0.0.7", + version: "0.0.8", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-invoice-updated/new-invoice-updated.mjs b/components/quickbooks/sources/new-invoice-updated/new-invoice-updated.mjs index c566d19f5e849..322072abceed4 100644 --- a/components/quickbooks/sources/new-invoice-updated/new-invoice-updated.mjs +++ b/components/quickbooks/sources/new-invoice-updated/new-invoice-updated.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-invoice-updated", name: "New Invoice Updated", description: "Emit new event when an invoice is updated.", - version: "0.0.7", + version: "0.0.8", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-item-created/new-item-created.mjs b/components/quickbooks/sources/new-item-created/new-item-created.mjs index 8aa868989b2cf..cd3fc1108679d 100644 --- a/components/quickbooks/sources/new-item-created/new-item-created.mjs +++ b/components/quickbooks/sources/new-item-created/new-item-created.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-item-created", name: "New Item Created", description: "Emit new event when a new item is created.", - version: "0.0.7", + version: "0.0.8", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-item-updated/new-item-updated.mjs b/components/quickbooks/sources/new-item-updated/new-item-updated.mjs index ecbc2c0f84a00..f525d82dba25f 100644 --- a/components/quickbooks/sources/new-item-updated/new-item-updated.mjs +++ b/components/quickbooks/sources/new-item-updated/new-item-updated.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-item-updated", name: "New Item Updated", description: "Emit new event when an item is updated.", - version: "0.0.7", + version: "0.0.8", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-purchase-created/new-purchase-created.mjs b/components/quickbooks/sources/new-purchase-created/new-purchase-created.mjs new file mode 100644 index 0000000000000..93a881cd6a8ed --- /dev/null +++ b/components/quickbooks/sources/new-purchase-created/new-purchase-created.mjs @@ -0,0 +1,25 @@ +import common from "../common/base.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "quickbooks-new-purchase-created", + name: "New Purchase Created", + description: "Emit new event when a new purchase is created.", + version: "0.0.2", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getQuery(lastDate) { + return `select * from Purchase Where Metadata.CreateTime >= '${lastDate}' orderby Metadata.CreateTime desc`; + }, + getFieldList() { + return "Purchase"; + }, + getSummary(item) { + return `New Purchase: ${item.Id}`; + }, + }, + sampleEmit, +}; diff --git a/components/quickbooks/sources/new-purchase-created/test-event.mjs b/components/quickbooks/sources/new-purchase-created/test-event.mjs new file mode 100644 index 0000000000000..919b6f7031f37 --- /dev/null +++ b/components/quickbooks/sources/new-purchase-created/test-event.mjs @@ -0,0 +1,55 @@ +export default { + "AccountRef": { + "value": "35", + "name": "Checking" + }, + "PaymentType": "Check", + "TotalAmt": 1, + "PrintStatus": "NotSet", + "PurchaseEx": { + "any": [ + { + "name": "{http://schema.intuit.com/finance/v3}NameValue", + "declaredType": "com.intuit.schema.finance.v3.NameValue", + "scope": "javax.xml.bind.JAXBElement$GlobalScope", + "value": { + "Name": "TxnType", + "Value": "3" + }, + "nil": false, + "globalScope": true, + "typeSubstituted": false + } + ] + }, + "domain": "QBO", + "sparse": false, + "Id": "180", + "SyncToken": "0", + "MetaData": { + "CreateTime": "2025-07-31T07:50:12-07:00", + "LastUpdatedTime": "2025-07-31T07:50:12-07:00" + }, + "TxnDate": "2025-07-31", + "CurrencyRef": { + "value": "USD", + "name": "United States Dollar" + }, + "Line": [ + { + "Id": "1", + "Amount": 1, + "DetailType": "AccountBasedExpenseLineDetail", + "AccountBasedExpenseLineDetail": { + "AccountRef": { + "value": "7", + "name": "Advertising" + }, + "BillableStatus": "NotBillable", + "TaxCodeRef": { + "value": "NON" + } + } + } + ] +} \ No newline at end of file diff --git a/components/quickbooks/sources/new-purchase-updated/new-purchase-updated.mjs b/components/quickbooks/sources/new-purchase-updated/new-purchase-updated.mjs new file mode 100644 index 0000000000000..e51bf304f788d --- /dev/null +++ b/components/quickbooks/sources/new-purchase-updated/new-purchase-updated.mjs @@ -0,0 +1,28 @@ +import common from "../common/base.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "quickbooks-new-purchase-updated", + name: "New Purchase Updated", + description: "Emit new event when a purchase is updated.", + version: "0.0.2", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getQuery(lastDate) { + return `select * from Purchase Where Metadata.LastUpdatedTime >= '${lastDate}' orderby Metadata.LastUpdatedTime desc`; + }, + getFieldList() { + return "Purchase"; + }, + getFieldDate() { + return "LastUpdatedTime"; + }, + getSummary(item) { + return `New Purchase Updated: ${item.Id}`; + }, + }, + sampleEmit, +}; diff --git a/components/quickbooks/sources/new-purchase-updated/test-event.mjs b/components/quickbooks/sources/new-purchase-updated/test-event.mjs new file mode 100644 index 0000000000000..139385dd60471 --- /dev/null +++ b/components/quickbooks/sources/new-purchase-updated/test-event.mjs @@ -0,0 +1,55 @@ +export default { + "AccountRef": { + "value": "35", + "name": "Checking" + }, + "PaymentType": "Check", + "TotalAmt": 1, + "PrintStatus": "NotSet", + "PurchaseEx": { + "any": [ + { + "name": "{http://schema.intuit.com/finance/v3}NameValue", + "declaredType": "com.intuit.schema.finance.v3.NameValue", + "scope": "javax.xml.bind.JAXBElement$GlobalScope", + "value": { + "Name": "TxnType", + "Value": "3" + }, + "nil": false, + "globalScope": true, + "typeSubstituted": false + } + ] + }, + "domain": "QBO", + "sparse": false, + "Id": "180", + "SyncToken": "0", + "MetaData": { + "CreateTime": "2025-07-31T07:50:12-07:00", + "LastUpdatedTime": "2025-07-31T07:55:00-00:00" + }, + "TxnDate": "2025-07-31", + "CurrencyRef": { + "value": "USD", + "name": "United States Dollar" + }, + "Line": [ + { + "Id": "1", + "Amount": 1, + "DetailType": "AccountBasedExpenseLineDetail", + "AccountBasedExpenseLineDetail": { + "AccountRef": { + "value": "7", + "name": "Advertising" + }, + "BillableStatus": "NotBillable", + "TaxCodeRef": { + "value": "NON" + } + } + } + ] +} \ No newline at end of file diff --git a/components/quickbooks_sandbox/actions/create-ap-aging-report/create-ap-aging-report.mjs b/components/quickbooks_sandbox/actions/create-ap-aging-report/create-ap-aging-report.mjs index 15f60380a021f..9e5dc65965160 100644 --- a/components/quickbooks_sandbox/actions/create-ap-aging-report/create-ap-aging-report.mjs +++ b/components/quickbooks_sandbox/actions/create-ap-aging-report/create-ap-aging-report.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-create-ap-aging-report", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/create-bill/create-bill.mjs b/components/quickbooks_sandbox/actions/create-bill/create-bill.mjs index dc43d92f195a9..6ef72c0c0fdd0 100644 --- a/components/quickbooks_sandbox/actions/create-bill/create-bill.mjs +++ b/components/quickbooks_sandbox/actions/create-bill/create-bill.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-create-bill", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/create-customer/create-customer.mjs b/components/quickbooks_sandbox/actions/create-customer/create-customer.mjs index 6d8141b7636b5..325b24b44b2e1 100644 --- a/components/quickbooks_sandbox/actions/create-customer/create-customer.mjs +++ b/components/quickbooks_sandbox/actions/create-customer/create-customer.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-create-customer", - version: "0.1.4", + version: "0.1.5", name, description, type, diff --git a/components/quickbooks_sandbox/actions/create-estimate/create-estimate.mjs b/components/quickbooks_sandbox/actions/create-estimate/create-estimate.mjs index 55b44d13b8db4..c0c5392e0a992 100644 --- a/components/quickbooks_sandbox/actions/create-estimate/create-estimate.mjs +++ b/components/quickbooks_sandbox/actions/create-estimate/create-estimate.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-create-estimate", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/quickbooks_sandbox/actions/create-invoice/create-invoice.mjs b/components/quickbooks_sandbox/actions/create-invoice/create-invoice.mjs index 20505197cd8fd..1395fecc1c5fa 100644 --- a/components/quickbooks_sandbox/actions/create-invoice/create-invoice.mjs +++ b/components/quickbooks_sandbox/actions/create-invoice/create-invoice.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-create-invoice", - version: "0.1.4", + version: "0.1.5", name, description, type, diff --git a/components/quickbooks_sandbox/actions/create-payment/create-payment.mjs b/components/quickbooks_sandbox/actions/create-payment/create-payment.mjs index df52c9df75a4b..eb9d88f1cc860 100644 --- a/components/quickbooks_sandbox/actions/create-payment/create-payment.mjs +++ b/components/quickbooks_sandbox/actions/create-payment/create-payment.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-create-payment", - version: "0.1.4", + version: "0.1.5", name, description, type, diff --git a/components/quickbooks_sandbox/actions/create-pl-report/create-pl-report.mjs b/components/quickbooks_sandbox/actions/create-pl-report/create-pl-report.mjs index 94f8f158c3c7b..600df22412b45 100644 --- a/components/quickbooks_sandbox/actions/create-pl-report/create-pl-report.mjs +++ b/components/quickbooks_sandbox/actions/create-pl-report/create-pl-report.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-create-pl-report", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/create-purchase-order/create-purchase-order.mjs b/components/quickbooks_sandbox/actions/create-purchase-order/create-purchase-order.mjs index 2f07717a91bf3..8a7ed72801f34 100644 --- a/components/quickbooks_sandbox/actions/create-purchase-order/create-purchase-order.mjs +++ b/components/quickbooks_sandbox/actions/create-purchase-order/create-purchase-order.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-create-purchase-order", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/quickbooks_sandbox/actions/create-purchase/create-purchase.mjs b/components/quickbooks_sandbox/actions/create-purchase/create-purchase.mjs index fa6d2fd771527..1c70673b80797 100644 --- a/components/quickbooks_sandbox/actions/create-purchase/create-purchase.mjs +++ b/components/quickbooks_sandbox/actions/create-purchase/create-purchase.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-create-purchase", - version: "0.1.4", + version: "0.1.5", name, description, type, diff --git a/components/quickbooks_sandbox/actions/create-sales-receipt/create-sales-receipt.mjs b/components/quickbooks_sandbox/actions/create-sales-receipt/create-sales-receipt.mjs index 78c41804ed3c3..123f93e11be72 100644 --- a/components/quickbooks_sandbox/actions/create-sales-receipt/create-sales-receipt.mjs +++ b/components/quickbooks_sandbox/actions/create-sales-receipt/create-sales-receipt.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-create-sales-receipt", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/delete-purchase/delete-purchase.mjs b/components/quickbooks_sandbox/actions/delete-purchase/delete-purchase.mjs index dd09a75fa89ca..dc170c8e17c6c 100644 --- a/components/quickbooks_sandbox/actions/delete-purchase/delete-purchase.mjs +++ b/components/quickbooks_sandbox/actions/delete-purchase/delete-purchase.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-delete-purchase", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/get-bill/get-bill.mjs b/components/quickbooks_sandbox/actions/get-bill/get-bill.mjs index ff5b9e0f25ac2..ceffc158d161f 100644 --- a/components/quickbooks_sandbox/actions/get-bill/get-bill.mjs +++ b/components/quickbooks_sandbox/actions/get-bill/get-bill.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-get-bill", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/get-customer/get-customer.mjs b/components/quickbooks_sandbox/actions/get-customer/get-customer.mjs index b3a83d7979a9a..ab3ad7b2758e7 100644 --- a/components/quickbooks_sandbox/actions/get-customer/get-customer.mjs +++ b/components/quickbooks_sandbox/actions/get-customer/get-customer.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-get-customer", - version: "0.1.4", + version: "0.1.5", name, description, type, diff --git a/components/quickbooks_sandbox/actions/get-invoice/get-invoice.mjs b/components/quickbooks_sandbox/actions/get-invoice/get-invoice.mjs index 13142eecefa8f..2c1d6a1199417 100644 --- a/components/quickbooks_sandbox/actions/get-invoice/get-invoice.mjs +++ b/components/quickbooks_sandbox/actions/get-invoice/get-invoice.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-get-invoice", - version: "0.1.4", + version: "0.1.5", name, description, type, diff --git a/components/quickbooks_sandbox/actions/get-my-company/get-my-company.mjs b/components/quickbooks_sandbox/actions/get-my-company/get-my-company.mjs index 34fad046eb73e..218973d64c562 100644 --- a/components/quickbooks_sandbox/actions/get-my-company/get-my-company.mjs +++ b/components/quickbooks_sandbox/actions/get-my-company/get-my-company.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-get-my-company", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/get-payment/get-payment.mjs b/components/quickbooks_sandbox/actions/get-payment/get-payment.mjs index 78845c7d4fd84..9c8f231244468 100644 --- a/components/quickbooks_sandbox/actions/get-payment/get-payment.mjs +++ b/components/quickbooks_sandbox/actions/get-payment/get-payment.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-get-payment", - version: "0.1.4", + version: "0.1.5", name, description, type, diff --git a/components/quickbooks_sandbox/actions/get-purchase-order/get-purchase-order.mjs b/components/quickbooks_sandbox/actions/get-purchase-order/get-purchase-order.mjs index b467ec743d2eb..3e0fddfbe2d22 100644 --- a/components/quickbooks_sandbox/actions/get-purchase-order/get-purchase-order.mjs +++ b/components/quickbooks_sandbox/actions/get-purchase-order/get-purchase-order.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-get-purchase-order", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/get-purchase/get-purchase.mjs b/components/quickbooks_sandbox/actions/get-purchase/get-purchase.mjs index 4c0f9cad9d416..d067aced1d3ee 100644 --- a/components/quickbooks_sandbox/actions/get-purchase/get-purchase.mjs +++ b/components/quickbooks_sandbox/actions/get-purchase/get-purchase.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-get-purchase", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/get-sales-receipt/get-sales-receipt.mjs b/components/quickbooks_sandbox/actions/get-sales-receipt/get-sales-receipt.mjs index e570e9c2b6808..7e44d5b7d29bd 100644 --- a/components/quickbooks_sandbox/actions/get-sales-receipt/get-sales-receipt.mjs +++ b/components/quickbooks_sandbox/actions/get-sales-receipt/get-sales-receipt.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-get-sales-receipt", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/get-time-activity/get-time-activity.mjs b/components/quickbooks_sandbox/actions/get-time-activity/get-time-activity.mjs index fe9bda76f8d1b..a5e71e2fb4ff0 100644 --- a/components/quickbooks_sandbox/actions/get-time-activity/get-time-activity.mjs +++ b/components/quickbooks_sandbox/actions/get-time-activity/get-time-activity.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-get-time-activity", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/search-accounts/search-accounts.mjs b/components/quickbooks_sandbox/actions/search-accounts/search-accounts.mjs index 2c630b08dc129..f81132750a394 100644 --- a/components/quickbooks_sandbox/actions/search-accounts/search-accounts.mjs +++ b/components/quickbooks_sandbox/actions/search-accounts/search-accounts.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-search-accounts", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/search-customers/search-customers.mjs b/components/quickbooks_sandbox/actions/search-customers/search-customers.mjs index d2cf04e949937..e943fc0f0ef48 100644 --- a/components/quickbooks_sandbox/actions/search-customers/search-customers.mjs +++ b/components/quickbooks_sandbox/actions/search-customers/search-customers.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-search-customers", - version: "0.1.4", + version: "0.1.5", name, description, type, diff --git a/components/quickbooks_sandbox/actions/search-invoices/search-invoices.mjs b/components/quickbooks_sandbox/actions/search-invoices/search-invoices.mjs index a855674fe7a0b..932fd1b272a59 100644 --- a/components/quickbooks_sandbox/actions/search-invoices/search-invoices.mjs +++ b/components/quickbooks_sandbox/actions/search-invoices/search-invoices.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-search-invoices", - version: "0.1.4", + version: "0.1.5", name, description, type, diff --git a/components/quickbooks_sandbox/actions/search-items/search-items.mjs b/components/quickbooks_sandbox/actions/search-items/search-items.mjs index 9b76f89f85b7f..09eaae0411ea7 100644 --- a/components/quickbooks_sandbox/actions/search-items/search-items.mjs +++ b/components/quickbooks_sandbox/actions/search-items/search-items.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-search-items", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/search-products/search-products.mjs b/components/quickbooks_sandbox/actions/search-products/search-products.mjs index c2ed30be53bfc..9a1240cd7956e 100644 --- a/components/quickbooks_sandbox/actions/search-products/search-products.mjs +++ b/components/quickbooks_sandbox/actions/search-products/search-products.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-search-products", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/search-purchases/search-purchases.mjs b/components/quickbooks_sandbox/actions/search-purchases/search-purchases.mjs index 7f917886ce2fa..7ad071299d4b0 100644 --- a/components/quickbooks_sandbox/actions/search-purchases/search-purchases.mjs +++ b/components/quickbooks_sandbox/actions/search-purchases/search-purchases.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-search-purchases", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/search-query/search-query.mjs b/components/quickbooks_sandbox/actions/search-query/search-query.mjs index 4eba4f59e5ede..e3fee30e2ab1f 100644 --- a/components/quickbooks_sandbox/actions/search-query/search-query.mjs +++ b/components/quickbooks_sandbox/actions/search-query/search-query.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-search-query", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/search-services/search-services.mjs b/components/quickbooks_sandbox/actions/search-services/search-services.mjs index 1a8ef097e5758..75914f217061e 100644 --- a/components/quickbooks_sandbox/actions/search-services/search-services.mjs +++ b/components/quickbooks_sandbox/actions/search-services/search-services.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-search-services", - version: "0.1.4", + version: "0.1.5", name, description, type, diff --git a/components/quickbooks_sandbox/actions/search-time-activities/search-time-activities.mjs b/components/quickbooks_sandbox/actions/search-time-activities/search-time-activities.mjs index 69f116c932602..6a18bd8fdd41f 100644 --- a/components/quickbooks_sandbox/actions/search-time-activities/search-time-activities.mjs +++ b/components/quickbooks_sandbox/actions/search-time-activities/search-time-activities.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-search-time-activities", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/search-vendors/search-vendors.mjs b/components/quickbooks_sandbox/actions/search-vendors/search-vendors.mjs index c5aff097cdef3..5743bb99210c5 100644 --- a/components/quickbooks_sandbox/actions/search-vendors/search-vendors.mjs +++ b/components/quickbooks_sandbox/actions/search-vendors/search-vendors.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-search-vendors", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/send-estimate/send-estimate.mjs b/components/quickbooks_sandbox/actions/send-estimate/send-estimate.mjs index 9b06920142e5d..632258a80df24 100644 --- a/components/quickbooks_sandbox/actions/send-estimate/send-estimate.mjs +++ b/components/quickbooks_sandbox/actions/send-estimate/send-estimate.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-send-estimate", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/quickbooks_sandbox/actions/send-invoice/send-invoice.mjs b/components/quickbooks_sandbox/actions/send-invoice/send-invoice.mjs index 17315aaca5428..353e0ffe6f074 100644 --- a/components/quickbooks_sandbox/actions/send-invoice/send-invoice.mjs +++ b/components/quickbooks_sandbox/actions/send-invoice/send-invoice.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-send-invoice", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/quickbooks_sandbox/actions/sparse-update-invoice/sparse-update-invoice.mjs b/components/quickbooks_sandbox/actions/sparse-update-invoice/sparse-update-invoice.mjs index e2abd4bc427f0..d7d7e705d3478 100644 --- a/components/quickbooks_sandbox/actions/sparse-update-invoice/sparse-update-invoice.mjs +++ b/components/quickbooks_sandbox/actions/sparse-update-invoice/sparse-update-invoice.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-sparse-update-invoice", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/update-customer/update-customer.mjs b/components/quickbooks_sandbox/actions/update-customer/update-customer.mjs index 1a94dd7c33d2b..9a9501d4599df 100644 --- a/components/quickbooks_sandbox/actions/update-customer/update-customer.mjs +++ b/components/quickbooks_sandbox/actions/update-customer/update-customer.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-update-customer", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/actions/update-estimate/update-estimate.mjs b/components/quickbooks_sandbox/actions/update-estimate/update-estimate.mjs index 40b0ab7b50e8f..cf9fcb6c7b36b 100644 --- a/components/quickbooks_sandbox/actions/update-estimate/update-estimate.mjs +++ b/components/quickbooks_sandbox/actions/update-estimate/update-estimate.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-update-estimate", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/quickbooks_sandbox/actions/update-invoice/update-invoice.mjs b/components/quickbooks_sandbox/actions/update-invoice/update-invoice.mjs index 05a9ba2e0ef24..12f27964caaaf 100644 --- a/components/quickbooks_sandbox/actions/update-invoice/update-invoice.mjs +++ b/components/quickbooks_sandbox/actions/update-invoice/update-invoice.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-update-invoice", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/quickbooks_sandbox/actions/update-item/update-item.mjs b/components/quickbooks_sandbox/actions/update-item/update-item.mjs index 9c4c458871aeb..2f1f67d79daeb 100644 --- a/components/quickbooks_sandbox/actions/update-item/update-item.mjs +++ b/components/quickbooks_sandbox/actions/update-item/update-item.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-update-item", - version: "0.2.4", + version: "0.2.5", name, description, type, diff --git a/components/quickbooks_sandbox/actions/void-invoice/void-invoice.mjs b/components/quickbooks_sandbox/actions/void-invoice/void-invoice.mjs index 374be503f0c29..4c2042fb16afa 100644 --- a/components/quickbooks_sandbox/actions/void-invoice/void-invoice.mjs +++ b/components/quickbooks_sandbox/actions/void-invoice/void-invoice.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-void-invoice", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/quickbooks_sandbox/package.json b/components/quickbooks_sandbox/package.json index b45082f443247..b8ddc07695fe7 100644 --- a/components/quickbooks_sandbox/package.json +++ b/components/quickbooks_sandbox/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/quickbooks_sandbox", - "version": "0.2.0", + "version": "0.3.1", "description": "Pipedream Quickbooks Sandbox Components", "main": "quickbooks_sandbox.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/quickbooks": "^0.6.1" + "@pipedream/quickbooks": "^0.7.1" } } diff --git a/components/quickbooks_sandbox/sources/new-customer-created/new-customer-created.mjs b/components/quickbooks_sandbox/sources/new-customer-created/new-customer-created.mjs index ed1fba5222c6c..b9c513a83695b 100644 --- a/components/quickbooks_sandbox/sources/new-customer-created/new-customer-created.mjs +++ b/components/quickbooks_sandbox/sources/new-customer-created/new-customer-created.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-new-customer-created", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/sources/new-customer-updated/new-customer-updated.mjs b/components/quickbooks_sandbox/sources/new-customer-updated/new-customer-updated.mjs index 5c6b74c97fd63..cd977ea5c0bd6 100644 --- a/components/quickbooks_sandbox/sources/new-customer-updated/new-customer-updated.mjs +++ b/components/quickbooks_sandbox/sources/new-customer-updated/new-customer-updated.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-new-customer-updated", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/sources/new-employee-created/new-employee-created.mjs b/components/quickbooks_sandbox/sources/new-employee-created/new-employee-created.mjs index 2faa77fc0640c..876fe7a00251d 100644 --- a/components/quickbooks_sandbox/sources/new-employee-created/new-employee-created.mjs +++ b/components/quickbooks_sandbox/sources/new-employee-created/new-employee-created.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-new-employee-created", - version: "0.0.4", + version: "0.0.5", name, description, type, diff --git a/components/quickbooks_sandbox/sources/new-employee-updated/new-employee-updated.mjs b/components/quickbooks_sandbox/sources/new-employee-updated/new-employee-updated.mjs index d1dad91782015..49b80662e95ba 100644 --- a/components/quickbooks_sandbox/sources/new-employee-updated/new-employee-updated.mjs +++ b/components/quickbooks_sandbox/sources/new-employee-updated/new-employee-updated.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-new-employee-updated", - version: "0.0.4", + version: "0.0.5", name, description, type, diff --git a/components/quickbooks_sandbox/sources/new-invoice-created/new-invoice-created.mjs b/components/quickbooks_sandbox/sources/new-invoice-created/new-invoice-created.mjs index 02d4fbbe0744a..90b3050d3e83c 100644 --- a/components/quickbooks_sandbox/sources/new-invoice-created/new-invoice-created.mjs +++ b/components/quickbooks_sandbox/sources/new-invoice-created/new-invoice-created.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-new-invoice-created", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/sources/new-invoice-updated/new-invoice-updated.mjs b/components/quickbooks_sandbox/sources/new-invoice-updated/new-invoice-updated.mjs index 9baa413fe6691..9b522a35c80c4 100644 --- a/components/quickbooks_sandbox/sources/new-invoice-updated/new-invoice-updated.mjs +++ b/components/quickbooks_sandbox/sources/new-invoice-updated/new-invoice-updated.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-new-invoice-updated", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/sources/new-item-created/new-item-created.mjs b/components/quickbooks_sandbox/sources/new-item-created/new-item-created.mjs index da21f57e9fa86..802532ddd8792 100644 --- a/components/quickbooks_sandbox/sources/new-item-created/new-item-created.mjs +++ b/components/quickbooks_sandbox/sources/new-item-created/new-item-created.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-new-item-created", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/sources/new-item-updated/new-item-updated.mjs b/components/quickbooks_sandbox/sources/new-item-updated/new-item-updated.mjs index cfe26cdfd329b..d0ec15599d4c9 100644 --- a/components/quickbooks_sandbox/sources/new-item-updated/new-item-updated.mjs +++ b/components/quickbooks_sandbox/sources/new-item-updated/new-item-updated.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "quickbooks_sandbox-new-item-updated", - version: "0.0.3", + version: "0.0.4", name, description, type, diff --git a/components/quickbooks_sandbox/sources/new-purchase-created/new-purchase-created.mjs b/components/quickbooks_sandbox/sources/new-purchase-created/new-purchase-created.mjs new file mode 100644 index 0000000000000..a52c51fac8b9f --- /dev/null +++ b/components/quickbooks_sandbox/sources/new-purchase-created/new-purchase-created.mjs @@ -0,0 +1,22 @@ +import app from "../../quickbooks_sandbox.app.mjs"; +import common from "@pipedream/quickbooks/sources/new-purchase-created/new-purchase-created.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "quickbooks_sandbox-new-purchase-created", + version: "0.0.2", + name, + description, + type, + props: { + quickbooks: app, + ...props, + }, +}; diff --git a/components/quickbooks_sandbox/sources/new-purchase-updated/new-purchase-updated.mjs b/components/quickbooks_sandbox/sources/new-purchase-updated/new-purchase-updated.mjs new file mode 100644 index 0000000000000..a5ddb59ef735b --- /dev/null +++ b/components/quickbooks_sandbox/sources/new-purchase-updated/new-purchase-updated.mjs @@ -0,0 +1,22 @@ +import app from "../../quickbooks_sandbox.app.mjs"; +import common from "@pipedream/quickbooks/sources/new-purchase-updated/new-purchase-updated.mjs"; + +import { adjustPropDefinitions } from "../../common/utils.mjs"; + +const { + name, description, type, ...others +} = common; +const props = adjustPropDefinitions(others.props, app); + +export default { + ...others, + key: "quickbooks_sandbox-new-purchase-updated", + version: "0.0.2", + name, + description, + type, + props: { + quickbooks: app, + ...props, + }, +}; diff --git a/components/quickemailverification/tsconfig.json b/components/quickemailverification/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/quickemailverification/tsconfig.json +++ b/components/quickemailverification/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/quickmail_io/.gitignore b/components/quickmail_io/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/quickmail_io/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/quickmail_io/app/quickmail_io.app.ts b/components/quickmail_io/app/quickmail_io.app.ts deleted file mode 100644 index d4c7fe60f224c..0000000000000 --- a/components/quickmail_io/app/quickmail_io.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "quickmail_io", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/quickmail_io/package.json b/components/quickmail_io/package.json index f94af06c469d0..d9abd5ba548e5 100644 --- a/components/quickmail_io/package.json +++ b/components/quickmail_io/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/quickmail_io", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream QuickMail.io Components", - "main": "dist/app/quickmail_io.app.mjs", + "main": "quickmail_io.app.mjs", "keywords": [ "pipedream", "quickmail_io" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/quickmail_io", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/quickmail_io/quickmail_io.app.mjs b/components/quickmail_io/quickmail_io.app.mjs new file mode 100644 index 0000000000000..6d877f919b8b8 --- /dev/null +++ b/components/quickmail_io/quickmail_io.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "quickmail_io", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/qwilr/.gitignore b/components/qwilr/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/qwilr/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/qwilr/app/qwilr.app.ts b/components/qwilr/app/qwilr.app.ts deleted file mode 100644 index d6a12ae851923..0000000000000 --- a/components/qwilr/app/qwilr.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "qwilr", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/qwilr/package.json b/components/qwilr/package.json index 9eba5e1f90702..5a18d429f05a2 100644 --- a/components/qwilr/package.json +++ b/components/qwilr/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/qwilr", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Qwilr Components", - "main": "dist/app/qwilr.app.mjs", + "main": "qwilr.app.mjs", "keywords": [ "pipedream", "qwilr" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/qwilr", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/qwilr/qwilr.app.mjs b/components/qwilr/qwilr.app.mjs new file mode 100644 index 0000000000000..e78a0b309c296 --- /dev/null +++ b/components/qwilr/qwilr.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "qwilr", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/radar/.gitignore b/components/radar/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/radar/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/radar/app/radar.app.ts b/components/radar/app/radar.app.ts deleted file mode 100644 index 17d1f84a11668..0000000000000 --- a/components/radar/app/radar.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "radar", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/radar/package.json b/components/radar/package.json index b896fac321b80..fad448c2cfd33 100644 --- a/components/radar/package.json +++ b/components/radar/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/radar", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Radar Components", - "main": "dist/app/radar.app.mjs", + "main": "radar.app.mjs", "keywords": [ "pipedream", "radar" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/radar", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/radar/radar.app.mjs b/components/radar/radar.app.mjs new file mode 100644 index 0000000000000..0f964b576fd0d --- /dev/null +++ b/components/radar/radar.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "radar", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/rapid7_insight_platform/.gitignore b/components/rapid7_insight_platform/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/rapid7_insight_platform/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/rapid7_insight_platform/app/rapid7_insight_platform.app.ts b/components/rapid7_insight_platform/app/rapid7_insight_platform.app.ts deleted file mode 100644 index d3a98049b8cdb..0000000000000 --- a/components/rapid7_insight_platform/app/rapid7_insight_platform.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "rapid7_insight_platform", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/rapid7_insight_platform/package.json b/components/rapid7_insight_platform/package.json index 5bfa997da2f90..e9a153b68ce94 100644 --- a/components/rapid7_insight_platform/package.json +++ b/components/rapid7_insight_platform/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/rapid7_insight_platform", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Rapid7 Insight Platform Components", - "main": "dist/app/rapid7_insight_platform.app.mjs", + "main": "rapid7_insight_platform.app.mjs", "keywords": [ "pipedream", "rapid7_insight_platform" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/rapid7_insight_platform", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/rapid7_insight_platform/rapid7_insight_platform.app.mjs b/components/rapid7_insight_platform/rapid7_insight_platform.app.mjs new file mode 100644 index 0000000000000..0bf5e955d55ff --- /dev/null +++ b/components/rapid7_insight_platform/rapid7_insight_platform.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "rapid7_insight_platform", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/rat_genome_database/.gitignore b/components/rat_genome_database/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/rat_genome_database/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/rat_genome_database/app/rat_genome_database.app.ts b/components/rat_genome_database/app/rat_genome_database.app.ts deleted file mode 100644 index 9a5fdc0dde7ff..0000000000000 --- a/components/rat_genome_database/app/rat_genome_database.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "rat_genome_database", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/rat_genome_database/package.json b/components/rat_genome_database/package.json index 8fcd0cf85a2a1..11ad49724ef40 100644 --- a/components/rat_genome_database/package.json +++ b/components/rat_genome_database/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/rat_genome_database", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Rat Genome Database Components", - "main": "dist/app/rat_genome_database.app.mjs", + "main": "rat_genome_database.app.mjs", "keywords": [ "pipedream", "rat_genome_database" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/rat_genome_database", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/rat_genome_database/rat_genome_database.app.mjs b/components/rat_genome_database/rat_genome_database.app.mjs new file mode 100644 index 0000000000000..da437ae524800 --- /dev/null +++ b/components/rat_genome_database/rat_genome_database.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "rat_genome_database", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/raven_tools/package.json b/components/raven_tools/package.json index 4cf3720d98e23..d2c4f3118faf8 100644 --- a/components/raven_tools/package.json +++ b/components/raven_tools/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/raven_tools", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Raven Tools Components", "main": "dist/app/raven_tools.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/raven_tools/tsconfig.json b/components/raven_tools/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/raven_tools/tsconfig.json +++ b/components/raven_tools/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/rawg_video_games_database/.gitignore b/components/rawg_video_games_database/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/rawg_video_games_database/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/rawg_video_games_database/app/rawg_video_games_database.app.ts b/components/rawg_video_games_database/app/rawg_video_games_database.app.ts deleted file mode 100644 index 0f1510740bdb8..0000000000000 --- a/components/rawg_video_games_database/app/rawg_video_games_database.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "rawg_video_games_database", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/rawg_video_games_database/package.json b/components/rawg_video_games_database/package.json index de71525141d6a..affef270d5446 100644 --- a/components/rawg_video_games_database/package.json +++ b/components/rawg_video_games_database/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/rawg_video_games_database", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream RAWG Video Games Database Components", - "main": "dist/app/rawg_video_games_database.app.mjs", + "main": "rawg_video_games_database.app.mjs", "keywords": [ "pipedream", "rawg_video_games_database" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/rawg_video_games_database", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/rawg_video_games_database/rawg_video_games_database.app.mjs b/components/rawg_video_games_database/rawg_video_games_database.app.mjs new file mode 100644 index 0000000000000..9a23452a27813 --- /dev/null +++ b/components/rawg_video_games_database/rawg_video_games_database.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "rawg_video_games_database", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/razorpay/.gitignore b/components/razorpay/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/razorpay/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/razorpay/app/razorpay.app.ts b/components/razorpay/app/razorpay.app.ts deleted file mode 100644 index 238a3411e9a37..0000000000000 --- a/components/razorpay/app/razorpay.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "razorpay", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/razorpay/package.json b/components/razorpay/package.json index d65bbc8eb0d27..756075656a023 100644 --- a/components/razorpay/package.json +++ b/components/razorpay/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/razorpay", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Razorpay Components", - "main": "dist/app/razorpay.app.mjs", + "main": "razorpay.app.mjs", "keywords": [ "pipedream", "razorpay" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/razorpay", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/razorpay/razorpay.app.mjs b/components/razorpay/razorpay.app.mjs new file mode 100644 index 0000000000000..6bf9b4ae9c67a --- /dev/null +++ b/components/razorpay/razorpay.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "razorpay", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/readwise/package.json b/components/readwise/package.json index 7c5c172302ef3..ecf47caeede18 100644 --- a/components/readwise/package.json +++ b/components/readwise/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/readwise", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Readwise Components", - "main": "dist/app/readwise.app.mjs", + "main": "readwise.app.mjs", "keywords": [ "pipedream", "readwise" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/readwise", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/realphonevalidation/.gitignore b/components/realphonevalidation/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/realphonevalidation/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/realphonevalidation/app/realphonevalidation.app.ts b/components/realphonevalidation/app/realphonevalidation.app.ts deleted file mode 100644 index af2a8505e3dfb..0000000000000 --- a/components/realphonevalidation/app/realphonevalidation.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "realphonevalidation", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/realphonevalidation/package.json b/components/realphonevalidation/package.json index 45675b8904a9e..06b2937895735 100644 --- a/components/realphonevalidation/package.json +++ b/components/realphonevalidation/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/realphonevalidation", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream RealPhoneValidation Components", - "main": "dist/app/realphonevalidation.app.mjs", + "main": "realphonevalidation.app.mjs", "keywords": [ "pipedream", "realphonevalidation" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/realphonevalidation", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/realphonevalidation/realphonevalidation.app.mjs b/components/realphonevalidation/realphonevalidation.app.mjs new file mode 100644 index 0000000000000..8df158db62f97 --- /dev/null +++ b/components/realphonevalidation/realphonevalidation.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "realphonevalidation", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/recreation_gov/package.json b/components/recreation_gov/package.json index cc34caefca60c..ed046b480e2e2 100644 --- a/components/recreation_gov/package.json +++ b/components/recreation_gov/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/recreation_gov", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Recreation.gov Components", - "main": "dist/app/recreation_gov.app.mjs", + "main": "recreation_gov.app.mjs", "keywords": [ "pipedream", "recreation_gov" diff --git a/components/redis_cloud_rest_api/package.json b/components/redis_cloud_rest_api/package.json new file mode 100644 index 0000000000000..593c2ab3b7567 --- /dev/null +++ b/components/redis_cloud_rest_api/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/redis_cloud_rest_api", + "version": "0.0.1", + "description": "Pipedream Redis Cloud REST API Components", + "main": "redis_cloud_rest_api.app.mjs", + "keywords": [ + "pipedream", + "redis_cloud_rest_api" + ], + "homepage": "https://pipedream.com/apps/redis_cloud_rest_api", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/redis_cloud_rest_api/redis_cloud_rest_api.app.mjs b/components/redis_cloud_rest_api/redis_cloud_rest_api.app.mjs new file mode 100644 index 0000000000000..f2fa002c92391 --- /dev/null +++ b/components/redis_cloud_rest_api/redis_cloud_rest_api.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "redis_cloud_rest_api", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/referralrock/.gitignore b/components/referralrock/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/referralrock/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/referralrock/app/referralrock.app.ts b/components/referralrock/app/referralrock.app.ts deleted file mode 100644 index 0d0cebf89a01c..0000000000000 --- a/components/referralrock/app/referralrock.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "referralrock", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/referralrock/package.json b/components/referralrock/package.json index 274fe539971c3..2ce8b3be2c6be 100644 --- a/components/referralrock/package.json +++ b/components/referralrock/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/referralrock", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream ReferralRock Components", - "main": "dist/app/referralrock.app.mjs", + "main": "referralrock.app.mjs", "keywords": [ "pipedream", "referralrock" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/referralrock", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/referralrock/referralrock.app.mjs b/components/referralrock/referralrock.app.mjs new file mode 100644 index 0000000000000..3dc69d56613dd --- /dev/null +++ b/components/referralrock/referralrock.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "referralrock", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/remarkety/.gitignore b/components/remarkety/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/remarkety/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/remarkety/app/remarkety.app.ts b/components/remarkety/app/remarkety.app.ts deleted file mode 100644 index aaf72d2bcc107..0000000000000 --- a/components/remarkety/app/remarkety.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "remarkety", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/remarkety/package.json b/components/remarkety/package.json index 14bfebe502439..1bd9fc42578cd 100644 --- a/components/remarkety/package.json +++ b/components/remarkety/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/remarkety", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Remarkety Components", - "main": "dist/app/remarkety.app.mjs", + "main": "remarkety.app.mjs", "keywords": [ "pipedream", "remarkety" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/remarkety", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/remarkety/remarkety.app.mjs b/components/remarkety/remarkety.app.mjs new file mode 100644 index 0000000000000..b11a1311d984f --- /dev/null +++ b/components/remarkety/remarkety.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "remarkety", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/render/.gitignore b/components/render/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/render/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/render/app/render.app.ts b/components/render/app/render.app.ts deleted file mode 100644 index a657213704ccc..0000000000000 --- a/components/render/app/render.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "render", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/render/package.json b/components/render/package.json index a8b61ac0c18b8..abc291c77f04f 100644 --- a/components/render/package.json +++ b/components/render/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/render", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Render Components", - "main": "dist/app/render.app.mjs", + "main": "render.app.mjs", "keywords": [ "pipedream", "render" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/render", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/render/render.app.mjs b/components/render/render.app.mjs new file mode 100644 index 0000000000000..f134329db72b3 --- /dev/null +++ b/components/render/render.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "render", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/renderform/package.json b/components/renderform/package.json index 35a2a5c8f4cd4..818d93710f36c 100644 --- a/components/renderform/package.json +++ b/components/renderform/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/renderform", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream RenderForm Components", "main": "renderform.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/repuso/package.json b/components/repuso/package.json index dbf63cc276585..3b6a81712997d 100644 --- a/components/repuso/package.json +++ b/components/repuso/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/repuso", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Repuso Components", "main": "dist/app/repuso.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.0", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/repuso/tsconfig.json b/components/repuso/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/repuso/tsconfig.json +++ b/components/repuso/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/resend/package.json b/components/resend/package.json index 37b9676d30461..0248d50024a5c 100644 --- a/components/resend/package.json +++ b/components/resend/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/resend", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Resend Components", "main": "dist/app/resend.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.5.1", - "@pipedream/types": "^0.1.6" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/resend/tsconfig.json b/components/resend/tsconfig.json index 90454c201dd3c..3a9389484d040 100644 --- a/components/resend/tsconfig.json +++ b/components/resend/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true - }, - "allowJs": true, - "include": ["app", "actions", "sources", "common"], - "exclude": ["dist"] + "extends": "../../tsconfig.components.json" } diff --git a/components/respond_io/.gitignore b/components/respond_io/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/respond_io/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/respond_io/app/respond_io.app.ts b/components/respond_io/app/respond_io.app.ts deleted file mode 100644 index a5e2374b037b3..0000000000000 --- a/components/respond_io/app/respond_io.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "respond_io", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/respond_io/package.json b/components/respond_io/package.json index 9ae45abbb6238..6ae1588ee747a 100644 --- a/components/respond_io/package.json +++ b/components/respond_io/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/respond_io", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Respond.io Components", - "main": "dist/app/respond_io.app.mjs", + "main": "respond_io.app.mjs", "keywords": [ "pipedream", "respond_io" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/respond_io", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/respond_io/respond_io.app.mjs b/components/respond_io/respond_io.app.mjs new file mode 100644 index 0000000000000..d0bd1afe9774f --- /dev/null +++ b/components/respond_io/respond_io.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "respond_io", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/retool/.gitignore b/components/retool/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/retool/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/retool/app/retool.app.ts b/components/retool/app/retool.app.ts deleted file mode 100644 index 90ebcff256942..0000000000000 --- a/components/retool/app/retool.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "retool", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/retool/package.json b/components/retool/package.json index 96ac5d3393259..2d9926c457b85 100644 --- a/components/retool/package.json +++ b/components/retool/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/retool", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Retool Components", - "main": "dist/app/retool.app.mjs", + "main": "retool.app.mjs", "keywords": [ "pipedream", "retool" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/retool", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/retool/retool.app.mjs b/components/retool/retool.app.mjs new file mode 100644 index 0000000000000..ed41e0355a927 --- /dev/null +++ b/components/retool/retool.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "retool", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/revamp_crm/.gitignore b/components/revamp_crm/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/revamp_crm/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/revamp_crm/app/revamp_crm.app.ts b/components/revamp_crm/app/revamp_crm.app.ts deleted file mode 100644 index 6df630402a551..0000000000000 --- a/components/revamp_crm/app/revamp_crm.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "revamp_crm", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/revamp_crm/package.json b/components/revamp_crm/package.json index 9295add78c960..b829c75104782 100644 --- a/components/revamp_crm/package.json +++ b/components/revamp_crm/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/revamp_crm", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Revamp CRM Components", - "main": "dist/app/revamp_crm.app.mjs", + "main": "revamp_crm.app.mjs", "keywords": [ "pipedream", "revamp_crm" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/revamp_crm", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/revamp_crm/revamp_crm.app.mjs b/components/revamp_crm/revamp_crm.app.mjs new file mode 100644 index 0000000000000..38fcb9d03e20e --- /dev/null +++ b/components/revamp_crm/revamp_crm.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "revamp_crm", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/reversecontact/package.json b/components/reversecontact/package.json index 58b1fdba46c69..66e85f10eaf34 100644 --- a/components/reversecontact/package.json +++ b/components/reversecontact/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/reversecontact", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream ReverseContact Components", "main": "dist/app/reversecontact.app.mjs", "keywords": [ @@ -14,7 +14,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.3.0", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/reversecontact/tsconfig.json b/components/reversecontact/tsconfig.json index e4f6e612b50bf..3a9389484d040 100644 --- a/components/reversecontact/tsconfig.json +++ b/components/reversecontact/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/reviews_io/.gitignore b/components/reviews_io/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/reviews_io/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/reviews_io/app/reviews_io.app.ts b/components/reviews_io/app/reviews_io.app.ts deleted file mode 100644 index 06078584b3ea5..0000000000000 --- a/components/reviews_io/app/reviews_io.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "reviews_io", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/reviews_io/package.json b/components/reviews_io/package.json index ab721dac275b1..6b6c1981626df 100644 --- a/components/reviews_io/package.json +++ b/components/reviews_io/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/reviews_io", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Reviews.io Components", - "main": "dist/app/reviews_io.app.mjs", + "main": "reviews_io.app.mjs", "keywords": [ "pipedream", "reviews_io" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/reviews_io", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/reviews_io/reviews_io.app.mjs b/components/reviews_io/reviews_io.app.mjs new file mode 100644 index 0000000000000..0e7dd6d8ceacf --- /dev/null +++ b/components/reviews_io/reviews_io.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "reviews_io", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/rewardful/.gitignore b/components/rewardful/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/rewardful/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/rewardful/app/rewardful.app.ts b/components/rewardful/app/rewardful.app.ts deleted file mode 100644 index 52c0348d4c57a..0000000000000 --- a/components/rewardful/app/rewardful.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "rewardful", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/rewardful/package.json b/components/rewardful/package.json index caa08894b07cc..30d4b0be06da5 100644 --- a/components/rewardful/package.json +++ b/components/rewardful/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/rewardful", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Rewardful Components", - "main": "dist/app/rewardful.app.mjs", + "main": "rewardful.app.mjs", "keywords": [ "pipedream", "rewardful" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/rewardful", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/rewardful/rewardful.app.mjs b/components/rewardful/rewardful.app.mjs new file mode 100644 index 0000000000000..b7b281db0548d --- /dev/null +++ b/components/rewardful/rewardful.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "rewardful", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/rewiser/actions/create-transaction/create-transaction.mjs b/components/rewiser/actions/create-transaction/create-transaction.mjs new file mode 100644 index 0000000000000..dff87dabd7a95 --- /dev/null +++ b/components/rewiser/actions/create-transaction/create-transaction.mjs @@ -0,0 +1,107 @@ +import { getSummary } from "../../common/utils.mjs"; +import rewiser from "../../rewiser.app.mjs"; + +export default { + key: "rewiser-create-transaction", + name: "Create Transaction", + description: "Create a financial transaction in Rewiser. [See the documentation](https://rewiser.io/api)", + version: "0.0.1", + type: "action", + props: { + rewiser, + folderId: { + propDefinition: [ + rewiser, + "folderId", + ], + }, + type: { + type: "string", + label: "Type", + description: "The type of transaction.", + options: [ + { + label: "Income", + value: "income", + }, + { + label: "Expense", + value: "expense", + }, + ], + }, + name: { + type: "string", + label: "Name", + description: "The name/description of the transaction.", + }, + amount: { + type: "string", + label: "Amount", + description: "The amount of the transaction.", + }, + plannedDate: { + type: "string", + label: "Planned Date", + description: "The planned date for the transaction, in the format `YYYY-MM-DD` (e.g. `2025-01-01`)", + }, + isPaid: { + type: "boolean", + label: "Is Paid", + description: "Whether the transaction is paid.", + optional: true, + }, + note: { + type: "string", + label: "Note", + description: "Additional notes for the transaction.", + optional: true, + }, + repeatType: { + type: "string", + label: "Repeat Type", + description: "The repeat type for recurring transactions.", + options: [ + { + label: "Daily", + value: "daily", + }, + { + label: "Weekly", + value: "weekly", + }, + { + label: "Monthly", + value: "monthly", + }, + { + label: "Yearly", + value: "yearly", + }, + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.rewiser.createTransaction({ + $, + data: { + transactions: [ + { + folder_id: this.folderId, + type: this.type, + name: this.name, + amount: parseFloat(this.amount), + planned_date: this.plannedDate, + is_paid: this.isPaid, + note: this.note, + repeat_type: this.repeatType, + }, + ], + }, + }); + + $.export("$summary", getSummary(response)); + return response; + }, +}; diff --git a/components/rewiser/common/utils.mjs b/components/rewiser/common/utils.mjs new file mode 100644 index 0000000000000..8978d601f84e4 --- /dev/null +++ b/components/rewiser/common/utils.mjs @@ -0,0 +1,25 @@ +export const getSummary = ({ + inserted, errors, duplicates, skipped, +}) => { + const actions = { + inserted, + errors, + duplicates, + skipped, + }; + + const [ + action, + ] = Object.keys(actions).filter((key) => actions[key].length > 0); + + switch (action) { + case "inserted": + return "Inserted transaction"; + case "errors": + return "Transaction creation failed"; + case "duplicates": + return "Transaction creation duplicate"; + case "skipped": + return "Transaction creation skipped"; + } +}; diff --git a/components/rewiser/package.json b/components/rewiser/package.json index 2f0d746753821..3ef0af763dceb 100644 --- a/components/rewiser/package.json +++ b/components/rewiser/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/rewiser", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream Rewiser Components", "main": "rewiser.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } -} \ No newline at end of file +} diff --git a/components/rewiser/rewiser.app.mjs b/components/rewiser/rewiser.app.mjs index ca620607b3660..430f4498dedd4 100644 --- a/components/rewiser/rewiser.app.mjs +++ b/components/rewiser/rewiser.app.mjs @@ -1,11 +1,62 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "rewiser", - propDefinitions: {}, + propDefinitions: { + folderId: { + type: "string", + label: "Folder ID", + description: "The folder ID for the transaction.", + async options() { + const folders = await this.listFolders(); + + return folders.map(({ + key: value, label, + }) => ({ + label, + value, + })); + }, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://nzkqapsaeatytqrnitpj.supabase.co/functions/v1"; + }, + _headers() { + return { + "Authorization": `Bearer ${this.$auth.api_key}`, + "content-type": "application/json", + }; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: this._baseUrl() + path, + headers: this._headers(), + ...opts, + }); + }, + listFolders(opts = {}) { + return this._makeRequest({ + path: "/get-folders", + ...opts, + }); + }, + getRecentTransactions(opts = {}) { + return this._makeRequest({ + path: "/get-recent-transactions", + ...opts, + }); + }, + createTransaction(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/create_multiple_transactions", + ...opts, + }); }, }, }; diff --git a/components/rewiser/sources/new-transaction-created/new-transaction-created.mjs b/components/rewiser/sources/new-transaction-created/new-transaction-created.mjs new file mode 100644 index 0000000000000..6547051c1d75f --- /dev/null +++ b/components/rewiser/sources/new-transaction-created/new-transaction-created.mjs @@ -0,0 +1,60 @@ +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import rewiser from "../../rewiser.app.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + key: "rewiser-new-transaction-created", + name: "New Transaction Created", + description: "Emit new event when a new transaction is created in Rewiser. [See the documentation](https://rewiser.io/api)", + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + rewiser, + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + db: "$.service.db", + alert: { + type: "alert", + alertType: "info", + content: "This endpoint automatically returns only transactions created within the last 1 hour (maximum 100 records) to optimize polling and prevent duplicate triggers.", + }, + }, + methods: { + getLastDate() { + return this.db.get("lastDate") || "1970-01-01T00:00:00.000Z"; + }, + setLastDate(date) { + return this.db.set("lastDate", date); + }, + }, + async run() { + const responseArray = []; + let lastDate = this.getLastDate(); + const { data: transactions } = await this.rewiser.getRecentTransactions(); + + for (const transaction of transactions) { + if (Date.parse(transaction.created_at) < Date.parse(lastDate)) { + break; + } + responseArray.push(transaction); + } + + if (responseArray.length > 0) { + this.setLastDate(responseArray[0].created_at); + } + + for (const transaction of responseArray.reverse()) { + this.$emit(transaction, { + id: transaction.id, + summary: `New Transaction: ${transaction.name} (${transaction.amount})`, + ts: Date.parse(transaction.created_at), + }); + } + }, + sampleEmit, +}; diff --git a/components/rewiser/sources/new-transaction-created/test-event.mjs b/components/rewiser/sources/new-transaction-created/test-event.mjs new file mode 100644 index 0000000000000..8ff20a9751629 --- /dev/null +++ b/components/rewiser/sources/new-transaction-created/test-event.mjs @@ -0,0 +1,11 @@ +export default { + id: "transaction_uuid_here", + name: "Notion Subscription", + amount: 19.99, + type: "Expense", + created_at: "2025-06-11T19:44:44.109694+00:00", + folder_id: "folder_uuid_here", + is_paid: false, + planned_date: "2025-06-15T22:44:00.000Z", + note: "Monthly subscription", +}; \ No newline at end of file diff --git a/components/rhombus/actions/create-camera-clip/create-camera-clip.mjs b/components/rhombus/actions/create-camera-clip/create-camera-clip.mjs new file mode 100644 index 0000000000000..7018338d3496b --- /dev/null +++ b/components/rhombus/actions/create-camera-clip/create-camera-clip.mjs @@ -0,0 +1,117 @@ +import rhombus from "../../rhombus.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "rhombus-create-camera-clip", + name: "Create Camera Clip", + description: "Create a camera clip from video footage. [See the documentation](https://apidocs.rhombus.com/reference/splicev3)", + version: "0.0.1", + type: "action", + props: { + rhombus, + clipType: { + type: "string", + label: "Clip Type", + description: "The type of clip to create", + options: [ + { + label: "Arbitrary Clip (Splice)", + value: "splice", + }, + { + label: "Policy Alert Clip", + value: "policyAlert", + }, + ], + default: "splice", + }, + cameraUuid: { + type: "string", + label: "Camera ID", + description: "The ID of a camera (required for arbitrary clips)", + propDefinition: [ + rhombus, + "cameraUuid", + ], + optional: true, + }, + startTimeMills: { + type: "string", + label: "Start Time", + description: "The start time for the clip (in milliseconds since the Unix epoch) - required for arbitrary clips", + optional: true, + }, + durationSec: { + type: "integer", + label: "Duration (sec)", + description: "The duration of the clip (in seconds)", + optional: true, + }, + policyAlertUuid: { + type: "string", + label: "Policy Alert UUID", + description: "The UUID of the policy alert to save as a clip (required for policy alert clips)", + optional: true, + }, + clipName: { + type: "string", + label: "Clip Name", + description: "A name for the created clip", + optional: true, + }, + description: { + type: "string", + label: "Description", + description: "A description for the created clip", + optional: true, + }, + }, + async run({ $ }) { + let response; + + if (this.clipType === "splice") { + // Validate required fields for splice + if (!this.cameraUuid) { + throw new ConfigurationError("Camera UUID is required for arbitrary clips"); + } + if (!this.startTimeMills) { + throw new ConfigurationError("Start time is required for arbitrary clips"); + } + + response = await this.rhombus.spliceV3({ + $, + data: { + deviceUuids: [ + this.cameraUuid, + ], + startTimeMillis: this.startTimeMills, + durationSec: this.durationSec, + title: this.clipName, + description: this.description, + }, + }); + + $.export("$summary", `Created arbitrary clip for camera ${this.cameraUuid}`); + } else if (this.clipType === "policyAlert") { + // Validate required fields for policy alert + if (!this.policyAlertUuid) { + throw new ConfigurationError("Policy Alert UUID is required for policy alert clips"); + } + + response = await this.rhombus.savePolicyAlertV2({ + $, + data: { + alertUuid: this.policyAlertUuid, + savedClipTitle: this.clipName, + savedClipDescription: this.description, + }, + }); + + $.export("$summary", `Created policy alert clip from policy alert ${this.policyAlertUuid}`); + } else { + throw new ConfigurationError(`Unsupported clip type: ${this.clipType}`); + } + + return response; + }, +}; diff --git a/components/rhombus/actions/create-custom-footage-seekpoints/create-custom-footage-seekpoints.mjs b/components/rhombus/actions/create-custom-footage-seekpoints/create-custom-footage-seekpoints.mjs new file mode 100644 index 0000000000000..d4fe858f38f89 --- /dev/null +++ b/components/rhombus/actions/create-custom-footage-seekpoints/create-custom-footage-seekpoints.mjs @@ -0,0 +1,52 @@ +import rhombus from "../../rhombus.app.mjs"; + +export default { + key: "rhombus-create-custom-footage-seekpoints", + name: "Create Custom Footage Seekpoints", + description: "Create custom activity seekpoints for a specified camera. [See the documentation](https://apidocs.rhombus.com/reference/createcustomfootageseekpoints)", + version: "0.0.1", + type: "action", + props: { + rhombus, + cameraUuid: { + propDefinition: [ + rhombus, + "cameraUuid", + ], + }, + name: { + type: "string", + label: "Name", + description: "The name of the custom seekpoint", + }, + timestampMs: { + type: "integer", + label: "Timestamp (ms)", + description: "The timestamp of the custom seekpoint (in milliseconds since the Unix epoch)", + }, + description: { + type: "string", + label: "Description", + description: "A description for the custom seekpoint", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.rhombus.createCustomFootageSeekpoints({ + $, + data: { + cameraUuid: this.cameraUuid, + footageSeekpoints: [ + { + name: this.name, + timestampMs: this.timestampMs, + description: this.description, + }, + ], + }, + }); + + $.export("$summary", `Created custom footage seekpoint for camera ${this.cameraUuid}`); + return response; + }, +}; diff --git a/components/rhombus/actions/create-shared-live-video-stream/create-shared-live-video-stream.mjs b/components/rhombus/actions/create-shared-live-video-stream/create-shared-live-video-stream.mjs new file mode 100644 index 0000000000000..5649a08a4648f --- /dev/null +++ b/components/rhombus/actions/create-shared-live-video-stream/create-shared-live-video-stream.mjs @@ -0,0 +1,126 @@ +import rhombus from "../../rhombus.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; +import constants from "../../common/constants.mjs"; + +export default { + key: "rhombus-create-shared-live-video-stream", + name: "Create Shared Live Video Stream", + description: "Create a shared live video stream and get the URL to access it. [See the documentation](https://apidocs.rhombus.com/reference/createcamerasharedlivevideostream))", + version: "0.0.1", + type: "action", + props: { + rhombus, + deviceType: { + type: "string", + label: "Device Type", + description: "The type of device to create a shared stream for", + options: [ + { + label: "Camera", + value: "camera", + }, + { + label: "Doorbell Camera", + value: "doorbell", + }, + ], + default: "camera", + }, + streamType: { + type: "string", + label: "Stream Type", + description: "The type of stream to create", + options: constants.STREAM_TYPES, + }, + vodEnabled: { + type: "boolean", + label: "VOD Enabled", + description: "Enables recording of live footage to a VOD", + }, + cameraUuid: { + type: "string", + label: "Camera ID", + description: "The ID of a camera (required when device type is 'camera')", + propDefinition: [ + rhombus, + "cameraUuid", + ], + optional: true, + }, + doorbellCameraUuid: { + type: "string", + label: "Doorbell Camera ID", + description: "The ID of a doorbell camera (required when device type is 'doorbell')", + propDefinition: [ + rhombus, + "doorbellCameraUuid", + ], + optional: true, + }, + includeAudio: { + type: "boolean", + label: "Include Audio", + description: "Camera must be associated with an audio gateway to have audio. Required when device type is `camera`.", + default: false, + optional: true, + }, + }, + async run({ $ }) { + let response; + let deviceUuid; + + if (this.deviceType === "camera") { + if (!this.cameraUuid) { + throw new ConfigurationError("Camera UUID is required when device type is 'camera'"); + } + if (this.includeAudio === undefined || this.includeAudio === null) { + throw new ConfigurationError("Include Audio is required when device type is 'camera'"); + } + deviceUuid = this.cameraUuid; + + response = await this.rhombus.createSharedLiveVideoStream({ + $, + data: { + cameraUuid: this.cameraUuid, + includeAudio: this.includeAudio, + vodEnabled: this.vodEnabled, + streamType: this.streamType, + }, + }); + } else if (this.deviceType === "doorbell") { + if (!this.doorbellCameraUuid) { + throw new ConfigurationError("Doorbell Camera UUID is required when device type is 'doorbell'"); + } + deviceUuid = this.doorbellCameraUuid; + + response = await this.rhombus.createDoorbellSharedLiveVideoStream({ + $, + data: { + doorbellCameraUuid: this.doorbellCameraUuid, + includeAudio: this.includeAudio, + vodEnabled: this.vodEnabled, + streamType: this.streamType, + }, + }); + } else { + throw new Error(`Unsupported device type: ${this.deviceType}`); + } + + // Extract the stream URL from the response + const streamUrl = response.streamUrl || response.url; + + $.export("$summary", `Created shared live video stream '${this.streamName}' for ${this.deviceType} ${deviceUuid}`); + + // Export the stream URL for easy access + if (streamUrl) { + $.export("streamUrl", streamUrl); + } + + return { + ...response, + streamUrl, + deviceType: this.deviceType, + deviceUuid, + }; + }, +}; diff --git a/components/rhombus/actions/play-audio-upload/play-audio-upload.mjs b/components/rhombus/actions/play-audio-upload/play-audio-upload.mjs new file mode 100644 index 0000000000000..c1cba6c72399e --- /dev/null +++ b/components/rhombus/actions/play-audio-upload/play-audio-upload.mjs @@ -0,0 +1,52 @@ +import rhombus from "../../rhombus.app.mjs"; + +export default { + key: "rhombus-play-audio-upload", + name: "Play Audio Upload", + description: "Play an uploaded audio clip through an audio device. [See the documentation](https://apidocs.rhombus.com/reference/playaudioupload)", + version: "0.0.1", + type: "action", + props: { + rhombus, + audioGatewayUuid: { + propDefinition: [ + rhombus, + "audioGatewayUuid", + ], + }, + audioUploadUuid: { + propDefinition: [ + rhombus, + "audioUploadUuid", + ], + }, + loopDurationSec: { + type: "integer", + label: "Loop Duration (sec)", + description: "The duration of the loop (in seconds)", + optional: true, + }, + playCount: { + type: "integer", + label: "Play Count", + description: "The number of times to play the audio upload", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.rhombus.playAudioUpload({ + $, + data: { + audioGatewayUuids: [ + this.audioGatewayUuid, + ], + audioUploadUuid: this.audioUploadUuid, + loopDurationSec: this.loopDurationSec, + playCount: this.playCount, + }, + }); + + $.export("$summary", `Playing audio upload ${this.audioUploadUuid} through audio gateway ${this.audioGatewayUuid}`); + return response; + }, +}; diff --git a/components/rhombus/actions/reboot-camera/reboot-camera.mjs b/components/rhombus/actions/reboot-camera/reboot-camera.mjs new file mode 100644 index 0000000000000..69a36676ec7ee --- /dev/null +++ b/components/rhombus/actions/reboot-camera/reboot-camera.mjs @@ -0,0 +1,28 @@ +import rhombus from "../../rhombus.app.mjs"; + +export default { + key: "rhombus-reboot-camera", + name: "Reboot Camera", + description: "Reboot a camera. [See the documentation](https://apidocs.rhombus.com/reference/rebootcamera)", + version: "0.0.1", + type: "action", + props: { + rhombus, + cameraUuid: { + propDefinition: [ + rhombus, + "cameraUuid", + ], + }, + }, + async run({ $ }) { + const response = await this.rhombus.rebootCamera({ + $, + data: { + cameraUuid: this.cameraUuid, + }, + }); + $.export("$summary", `Rebooted camera ${this.cameraUuid}`); + return response; + }, +}; diff --git a/components/rhombus/actions/toggle-audio-gateway-recording/toggle-audio-gateway-recording.mjs b/components/rhombus/actions/toggle-audio-gateway-recording/toggle-audio-gateway-recording.mjs new file mode 100644 index 0000000000000..a7fa788721d13 --- /dev/null +++ b/components/rhombus/actions/toggle-audio-gateway-recording/toggle-audio-gateway-recording.mjs @@ -0,0 +1,51 @@ +import rhombus from "../../rhombus.app.mjs"; + +export default { + key: "rhombus-toggle-audio-gateway-recording", + name: "Toggle Audio Gateway Recording", + description: "Update audio gateway settings to enable or disable audio recording. [See the documentation](https://apidocs.rhombus.com/reference/updateaudiogatewayconfig)", + version: "0.0.1", + type: "action", + props: { + rhombus, + audioGatewayUuid: { + propDefinition: [ + rhombus, + "audioGatewayUuid", + ], + }, + enableRecording: { + type: "boolean", + label: "Enable Recording", + description: "Set to true to enable audio recording, false to disable", + default: true, + }, + }, + async run({ $ }) { + // First, get the current configuration to preserve other settings + const currentConfig = await this.rhombus.getAudioGatewayConfig({ + $, + data: { + audioGatewayUuid: this.audioGatewayUuid, + }, + }); + + // Update the configuration with the new recording setting + const response = await this.rhombus.updateAudioGatewayConfig({ + $, + data: { + uuid: this.audioGatewayUuid, + config: { + ...currentConfig.config, // Preserve existing config + audioRecord: this.enableRecording, + }, + }, + }); + + const action = this.enableRecording + ? "enabled" + : "disabled"; + $.export("$summary", `${action} audio recording for audio gateway ${this.audioGatewayUuid}`); + return response; + }, +}; diff --git a/components/rhombus/actions/unlock-access-controlled-door/unlock-access-controlled-door.mjs b/components/rhombus/actions/unlock-access-controlled-door/unlock-access-controlled-door.mjs new file mode 100644 index 0000000000000..f673bcdff24d6 --- /dev/null +++ b/components/rhombus/actions/unlock-access-controlled-door/unlock-access-controlled-door.mjs @@ -0,0 +1,28 @@ +import rhombus from "../../rhombus.app.mjs"; + +export default { + key: "rhombus-unlock-access-controlled-door", + name: "Unlock Access Controlled Door", + description: "Unlock an access controlled door. [See the documentation](https://apidocs.rhombus.com/reference/unlockaccesscontrolleddoor)", + version: "0.0.1", + type: "action", + props: { + rhombus, + doorUuid: { + propDefinition: [ + rhombus, + "doorUuid", + ], + }, + }, + async run({ $ }) { + const response = await this.rhombus.unlockAccessControlledDoor({ + $, + data: { + accessControlledDoorUuid: this.doorUuid, + }, + }); + $.export("$summary", `Unlocked access controlled door ${this.doorUuid}`); + return response; + }, +}; diff --git a/components/rhombus/common/constants.mjs b/components/rhombus/common/constants.mjs new file mode 100644 index 0000000000000..d11ec5e95e743 --- /dev/null +++ b/components/rhombus/common/constants.mjs @@ -0,0 +1,396 @@ +const AUDIT_RECORD_ACTIONS = [ + "THREAT_CASE_ESCALATED", + "THREAT_CASE_CANCELLED", + "THREAT_CASE_DISMISSED", + "THREAT_CASE_DELETED", + "THREAT_CASE_DELETE_BY_STATUS", + "PIN_CREATED", + "PIN_DELETED", + "ALM_PIN_CREATE", + "ALM_PIN_BULK_CREATE", + "ALM_PIN_UPDATE", + "ALM_PIN_ROTATE", + "ALM_PIN_BULK_ROTATE", + "ALM_PIN_DELETE", + "BASIC_AUTH_SUCCESS", + "BASIC_AUTH_FAILURE", + "SAML_LOGIN_WEB", + "LOGIN_WEB", + "PASSWORDLESS_LOGIN_WEB", + "PARTNER_LOGIN_WEB", + "PARTNER_PASSWORDLESS_LOGIN_WEB", + "SAML_LOGIN_FAILURE_WEB", + "LOGIN_FAILURE_WEB", + "RHOMBUS_KEY_LOGIN", + "RHOMBUS_KEY_PASSWORDLESS_LOGIN", + "RHOMBUS_KEY_SAML_LOGIN", + "LOGOUT_WEB", + "PARTNER_LOGOUT_WEB", + "WEB_CONSOLE_ACCESS", + "MOBILE_CONSOLE_ACCESS", + "SAML_LOGIN_MOBILE", + "PARTNER_LOGIN_MOBILE", + "PARTNER_PASSWORDLESS_LOGIN_MOBILE", + "LOGIN_MOBILE", + "PASSWORDLESS_LOGIN_MOBILE", + "SAML_LOGIN_FAILURE_MOBILE", + "LOGIN_FAILURE_MOBILE", + "LOGOUT_MOBILE", + "PARTNER_LOGOUT_MOBILE", + "MOBILE_ACCESS", + "PARTNER_LOGIN_MOBILE_REFRESH", + "LOGIN_MOBILE_REFRESH", + "RHOMBUS_KEY_LOGIN_REFRESH", + "CAMERA_WIFI_NETWORK_CHANGED", + "CAMERA_FORCED_REBOOT", + "AUDIO_GATEWAY_FORCED_REBOOT", + "ENVIRONMENTAL_GATEWAY_FORCED_REBOOT", + "DOORBELL_CAMERA_FORCED_REBOOT", + "BADGE_READER_FORCED_REBOOT", + "FIRMWARE_UPDATE_CAMERA", + "DELETE_CAMERA", + "DELETE_USER", + "DELETE_LOCATION", + "LOCATION_UPDATED", + "DELETE_ROLE", + "ERASE_CAMERA", + "POLICY_UPDATE", + "POLICY_DELETE", + "POLICY_PAUSED_LOCATION", + "POLICY_PAUSED_DEVICE", + "POLICY_PAUSED_COMPONENT_COMPOSITE", + "CREATE_POLICY_ADDENDUM", + "DEVICE_REGISTERED", + "DEVICE_UPDATE", + "DEVICE_SETTINGS_UPDATE", + "DEVICE_FEATURE_UPDATE", + "DEVICE_ORG_REASSIGN", + "CLAIMKEY_RENEWAL_CREATED", + "LICENSES_CLAIMED", + "LICENSES_RETURNED", + "LICENSE_ASSIGNED", + "LICENSE_CREATED", + "LICENSE_UPDATED", + "USER_UPDATE", + "USER_CREATE", + "USER_IMPORT", + "ROLE_CREATE", + "POLICY_CREATE", + "PARTNER_CLIENT_CREATE", + "PARTNER_CUSTOMIZE_CLIENT", + "PARTNER_CUSTOMIZE_CLIENT_DEVICE", + "ORG_UPDATE", + "DELETE_ORG", + "DISABLE_ORG", + "CREATE_ORG", + "ROLE_UPDATE", + "USER_ROLE_UPDATE", + "USER_EMAIL_UPDATE", + "TIMELAPSE_CREATE", + "TIMELAPSE_DELETE", + "ALERT_DISMISS", + "ALL_ALERT_DISMISS", + "SAVED_CLIP_CREATE", + "SAVED_CLIP_DELETE", + "CLIP_GROUP_CREATED", + "CLIP_GROUP_DELETE", + "SHARED_CLIP_DELETE", + "SHARED_CLIP_CREATE", + "SHARED_LINK_SENT", + "SHARED_LIVE_VIDEO_STREAM_WITH_PASSWORD_CREATE", + "SHARED_LIVE_VIDEO_STREAM_WITHOUT_PASSWORD_CREATE", + "SHARED_LIVE_VIDEO_STREAM_DELETE", + "SHARED_VIDEOWALL_WITH_PASSWORD_CREATE", + "SHARED_VIDEOWALL_WITHOUT_PASSWORD_CREATE", + "SHARED_VIDEOWALL_DELETE", + "RAW_HTTP_STREAM_CREATED", + "RAW_HTTP_STREAM_DELETED", + "SETUP_VIRTUAL_MFA_DEVICE", + "DELETE_VIRTUAL_MFA_DEVICE", + "SETUP_SCIM_API_ACCESS", + "REVOKE_SCIM_API_ACCESS", + "AUDIT_EXPORT", + "COUNT_EXPORT", + "DIAGNOSTIC_EXPORT", + "INVENTORY_EXPORT", + "USERS_EXPORT", + "UPTIME_EXPORT", + "SUPPORT_TICKET_OPEN", + "RMA_OPEN", + "FEEDBACK_CREATE", + "SUPPORT_ACCESS_GRANT", + "SUPPORT_ACCESS_REVOKE", + "SUPPORT_PARTNER_ADD", + "SUPPORT_PARTNER_REMOVE", + "SUPPORT_PARTNER_LOGIN_ACCESS_EXPIRED", + "SUPPORT_SEARCH_TICKETS", + "ACCEPT_UAP", + "ACCEPT_RHOMBUS_UAP", + "ACCEPT_ALERTMONITORING_UAP", + "CREATE_SEEKPOINT", + "DELETE_CUSTOM_SEEKPOINT", + "UPDATE_INTEGRATION_SAML", + "UPDATE_INTEGRATION_SLACK", + "UPDATE_INTEGRATION_SLACK_V2", + "DELETE_INTEGRATION_SLACK_V2", + "UPDATE_INTEGRATION_BOX", + "DELETE_INTEGRATION_BOX", + "UPDATE_INTEGRATION_GOOGLE", + "DELETE_INTEGRATION_GOOGLE", + "UPDATE_INTEGRATION_GOOGLE_V2", + "DELETE_INTEGRATION_GOOGLE_V2", + "UPDATE_INTEGRATION_PAGERDUTY", + "DELETE_INTEGRATION_PAGERDUTY", + "UPDATE_INTEGRATION_SERVICENOW", + "DELETE_INTEGRATION_SERVICENOW", + "UPDATE_INTEGRATION_OFFICE365", + "DELETE_INTEGRATION_OFFICE365", + "UPDATE_INTEGRATION_DROPBOX", + "DELETE_INTEGRATION_DROPBOX", + "UPDATE_INTEGRATION_SQUARE", + "DELETE_INTEGRATION_SQUARE", + "UPDATE_INTEGRATION_AWS", + "DELETE_INTEGRATION_AWS", + "UPDATE_INTEGRATION_HALO", + "DELETE_INTEGRATION_HALO", + "UPDATE_INTEGRATION_WEBHOOK", + "DELETE_INTEGRATION_WEBHOOK", + "UPDATE_INTEGRATION_EMAIL", + "DELETE_INTEGRATION_EMAIL", + "UPDATE_INTEGRATION_MATTERMOST", + "DELETE_INTEGRATION_MATTERMOST", + "UPDATE_INTEGRATION_OPENPATH", + "DELETE_INTEGRATION_OPENPATH", + "UPDATE_INTEGRATION_AVIGILON_ALTA", + "DELETE_INTEGRATION_AVIGILON_ALTA", + "UPDATE_INTEGRATION_DICE", + "DELETE_INTEGRATION_DICE", + "UPDATE_INTEGRATION_LUMEO", + "DELETE_INTEGRATION_LUMEO", + "UPDATE_INTEGRATION_DEVICE", + "DELETE_INTEGRATION_DEVICE", + "UPDATE_INTEGRATION_GUESTMANAGEMENT", + "DELETE_INTEGRATION_GUESTMANAGEMENT", + "UPDATE_GUESTMANAGEMENT_SETTINGS", + "DELETE_GUESTMANAGEMENT_SETTINGS", + "INVITE_GUEST", + "CREATE_GUEST", + "CHECKIN_GUEST", + "CHECKOUT_GUEST", + "UPDATE_GUEST", + "DELETE_GUEST", + "ACTIVATE_KIOSK", + "UPDATE_INTEGRATION_OMNIALERT", + "DELETE_INTEGRATION_OMNIALERT", + "UPDATE_INTEGRATION_OPENTECHALLIANCE", + "DELETE_INTEGRATION_OPENTECHALLIANCE", + "UPDATE_INTEGRATION_TOAST", + "DELETE_INTEGRATION_TOAST", + "UPDATE_INTEGRATION_KISI", + "DELETE_INTEGRATION_KISI", + "UPDATE_INTEGRATION_BRIVO", + "DELETE_INTEGRATION_BRIVO", + "UPDATE_INTEGRATION_BUTTERFLYMX", + "DELETE_INTEGRATION_BUTTERFLYMX", + "UPDATE_INTEGRATION_ENVOY", + "DELETE_INTEGRATION_ENVOY", + "CREATE_ENVOY_INVITE", + "UPDATE_INTEGRATION_SALTO", + "UPDATE_INTEGRATION_PDK", + "DELETE_INTEGRATION_PDK", + "UPDATE_INTEGRATION_GENEA", + "DELETE_INTEGRATION_GENEA", + "UPDATE_INTEGRATION_MICROSOFTTEAMS", + "DELETE_INTEGRATION_MICROSOFTTEAMS", + "UPDATE_INTEGRATION_AMT", + "DELETE_INTEGRATION_AMT", + "UPDATE_INTEGRATION_PLACEOS", + "DELETE_INTEGRATION_PLACEOS", + "UPDATE_INTEGRATION_INTUIFACE", + "DELETE_INTEGRATION_INTUIFACE", + "UPDATE_INTEGRATION_INFORMACAST", + "DELETE_INTEGRATION_INFORMACAST", + "UPDATE_INTEGRATION_INNERRANGE", + "DELETE_INTEGRATION_INNERRANGE", + "UPDATE_INTEGRATION_SHELLY", + "DELETE_INTEGRATION_SHELLY", + "UPDATE_INTEGRATION_FLIC", + "DELETE_INTEGRATION_FLIC", + "UPDATE_INTEGRATION_NINEONEONECELLULAR", + "DELETE_INTEGRATION_NINEONEONECELLULAR", + "UPDATE_INTEGRATION_PIMLOC", + "DELETE_INTEGRATION_PIMLOC", + "UPDATE_INTEGRATION_RAPTOR", + "DELETE_INTEGRATION_RAPTOR", + "UPDATE_INTEGRATION_NOONLIGHT", + "UPDATE_INTEGRATION_ALARM_MONITORING", + "ENABLE_LIVE_ALARM_MONITORING", + "ENABLE_LIVE_ALARM_MONITORING_LOCATION", + "CREATE_ALARM_MONITORING_SETTINGS", + "UPDATE_ALARM_MONITORING_SETTINGS", + "DELETE_ALARM_MONITORING_SETTINGS", + "ENABLE_ALARM_MONITORING_SETTINGS", + "DISABLE_ALARM_MONITORING_SETTINGS", + "REPORT_VEHICLE_EVENT", + "API_TOKEN_REQUEST", + "API_TOKEN_REVOKE", + "API_INVOCATION", + "API_OAUTH_TOKEN_REQUEST", + "API_OAUTH_TOKEN_REFRESH", + "API_OAUTH_TOKEN_REVOKE", + "API_OAUTH_INVOCATION", + "API_OAUTH_SUBMIT_APPLICATION", + "API_OAUTH_UPDATE_APPLICATION", + "API_OAUTH_DELETE_APPLICATION", + "API_OAUTH_AUTHORIZE", + "VIDEO_WALL_CREATE", + "VIDEO_WALL_UPDATE", + "VIDEO_WALL_DELETE", + "VIEW_SHARE_TIMELAPSE", + "VIEW_SHARE_CLIP", + "VIEW_SHARE_STREAM", + "VIEW_SHARE_VIDEOWALL", + "VIEW_CAMERA_VOD", + "CAMERA_POLICY_UPDATE", + "CAMERA_POLICY_CREATE", + "CAMERA_POLICY_DELETE", + "TAG_POLICY_UPDATE", + "TAG_POLICY_CREATE", + "TAG_POLICY_DELETE", + "CLIMATE_POLICY_UPDATE", + "CLIMATE_POLICY_CREATE", + "CLIMATE_POLICY_DELETE", + "DOOR_POLICY_UPDATE", + "DOOR_POLICY_CREATE", + "DOOR_POLICY_DELETE", + "DOOR_SCHEDULE_EXCEPTION_UPDATE", + "DOOR_SCHEDULE_EXCEPTION_CREATE", + "DOOR_SCHEDULE_EXCEPTION_DELETE", + "ACCESS_CONTROLLED_DOOR_POLICY_UPDATE", + "ACCESS_CONTROLLED_DOOR_POLICY_CREATE", + "ACCESS_CONTROLLED_DOOR_POLICY_DELETE", + "VIDEO_INTERCOM_POLICY_UPDATE", + "VIDEO_INTERCOM_POLICY_CREATE", + "VIDEO_INTERCOM_POLICY_DELETE", + "OCCUPANCY_POLICY_UPDATE", + "OCCUPANCY_POLICY_CREATE", + "OCCUPANCY_POLICY_DELETE", + "AUDIO_POLICY_UPDATE", + "AUDIO_POLICY_CREATE", + "AUDIO_POLICY_DELETE", + "SCHEDULE_CREATE", + "SCHEDULE_DELETE", + "SCHEDULE_UPDATE", + "UPLOAD_FLOORPLAN", + "ORG_AUDIO_RECORD_UPDATE", + "ORG_AUDIO_ANALYSIS_UPDATE", + "DOOR_ACCESS_UNLOCK", + "RHOMBUS_KEY_DOOR_UNLOCK", + "UPLOAD_ACCESS_CONTROLLED_DOOR", + "UPLOAD_USER_PROFILE_PICTURE", + "ACCESS_GRANT_CREATE", + "ACCESS_GRANT_UPDATE", + "ACCESS_GRANT_DELETE", + "ACCESS_REVOCATION_CREATE", + "ACCESS_REVOCATION_UPDATE", + "ACCESS_REVOCATION_DELETE", + "ACCESS_CONTROLLED_DOOR_CREATE", + "ACCESS_CONTROLLED_DOOR_UPDATE", + "ACCESS_CONTROLLED_DOOR_DELETE", + "AC_CRED_RHOMBUS_SECURE_CSN_CREATE", + "AC_CRED_RHOMBUS_SECURE_CSN_UPDATE", + "AC_CRED_RHOMBUS_SECURE_CSN_DELETE", + "AC_CRED_RHOMBUS_SECURE_CSN_REVOKED", + "AC_CRED_STANDARD_CSN_CREATE", + "AC_CRED_STANDARD_CSN_UPDATE", + "AC_CRED_STANDARD_CSN_DELETE", + "AC_CRED_STANDARD_CSN_REVOKED", + "AC_CRED_RHOMBUS_SECURE_MOBILE_CREATE", + "AC_CRED_RHOMBUS_SECURE_MOBILE_UPDATE", + "AC_CRED_RHOMBUS_SECURE_MOBILE_DELETE", + "AC_CRED_RHOMBUS_SECURE_MOBILE_REVOKED", + "AC_CRED_PIN_CREATE", + "AC_CRED_PIN_BULK_CREATE", + "AC_CRED_PIN_UPDATE", + "AC_CRED_PIN_ROTATE", + "AC_CRED_PIN_BULK_ROTATE", + "AC_CRED_PIN_DELETE", + "AC_CRED_PIN_REVOKED", + "AC_CRED_WIEGAND_CREATE", + "AC_CRED_WIEGAND_UPDATE", + "AC_CRED_WIEGAND_DELETE", + "AC_CRED_WIEGAND_REVOKED", + "AC_CRED_NOTE_UPDATE", + "AC_LOCKDOWN_PLAN_CREATED", + "AC_LOCKDOWN_PLAN_UPDATED", + "AC_LOCKDOWN_PLAN_DELETED", + "AC_LOCKDOWN_ACTIVATED", + "AC_LOCKDOWN_DEACTIVATED", + "AC_COMPONENT_POWER_CYCLE", + "AC_DOOR_STATE_OVERRIDE_APPLIED", + "AC_DOOR_STATE_OVERRIDE_CANCELLED", + "SCIM_GET_ALL_USERS", + "SCIM_POST_CREATE_USER", + "SCIM_PUT_UPDATE_USER", + "SCIM_PATCH_UPDATE_USER", + "SCIM_GET_USER_BY_ID", + "SCIM_DELETE_USER_BY_ID", + "SCIM_GET_ALL_GROUPS", + "SCIM_POST_CREATE_GROUP", + "SCIM_PUT_UPDATE_GROUP", + "SCIM_PATCH_UPDATE_GROUP", + "SCIM_GET_GROUP_BY_ID", + "SCIM_DELETE_GROUP_BY_ID", + "CREATE_ACCESS_CONTROL_GROUP", + "UPDATE_ACCESS_CONTROL_GROUP", + "DELETE_ACCESS_CONTROL_GROUP", + "RULE_CREATE", + "RULE_DELETE", + "RULE_UPDATE", + "RULE_PAUSE", + "UPLOAD_FACES", + "UPDATE_FACE", + "REPORT_FACE_EVENT", + "FACE_EVENT_UPDATED", + "FACE_EVENT_DELETED", + "FACE_PERSON_CREATED", + "FACE_PERSON_UPDATED", + "FACE_PERSON_DELETED", + "FACE_MATCHMAKER_CREATED", + "FACE_MATCHMAKER_DELETED", + "FACE_MATCHMAKER_UPLOADED", + "FACE_MATCHING_CONFIG_UPDATED", + "EXPUNGE_FACES_ORG", + "EXPUNGE_VEHICLES_ORG", + "DEVICE_NETWORK_CONFIGURATION_CHANGE", + "KIOSK_UPDATED", + "KIOSK_DELETED", + "KIOSK_CREATED", + "UPDATE_APERIO_FIRMWARE", + "UPDATE_INTEGRATION_APERIO", + "DELETE_INTEGRATION_APERIO", + "THIRD_PARTY_CAMERA_CREATE", + "THIRD_PARTY_CAMERA_DELETE", + "THIRD_PARTY_CAMERA_UPDATED", + "THIRD_PARTY_CAMERA_ASSIGNED_TO_CORE", + "THIRD_PARTY_CAMERA_ASSIGNED_TO_LITE", + "THIRD_PARTY_CAMERA_UNASSIGNED", + "THIRD_PARTY_CAMERA_PASSWORD_CREATE", + "THIRD_PARTY_CAMERA_PASSWORD_DELETE", + "UNKNOWN", +]; + +const STREAM_TYPES = [ + "USER", + "ALARM_MONITORING", + "DICE", + "LUMEO", + "INFORMACAST", + "RAPIDSOS", + "UNKNOWN", +]; + +export default { + AUDIT_RECORD_ACTIONS, + STREAM_TYPES, +}; diff --git a/components/rhombus/package.json b/components/rhombus/package.json index 539a3702cd9f9..be74a659af148 100644 --- a/components/rhombus/package.json +++ b/components/rhombus/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/rhombus", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream Rhombus Components", "main": "rhombus.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } -} \ No newline at end of file +} diff --git a/components/rhombus/rhombus.app.mjs b/components/rhombus/rhombus.app.mjs index 9e5135d56ab22..ab0cebf94f980 100644 --- a/components/rhombus/rhombus.app.mjs +++ b/components/rhombus/rhombus.app.mjs @@ -1,11 +1,199 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "rhombus", - propDefinitions: {}, + propDefinitions: { + cameraUuid: { + type: "string", + label: "Camera ID", + description: "The ID of a camera", + async options() { + const { cameras } = await this.listCameras(); + return cameras.map((camera) => ({ + label: camera.name, + value: camera.uuid, + })); + }, + }, + doorUuid: { + type: "string", + label: "Access Controlled Door ID", + description: "The ID of an access controlled door", + async options() { + const { accessControlledDoors } = await this.findAccessControlledDoors(); + return accessControlledDoors.map((door) => ({ + label: door.name, + value: door.uuid, + })); + }, + }, + audioGatewayUuid: { + type: "string", + label: "Audio Gateway ID", + description: "The ID of an audio gateway", + async options() { + const { audioGatewayStates } = await this.getMinimalAudioGatewayStateList(); + return audioGatewayStates.map((gateway) => ({ + label: gateway.name, + value: gateway.uuid, + })); + }, + }, + audioUploadUuid: { + type: "string", + label: "Audio Upload ID", + description: "The ID of an uploaded audio clip", + async options() { + const { audioUploadMetadata } = await this.getAudioUploadMetadataForOrg(); + return audioUploadMetadata.map((audio) => ({ + label: audio.displayName, + value: audio.uuid, + })); + }, + }, + doorbellCameraUuid: { + type: "string", + label: "Doorbell Camera ID", + description: "The ID of a doorbell camera", + async options() { + const { doorbellCameras } = await this.getMinimalDoorbellCameraStateList(); + return doorbellCameras.map((camera) => ({ + label: camera.name, + value: camera.uuid, + })); + }, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://api2.rhombussystems.com/api"; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + method: "POST", + url: `${this._baseUrl()}${path}`, + headers: { + "x-auth-apikey": `${this.$auth.api_token}`, + "x-auth-scheme": "api-token", + "content-type": "application/json", + }, + ...opts, + }); + }, + createWebhook(opts = {}) { + return this._makeRequest({ + path: "/integrations/webhooks/subscribeZapierWebhook", + ...opts, + }); + }, + deleteWebhook(opts = {}) { + return this._makeRequest({ + path: "/integrations/webhooks/unsubscribeZapierWebhook", + ...opts, + }); + }, + listCameras(opts = {}) { + return this._makeRequest({ + path: "/camera/getMinimalList", + ...opts, + }); + }, + getAuditFeed(opts = {}) { + return this._makeRequest({ + path: "/report/getAuditFeed", + ...opts, + }); + }, + rebootCamera(opts = {}) { + return this._makeRequest({ + path: "/camera/reboot", + ...opts, + }); + }, + findAccessControlledDoors(opts = {}) { + return this._makeRequest({ + path: "/component/findAccessControlledDoors", + data: {}, + ...opts, + }); + }, + unlockAccessControlledDoor(opts = {}) { + return this._makeRequest({ + path: "/accesscontrol/unlockAccessControlledDoor", + ...opts, + }); + }, + createCustomFootageSeekpoints(opts = {}) { + return this._makeRequest({ + path: "/camera/createCustomFootageSeekpoints", + ...opts, + }); + }, + getMinimalAudioGatewayStateList(opts = {}) { + return this._makeRequest({ + path: "/audiogateway/getMinimalAudioGatewayStateList", + data: {}, + ...opts, + }); + }, + getAudioUploadMetadataForOrg(opts = {}) { + return this._makeRequest({ + path: "/audioplayback/getAudioUploadMetadataForOrg", + data: {}, + ...opts, + }); + }, + playAudioUpload(opts = {}) { + return this._makeRequest({ + path: "/audioplayback/playAudioUpload", + ...opts, + }); + }, + getAudioGatewayConfig(opts = {}) { + return this._makeRequest({ + path: "/audiogateway/getConfig", + ...opts, + }); + }, + updateAudioGatewayConfig(opts = {}) { + return this._makeRequest({ + path: "/audiogateway/updateConfig", + ...opts, + }); + }, + getMinimalDoorbellCameraStateList(opts = {}) { + return this._makeRequest({ + path: "/doorbellcamera/getMinimalDoorbellCameraStateList", + data: {}, + ...opts, + }); + }, + createSharedLiveVideoStream(opts = {}) { + return this._makeRequest({ + path: "/camera/createSharedLiveVideoStream", + ...opts, + }); + }, + createDoorbellSharedLiveVideoStream(opts = {}) { + return this._makeRequest({ + path: "/doorbellcamera/createSharedLiveVideoStream", + ...opts, + }); + }, + spliceV3(opts = {}) { + return this._makeRequest({ + path: "/video/spliceV3", + ...opts, + }); + }, + savePolicyAlertV2(opts = {}) { + return this._makeRequest({ + path: "/event/savePolicyAlertV2", + ...opts, + }); }, }, }; diff --git a/components/rhombus/sources/common/base-polling.mjs b/components/rhombus/sources/common/base-polling.mjs new file mode 100644 index 0000000000000..841198d7edd7e --- /dev/null +++ b/components/rhombus/sources/common/base-polling.mjs @@ -0,0 +1,56 @@ +import rhombus from "../../rhombus.app.mjs"; +import { + DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, ConfigurationError, +} from "@pipedream/platform"; + +export default { + props: { + rhombus, + db: "$.service.db", + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + methods: { + _getLastTs() { + return this.db.get("lastTs"); + }, + _setLastTs(ts) { + this.db.set("lastTs", ts); + }, + async processEvent(max) { + const lastTs = this._getLastTs(); + const { auditEvents } = await this.rhombus.getAuditFeed({ + data: { + includeActions: this.getActions(), + timestampMsAfter: lastTs, + }, + }); + if (!auditEvents?.length) { + return; + } + this._setLastTs(auditEvents[0].timestamp); + auditEvents.slice(0, max).forEach((event) => { + this.$emit(event, { + id: event.uuid, + summary: event.displayText, + ts: event.timestamp, + }); + }); + }, + getActions() { + throw new ConfigurationError("getActions is not implemented"); + }, + }, + hooks: { + async deploy() { + await this.processEvent(25); + }, + }, + async run() { + await this.processEvent(); + }, +}; diff --git a/components/rhombus/sources/common/base-webhook.mjs b/components/rhombus/sources/common/base-webhook.mjs new file mode 100644 index 0000000000000..d3cdc9d2d66c3 --- /dev/null +++ b/components/rhombus/sources/common/base-webhook.mjs @@ -0,0 +1,55 @@ +import rhombus from "../../rhombus.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + props: { + rhombus, + db: "$.service.db", + http: "$.interface.http", + }, + hooks: { + async activate() { + const { webhookId } = await this.rhombus.createWebhook({ + hookUrl: this.http.endpoint, + zapEnum: this.getEventType(), + }); + this._setWebhookId(webhookId); + }, + async deactivate() { + const webhookId = this._getWebhookId(); + if (webhookId) { + await this.rhombus.deleteWebhook({ + data: { + webhookId, + }, + }); + } + }, + }, + methods: { + _getWebhookId() { + return this.db.get("webhookId"); + }, + _setWebhookId(webhookId) { + this.db.set("webhookId", webhookId); + }, + generateMeta(event) { + return { + id: event.alertUuid, + summary: event.summary, + ts: event.timestampMs, + }; + }, + getEventType() { + throw new ConfigurationError("getEventType is not implemented"); + }, + }, + async run(event) { + const { body } = event; + if (!body) { + return; + } + const meta = this.generateMeta(body); + this.$emit(body, meta); + }, +}; diff --git a/components/rhombus/sources/new-audit-record-created/new-audit-record-created.mjs b/components/rhombus/sources/new-audit-record-created/new-audit-record-created.mjs new file mode 100644 index 0000000000000..3a4c5e489baa1 --- /dev/null +++ b/components/rhombus/sources/new-audit-record-created/new-audit-record-created.mjs @@ -0,0 +1,27 @@ +import common from "../common/base-polling.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + ...common, + key: "rhombus-new-audit-record-created", + name: "New Audit Record Created", + description: "Emit new event when a new audit record for a specified event is created. [See the documentation](https://apidocs.rhombus.com/reference/getauditfeed)", + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + ...common.props, + actions: { + type: "string[]", + label: "Actions", + description: "The actions to listen for", + options: constants.AUDIT_RECORD_ACTIONS, + }, + }, + methods: { + ...common.methods, + getActions() { + return this.actions; + }, + }, +}; diff --git a/components/rhombus/sources/new-button-event-instant/new-button-event-instant.mjs b/components/rhombus/sources/new-button-event-instant/new-button-event-instant.mjs new file mode 100644 index 0000000000000..b57b48e359561 --- /dev/null +++ b/components/rhombus/sources/new-button-event-instant/new-button-event-instant.mjs @@ -0,0 +1,19 @@ +import common from "../common/base-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "rhombus-new-button-event-instant", + name: "New Button Event (Instant)", + description: "Emit new event when a new button event is created. [See the documentation](https://apidocs.rhombus.com/reference/subscribezapierwebhook)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getEventType() { + return "BUTTON_EVENTS"; + }, + }, + sampleEmit, +}; diff --git a/components/rhombus/sources/new-button-event-instant/test-event.mjs b/components/rhombus/sources/new-button-event-instant/test-event.mjs new file mode 100644 index 0000000000000..4c0c6976a9ba2 --- /dev/null +++ b/components/rhombus/sources/new-button-event-instant/test-event.mjs @@ -0,0 +1,12 @@ +export default { + 'summary': 'Movement detected at Headquarters', + 'deviceUuid': 'XXXXXXXXXXXXXXXXXX', + 'clipLocationMap': {'XXXXXXXXXXXXXXXXXX': 'us-west-2'}, + 'alertUuid': 'XXXXXXXXXXXXXXXXXXX', + 'activityTrigger': 'MOTION', + 'location': 'XXXXXXXXXXXXXXXX', + 'durationSec': 8, + 'version': '2', + 'timestampMs': 1646942680190, + 'thumbnailLocation': 'us-west-2' +} \ No newline at end of file diff --git a/components/rhombus/sources/new-camera-clip-created/new-camera-clip-created.mjs b/components/rhombus/sources/new-camera-clip-created/new-camera-clip-created.mjs new file mode 100644 index 0000000000000..9c55b392f5935 --- /dev/null +++ b/components/rhombus/sources/new-camera-clip-created/new-camera-clip-created.mjs @@ -0,0 +1,19 @@ +import common from "../common/base-polling.mjs"; + +export default { + ...common, + key: "rhombus-new-camera-clip-created", + name: "New Camera Clip Created", + description: "Emit new event when a new clip is created. [See the documentation](https://apidocs.rhombus.com/reference/getauditfeed)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getActions() { + return [ + "SAVED_CLIP_CREATE", + ]; + }, + }, +}; diff --git a/components/rhombus/sources/new-door-sensor-event-instant/new-door-sensor-event-instant.mjs b/components/rhombus/sources/new-door-sensor-event-instant/new-door-sensor-event-instant.mjs new file mode 100644 index 0000000000000..1be27e617ec68 --- /dev/null +++ b/components/rhombus/sources/new-door-sensor-event-instant/new-door-sensor-event-instant.mjs @@ -0,0 +1,19 @@ +import common from "../common/base-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "rhombus-new-door-sensor-event-instant", + name: "New Door Sensor Event (Instant)", + description: "Emit new event when a new door sensor event is created. [See the documentation](https://apidocs.rhombus.com/reference/subscribezapierwebhook)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getEventType() { + return "DOOR_SENSOR_EVENTS"; + }, + }, + sampleEmit, +}; diff --git a/components/rhombus/sources/new-door-sensor-event-instant/test-event.mjs b/components/rhombus/sources/new-door-sensor-event-instant/test-event.mjs new file mode 100644 index 0000000000000..4c0c6976a9ba2 --- /dev/null +++ b/components/rhombus/sources/new-door-sensor-event-instant/test-event.mjs @@ -0,0 +1,12 @@ +export default { + 'summary': 'Movement detected at Headquarters', + 'deviceUuid': 'XXXXXXXXXXXXXXXXXX', + 'clipLocationMap': {'XXXXXXXXXXXXXXXXXX': 'us-west-2'}, + 'alertUuid': 'XXXXXXXXXXXXXXXXXXX', + 'activityTrigger': 'MOTION', + 'location': 'XXXXXXXXXXXXXXXX', + 'durationSec': 8, + 'version': '2', + 'timestampMs': 1646942680190, + 'thumbnailLocation': 'us-west-2' +} \ No newline at end of file diff --git a/components/rhombus/sources/new-environmental-sensor-event-instant/new-environmental-sensor-event-instant.mjs b/components/rhombus/sources/new-environmental-sensor-event-instant/new-environmental-sensor-event-instant.mjs new file mode 100644 index 0000000000000..1bde245054b76 --- /dev/null +++ b/components/rhombus/sources/new-environmental-sensor-event-instant/new-environmental-sensor-event-instant.mjs @@ -0,0 +1,19 @@ +import common from "../common/base-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "rhombus-new-environmental-sensor-event-instant", + name: "New Environmental Sensor Event (Instant)", + description: "Emit new event when a new environmental sensor event is created. [See the documentation](https://apidocs.rhombus.com/reference/subscribezapierwebhook)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getEventType() { + return "ENVIRONMENTAL_SENSOR_EVENTS"; + }, + }, + sampleEmit, +}; diff --git a/components/rhombus/sources/new-environmental-sensor-event-instant/test-event.mjs b/components/rhombus/sources/new-environmental-sensor-event-instant/test-event.mjs new file mode 100644 index 0000000000000..4c0c6976a9ba2 --- /dev/null +++ b/components/rhombus/sources/new-environmental-sensor-event-instant/test-event.mjs @@ -0,0 +1,12 @@ +export default { + 'summary': 'Movement detected at Headquarters', + 'deviceUuid': 'XXXXXXXXXXXXXXXXXX', + 'clipLocationMap': {'XXXXXXXXXXXXXXXXXX': 'us-west-2'}, + 'alertUuid': 'XXXXXXXXXXXXXXXXXXX', + 'activityTrigger': 'MOTION', + 'location': 'XXXXXXXXXXXXXXXX', + 'durationSec': 8, + 'version': '2', + 'timestampMs': 1646942680190, + 'thumbnailLocation': 'us-west-2' +} \ No newline at end of file diff --git a/components/rhombus/sources/new-rule-event-instant/new-rule-event-instant.mjs b/components/rhombus/sources/new-rule-event-instant/new-rule-event-instant.mjs new file mode 100644 index 0000000000000..c02e8c534e249 --- /dev/null +++ b/components/rhombus/sources/new-rule-event-instant/new-rule-event-instant.mjs @@ -0,0 +1,19 @@ +import common from "../common/base-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "rhombus-new-rule-event-instant", + name: "New Rule Event (Instant)", + description: "Emit new event when a new rule event is created. [See the documentation](https://apidocs.rhombus.com/reference/subscribezapierwebhook)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getEventType() { + return "RULE_EVENTS"; + }, + }, + sampleEmit, +}; diff --git a/components/rhombus/sources/new-rule-event-instant/test-event.mjs b/components/rhombus/sources/new-rule-event-instant/test-event.mjs new file mode 100644 index 0000000000000..4c0c6976a9ba2 --- /dev/null +++ b/components/rhombus/sources/new-rule-event-instant/test-event.mjs @@ -0,0 +1,12 @@ +export default { + 'summary': 'Movement detected at Headquarters', + 'deviceUuid': 'XXXXXXXXXXXXXXXXXX', + 'clipLocationMap': {'XXXXXXXXXXXXXXXXXX': 'us-west-2'}, + 'alertUuid': 'XXXXXXXXXXXXXXXXXXX', + 'activityTrigger': 'MOTION', + 'location': 'XXXXXXXXXXXXXXXX', + 'durationSec': 8, + 'version': '2', + 'timestampMs': 1646942680190, + 'thumbnailLocation': 'us-west-2' +} \ No newline at end of file diff --git a/components/rhombus/sources/new-seekpoint-created/new-seekpoint-created.mjs b/components/rhombus/sources/new-seekpoint-created/new-seekpoint-created.mjs new file mode 100644 index 0000000000000..971084902404e --- /dev/null +++ b/components/rhombus/sources/new-seekpoint-created/new-seekpoint-created.mjs @@ -0,0 +1,19 @@ +import common from "../common/base-polling.mjs"; + +export default { + ...common, + key: "rhombus-new-seekpoint-created", + name: "New Seekpoint Created", + description: "Emit new event when a new seekpoint is created. [See the documentation](https://apidocs.rhombus.com/reference/getauditfeed)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getActions() { + return [ + "CREATE_SEEKPOINT", + ]; + }, + }, +}; diff --git a/components/rinkel/actions/add-note/add-note.mjs b/components/rinkel/actions/add-note/add-note.mjs new file mode 100644 index 0000000000000..fa0422934c89c --- /dev/null +++ b/components/rinkel/actions/add-note/add-note.mjs @@ -0,0 +1,34 @@ +import rinkel from "../../rinkel.app.mjs"; + +export default { + key: "rinkel-add-note", + name: "Add Note", + description: "Add a note to a call. [See the documentation](https://developers.rinkel.com/docs/api/add-a-note-to-a-call-detail-record)", + version: "0.0.1", + type: "action", + props: { + rinkel, + callId: { + propDefinition: [ + rinkel, + "callId", + ], + }, + content: { + type: "string", + label: "Content", + description: "The content of the note", + }, + }, + async run({ $ }) { + const response = await this.rinkel.addNote({ + $, + id: this.callId, + data: { + content: this.content, + }, + }); + $.export("$summary", `Note added to call ${this.callId}`); + return response; + }, +}; diff --git a/components/rinkel/actions/get-call-details/get-call-details.mjs b/components/rinkel/actions/get-call-details/get-call-details.mjs new file mode 100644 index 0000000000000..64aba5fdb5eb7 --- /dev/null +++ b/components/rinkel/actions/get-call-details/get-call-details.mjs @@ -0,0 +1,26 @@ +import rinkel from "../../rinkel.app.mjs"; + +export default { + key: "rinkel-get-call-details", + name: "Get Call Details", + description: "Get details about a call. [See the documentation](https://developers.rinkel.com/docs/api/get-a-specific-call-detail-record)", + version: "0.0.1", + type: "action", + props: { + rinkel, + callId: { + propDefinition: [ + rinkel, + "callId", + ], + }, + }, + async run({ $ }) { + const response = await this.rinkel.getCallDetailRecord({ + $, + id: this.callId, + }); + $.export("$summary", `Call details for ${this.callId} retrieved`); + return response; + }, +}; diff --git a/components/rinkel/actions/get-call-recording/get-call-recording.mjs b/components/rinkel/actions/get-call-recording/get-call-recording.mjs new file mode 100644 index 0000000000000..77155a0611f3a --- /dev/null +++ b/components/rinkel/actions/get-call-recording/get-call-recording.mjs @@ -0,0 +1,26 @@ +import rinkel from "../../rinkel.app.mjs"; + +export default { + key: "rinkel-get-call-recording", + name: "Get Call Recording", + description: "Get a call recording. [See the documentation](https://developers.rinkel.com/docs/api/get-a-recording)", + version: "0.0.1", + type: "action", + props: { + rinkel, + recordingId: { + propDefinition: [ + rinkel, + "recordingId", + ], + }, + }, + async run({ $ }) { + const response = await this.rinkel.getCallRecording({ + $, + id: this.recordingId, + }); + $.export("$summary", `Recording ${this.recordingId} retrieved`); + return response; + }, +}; diff --git a/components/rinkel/actions/get-voicemail/get-voicemail.mjs b/components/rinkel/actions/get-voicemail/get-voicemail.mjs new file mode 100644 index 0000000000000..8f9967bd9b3b5 --- /dev/null +++ b/components/rinkel/actions/get-voicemail/get-voicemail.mjs @@ -0,0 +1,26 @@ +import rinkel from "../../rinkel.app.mjs"; + +export default { + key: "rinkel-get-voicemail", + name: "Get Voicemail", + description: "Returns a URL to stream or download a voicemail. [See the documentation](https://developers.rinkel.com/docs/api/get-a-temporary-url-to-stream-or-download-a-voicemail)", + version: "0.0.1", + type: "action", + props: { + rinkel, + voicemailId: { + propDefinition: [ + rinkel, + "voicemailId", + ], + }, + }, + async run({ $ }) { + const response = await this.rinkel.getVoicemail({ + $, + id: this.voicemailId, + }); + $.export("$summary", `Voicemail ${this.voicemailId} retrieved`); + return response; + }, +}; diff --git a/components/rinkel/actions/update-note/update-note.mjs b/components/rinkel/actions/update-note/update-note.mjs new file mode 100644 index 0000000000000..5109ff9d88c19 --- /dev/null +++ b/components/rinkel/actions/update-note/update-note.mjs @@ -0,0 +1,44 @@ +import rinkel from "../../rinkel.app.mjs"; + +export default { + key: "rinkel-update-note", + name: "Update Note", + description: "Update a note on a call. [See the documentation](https://developers.rinkel.com/docs/api/update-a-note-in-a-call-detail-record)", + version: "0.0.1", + type: "action", + props: { + rinkel, + callId: { + propDefinition: [ + rinkel, + "callId", + ], + }, + noteId: { + propDefinition: [ + rinkel, + "noteId", + (c) => ({ + callId: c.callId, + }), + ], + }, + content: { + type: "string", + label: "Content", + description: "The content of the note", + }, + }, + async run({ $ }) { + const response = await this.rinkel.updateNote({ + $, + callId: this.callId, + noteId: this.noteId, + data: { + content: this.content, + }, + }); + $.export("$summary", `Note updated for call ${this.callId}`); + return response; + }, +}; diff --git a/components/rinkel/package.json b/components/rinkel/package.json new file mode 100644 index 0000000000000..ac70203f77554 --- /dev/null +++ b/components/rinkel/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/rinkel", + "version": "0.1.0", + "description": "Pipedream Rinkel Components", + "main": "rinkel.app.mjs", + "keywords": [ + "pipedream", + "rinkel" + ], + "homepage": "https://pipedream.com/apps/rinkel", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + } +} diff --git a/components/rinkel/rinkel.app.mjs b/components/rinkel/rinkel.app.mjs new file mode 100644 index 0000000000000..d74c0a7b8f539 --- /dev/null +++ b/components/rinkel/rinkel.app.mjs @@ -0,0 +1,162 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "rinkel", + propDefinitions: { + callId: { + type: "string", + label: "Call ID", + description: "The ID of the call to get the call detail records for", + async options({ page }) { + const response = await this.listCallDetailRecords({ + params: { + page: page + 1, + sort: "date", + sortOrder: "DESC", + }, + }); + return response.data.map((call) => call.id); + }, + }, + recordingId: { + type: "string", + label: "Recording ID", + description: "The ID of the recording to get the details for", + async options({ page }) { + const response = await this.listCallRecordings({ + params: { + page: page + 1, + sort: "date", + sortOrder: "DESC", + }, + }); + return response.data.map((recording) => recording.id); + }, + }, + voicemailId: { + type: "string", + label: "Voicemail ID", + description: "The ID of the voicemail to get the details for", + async options({ page }) { + const response = await this.listVoicemails({ + params: { + page: page + 1, + sort: "date", + sortOrder: "DESC", + }, + }); + return response.data.map((voicemail) => voicemail.id); + }, + }, + noteId: { + type: "string", + label: "Note ID", + description: "The ID of the note to update", + async options({ callId }) { + const response = await this.getCallDetailRecord({ + id: callId, + }); + const notes = response.data.notes; + return notes.map((note) => ({ + label: note.content, + value: note.id, + })); + }, + }, + }, + methods: { + _baseUrl() { + return "https://api.rinkel.com/v1"; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: { + "x-rinkel-api-key": this.$auth.api_key, + }, + ...opts, + }); + }, + createWebhook({ + event, ...opts + }) { + return this._makeRequest({ + path: `/webhooks/${event}`, + method: "POST", + ...opts, + }); + }, + deleteWebhook({ + event, ...opts + }) { + return this._makeRequest({ + path: `/webhooks/${event}`, + method: "DELETE", + ...opts, + }); + }, + getCallDetailRecord({ + id, ...opts + }) { + return this._makeRequest({ + path: `/call-detail-records/${id}`, + ...opts, + }); + }, + getCallRecording({ + id, ...opts + }) { + return this._makeRequest({ + path: `/recordings/${id}`, + ...opts, + }); + }, + getVoicemail({ + id, ...opts + }) { + return this._makeRequest({ + path: `/voicemails/${id}/stream`, + ...opts, + }); + }, + listCallDetailRecords(opts = {}) { + return this._makeRequest({ + path: "/call-detail-records", + ...opts, + }); + }, + listCallRecordings(opts = {}) { + return this._makeRequest({ + path: "/recordings", + ...opts, + }); + }, + listVoicemails(opts = {}) { + return this._makeRequest({ + path: "/voicemails", + ...opts, + }); + }, + addNote({ + id, ...opts + }) { + return this._makeRequest({ + path: `/call-detail-records/${id}/note`, + method: "PUT", + ...opts, + }); + }, + updateNote({ + callId, noteId, ...opts + }) { + return this._makeRequest({ + path: `/call-detail-records/${callId}/note/${noteId}`, + method: "PATCH", + ...opts, + }); + }, + }, +}; diff --git a/components/rinkel/sources/call-ended/call-ended.mjs b/components/rinkel/sources/call-ended/call-ended.mjs new file mode 100644 index 0000000000000..7865c767693f9 --- /dev/null +++ b/components/rinkel/sources/call-ended/call-ended.mjs @@ -0,0 +1,26 @@ +import common from "../common/base-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "rinkel-call-ended", + name: "Call Ended (Instant)", + description: "Emit new event when a call ends. [See the documentation](https://developers.rinkel.com/docs/api/subscribe-to-a-webhook)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getEvent() { + return "callEnd"; + }, + generateMeta(event) { + return { + id: event.id, + summary: `Call ended: ${event.cause}`, + ts: Date.parse(event.datetime), + }; + }, + }, + sampleEmit, +}; diff --git a/components/rinkel/sources/call-ended/test-event.mjs b/components/rinkel/sources/call-ended/test-event.mjs new file mode 100644 index 0000000000000..d61b5d770176e --- /dev/null +++ b/components/rinkel/sources/call-ended/test-event.mjs @@ -0,0 +1,5 @@ +export default { + id: '1c8b83a7c690084224ec3984515bc1a2', + datetime: '2023-06-14T13:56:24.969Z', + cause: 'ANSWERED' +} \ No newline at end of file diff --git a/components/rinkel/sources/common/base-webhook.mjs b/components/rinkel/sources/common/base-webhook.mjs new file mode 100644 index 0000000000000..dd27bf8cd4326 --- /dev/null +++ b/components/rinkel/sources/common/base-webhook.mjs @@ -0,0 +1,42 @@ +import rinkel from "../../rinkel.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + props: { + rinkel, + http: "$.interface.http", + }, + hooks: { + async activate() { + await this.rinkel.createWebhook({ + event: this.getEvent(), + data: { + url: this.http.endpoint, + contentType: "application/json", + active: true, + }, + }); + }, + async deactivate() { + await this.rinkel.deleteWebhook({ + event: this.getEvent(), + }); + }, + }, + methods: { + getEvent() { + throw new ConfigurationError("getEvent must be implemented"); + }, + generateMeta() { + throw new ConfigurationError("generateMeta must be implemented"); + }, + }, + async run(event) { + const { body } = event; + if (!body) { + return; + } + const meta = this.generateMeta(body); + this.$emit(body, meta); + }, +}; diff --git a/components/rise/package.json b/components/rise/package.json index 896f3352ac89f..219c96ab4762e 100644 --- a/components/rise/package.json +++ b/components/rise/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/rise", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Rise Components", "main": "dist/app/rise.app.mjs", "keywords": [ @@ -16,6 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.1" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/rise/tsconfig.json b/components/rise/tsconfig.json index 335fa6f1cf6ec..3a9389484d040 100644 --- a/components/rise/tsconfig.json +++ b/components/rise/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/rize/rize.app.mjs b/components/rize/rize.app.mjs index 0a98323882ab3..0df6a2f21662f 100644 --- a/components/rize/rize.app.mjs +++ b/components/rize/rize.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/rocketskip/actions/skip-trace-property/skip-trace-property.mjs b/components/rocketskip/actions/skip-trace-property/skip-trace-property.mjs new file mode 100644 index 0000000000000..f9b013fdb109f --- /dev/null +++ b/components/rocketskip/actions/skip-trace-property/skip-trace-property.mjs @@ -0,0 +1,63 @@ +import app from "../../rocketskip.app.mjs"; + +export default { + key: "rocketskip-skip-trace-property", + name: "Skip Trace Property", + description: "Send a property to get phone numbers for the property owner. [See the documentation](https://docs.rocketskip.com/api-reference/endpoint/post)", + version: "0.0.1", + type: "action", + props: { + app, + streetAddress: { + propDefinition: [ + app, + "streetAddress", + ], + }, + city: { + propDefinition: [ + app, + "city", + ], + }, + state: { + propDefinition: [ + app, + "state", + ], + }, + zipCode: { + propDefinition: [ + app, + "zipCode", + ], + }, + firstName: { + propDefinition: [ + app, + "firstName", + ], + }, + lastName: { + propDefinition: [ + app, + "lastName", + ], + }, + }, + async run({ $ }) { + const response = await this.app.skipTraceProperty({ + $, + data: { + street_address: this.streetAddress, + city: this.city, + state: this.state, + zip_code: this.zipCode, + first_name: this.firstName, + last_name: this.lastName, + }, + }); + $.export("$summary", "Successfully sent the request and retrieved " + response.result.length + " resultts"); + return response; + }, +}; diff --git a/components/rocketskip/package.json b/components/rocketskip/package.json new file mode 100644 index 0000000000000..cb51269a0d48c --- /dev/null +++ b/components/rocketskip/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/rocketskip", + "version": "0.1.0", + "description": "Pipedream RocketSkip Components", + "main": "rocketskip.app.mjs", + "keywords": [ + "pipedream", + "rocketskip" + ], + "homepage": "https://pipedream.com/apps/rocketskip", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + } +} diff --git a/components/rocketskip/rocketskip.app.mjs b/components/rocketskip/rocketskip.app.mjs new file mode 100644 index 0000000000000..6422dae2f8aaf --- /dev/null +++ b/components/rocketskip/rocketskip.app.mjs @@ -0,0 +1,69 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "rocketskip", + propDefinitions: { + streetAddress: { + type: "string", + label: "Street Address", + description: "Street address of the property, i.e.: `44 Montgomery St`", + }, + city: { + type: "string", + label: "City", + description: "City of the property, i.e.: `San Francisco`", + }, + state: { + type: "string", + label: "State", + description: "State of the property, i.e.: `CA`", + }, + zipCode: { + type: "string", + label: "Zip Code", + description: "Postal code of the property, i.e.: `94108`", + }, + firstName: { + type: "string", + label: "First Name", + description: "First name of the property owner", + optional: true, + }, + lastName: { + type: "string", + label: "Last Name", + description: "Last name of the property owner", + optional: true, + }, + }, + methods: { + _baseUrl() { + return "https://api.rocketskip.com/api/v1"; + }, + async _makeRequest(opts = {}) { + const { + $ = this, + path, + headers, + ...otherOpts + } = opts; + return axios($, { + ...otherOpts, + url: this._baseUrl() + path, + headers: { + Authorization: `Bearer ${this.$auth.oauth_access_token}`, + ...headers, + }, + }); + }, + + async skipTraceProperty(args = {}) { + return this._makeRequest({ + path: "/property/skiptrace", + method: "post", + ...args, + }); + }, + }, +}; diff --git a/components/route4me/.gitignore b/components/route4me/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/route4me/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/route4me/app/route4me.app.ts b/components/route4me/app/route4me.app.ts deleted file mode 100644 index b4add90041cdd..0000000000000 --- a/components/route4me/app/route4me.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "route4me", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/route4me/package.json b/components/route4me/package.json index 0e8d9351de02b..406d21726754c 100644 --- a/components/route4me/package.json +++ b/components/route4me/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/route4me", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Route4Me Components", - "main": "dist/app/route4me.app.mjs", + "main": "route4me.app.mjs", "keywords": [ "pipedream", "route4me" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/route4me", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/route4me/route4me.app.mjs b/components/route4me/route4me.app.mjs new file mode 100644 index 0000000000000..7fd7c0808686c --- /dev/null +++ b/components/route4me/route4me.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "route4me", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/rss/package.json b/components/rss/package.json index 781a4f5cd7713..6c432addcc367 100644 --- a/components/rss/package.json +++ b/components/rss/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/rss", - "version": "0.5.7", + "version": "0.5.8", "description": "Pipedream RSS Components", "main": "dist/app/rss.app.mjs", "types": "dist/app/rss.app.d.ts", @@ -21,11 +21,12 @@ "@types/axios": "^0.14.0", "@types/feedparser": "^2.2.5", "@types/node": "^17.0.36", - "@types/object-hash": "^2.2.1" + "@types/object-hash": "^2.2.1", + "@pipedream/types": "^0.3.2" }, "dependencies": { "@pipedream/helpers": "^1.3.9", - "@pipedream/platform": "^1.4.0", + "@pipedream/platform": "^3.1.0", "feedparser": "^2.2.10", "object-hash": "^3.0.0", "rss-parser": "^3.12.0", diff --git a/components/rss/tsconfig.json b/components/rss/tsconfig.json index 335fa6f1cf6ec..3a9389484d040 100644 --- a/components/rss/tsconfig.json +++ b/components/rss/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/rudderstack/.gitignore b/components/rudderstack/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/rudderstack/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/rudderstack/app/rudderstack.app.ts b/components/rudderstack/app/rudderstack.app.ts deleted file mode 100644 index ad47accd81d36..0000000000000 --- a/components/rudderstack/app/rudderstack.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "rudderstack", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/rudderstack/package.json b/components/rudderstack/package.json index 96377ceee342e..f038f39bef4b3 100644 --- a/components/rudderstack/package.json +++ b/components/rudderstack/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/rudderstack", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream RudderStack HTTP Components", - "main": "dist/app/rudderstack.app.mjs", + "main": "rudderstack.app.mjs", "keywords": [ "pipedream", "rudderstack" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/rudderstack", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/rudderstack/rudderstack.app.mjs b/components/rudderstack/rudderstack.app.mjs new file mode 100644 index 0000000000000..ecb13910607fa --- /dev/null +++ b/components/rudderstack/rudderstack.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "rudderstack", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/rudderstack_transformation/.gitignore b/components/rudderstack_transformation/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/rudderstack_transformation/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/rudderstack_transformation/app/rudderstack_transformation.app.ts b/components/rudderstack_transformation/app/rudderstack_transformation.app.ts deleted file mode 100644 index 5be91e7ceac34..0000000000000 --- a/components/rudderstack_transformation/app/rudderstack_transformation.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "rudderstack_transformation", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/rudderstack_transformation/package.json b/components/rudderstack_transformation/package.json index 21595ccb86cde..7f19028be106b 100644 --- a/components/rudderstack_transformation/package.json +++ b/components/rudderstack_transformation/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/rudderstack_transformation", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream RudderStack Transformation Components", - "main": "dist/app/rudderstack_transformation.app.mjs", + "main": "rudderstack_transformation.app.mjs", "keywords": [ "pipedream", "rudderstack_transformation" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/rudderstack_transformation", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/rudderstack_transformation/rudderstack_transformation.app.mjs b/components/rudderstack_transformation/rudderstack_transformation.app.mjs new file mode 100644 index 0000000000000..07f486e3dfef5 --- /dev/null +++ b/components/rudderstack_transformation/rudderstack_transformation.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "rudderstack_transformation", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/runsignup/runsignup.app.mjs b/components/runsignup/runsignup.app.mjs index d8fa2d880df08..43901dffae792 100644 --- a/components/runsignup/runsignup.app.mjs +++ b/components/runsignup/runsignup.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/rytr/.gitignore b/components/rytr/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/rytr/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/rytr/app/rytr.app.ts b/components/rytr/app/rytr.app.ts deleted file mode 100644 index 650f958ab5f2a..0000000000000 --- a/components/rytr/app/rytr.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "rytr", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/rytr/package.json b/components/rytr/package.json index 0c66ee3660225..7c946b305eb80 100644 --- a/components/rytr/package.json +++ b/components/rytr/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/rytr", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Rytr Components", - "main": "dist/app/rytr.app.mjs", + "main": "rytr.app.mjs", "keywords": [ "pipedream", "rytr" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/rytr", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/rytr/rytr.app.mjs b/components/rytr/rytr.app.mjs new file mode 100644 index 0000000000000..20908cfe6b0c5 --- /dev/null +++ b/components/rytr/rytr.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "rytr", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/ryver/.gitignore b/components/ryver/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/ryver/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/ryver/app/ryver.app.ts b/components/ryver/app/ryver.app.ts deleted file mode 100644 index fae998153e6da..0000000000000 --- a/components/ryver/app/ryver.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "ryver", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/ryver/package.json b/components/ryver/package.json index 2e9098e4c8bfc..102e37e68a24f 100644 --- a/components/ryver/package.json +++ b/components/ryver/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/ryver", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Ryver Components", - "main": "dist/app/ryver.app.mjs", + "main": "ryver.app.mjs", "keywords": [ "pipedream", "ryver" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/ryver", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/ryver/ryver.app.mjs b/components/ryver/ryver.app.mjs new file mode 100644 index 0000000000000..575bd9ac653c4 --- /dev/null +++ b/components/ryver/ryver.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "ryver", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sailpoint/.gitignore b/components/sailpoint/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sailpoint/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sailpoint/app/sailpoint.app.ts b/components/sailpoint/app/sailpoint.app.ts deleted file mode 100644 index 30c1a55ca46d1..0000000000000 --- a/components/sailpoint/app/sailpoint.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sailpoint", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/sailpoint/package.json b/components/sailpoint/package.json index 25341643f4a5d..1bcc02a8ab23e 100644 --- a/components/sailpoint/package.json +++ b/components/sailpoint/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/sailpoint", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream SailPoint Components", - "main": "dist/app/sailpoint.app.mjs", + "main": "sailpoint.app.mjs", "keywords": [ "pipedream", "sailpoint" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/sailpoint", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sailpoint/sailpoint.app.mjs b/components/sailpoint/sailpoint.app.mjs new file mode 100644 index 0000000000000..5fef322d72a19 --- /dev/null +++ b/components/sailpoint/sailpoint.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sailpoint", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sailpoint_personal_token/.gitignore b/components/sailpoint_personal_token/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sailpoint_personal_token/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sailpoint_personal_token/app/sailpoint_personal_token.app.ts b/components/sailpoint_personal_token/app/sailpoint_personal_token.app.ts deleted file mode 100644 index 7cb267cab2db3..0000000000000 --- a/components/sailpoint_personal_token/app/sailpoint_personal_token.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sailpoint_personal_token", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/sailpoint_personal_token/package.json b/components/sailpoint_personal_token/package.json index 89d79761b60b3..8864553a512f0 100644 --- a/components/sailpoint_personal_token/package.json +++ b/components/sailpoint_personal_token/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/sailpoint_personal_token", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream sailpoint-personal-token Components", - "main": "dist/app/sailpoint_personal_token.app.mjs", + "main": "sailpoint_personal_token.app.mjs", "keywords": [ "pipedream", "sailpoint_personal_token" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/sailpoint_personal_token", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sailpoint_personal_token/sailpoint_personal_token.app.mjs b/components/sailpoint_personal_token/sailpoint_personal_token.app.mjs new file mode 100644 index 0000000000000..862e385f8adac --- /dev/null +++ b/components/sailpoint_personal_token/sailpoint_personal_token.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sailpoint_personal_token", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sakari_sms/.gitignore b/components/sakari_sms/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sakari_sms/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sakari_sms/app/sakari_sms.app.ts b/components/sakari_sms/app/sakari_sms.app.ts deleted file mode 100644 index 34776beed0e9e..0000000000000 --- a/components/sakari_sms/app/sakari_sms.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sakari_sms", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/sakari_sms/package.json b/components/sakari_sms/package.json index dd8ba3ec8cb09..c45b4858c9cc7 100644 --- a/components/sakari_sms/package.json +++ b/components/sakari_sms/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/sakari_sms", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Sakari SMS Components", - "main": "dist/app/sakari_sms.app.mjs", + "main": "sakari_sms.app.mjs", "keywords": [ "pipedream", "sakari_sms" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/sakari_sms", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sakari_sms/sakari_sms.app.mjs b/components/sakari_sms/sakari_sms.app.mjs new file mode 100644 index 0000000000000..dd75219e4166a --- /dev/null +++ b/components/sakari_sms/sakari_sms.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sakari_sms", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sales_simplify/.gitignore b/components/sales_simplify/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sales_simplify/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sales_simplify/app/sales_simplify.app.ts b/components/sales_simplify/app/sales_simplify.app.ts deleted file mode 100644 index 2a96e7186933a..0000000000000 --- a/components/sales_simplify/app/sales_simplify.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sales_simplify", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/sales_simplify/package.json b/components/sales_simplify/package.json index 69241a1053240..4762e019e78ee 100644 --- a/components/sales_simplify/package.json +++ b/components/sales_simplify/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/sales_simplify", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Sales Simplify Components", - "main": "dist/app/sales_simplify.app.mjs", + "main": "sales_simplify.app.mjs", "keywords": [ "pipedream", "sales_simplify" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/sales_simplify", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sales_simplify/sales_simplify.app.mjs b/components/sales_simplify/sales_simplify.app.mjs new file mode 100644 index 0000000000000..3a5dffd202356 --- /dev/null +++ b/components/sales_simplify/sales_simplify.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sales_simplify", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/salesblink/.gitignore b/components/salesblink/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/salesblink/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/salesblink/app/salesblink.app.ts b/components/salesblink/app/salesblink.app.ts deleted file mode 100644 index 5958148a108fe..0000000000000 --- a/components/salesblink/app/salesblink.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "salesblink", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/salesblink/package.json b/components/salesblink/package.json index d3218c4f1b0b2..a5d44de7a3714 100644 --- a/components/salesblink/package.json +++ b/components/salesblink/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/salesblink", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream SalesBlink Components", - "main": "dist/app/salesblink.app.mjs", + "main": "salesblink.app.mjs", "keywords": [ "pipedream", "salesblink" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/salesblink", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/salesblink/salesblink.app.mjs b/components/salesblink/salesblink.app.mjs new file mode 100644 index 0000000000000..134bb229abed1 --- /dev/null +++ b/components/salesblink/salesblink.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "salesblink", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/salesforce_rest_api/actions/add-contact-to-campaign/add-contact-to-campaign.mjs b/components/salesforce_rest_api/actions/add-contact-to-campaign/add-contact-to-campaign.mjs index e34e0fbf29b30..eb431dd0cde89 100644 --- a/components/salesforce_rest_api/actions/add-contact-to-campaign/add-contact-to-campaign.mjs +++ b/components/salesforce_rest_api/actions/add-contact-to-campaign/add-contact-to-campaign.mjs @@ -5,7 +5,7 @@ export default { key: "salesforce_rest_api-add-contact-to-campaign", name: "Add Contact to Campaign", description: "Adds an existing contact to an existing campaign. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_campaignmember.htm)", - version: "0.1.0", + version: "0.1.1", type: "action", props: { salesforce, diff --git a/components/salesforce_rest_api/actions/add-lead-to-campaign/add-lead-to-campaign.mjs b/components/salesforce_rest_api/actions/add-lead-to-campaign/add-lead-to-campaign.mjs index ac4dc7fe5aa01..2f42ded41ac10 100644 --- a/components/salesforce_rest_api/actions/add-lead-to-campaign/add-lead-to-campaign.mjs +++ b/components/salesforce_rest_api/actions/add-lead-to-campaign/add-lead-to-campaign.mjs @@ -5,7 +5,7 @@ export default { key: "salesforce_rest_api-add-lead-to-campaign", name: "Add Lead to Campaign", description: "Adds an existing lead to an existing campaign. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_campaignmember.htm)", - version: "0.1.0", + version: "0.1.1", type: "action", props: { salesforce, diff --git a/components/salesforce_rest_api/actions/common/batch-operation.mjs b/components/salesforce_rest_api/actions/common/batch-operation.mjs new file mode 100644 index 0000000000000..6137b735280bb --- /dev/null +++ b/components/salesforce_rest_api/actions/common/batch-operation.mjs @@ -0,0 +1,86 @@ +import { + ConfigurationError, + getFileStream, +} from "@pipedream/platform"; +import app from "../../salesforce_rest_api.app.mjs"; + +export default { + props: { + app, + csvFilePath: { + type: "string", + label: "CSV File Path Or URL", + description: "The path to the CSV file to process. Provide a path to a file in the `/tmp` directory (for example, `/tmp/data.csv`). If a URL is provided, the file will be downloaded to the `/tmp` directory. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_prepare_data.htm)", + }, + syncDir: { + type: "dir", + accessMode: "read", + sync: true, + }, + }, + methods: { + getObject() { + throw new ConfigurationError("getObject method not implemented"); + }, + getOperation() { + throw new ConfigurationError("getOperation method not implemented"); + }, + getSummary() { + throw new ConfigurationError("getSummary method not implemented"); + }, + async processBulkOperation({ + object, operation, csvData, externalIdFieldName, ...args + } = {}) { + const { app } = this; + const job = await app.createBulkJob({ + ...args, + data: { + object, + operation, + externalIdFieldName, + }, + }); + + await app.uploadBulkJobData({ + ...args, + jobId: job.id, + data: csvData, + }); + + await app.patchBulkJob({ + ...args, + jobId: job.id, + data: { + state: "UploadComplete", + }, + }); + + return app.getBulkJobInfo({ + ...args, + jobId: job.id, + }); + }, + }, + async run({ $ }) { + const { + processBulkOperation, + getObject, + getOperation, + getSummary, + csvFilePath, + } = this; + + const csvData = await getFileStream(csvFilePath); + + const result = await processBulkOperation({ + $, + object: getObject(), + operation: getOperation(), + csvData, + }); + + $.export("$summary", getSummary()); + + return result; + }, +}; diff --git a/components/salesforce_rest_api/actions/convert-soap-xml-to-json/convert-soap-xml-to-json.mjs b/components/salesforce_rest_api/actions/convert-soap-xml-to-json/convert-soap-xml-to-json.mjs index 076f0e9979af2..dd055c94e5941 100644 --- a/components/salesforce_rest_api/actions/convert-soap-xml-to-json/convert-soap-xml-to-json.mjs +++ b/components/salesforce_rest_api/actions/convert-soap-xml-to-json/convert-soap-xml-to-json.mjs @@ -5,7 +5,7 @@ export default { key: "salesforce_rest_api-convert-soap-xml-to-json", name: "Convert SOAP XML Object to JSON", description: "Converts a SOAP XML Object received from Salesforce to JSON", - version: "0.0.6", + version: "0.0.7", type: "action", props: { salesforce_rest_api, diff --git a/components/salesforce_rest_api/actions/create-account/create-account.mjs b/components/salesforce_rest_api/actions/create-account/create-account.mjs index 8ecf098b909bf..1de141e4bff85 100644 --- a/components/salesforce_rest_api/actions/create-account/create-account.mjs +++ b/components/salesforce_rest_api/actions/create-account/create-account.mjs @@ -8,7 +8,7 @@ export default { key: "salesforce_rest_api-create-account", name: "Create Account", description: `Creates a Salesforce account. [See the documentation](${docsLink})`, - version: "0.3.1", + version: "0.3.2", type: "action", methods: { ...common.methods, diff --git a/components/salesforce_rest_api/actions/create-accounts-batch/create-accounts-batch.mjs b/components/salesforce_rest_api/actions/create-accounts-batch/create-accounts-batch.mjs new file mode 100644 index 0000000000000..4dbcd3030616e --- /dev/null +++ b/components/salesforce_rest_api/actions/create-accounts-batch/create-accounts-batch.mjs @@ -0,0 +1,22 @@ +import common from "../common/batch-operation.mjs"; + +export default { + ...common, + key: "salesforce_rest_api-create-accounts-batch", + name: "Create Accounts (Batch)", + description: "Create multiple Accounts in Salesforce using Bulk API 2.0. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_understanding_bulk2_ingest.htm)", + version: "0.0.1", + type: "action", + methods: { + ...common.methods, + getObject() { + return "Account"; + }, + getOperation() { + return "insert"; + }, + getSummary() { + return "Successfully created Accounts"; + }, + }, +}; diff --git a/components/salesforce_rest_api/actions/create-attachment/create-attachment.mjs b/components/salesforce_rest_api/actions/create-attachment/create-attachment.mjs index 6b1cbc86665bc..6171a359d6dcd 100644 --- a/components/salesforce_rest_api/actions/create-attachment/create-attachment.mjs +++ b/components/salesforce_rest_api/actions/create-attachment/create-attachment.mjs @@ -18,7 +18,7 @@ export default { key: "salesforce_rest_api-create-attachment", name: "Create Attachment", description: `Creates an Attachment on a parent object. [See the documentation](${docsLink})`, - version: "0.5.1", + version: "0.5.2", type: "action", props, async run({ $ }) { diff --git a/components/salesforce_rest_api/actions/create-campaign/create-campaign.mjs b/components/salesforce_rest_api/actions/create-campaign/create-campaign.mjs index e30835c78ca0b..762db4999ed0a 100644 --- a/components/salesforce_rest_api/actions/create-campaign/create-campaign.mjs +++ b/components/salesforce_rest_api/actions/create-campaign/create-campaign.mjs @@ -8,7 +8,7 @@ export default { key: "salesforce_rest_api-create-campaign", name: "Create Campaign", description: `Creates a marketing campaign. [See the documentation](${docsLink})`, - version: "0.3.1", + version: "0.3.2", type: "action", methods: { ...common.methods, diff --git a/components/salesforce_rest_api/actions/create-case/create-case.mjs b/components/salesforce_rest_api/actions/create-case/create-case.mjs index e44943c686121..f03bc510a2b27 100644 --- a/components/salesforce_rest_api/actions/create-case/create-case.mjs +++ b/components/salesforce_rest_api/actions/create-case/create-case.mjs @@ -8,7 +8,7 @@ export default { key: "salesforce_rest_api-create-case", name: "Create Case", description: `Creates a Case, which represents a customer issue or problem. [See the documentation](${docsLink})`, - version: "0.3.1", + version: "0.3.2", type: "action", methods: { ...common.methods, diff --git a/components/salesforce_rest_api/actions/create-casecomment/create-casecomment.mjs b/components/salesforce_rest_api/actions/create-casecomment/create-casecomment.mjs index 575113c430eac..7216f2cc0d258 100644 --- a/components/salesforce_rest_api/actions/create-casecomment/create-casecomment.mjs +++ b/components/salesforce_rest_api/actions/create-casecomment/create-casecomment.mjs @@ -17,7 +17,7 @@ export default { key: "salesforce_rest_api-create-casecomment", name: "Create Case Comment", description: `Creates a Case Comment on a selected Case. [See the documentation](${docsLink})`, - version: "0.3.1", + version: "0.3.2", type: "action", props, async run({ $ }) { diff --git a/components/salesforce_rest_api/actions/create-contact/create-contact.mjs b/components/salesforce_rest_api/actions/create-contact/create-contact.mjs index 1e90e785aa6bb..9d0b612d65fc9 100644 --- a/components/salesforce_rest_api/actions/create-contact/create-contact.mjs +++ b/components/salesforce_rest_api/actions/create-contact/create-contact.mjs @@ -8,7 +8,7 @@ export default { key: "salesforce_rest_api-create-contact", name: "Create Contact", description: `Creates a contact. [See the documentation](${docsLink})`, - version: "0.3.1", + version: "0.3.2", type: "action", methods: { ...common.methods, diff --git a/components/salesforce_rest_api/actions/create-content-note/create-content-note.mjs b/components/salesforce_rest_api/actions/create-content-note/create-content-note.mjs index ced5bf4476291..3b6aaf644b587 100644 --- a/components/salesforce_rest_api/actions/create-content-note/create-content-note.mjs +++ b/components/salesforce_rest_api/actions/create-content-note/create-content-note.mjs @@ -27,7 +27,7 @@ export default { key: "salesforce_rest_api-create-content-note", name: "Create Content Note", description: `Creates a content note. [See the documentation](${docsLink}) and [Set Up Notes](https://help.salesforce.com/s/articleView?id=sales.notes_admin_setup.htm&type=5).`, - version: "0.0.1", + version: "0.0.2", type: "action", props: { ...contentNoteProps, diff --git a/components/salesforce_rest_api/actions/create-event/create-event.mjs b/components/salesforce_rest_api/actions/create-event/create-event.mjs index b427102b2ccd8..deb4ba6db72ad 100644 --- a/components/salesforce_rest_api/actions/create-event/create-event.mjs +++ b/components/salesforce_rest_api/actions/create-event/create-event.mjs @@ -9,7 +9,7 @@ export default { key: "salesforce_rest_api-create-event", name: "Create Event", description: `Creates an event. [See the documentation](${docsLink})`, - version: "0.3.1", + version: "0.3.2", type: "action", methods: { ...common.methods, diff --git a/components/salesforce_rest_api/actions/create-lead/create-lead.mjs b/components/salesforce_rest_api/actions/create-lead/create-lead.mjs index e440b44863bd0..5a519c9737ad0 100644 --- a/components/salesforce_rest_api/actions/create-lead/create-lead.mjs +++ b/components/salesforce_rest_api/actions/create-lead/create-lead.mjs @@ -8,7 +8,7 @@ export default { key: "salesforce_rest_api-create-lead", name: "Create Lead", description: `Creates a lead. [See the documentation](${docsLink})`, - version: "0.3.1", + version: "0.3.2", type: "action", methods: { ...common.methods, diff --git a/components/salesforce_rest_api/actions/create-note/create-note.mjs b/components/salesforce_rest_api/actions/create-note/create-note.mjs index b001e2dedfca9..e8d3ee87a5478 100644 --- a/components/salesforce_rest_api/actions/create-note/create-note.mjs +++ b/components/salesforce_rest_api/actions/create-note/create-note.mjs @@ -17,7 +17,7 @@ export default { key: "salesforce_rest_api-create-note", name: "Create Note", description: `Creates a note. [See the documentation](${docsLink})`, - version: "0.3.1", + version: "0.3.2", type: "action", props, async run({ $ }) { diff --git a/components/salesforce_rest_api/actions/create-opportunities-batch/create-opportunities-batch.mjs b/components/salesforce_rest_api/actions/create-opportunities-batch/create-opportunities-batch.mjs new file mode 100644 index 0000000000000..4a9e268d563fd --- /dev/null +++ b/components/salesforce_rest_api/actions/create-opportunities-batch/create-opportunities-batch.mjs @@ -0,0 +1,22 @@ +import common from "../common/batch-operation.mjs"; + +export default { + ...common, + key: "salesforce_rest_api-create-opportunities-batch", + name: "Create Opportunities (Batch)", + description: "Create multiple Opportunities in Salesforce using Bulk API 2.0. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_understanding_bulk2_ingest.htm)", + version: "0.0.1", + type: "action", + methods: { + ...common.methods, + getObject() { + return "Opportunity"; + }, + getOperation() { + return "insert"; + }, + getSummary() { + return "Successfully created Opportunities"; + }, + }, +}; diff --git a/components/salesforce_rest_api/actions/create-opportunity/create-opportunity.mjs b/components/salesforce_rest_api/actions/create-opportunity/create-opportunity.mjs index 933047d33df0a..a62ca17115225 100644 --- a/components/salesforce_rest_api/actions/create-opportunity/create-opportunity.mjs +++ b/components/salesforce_rest_api/actions/create-opportunity/create-opportunity.mjs @@ -8,7 +8,7 @@ export default { key: "salesforce_rest_api-create-opportunity", name: "Create Opportunity", description: `Creates an opportunity. [See the documentation](${docsLink})`, - version: "0.3.1", + version: "0.3.2", type: "action", methods: { ...common.methods, diff --git a/components/salesforce_rest_api/actions/create-record/create-record.mjs b/components/salesforce_rest_api/actions/create-record/create-record.mjs index 28a72030a31cd..5ee91e3e690ec 100644 --- a/components/salesforce_rest_api/actions/create-record/create-record.mjs +++ b/components/salesforce_rest_api/actions/create-record/create-record.mjs @@ -8,7 +8,7 @@ export default { key: "salesforce_rest_api-create-record", name: "Create Record", description: "Create a record of a given object. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_create.htm)", - version: "0.3.1", + version: "0.3.2", type: "action", props: { salesforce, diff --git a/components/salesforce_rest_api/actions/create-task/create-task.mjs b/components/salesforce_rest_api/actions/create-task/create-task.mjs index d4ebb4703c606..c35b9811364e1 100644 --- a/components/salesforce_rest_api/actions/create-task/create-task.mjs +++ b/components/salesforce_rest_api/actions/create-task/create-task.mjs @@ -9,7 +9,7 @@ export default { key: "salesforce_rest_api-create-task", name: "Create Task", description: `Creates a task. [See the documentation](${docsLink})`, - version: "0.4.1", + version: "0.4.2", type: "action", methods: { ...common.methods, diff --git a/components/salesforce_rest_api/actions/create-user/create-user.mjs b/components/salesforce_rest_api/actions/create-user/create-user.mjs index a41f116115a1b..9c8633ef8f92f 100644 --- a/components/salesforce_rest_api/actions/create-user/create-user.mjs +++ b/components/salesforce_rest_api/actions/create-user/create-user.mjs @@ -9,7 +9,7 @@ export default { key: "salesforce_rest_api-create-user", name: "Create User", description: `Creates a Salesforce user. [See the documentation](${docsLink})`, - version: "0.1.1", + version: "0.1.2", type: "action", methods: { ...common.methods, diff --git a/components/salesforce_rest_api/actions/delete-opportunity/delete-opportunity.mjs b/components/salesforce_rest_api/actions/delete-opportunity/delete-opportunity.mjs index 8d7ccec6c201e..fb70087f1bd02 100644 --- a/components/salesforce_rest_api/actions/delete-opportunity/delete-opportunity.mjs +++ b/components/salesforce_rest_api/actions/delete-opportunity/delete-opportunity.mjs @@ -4,7 +4,7 @@ export default { key: "salesforce_rest_api-delete-opportunity", name: "Delete Opportunity", description: "Deletes an opportunity. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_delete_record.htm)", - version: "0.3.0", + version: "0.3.1", type: "action", props: { salesforce, diff --git a/components/salesforce_rest_api/actions/delete-record/delete-record.mjs b/components/salesforce_rest_api/actions/delete-record/delete-record.mjs index 4ea946d854315..478dbc623f706 100644 --- a/components/salesforce_rest_api/actions/delete-record/delete-record.mjs +++ b/components/salesforce_rest_api/actions/delete-record/delete-record.mjs @@ -5,7 +5,7 @@ export default { name: "Delete Record", description: "Deletes an existing record in an object. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_sobject_retrieve_delete.htm)", - version: "0.2.0", + version: "0.2.1", type: "action", props: { salesforce, diff --git a/components/salesforce_rest_api/actions/find-records/find-records.mjs b/components/salesforce_rest_api/actions/find-records/find-records.mjs index 813f662dc9e65..65f83198ae6af 100644 --- a/components/salesforce_rest_api/actions/find-records/find-records.mjs +++ b/components/salesforce_rest_api/actions/find-records/find-records.mjs @@ -5,7 +5,7 @@ export default { name: "Find Records", description: "Retrieves selected fields for some or all records of a selected object. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_field_values.htm)", - version: "0.2.0", + version: "0.2.1", type: "action", props: { salesforce, diff --git a/components/salesforce_rest_api/actions/get-case/get-case.mjs b/components/salesforce_rest_api/actions/get-case/get-case.mjs new file mode 100644 index 0000000000000..04db7cca5d3af --- /dev/null +++ b/components/salesforce_rest_api/actions/get-case/get-case.mjs @@ -0,0 +1,36 @@ +import salesforce from "../../salesforce_rest_api.app.mjs"; + +export default { + key: "salesforce_rest_api-get-case", + name: "Get Case", + description: "Retrieves a case by its ID. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_field_values.htm)", + version: "0.0.2", + type: "action", + props: { + salesforce, + caseId: { + propDefinition: [ + salesforce, + "recordId", + () => ({ + objType: "Case", + }), + ], + label: "Case ID", + description: "The case ID to retrieve", + }, + }, + async run({ $ }) { + const fields = (await this.salesforce.getFieldsForObjectType("Case")).map(({ name }) => name); + + let query = `SELECT ${fields.join(", ")} FROM Case WHERE Id = '${this.caseId}'`; + + const { records } = await this.salesforce.query({ + $, + query, + }); + + $.export("$summary", `Successfully retrieved case with ID ${this.caseId}`); + return records[0]; + }, +}; diff --git a/components/salesforce_rest_api/actions/get-user/get-user.mjs b/components/salesforce_rest_api/actions/get-user/get-user.mjs new file mode 100644 index 0000000000000..5023a0c74a328 --- /dev/null +++ b/components/salesforce_rest_api/actions/get-user/get-user.mjs @@ -0,0 +1,34 @@ +import salesforce from "../../salesforce_rest_api.app.mjs"; + +export default { + key: "salesforce_rest_api-get-user", + name: "Get User", + description: "Retrieves a user by their ID. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_field_values.htm)", + version: "0.0.2", + type: "action", + props: { + salesforce, + userId: { + propDefinition: [ + salesforce, + "recordId", + () => ({ + objType: "User", + }), + ], + }, + }, + async run({ $ }) { + const fields = (await this.salesforce.getFieldsForObjectType("User")).map(({ name }) => name); + + let query = `SELECT ${fields.join(", ")} FROM User WHERE Id = '${this.userId}'`; + + const { records } = await this.salesforce.query({ + $, + query, + }); + + $.export("$summary", `Sucessfully retrieved user with ID ${this.userId}`); + return records[0]; + }, +}; diff --git a/components/salesforce_rest_api/actions/insert-blob-data/insert-blob-data.mjs b/components/salesforce_rest_api/actions/insert-blob-data/insert-blob-data.mjs index ab9050fae8a14..6d65b9a252c08 100644 --- a/components/salesforce_rest_api/actions/insert-blob-data/insert-blob-data.mjs +++ b/components/salesforce_rest_api/actions/insert-blob-data/insert-blob-data.mjs @@ -4,7 +4,7 @@ export default { key: "salesforce_rest_api-insert-blob-data", name: "Insert Blob Data", description: "Inserts blob data in Salesforce standard objects. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm)", - version: "0.2.8", + version: "0.2.9", type: "action", props: { salesforce, diff --git a/components/salesforce_rest_api/actions/list-case-comments/list-case-comments.mjs b/components/salesforce_rest_api/actions/list-case-comments/list-case-comments.mjs new file mode 100644 index 0000000000000..52f85023e3244 --- /dev/null +++ b/components/salesforce_rest_api/actions/list-case-comments/list-case-comments.mjs @@ -0,0 +1,32 @@ +import salesforce from "../../salesforce_rest_api.app.mjs"; + +export default { + key: "salesforce_rest_api-list-case-comments", + name: "List Case Comments", + description: "Lists all comments for a case. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_field_values.htm)", + version: "0.0.2", + type: "action", + props: { + salesforce, + caseId: { + propDefinition: [ + salesforce, + "recordId", + () => ({ + objType: "Case", + }), + ], + }, + }, + async run({ $ }) { + const fields = (await this.salesforce.getFieldsForObjectType("CaseComment")).map(({ name }) => name); + let query = `SELECT ${fields.join(", ")} FROM CaseComment WHERE ParentId = '${this.caseId}'`; + + const { records } = await this.salesforce.query({ + $, + query, + }); + $.export("$summary", `Sucessfully retrieved ${records.length} comments for case with ID ${this.caseId}`); + return records; + }, +}; diff --git a/components/salesforce_rest_api/actions/list-email-messages/list-email-messages.mjs b/components/salesforce_rest_api/actions/list-email-messages/list-email-messages.mjs new file mode 100644 index 0000000000000..1a97e399aab67 --- /dev/null +++ b/components/salesforce_rest_api/actions/list-email-messages/list-email-messages.mjs @@ -0,0 +1,38 @@ +import salesforce from "../../salesforce_rest_api.app.mjs"; + +export default { + key: "salesforce_rest_api-list-email-messages", + name: "List Email Messages", + description: "Lists all email messages for a case. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_field_values.htm)", + version: "0.0.2", + type: "action", + props: { + salesforce, + caseId: { + propDefinition: [ + salesforce, + "recordId", + () => ({ + objType: "Case", + }), + ], + label: "Case ID", + description: "The ID of the case to retrieve email messages for", + optional: true, + }, + }, + async run({ $ }) { + const fields = (await this.salesforce.getFieldsForObjectType("EmailMessage")).map(({ name }) => name); + let query = `SELECT ${fields.join(", ")} FROM EmailMessage`; + if (this.caseId) { + query += ` WHERE RelatedToId = '${this.caseId}'`; + } + + const { records } = await this.salesforce.query({ + $, + query, + }); + $.export("$summary", `Sucessfully retrieved ${records.length} email messages for case with ID ${this.caseId}`); + return records; + }, +}; diff --git a/components/salesforce_rest_api/actions/list-email-templates/list-email-templates.mjs b/components/salesforce_rest_api/actions/list-email-templates/list-email-templates.mjs new file mode 100644 index 0000000000000..3b11e44226aa0 --- /dev/null +++ b/components/salesforce_rest_api/actions/list-email-templates/list-email-templates.mjs @@ -0,0 +1,23 @@ +import salesforce from "../../salesforce_rest_api.app.mjs"; + +export default { + key: "salesforce_rest_api-list-email-templates", + name: "List Email Templates", + description: "Lists all email templates. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_emailtemplate.htm)", + version: "0.0.2", + type: "action", + props: { + salesforce, + }, + async run({ $ }) { + const fields = (await this.salesforce.getFieldsForObjectType("EmailTemplate")).map(({ name }) => name); + const query = `SELECT ${fields.join(", ")} FROM EmailTemplate`; + + const { records } = await this.salesforce.query({ + $, + query, + }); + $.export("$summary", `Sucessfully retrieved ${records.length} email templates`); + return records; + }, +}; diff --git a/components/salesforce_rest_api/actions/list-knowledge-articles/list-knowledge-articles.mjs b/components/salesforce_rest_api/actions/list-knowledge-articles/list-knowledge-articles.mjs new file mode 100644 index 0000000000000..9c911349583d7 --- /dev/null +++ b/components/salesforce_rest_api/actions/list-knowledge-articles/list-knowledge-articles.mjs @@ -0,0 +1,23 @@ +import salesforce from "../../salesforce_rest_api.app.mjs"; + +export default { + key: "salesforce_rest_api-list-knowledge-articles", + name: "List Knowledge Articles", + description: "Lists all knowledge articles. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticle.htm)", + version: "0.0.2", + type: "action", + props: { + salesforce, + }, + async run({ $ }) { + const fields = (await this.salesforce.getFieldsForObjectType("KnowledgeArticle")).map(({ name }) => name); + const query = `SELECT ${fields.join(", ")} FROM KnowledgeArticle`; + + const { records } = await this.salesforce.query({ + $, + query, + }); + $.export("$summary", `Sucessfully retrieved ${records.length} knowledge articles`); + return records; + }, +}; diff --git a/components/salesforce_rest_api/actions/post-feed-to-chatter/post-feed-to-chatter.mjs b/components/salesforce_rest_api/actions/post-feed-to-chatter/post-feed-to-chatter.mjs index 99a221ffddba5..675781c28ad9c 100644 --- a/components/salesforce_rest_api/actions/post-feed-to-chatter/post-feed-to-chatter.mjs +++ b/components/salesforce_rest_api/actions/post-feed-to-chatter/post-feed-to-chatter.mjs @@ -5,7 +5,7 @@ export default { name: "Post a Message to Chatter Feed", description: "Post a feed item in Chatter. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/quickreference_post_feed_item.htm)", - version: "0.1.0", + version: "0.1.1", type: "action", props: { salesforce, diff --git a/components/salesforce_rest_api/actions/search-string/search-string.mjs b/components/salesforce_rest_api/actions/search-string/search-string.mjs index a04a990e92c42..8ba85afe5819f 100644 --- a/components/salesforce_rest_api/actions/search-string/search-string.mjs +++ b/components/salesforce_rest_api/actions/search-string/search-string.mjs @@ -5,7 +5,7 @@ export default { name: "Search Object Records", description: "Searches for records in an object using a parameterized search. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_search_parameterized_get.htm)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { salesforce, diff --git a/components/salesforce_rest_api/actions/send-email/send-email.mjs b/components/salesforce_rest_api/actions/send-email/send-email.mjs new file mode 100644 index 0000000000000..e987897d9c042 --- /dev/null +++ b/components/salesforce_rest_api/actions/send-email/send-email.mjs @@ -0,0 +1,60 @@ +import salesforce from "../../salesforce_rest_api.app.mjs"; + +export default { + key: "salesforce_rest_api-send-email", + name: "Send Email", + description: "Sends an email. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_action.meta/api_action/actions_obj_email_simple.htm)", + version: "0.0.2", + type: "action", + props: { + salesforce, + emailAddress: { + type: "string", + label: "Email Address", + description: "The email address to send the email to", + }, + emailSubject: { + type: "string", + label: "Subject", + description: "The subject of the email", + }, + emailBody: { + type: "string", + label: "Body", + description: "The body of the email", + }, + logEmailOnSend: { + type: "boolean", + label: "Log Email on Send", + description: "Indicates whether to log the email on the specified recordsโ€™ activity time lines", + optional: true, + }, + }, + methods: { + sendEmail(opts = {}) { + return this.salesforce._makeRequest({ + url: `${this.salesforce._baseApiVersionUrl()}/actions/standard/emailSimple`, + method: "POST", + ...opts, + }); + }, + }, + async run({ $ }) { + const response = await this.sendEmail({ + $, + data: { + inputs: [ + { + emailAddresses: this.emailAddress, + emailSubject: this.emailSubject, + emailBody: this.emailBody, + senderType: "CurrentUser", + logEmailOnSend: this.logEmailOnSend, + }, + ], + }, + }); + $.export("$summary", `Email sent to ${this.emailAddress}`); + return response; + }, +}; diff --git a/components/salesforce_rest_api/actions/soql-search/soql-search.mjs b/components/salesforce_rest_api/actions/soql-search/soql-search.mjs index 5d9297b9e6c70..521d206860c25 100644 --- a/components/salesforce_rest_api/actions/soql-search/soql-search.mjs +++ b/components/salesforce_rest_api/actions/soql-search/soql-search.mjs @@ -7,7 +7,7 @@ export default { key: "salesforce_rest_api-soql-search", name: "SOQL Query (Object Query)", description: `Executes a [Salesforce Object Query Language (SOQL)](${docsLink}) query-based, SQL-like search.`, - version: "0.2.9", + version: "0.2.10", type: "action", props: { salesforce, diff --git a/components/salesforce_rest_api/actions/sosl-search/sosl-search.mjs b/components/salesforce_rest_api/actions/sosl-search/sosl-search.mjs index 5ae3f484c16f0..6253ebafed995 100644 --- a/components/salesforce_rest_api/actions/sosl-search/sosl-search.mjs +++ b/components/salesforce_rest_api/actions/sosl-search/sosl-search.mjs @@ -12,7 +12,7 @@ export default { key: "salesforce_rest_api-sosl-search", name: "SOSL Search (Object Search)", description: `Executes a [Salesforce Object Search Language (SOSL)](${docsLink}) text-based search query.`, - version: "0.2.8", + version: "0.2.9", type: "action", props: { salesforce, diff --git a/components/salesforce_rest_api/actions/update-account/update-account.mjs b/components/salesforce_rest_api/actions/update-account/update-account.mjs index 4868eb90c6c03..e7f6433124997 100644 --- a/components/salesforce_rest_api/actions/update-account/update-account.mjs +++ b/components/salesforce_rest_api/actions/update-account/update-account.mjs @@ -15,7 +15,7 @@ export default { key: "salesforce_rest_api-update-account", name: "Update Account", description: `Updates a Salesforce account. [See the documentation](${docsLink})`, - version: "0.3.1", + version: "0.3.2", type: "action", methods: { ...common.methods, diff --git a/components/salesforce_rest_api/actions/update-accounts-batch/update-accounts-batch.mjs b/components/salesforce_rest_api/actions/update-accounts-batch/update-accounts-batch.mjs new file mode 100644 index 0000000000000..75620d6136701 --- /dev/null +++ b/components/salesforce_rest_api/actions/update-accounts-batch/update-accounts-batch.mjs @@ -0,0 +1,22 @@ +import common from "../common/batch-operation.mjs"; + +export default { + ...common, + key: "salesforce_rest_api-update-accounts-batch", + name: "Update Accounts (Batch)", + description: "Update multiple Accounts in Salesforce using Bulk API 2.0. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_understanding_bulk2_ingest.htm)", + version: "0.0.1", + type: "action", + methods: { + ...common.methods, + getObject() { + return "Account"; + }, + getOperation() { + return "update"; + }, + getSummary() { + return "Successfully updated Accounts"; + }, + }, +}; diff --git a/components/salesforce_rest_api/actions/update-contact/update-contact.mjs b/components/salesforce_rest_api/actions/update-contact/update-contact.mjs index 36f63b47f7392..beb843a540aee 100644 --- a/components/salesforce_rest_api/actions/update-contact/update-contact.mjs +++ b/components/salesforce_rest_api/actions/update-contact/update-contact.mjs @@ -16,7 +16,7 @@ export default { key: "salesforce_rest_api-update-contact", name: "Update Contact", description: `Updates a contact. [See the documentation](${docsLink})`, - version: "0.3.1", + version: "0.3.2", type: "action", methods: { ...common.methods, diff --git a/components/salesforce_rest_api/actions/update-email-template/update-email-template.mjs b/components/salesforce_rest_api/actions/update-email-template/update-email-template.mjs new file mode 100644 index 0000000000000..1d9d512b1671c --- /dev/null +++ b/components/salesforce_rest_api/actions/update-email-template/update-email-template.mjs @@ -0,0 +1,81 @@ +import { + convertFieldsToProps, getAdditionalFields, +} from "../../common/props-utils.mjs"; +import salesforce from "../../salesforce_rest_api.app.mjs"; +import { additionalFields } from "../common/base-create-update.mjs"; + +export default { + key: "salesforce_rest_api-update-email-template", + name: "Update Email Template", + description: "Updates an email template. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_update_fields.htm)", + version: "0.0.2", + type: "action", + props: { + salesforce, + recordId: { + propDefinition: [ + salesforce, + "recordId", + () => ({ + objType: "EmailTemplate", + }), + ], + description: "The email template to update.", + }, + fieldsToUpdate: { + propDefinition: [ + salesforce, + "fieldsToUpdate", + () => ({ + objType: "EmailTemplate", + }), + ], + reloadProps: true, + }, + }, + methods: { + getAdditionalFields, + convertFieldsToProps, + }, + async additionalProps() { + const { fieldsToUpdate } = this; + const fields = await this.salesforce.getFieldsForObjectType("EmailTemplate"); + + const selectedFields = fields.filter(({ name }) => fieldsToUpdate.includes(name)); + const selectedFieldProps = this.convertFieldsToProps(selectedFields); + + return { + docsInfo: { + type: "alert", + alertType: "info", + content: "[See the documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_emailtemplate.htm) for information on all available fields.", + }, + ...selectedFieldProps, + additionalFields, + }; + }, + async run({ $ }) { + /* eslint-disable no-unused-vars */ + const { + salesforce, + recordId, + fieldsToUpdate, + getAdditionalFields: getData, + convertFieldsToProps, + docsInfo, + additionalFields, + ...data + } = this; + /* eslint-enable no-unused-vars */ + const response = await this.salesforce.updateRecord("EmailTemplate", { + $, + id: recordId, + data: { + ...data, + ...getData(), + }, + }); + $.export("$summary", `Successfully updated Email Template record (ID: ${recordId})`); + return response; + }, +}; diff --git a/components/salesforce_rest_api/actions/update-opportunities-batch/update-opportunities-batch.mjs b/components/salesforce_rest_api/actions/update-opportunities-batch/update-opportunities-batch.mjs new file mode 100644 index 0000000000000..b0bcd509e61ad --- /dev/null +++ b/components/salesforce_rest_api/actions/update-opportunities-batch/update-opportunities-batch.mjs @@ -0,0 +1,22 @@ +import common from "../common/batch-operation.mjs"; + +export default { + ...common, + key: "salesforce_rest_api-update-opportunities-batch", + name: "Update Opportunities (Batch)", + description: "Update multiple Opportunities in Salesforce using Bulk API 2.0. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_understanding_bulk2_ingest.htm)", + version: "0.0.1", + type: "action", + methods: { + ...common.methods, + getObject() { + return "Opportunity"; + }, + getOperation() { + return "update"; + }, + getSummary() { + return "Successfully updated Opportunities"; + }, + }, +}; diff --git a/components/salesforce_rest_api/actions/update-opportunity/update-opportunity.mjs b/components/salesforce_rest_api/actions/update-opportunity/update-opportunity.mjs index 46e6ff90b1dff..1c8d5d36ba16a 100644 --- a/components/salesforce_rest_api/actions/update-opportunity/update-opportunity.mjs +++ b/components/salesforce_rest_api/actions/update-opportunity/update-opportunity.mjs @@ -16,7 +16,7 @@ export default { key: "salesforce_rest_api-update-opportunity", name: "Update Opportunity", description: `Updates an opportunity. [See the documentation](${docsLink})`, - version: "0.3.1", + version: "0.3.2", type: "action", methods: { ...common.methods, diff --git a/components/salesforce_rest_api/actions/update-record/update-record.mjs b/components/salesforce_rest_api/actions/update-record/update-record.mjs index 5d175f183a360..f1e2e2fb5b3e5 100644 --- a/components/salesforce_rest_api/actions/update-record/update-record.mjs +++ b/components/salesforce_rest_api/actions/update-record/update-record.mjs @@ -8,7 +8,7 @@ export default { key: "salesforce_rest_api-update-record", name: "Update Record", description: "Update fields of a record. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_update_fields.htm)", - version: "0.3.1", + version: "0.3.2", type: "action", props: { salesforce, diff --git a/components/salesforce_rest_api/actions/upsert-record/upsert-record.mjs b/components/salesforce_rest_api/actions/upsert-record/upsert-record.mjs index a95b4321c4a72..93cb61d868468 100644 --- a/components/salesforce_rest_api/actions/upsert-record/upsert-record.mjs +++ b/components/salesforce_rest_api/actions/upsert-record/upsert-record.mjs @@ -8,7 +8,7 @@ export default { key: "salesforce_rest_api-upsert-record", name: "Upsert Record", description: "Create or update a record of a given object. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_upsert.htm)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { salesforce, diff --git a/components/salesforce_rest_api/package.json b/components/salesforce_rest_api/package.json index 72086b4a1c7d9..cc20c610f0907 100644 --- a/components/salesforce_rest_api/package.json +++ b/components/salesforce_rest_api/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/salesforce_rest_api", - "version": "1.6.1", + "version": "1.8.0", "description": "Pipedream Salesforce (REST API) Components", "main": "salesforce_rest_api.app.mjs", "keywords": [ diff --git a/components/salesforce_rest_api/salesforce_rest_api.app.mjs b/components/salesforce_rest_api/salesforce_rest_api.app.mjs index cdf27c39ea0fc..7df2e24deafd8 100644 --- a/components/salesforce_rest_api/salesforce_rest_api.app.mjs +++ b/components/salesforce_rest_api/salesforce_rest_api.app.mjs @@ -366,5 +366,48 @@ export default { ...args, }); }, + createBulkJob(args = {}) { + return this._makeRequest({ + ...args, + method: "POST", + url: `${this._baseApiVersionUrl()}/jobs/ingest`, + data: { + contentType: "CSV", + columnDelimiter: "COMMA", + lineEnding: "LF", + ...args?.data, + }, + }); + }, + uploadBulkJobData({ + jobId, ...args + } = {}) { + return this._makeRequest({ + ...args, + method: "PUT", + url: `${this._baseApiVersionUrl()}/jobs/ingest/${jobId}/batches`, + headers: { + ...this._makeRequestHeaders(), + "Content-Type": "text/csv", + }, + }); + }, + patchBulkJob({ + jobId, ...args + } = {}) { + return this._makeRequest({ + ...args, + method: "PATCH", + url: `${this._baseApiVersionUrl()}/jobs/ingest/${jobId}`, + }); + }, + getBulkJobInfo({ + jobId, ...args + } = {}) { + return this._makeRequest({ + ...args, + url: `${this._baseApiVersionUrl()}/jobs/ingest/${jobId}`, + }); + }, }, }; diff --git a/components/salesforce_rest_api/sources/case-updated-instant/case-updated-instant.mjs b/components/salesforce_rest_api/sources/case-updated-instant/case-updated-instant.mjs new file mode 100644 index 0000000000000..dfd2f762c3f2d --- /dev/null +++ b/components/salesforce_rest_api/sources/case-updated-instant/case-updated-instant.mjs @@ -0,0 +1,43 @@ +import common from "../common/common-updated-record.mjs"; +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; + +export default { + ...common, + type: "source", + name: "Case Updated (Instant, of Selectable Type)", + key: "salesforce_rest_api-case-updated-instant", + description: "Emit new event when a case is updated. [See the documentation](https://sforce.co/3yPSJZy)", + version: "0.0.2", + props: { + salesforce: common.props.salesforce, + db: "$.service.db", + http: { + type: "$.interface.http", + customResponse: true, + }, + timer: { + type: "$.interface.timer", + description: "The timer is only used as a fallback if instant event delivery (webhook) is not available.", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + fieldsToObtain: { + propDefinition: [ + common.props.salesforce, + "fieldsToObtain", + () => ({ + objType: "Case", + }), + ], + optional: true, + description: "Select the field(s) to be retrieved for the records. Only applicable if the source is running on a timer. If running on a webhook, or if not specified, all fields will be retrieved.", + }, + }, + methods: { + ...common.methods, + getObjectType() { + return "Case"; + }, + }, +}; diff --git a/components/salesforce_rest_api/sources/common.mjs b/components/salesforce_rest_api/sources/common.mjs deleted file mode 100644 index 38dbf81babe83..0000000000000 --- a/components/salesforce_rest_api/sources/common.mjs +++ /dev/null @@ -1,203 +0,0 @@ -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; -import salesforce from "../salesforce_rest_api.app.mjs"; -import constants from "../common/constants.mjs"; -import { v4 as uuidv4 } from "uuid"; -import commonWebhookMethods from "./common-webhook-methods.mjs"; - -export default { - dedupe: "unique", - props: { - salesforce, - db: "$.service.db", - http: { - type: "$.interface.http", - customResponse: true, - }, - timer: { - type: "$.interface.timer", - description: "The timer is only used as a fallback if instant event delivery (webhook) is not available.", - default: { - intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, - }, - }, - objectType: { - label: "Object Type", - description: "The type of object for which to monitor events", - propDefinition: [ - salesforce, - "objectType", - ], - }, - }, - hooks: { - async activate() { - // Attempt to create the webhook - const secretToken = uuidv4(); - let webhookData; - try { - webhookData = await this.createWebhook({ - endpointUrl: this.http.endpoint, - sObjectType: this.objectType, - event: this.getEventType(), - secretToken, - fieldsToCheck: this.getFieldsToCheck(), - fieldsToCheckMode: this.getFieldsToCheckMode(), - skipValidation: true, // neccessary for custom objects - }); - console.log("Webhook created successfully"); - } catch (err) { - console.log("Error creating webhook:", err); - console.log("The source will operate on the polling schedule instead."); - - const latestDateCovered = this.getLatestDateCovered(); - if (!latestDateCovered) { - const now = new Date().toISOString(); - this.setLatestDateCovered(now); - } - - await this.timerActivateHook?.(); - } - this._setSecretToken(secretToken); - this._setWebhookData(webhookData); - - const nameField = await this.salesforce.getNameFieldForObjectType(this.objectType); - this.setNameField(nameField); - }, - async deactivate() { - // Delete the webhook, if it exists - const webhookData = this._getWebhookData(); - if (webhookData) { - await this.deleteWebhook(webhookData); - } - }, - }, - methods: { - ...commonWebhookMethods, - timerActivateHook() { - return null; - }, - getObjectTypeColumns() { - return this.db.get("columns") ?? []; - }, - setObjectTypeColumns(columns) { - this.db.set("columns", columns); - }, - getLatestDateCovered() { - return this.db.get("latestDateCovered"); - }, - setLatestDateCovered(latestDateCovered) { - this.db.set("latestDateCovered", latestDateCovered); - }, - getNameField() { - return this.db.get("nameField"); - }, - setNameField(nameField) { - this.db.set("nameField", nameField); - }, - processTimerEvent() { - throw new Error("processTimerEvent is not implemented"); - }, - getObjectTypeDescription(objectType) { - const { salesforce } = this; - return salesforce._makeRequest({ - debug: true, - url: salesforce._sObjectTypeDescriptionApiUrl(objectType), - }); - }, - query({ - query, ...args - } = {}) { - const { salesforce } = this; - const baseUrl = salesforce._baseApiVersionUrl(); - return salesforce._makeRequest({ - url: `${baseUrl}/query/?q=${encodeURIComponent(query)}`, - ...args, - }); - }, - queryObjects({ - objectType, columns, - startTimestamp, endTimestamp, - dateFieldName = constants.FIELD_NAME.CREATED_DATE, - limit = 100, offset = 0, ...args - } = {}) { - return this.query({ - debug: true, - query: ` - SELECT ${columns.join(", ")} - FROM ${objectType} - WHERE ${dateFieldName} > ${startTimestamp} AND ${dateFieldName} <= ${endTimestamp} - ORDER BY ${dateFieldName} DESC - LIMIT ${limit} OFFSET ${offset} - `, - ...args, - }); - }, - async paginate({ - fn = this.queryObjects, limit = 100, offset = 0, maxRecords = 4000, ...args - } = {}) { - let records = []; - let nextRecords = []; - - do { - ({ records: nextRecords } = - await fn({ - ...args, - offset, - limit, - })); - - records = [ - ...records, - ...nextRecords, - ]; - - offset += limit; - - } while (records.length < maxRecords && nextRecords.length === limit); - - return records; - }, - }, - async run(event) { - // Timer event - if (event.timestamp) { - if (this._getWebhookData()) { - console.log("Ignoring timer event (webhook active)"); - return; - } - const startTimestamp = this.getLatestDateCovered(); - const endTimestamp = new Date(event.timestamp * 1000).toISOString(); - const timeDiffSec = Math.floor( - (Date.parse(endTimestamp) - Date.parse(startTimestamp)) / 1000, - ); - if (timeDiffSec < 60) { - console.log(` - Skipping execution (already executed less than 60 seconds ago) - `); - return; - } - - await this.processTimerEvent({ - startTimestamp, - endTimestamp, - }); - } - - // Webhook event - else { - if (!this._isValidSource(event)) { - this.http.respond({ - statusCode: 404, - }); - console.log("Skipping event from unrecognized source"); - return; - } - - this.http.respond({ - statusCode: 200, - }); - - await this.processWebhookEvent(event); - } - }, -}; diff --git a/components/salesforce_rest_api/sources/common/common-new-record.mjs b/components/salesforce_rest_api/sources/common/common-new-record.mjs new file mode 100644 index 0000000000000..157458a695b6b --- /dev/null +++ b/components/salesforce_rest_api/sources/common/common-new-record.mjs @@ -0,0 +1,157 @@ +import startCase from "lodash/startCase.js"; +import { v4 as uuidv4 } from "uuid"; +import common from "../common/common.mjs"; + +export default { + ...common, + hooks: { + ...common.hooks, + async deploy() { + const objectType = this.getObjectType(); + const nameField = await this.salesforce.getNameFieldForObjectType(objectType); + this.setNameField(nameField); + + // emit historical events + const { recentItems } = await this.salesforce.listSObjectTypeIds(objectType); + const ids = recentItems.map((item) => item.Id); + for (const id of ids.slice(-25)) { + const object = await this.salesforce.getSObject(objectType, id); + const event = { + body: { + "New": object, + "UserId": id, + }, + }; + this.processWebhookEvent(event); + } + }, + async activate() { + // Attempt to create the webhook + const secretToken = uuidv4(); + let webhookData; + const objectType = this.getObjectType(); + try { + webhookData = await this.createWebhook({ + endpointUrl: this.http.endpoint, + sObjectType: objectType, + event: this.getEventType(), + secretToken, + fieldsToCheck: this.getFieldsToCheck(), + fieldsToCheckMode: this.getFieldsToCheckMode(), + skipValidation: true, // neccessary for custom objects + }); + console.log("Webhook created successfully"); + } catch (err) { + console.log("Error creating webhook:", err); + console.log("The source will operate on the polling schedule instead."); + + const latestDateCovered = this.getLatestDateCovered(); + if (!latestDateCovered) { + const now = new Date().toISOString(); + this.setLatestDateCovered(now); + } + + await this.timerActivateHook?.(); + } + this._setSecretToken(secretToken); + this._setWebhookData(webhookData); + + const nameField = await this.salesforce.getNameFieldForObjectType(objectType); + this.setNameField(nameField); + }, + }, + methods: { + ...common.methods, + generateTimerMeta(item, fieldName) { + const { objectType } = this; + const { + CreatedDate: createdDate, + [fieldName]: name, + Id: id, + } = item; + const entityType = startCase(objectType); + const summary = `New ${entityType} created: ${name ?? id}`; + const ts = Date.parse(createdDate); + return { + id, + summary, + ts, + }; + }, + generateWebhookMeta(data) { + const nameField = this.getNameField(); + const { New: newObject } = data.body; + const { + CreatedDate: createdDate, + Id: id, + [nameField]: name, + } = newObject; + const summary = `New ${this.getObjectType()} created: ${name ?? id}`; + const ts = Date.parse(createdDate); + return { + id, + summary, + ts, + }; + }, + getEventType() { + return "new"; + }, + async processTimerEvent(eventData) { + const { + paginate, + setLatestDateCovered, + getObjectTypeColumns, + getNameField, + generateTimerMeta, + $emit: emit, + } = this; + + const { + startTimestamp, + endTimestamp, + } = eventData; + + const fieldName = getNameField(); + const columns = getObjectTypeColumns(); + + const events = await paginate({ + objectType: this.getObjectType(), + startTimestamp, + endTimestamp, + columns, + }); + + const [ + latestEvent, + ] = events; + + if (latestEvent?.CreatedDate) { + const latestDateCovered = new Date(latestEvent.CreatedDate); + latestDateCovered.setSeconds(0); + setLatestDateCovered(latestDateCovered.toISOString()); + } + + Array.from(events) + .reverse() + .forEach((item) => { + const meta = generateTimerMeta(item, fieldName); + emit(item, meta); + }); + }, + async timerActivateHook() { + const { + getObjectTypeDescription, + setObjectTypeColumns, + } = this; + + let columns = this.fieldsToObtain; + if (!columns?.length) { + const { fields } = await getObjectTypeDescription(this.getObjectType()); + columns = fields.map(({ name }) => name); + } + + setObjectTypeColumns(columns); + }, + }, +}; diff --git a/components/salesforce_rest_api/sources/common/common-updated-record.mjs b/components/salesforce_rest_api/sources/common/common-updated-record.mjs new file mode 100644 index 0000000000000..3a4faf12c647e --- /dev/null +++ b/components/salesforce_rest_api/sources/common/common-updated-record.mjs @@ -0,0 +1,198 @@ +import startCase from "lodash/startCase.js"; +import common from "../common/common.mjs"; +import constants from "../../common/constants.mjs"; +import { v4 as uuidv4 } from "uuid"; + +export default { + ...common, + hooks: { + ...common.hooks, + async deploy() { + const objectType = this.getObjectType(); + const nameField = await this.salesforce.getNameFieldForObjectType(objectType); + this.setNameField(nameField); + + // emit historical events + const { recentItems } = await this.salesforce.listSObjectTypeIds(objectType); + const ids = recentItems.map((item) => item.Id); + for (const id of ids.slice(-25)) { + const object = await this.salesforce.getSObject(objectType, id); + const event = { + body: { + "New": object, + "UserId": id, + }, + }; + const meta = this.generateWebhookMeta(event); + this.$emit(event.body, meta); + } + }, + async activate() { + // Attempt to create the webhook + const secretToken = uuidv4(); + let webhookData; + const objectType = this.getObjectType(); + try { + webhookData = await this.createWebhook({ + endpointUrl: this.http.endpoint, + sObjectType: objectType, + event: this.getEventType(), + secretToken, + fieldsToCheck: this.getFieldsToCheck(), + fieldsToCheckMode: this.getFieldsToCheckMode(), + skipValidation: true, // neccessary for custom objects + }); + console.log("Webhook created successfully"); + } catch (err) { + console.log("Error creating webhook:", err); + console.log("The source will operate on the polling schedule instead."); + + const latestDateCovered = this.getLatestDateCovered(); + if (!latestDateCovered) { + const now = new Date().toISOString(); + this.setLatestDateCovered(now); + } + + await this.timerActivateHook?.(); + } + this._setSecretToken(secretToken); + this._setWebhookData(webhookData); + + const nameField = await this.salesforce.getNameFieldForObjectType(objectType); + this.setNameField(nameField); + }, + }, + methods: { + ...common.methods, + generateWebhookMeta(data) { + const nameField = this.getNameField(); + const { New: newObject } = data.body; + const { + LastModifiedDate: lastModifiedDate, + Id: id, + [nameField]: name, + } = newObject; + const summary = `${this.getObjectType()} updated: ${name}`; + const ts = Date.parse(lastModifiedDate); + const compositeId = `${id}-${ts}`; + return { + id: compositeId, + summary, + ts, + }; + }, + generateTimerMeta(item, fieldName) { + const { + LastModifiedDate: lastModifiedDate, + [fieldName]: name, + Id: id, + } = item; + + const entityType = startCase(this.getObjectType()); + const summary = `${entityType} updated: ${name}`; + const ts = Date.parse(lastModifiedDate); + return { + id: `${id}-${ts}`, + summary, + ts, + }; + }, + getEventType() { + return "updated"; + }, + isEventRelevant(changedFields) { + const { fields } = this; + return fields?.length + ? Object.keys(changedFields).some((key) => fields.includes(key)) + : true; + }, + getChangedFields(body) { + return Object.entries(body.New).filter(([ + key, + value, + ]) => { + const oldValue = body.Old[key]; + return ( + value !== undefined + && oldValue !== undefined + && JSON.stringify(value) !== JSON.stringify(oldValue) + ); + }) + .reduce((obj, [ + key, + value, + ]) => { + obj[key] = { + old: body.Old[key], + new: value, + }; + return obj; + }, {}); + }, + processWebhookEvent(event) { + const { body } = event; + const changedFields = this.getChangedFields(body); + if (this.isEventRelevant(changedFields)) { + const meta = this.generateWebhookMeta(event); + this.$emit({ + ...body, + changedFields, + }, meta); + } + }, + async processTimerEvent(eventData) { + const { + getNameField, + getObjectTypeColumns, + paginate, + setLatestDateCovered, + generateTimerMeta, + $emit: emit, + } = this; + + const { + startTimestamp, + endTimestamp, + } = eventData; + + const fieldName = getNameField(); + const columns = getObjectTypeColumns(); + + const events = await paginate({ + objectType: this.getObjectType(), + startTimestamp, + endTimestamp, + columns, + dateFieldName: constants.FIELD_NAME.LAST_MODIFIED_DATE, + }); + + const [ + latestEvent, + ] = events; + + if (latestEvent?.LastModifiedDate) { + const latestDateCovered = new Date(latestEvent.LastModifiedDate); + latestDateCovered.setSeconds(0); + setLatestDateCovered(latestDateCovered.toISOString()); + } + + Array.from(events) + .reverse() + .forEach((item) => { + const meta = generateTimerMeta(item, fieldName); + emit(item, meta); + }); + }, + async timerActivateHook() { + const { + getObjectTypeDescription, + setObjectTypeColumns, + } = this; + + const { fields } = await getObjectTypeDescription(this.getObjectType()); + const columns = fields.map(({ name }) => name); + + setObjectTypeColumns(columns); + }, + }, +}; diff --git a/components/salesforce_rest_api/sources/common-webhook-methods.mjs b/components/salesforce_rest_api/sources/common/common-webhook-methods.mjs similarity index 100% rename from components/salesforce_rest_api/sources/common-webhook-methods.mjs rename to components/salesforce_rest_api/sources/common/common-webhook-methods.mjs diff --git a/components/salesforce_rest_api/sources/common/common.mjs b/components/salesforce_rest_api/sources/common/common.mjs new file mode 100644 index 0000000000000..4e304965e4cc7 --- /dev/null +++ b/components/salesforce_rest_api/sources/common/common.mjs @@ -0,0 +1,203 @@ +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import salesforce from "../../salesforce_rest_api.app.mjs"; +import constants from "../../common/constants.mjs"; +import { v4 as uuidv4 } from "uuid"; +import commonWebhookMethods from "./common-webhook-methods.mjs"; + +export default { + dedupe: "unique", + props: { + salesforce, + db: "$.service.db", + http: { + type: "$.interface.http", + customResponse: true, + }, + timer: { + type: "$.interface.timer", + description: "The timer is only used as a fallback if instant event delivery (webhook) is not available.", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + objectType: { + label: "Object Type", + description: "The type of object for which to monitor events", + propDefinition: [ + salesforce, + "objectType", + ], + }, + }, + hooks: { + async activate() { + // Attempt to create the webhook + const secretToken = uuidv4(); + let webhookData; + try { + webhookData = await this.createWebhook({ + endpointUrl: this.http.endpoint, + sObjectType: this.objectType, + event: this.getEventType(), + secretToken, + fieldsToCheck: this.getFieldsToCheck(), + fieldsToCheckMode: this.getFieldsToCheckMode(), + skipValidation: true, // neccessary for custom objects + }); + console.log("Webhook created successfully"); + } catch (err) { + console.log("Error creating webhook:", err); + console.log("The source will operate on the polling schedule instead."); + + const latestDateCovered = this.getLatestDateCovered(); + if (!latestDateCovered) { + const now = new Date().toISOString(); + this.setLatestDateCovered(now); + } + + await this.timerActivateHook?.(); + } + this._setSecretToken(secretToken); + this._setWebhookData(webhookData); + + const nameField = await this.salesforce.getNameFieldForObjectType(this.objectType); + this.setNameField(nameField); + }, + async deactivate() { + // Delete the webhook, if it exists + const webhookData = this._getWebhookData(); + if (webhookData) { + await this.deleteWebhook(webhookData); + } + }, + }, + methods: { + ...commonWebhookMethods, + timerActivateHook() { + return null; + }, + getObjectTypeColumns() { + return this.db.get("columns") ?? []; + }, + setObjectTypeColumns(columns) { + this.db.set("columns", columns); + }, + getLatestDateCovered() { + return this.db.get("latestDateCovered"); + }, + setLatestDateCovered(latestDateCovered) { + this.db.set("latestDateCovered", latestDateCovered); + }, + getNameField() { + return this.db.get("nameField"); + }, + setNameField(nameField) { + this.db.set("nameField", nameField); + }, + processTimerEvent() { + throw new Error("processTimerEvent is not implemented"); + }, + getObjectTypeDescription(objectType) { + const { salesforce } = this; + return salesforce._makeRequest({ + debug: true, + url: salesforce._sObjectTypeDescriptionApiUrl(objectType), + }); + }, + query({ + query, ...args + } = {}) { + const { salesforce } = this; + const baseUrl = salesforce._baseApiVersionUrl(); + return salesforce._makeRequest({ + url: `${baseUrl}/query/?q=${encodeURIComponent(query)}`, + ...args, + }); + }, + queryObjects({ + objectType, columns, + startTimestamp, endTimestamp, + dateFieldName = constants.FIELD_NAME.CREATED_DATE, + limit = 100, offset = 0, ...args + } = {}) { + return this.query({ + debug: true, + query: ` + SELECT ${columns.join(", ")} + FROM ${objectType} + WHERE ${dateFieldName} > ${startTimestamp} AND ${dateFieldName} <= ${endTimestamp} + ORDER BY ${dateFieldName} DESC + LIMIT ${limit} OFFSET ${offset} + `, + ...args, + }); + }, + async paginate({ + fn = this.queryObjects, limit = 100, offset = 0, maxRecords = 4000, ...args + } = {}) { + let records = []; + let nextRecords = []; + + do { + ({ records: nextRecords } = + await fn({ + ...args, + offset, + limit, + })); + + records = [ + ...records, + ...nextRecords, + ]; + + offset += limit; + + } while (records.length < maxRecords && nextRecords.length === limit); + + return records; + }, + }, + async run(event) { + // Timer event + if (event.timestamp) { + if (this._getWebhookData()) { + console.log("Ignoring timer event (webhook active)"); + return; + } + const startTimestamp = this.getLatestDateCovered(); + const endTimestamp = new Date(event.timestamp * 1000).toISOString(); + const timeDiffSec = Math.floor( + (Date.parse(endTimestamp) - Date.parse(startTimestamp)) / 1000, + ); + if (timeDiffSec < 60) { + console.log(` + Skipping execution (already executed less than 60 seconds ago) + `); + return; + } + + await this.processTimerEvent({ + startTimestamp, + endTimestamp, + }); + } + + // Webhook event + else { + if (!this._isValidSource(event)) { + this.http.respond({ + statusCode: 404, + }); + console.log("Skipping event from unrecognized source"); + return; + } + + this.http.respond({ + statusCode: 200, + }); + + await this.processWebhookEvent(event); + } + }, +}; diff --git a/components/salesforce_rest_api/sources/email-template-updated-instant/email-template-updated-instant.mjs b/components/salesforce_rest_api/sources/email-template-updated-instant/email-template-updated-instant.mjs new file mode 100644 index 0000000000000..4a89b0811d61d --- /dev/null +++ b/components/salesforce_rest_api/sources/email-template-updated-instant/email-template-updated-instant.mjs @@ -0,0 +1,43 @@ +import common from "../common/common-updated-record.mjs"; +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; + +export default { + ...common, + type: "source", + name: "Email Template Updated (Instant, of Selectable Type)", + key: "salesforce_rest_api-email-template-updated-instant", + description: "Emit new event when an email template is updated. [See the documentation](https://sforce.co/3yPSJZy)", + version: "0.0.2", + props: { + salesforce: common.props.salesforce, + db: "$.service.db", + http: { + type: "$.interface.http", + customResponse: true, + }, + timer: { + type: "$.interface.timer", + description: "The timer is only used as a fallback if instant event delivery (webhook) is not available.", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + fieldsToObtain: { + propDefinition: [ + common.props.salesforce, + "fieldsToObtain", + () => ({ + objType: "EmailTemplate", + }), + ], + optional: true, + description: "Select the field(s) to be retrieved for the records. Only applicable if the source is running on a timer. If running on a webhook, or if not specified, all fields will be retrieved.", + }, + }, + methods: { + ...common.methods, + getObjectType() { + return "EmailTemplate"; + }, + }, +}; diff --git a/components/salesforce_rest_api/sources/knowledge-article-updated-instant/knowledge-article-updated-instant.mjs b/components/salesforce_rest_api/sources/knowledge-article-updated-instant/knowledge-article-updated-instant.mjs new file mode 100644 index 0000000000000..43e1f8ddde81a --- /dev/null +++ b/components/salesforce_rest_api/sources/knowledge-article-updated-instant/knowledge-article-updated-instant.mjs @@ -0,0 +1,43 @@ +import common from "../common/common-updated-record.mjs"; +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; + +export default { + ...common, + type: "source", + name: "Knowledge Article Updated (Instant, of Selectable Type)", + key: "salesforce_rest_api-knowledge-article-updated-instant", + description: "Emit new event when a knowledge article is updated. [See the documentation](https://sforce.co/3yPSJZy)", + version: "0.0.2", + props: { + salesforce: common.props.salesforce, + db: "$.service.db", + http: { + type: "$.interface.http", + customResponse: true, + }, + timer: { + type: "$.interface.timer", + description: "The timer is only used as a fallback if instant event delivery (webhook) is not available.", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + fieldsToObtain: { + propDefinition: [ + common.props.salesforce, + "fieldsToObtain", + () => ({ + objType: "KnowledgeArticle", + }), + ], + optional: true, + description: "Select the field(s) to be retrieved for the records. Only applicable if the source is running on a timer. If running on a webhook, or if not specified, all fields will be retrieved.", + }, + }, + methods: { + ...common.methods, + getObjectType() { + return "KnowledgeArticle"; + }, + }, +}; diff --git a/components/salesforce_rest_api/sources/new-case-instant/new-case-instant.mjs b/components/salesforce_rest_api/sources/new-case-instant/new-case-instant.mjs new file mode 100644 index 0000000000000..3d0b223b5b036 --- /dev/null +++ b/components/salesforce_rest_api/sources/new-case-instant/new-case-instant.mjs @@ -0,0 +1,43 @@ +import common from "../common/common-new-record.mjs"; +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; + +export default { + ...common, + type: "source", + name: "New Case (Instant, of Selectable Type)", + key: "salesforce_rest_api-new-case-instant", + description: "Emit new event when a case is created. [See the documentation](https://sforce.co/3yPSJZy)", + version: "0.0.2", + props: { + salesforce: common.props.salesforce, + db: "$.service.db", + http: { + type: "$.interface.http", + customResponse: true, + }, + timer: { + type: "$.interface.timer", + description: "The timer is only used as a fallback if instant event delivery (webhook) is not available.", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + fieldsToObtain: { + propDefinition: [ + common.props.salesforce, + "fieldsToObtain", + () => ({ + objType: "Case", + }), + ], + optional: true, + description: "Select the field(s) to be retrieved for the records. Only applicable if the source is running on a timer. If running on a webhook, or if not specified, all fields will be retrieved.", + }, + }, + methods: { + ...common.methods, + getObjectType() { + return "Case"; + }, + }, +}; diff --git a/components/salesforce_rest_api/sources/new-email-template-instant/new-email-template-instant.mjs b/components/salesforce_rest_api/sources/new-email-template-instant/new-email-template-instant.mjs new file mode 100644 index 0000000000000..d60b48a522787 --- /dev/null +++ b/components/salesforce_rest_api/sources/new-email-template-instant/new-email-template-instant.mjs @@ -0,0 +1,43 @@ +import common from "../common/common-new-record.mjs"; +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; + +export default { + ...common, + type: "source", + name: "New Email Template (Instant, of Selectable Type)", + key: "salesforce_rest_api-new-email-template-instant", + description: "Emit new event when an email template is created. [See the documentation](https://sforce.co/3yPSJZy)", + version: "0.0.2", + props: { + salesforce: common.props.salesforce, + db: "$.service.db", + http: { + type: "$.interface.http", + customResponse: true, + }, + timer: { + type: "$.interface.timer", + description: "The timer is only used as a fallback if instant event delivery (webhook) is not available.", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + fieldsToObtain: { + propDefinition: [ + common.props.salesforce, + "fieldsToObtain", + () => ({ + objType: "EmailTemplate", + }), + ], + optional: true, + description: "Select the field(s) to be retrieved for the records. Only applicable if the source is running on a timer. If running on a webhook, or if not specified, all fields will be retrieved.", + }, + }, + methods: { + ...common.methods, + getObjectType() { + return "EmailTemplate"; + }, + }, +}; diff --git a/components/salesforce_rest_api/sources/new-knowledge-article-instant/new-knowledge-article-instant.mjs b/components/salesforce_rest_api/sources/new-knowledge-article-instant/new-knowledge-article-instant.mjs new file mode 100644 index 0000000000000..1e28240544641 --- /dev/null +++ b/components/salesforce_rest_api/sources/new-knowledge-article-instant/new-knowledge-article-instant.mjs @@ -0,0 +1,43 @@ +import common from "../common/common-new-record.mjs"; +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; + +export default { + ...common, + type: "source", + name: "New Knowledge Article (Instant, of Selectable Type)", + key: "salesforce_rest_api-new-knowledge-article-instant", + description: "Emit new event when a knowledge article is created. [See the documentation](https://sforce.co/3yPSJZy)", + version: "0.0.2", + props: { + salesforce: common.props.salesforce, + db: "$.service.db", + http: { + type: "$.interface.http", + customResponse: true, + }, + timer: { + type: "$.interface.timer", + description: "The timer is only used as a fallback if instant event delivery (webhook) is not available.", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + fieldsToObtain: { + propDefinition: [ + common.props.salesforce, + "fieldsToObtain", + () => ({ + objType: "KnowledgeArticle", + }), + ], + optional: true, + description: "Select the field(s) to be retrieved for the records. Only applicable if the source is running on a timer. If running on a webhook, or if not specified, all fields will be retrieved.", + }, + }, + methods: { + ...common.methods, + getObjectType() { + return "KnowledgeArticle"; + }, + }, +}; diff --git a/components/salesforce_rest_api/sources/new-outbound-message/new-outbound-message.mjs b/components/salesforce_rest_api/sources/new-outbound-message/new-outbound-message.mjs index a0d232dcbb309..771efd9b8458a 100644 --- a/components/salesforce_rest_api/sources/new-outbound-message/new-outbound-message.mjs +++ b/components/salesforce_rest_api/sources/new-outbound-message/new-outbound-message.mjs @@ -6,7 +6,7 @@ export default { name: "New Outbound Message (Instant)", key: "salesforce_rest_api-new-outbound-message", description: "Emit new event when a new outbound message is received in Salesforce.", - version: "0.1.7", + version: "0.1.8", dedupe: "unique", props: { db: "$.service.db", diff --git a/components/salesforce_rest_api/sources/new-record-instant/new-record-instant.mjs b/components/salesforce_rest_api/sources/new-record-instant/new-record-instant.mjs index 382ba6a826ba5..ba5e6c7d8bfff 100644 --- a/components/salesforce_rest_api/sources/new-record-instant/new-record-instant.mjs +++ b/components/salesforce_rest_api/sources/new-record-instant/new-record-instant.mjs @@ -1,5 +1,4 @@ -import startCase from "lodash/startCase.js"; -import common from "../common.mjs"; +import common from "../common/common-new-record.mjs"; export default { ...common, @@ -7,7 +6,7 @@ export default { name: "New Record (Instant, of Selectable Type)", key: "salesforce_rest_api-new-record-instant", description: "Emit new event when a record of the selected object type is created. [See the documentation](https://sforce.co/3yPSJZy)", - version: "0.2.0", + version: "0.2.2", props: { ...common.props, fieldsToObtain: { @@ -22,123 +21,10 @@ export default { description: "Select the field(s) to be retrieved for the records. Only applicable if the source is running on a timer. If running on a webhook, or if not specified, all fields will be retrieved.", }, }, - hooks: { - ...common.hooks, - async deploy() { - const objectType = this.objectType; - const nameField = await this.salesforce.getNameFieldForObjectType(objectType); - this.setNameField(nameField); - - // emit historical events - const { recentItems } = await this.salesforce.listSObjectTypeIds(objectType); - const ids = recentItems.map((item) => item.Id); - for (const id of ids.slice(-25)) { - const object = await this.salesforce.getSObject(objectType, id); - const event = { - body: { - "New": object, - "UserId": id, - }, - }; - this.processWebhookEvent(event); - } - }, - }, methods: { ...common.methods, - generateTimerMeta(item, fieldName) { - const { objectType } = this; - const { - CreatedDate: createdDate, - [fieldName]: name, - Id: id, - } = item; - const entityType = startCase(objectType); - const summary = `New ${entityType} created: ${name ?? id}`; - const ts = Date.parse(createdDate); - return { - id, - summary, - ts, - }; - }, - generateWebhookMeta(data) { - const nameField = this.getNameField(); - const { New: newObject } = data.body; - const { - CreatedDate: createdDate, - Id: id, - [nameField]: name, - } = newObject; - const entityType = startCase(this.objectType).toLowerCase(); - const summary = `New ${entityType} created: ${name ?? id}`; - const ts = Date.parse(createdDate); - return { - id, - summary, - ts, - }; - }, - getEventType() { - return "new"; - }, - async processTimerEvent(eventData) { - const { - paginate, - objectType, - setLatestDateCovered, - getObjectTypeColumns, - getNameField, - generateTimerMeta, - $emit: emit, - } = this; - - const { - startTimestamp, - endTimestamp, - } = eventData; - - const fieldName = getNameField(); - const columns = getObjectTypeColumns(); - - const events = await paginate({ - objectType, - startTimestamp, - endTimestamp, - columns, - }); - - const [ - latestEvent, - ] = events; - - if (latestEvent?.CreatedDate) { - const latestDateCovered = new Date(latestEvent.CreatedDate); - latestDateCovered.setSeconds(0); - setLatestDateCovered(latestDateCovered.toISOString()); - } - - Array.from(events) - .reverse() - .forEach((item) => { - const meta = generateTimerMeta(item, fieldName); - emit(item, meta); - }); - }, - async timerActivateHook() { - const { - objectType, - getObjectTypeDescription, - setObjectTypeColumns, - } = this; - - let columns = this.fieldsToObtain; - if (!columns?.length) { - const { fields } = await getObjectTypeDescription(objectType); - columns = fields.map(({ name }) => name); - } - - setObjectTypeColumns(columns); + getObjectType() { + return this.objectType; }, }, }; diff --git a/components/salesforce_rest_api/sources/record-deleted-instant/record-deleted-instant.mjs b/components/salesforce_rest_api/sources/record-deleted-instant/record-deleted-instant.mjs index 46cd9b7485fdc..102c892a3a9ea 100644 --- a/components/salesforce_rest_api/sources/record-deleted-instant/record-deleted-instant.mjs +++ b/components/salesforce_rest_api/sources/record-deleted-instant/record-deleted-instant.mjs @@ -1,5 +1,5 @@ import startCase from "lodash/startCase.js"; -import common from "../common.mjs"; +import common from "../common/common.mjs"; export default { ...common, @@ -7,7 +7,7 @@ export default { name: "New Deleted Record (Instant, of Selectable Type)", key: "salesforce_rest_api-record-deleted-instant", description: "Emit new event when a record of the selected object type is deleted. [See the documentation](https://sforce.co/3msDDEE)", - version: "0.1.0", + version: "0.1.2", methods: { ...common.methods, generateWebhookMeta(data) { diff --git a/components/salesforce_rest_api/sources/record-updated-instant/record-updated-instant.mjs b/components/salesforce_rest_api/sources/record-updated-instant/record-updated-instant.mjs index 46db6b7992e6f..72c8bcbe16ac8 100644 --- a/components/salesforce_rest_api/sources/record-updated-instant/record-updated-instant.mjs +++ b/components/salesforce_rest_api/sources/record-updated-instant/record-updated-instant.mjs @@ -1,6 +1,4 @@ -import startCase from "lodash/startCase.js"; -import common from "../common.mjs"; -import constants from "../../common/constants.mjs"; +import common from "../common/common-updated-record.mjs"; const { salesforce } = common.props; export default { @@ -9,7 +7,7 @@ export default { name: "New Updated Record (Instant, of Selectable Type)", key: "salesforce_rest_api-record-updated-instant", description: "Emit new event when a record of the selected type is updated. [See the documentation](https://sforce.co/3yPSJZy)", - version: "0.2.0", + version: "0.2.2", props: { ...common.props, fields: { @@ -29,140 +27,8 @@ export default { }, methods: { ...common.methods, - generateWebhookMeta(data) { - const nameField = this.getNameField(); - const { New: newObject } = data.body; - const { - LastModifiedDate: lastModifiedDate, - Id: id, - [nameField]: name, - } = newObject; - const entityType = startCase(this.objectType); - const summary = `${entityType} updated: ${name}`; - const ts = Date.parse(lastModifiedDate); - const compositeId = `${id}-${ts}`; - return { - id: compositeId, - summary, - ts, - }; - }, - generateTimerMeta(item, fieldName) { - const { objectType } = this; - - const { - LastModifiedDate: lastModifiedDate, - [fieldName]: name, - Id: id, - } = item; - - const entityType = startCase(objectType); - const summary = `${entityType} updated: ${name}`; - const ts = Date.parse(lastModifiedDate); - return { - id: `${id}-${ts}`, - summary, - ts, - }; - }, - getEventType() { - return "updated"; - }, - isEventRelevant(changedFields) { - const { fields } = this; - return fields?.length - ? Object.keys(changedFields).some((key) => fields.includes(key)) - : true; - }, - getChangedFields(body) { - return Object.entries(body.New).filter(([ - key, - value, - ]) => { - const oldValue = body.Old[key]; - return ( - value !== undefined - && oldValue !== undefined - && JSON.stringify(value) !== JSON.stringify(oldValue) - ); - }) - .reduce((obj, [ - key, - value, - ]) => { - obj[key] = { - old: body.Old[key], - new: value, - }; - return obj; - }, {}); - }, - processWebhookEvent(event) { - const { body } = event; - const changedFields = this.getChangedFields(body); - if (this.isEventRelevant(changedFields)) { - const meta = this.generateWebhookMeta(event); - this.$emit({ - ...body, - changedFields, - }, meta); - } - }, - async processTimerEvent(eventData) { - const { - getNameField, - getObjectTypeColumns, - paginate, - objectType, - setLatestDateCovered, - generateTimerMeta, - $emit: emit, - } = this; - - const { - startTimestamp, - endTimestamp, - } = eventData; - - const fieldName = getNameField(); - const columns = getObjectTypeColumns(); - - const events = await paginate({ - objectType, - startTimestamp, - endTimestamp, - columns, - dateFieldName: constants.FIELD_NAME.LAST_MODIFIED_DATE, - }); - - const [ - latestEvent, - ] = events; - - if (latestEvent?.LastModifiedDate) { - const latestDateCovered = new Date(latestEvent.LastModifiedDate); - latestDateCovered.setSeconds(0); - setLatestDateCovered(latestDateCovered.toISOString()); - } - - Array.from(events) - .reverse() - .forEach((item) => { - const meta = generateTimerMeta(item, fieldName); - emit(item, meta); - }); - }, - async timerActivateHook() { - const { - objectType, - getObjectTypeDescription, - setObjectTypeColumns, - } = this; - - const { fields } = await getObjectTypeDescription(objectType); - const columns = fields.map(({ name }) => name); - - setObjectTypeColumns(columns); + getObjectType() { + return this.objectType; }, }, }; diff --git a/components/salesmate/package.json b/components/salesmate/package.json index f6bc3ac3b13b2..2404014ea57d2 100644 --- a/components/salesmate/package.json +++ b/components/salesmate/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/salesmate", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Salesmate Components", "main": "dist/app/salesmate.app.mjs", "keywords": [ @@ -15,5 +15,8 @@ }, "dependencies": { "@pipedream/platform": "^1.2.1" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/salesmate/tsconfig.json b/components/salesmate/tsconfig.json index 8e0713505004b..3a9389484d040 100644 --- a/components/salesmate/tsconfig.json +++ b/components/salesmate/tsconfig.json @@ -1,24 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common", - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/salestown/.gitignore b/components/salestown/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/salestown/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/salestown/app/salestown.app.ts b/components/salestown/app/salestown.app.ts deleted file mode 100644 index cc99c5689b9fc..0000000000000 --- a/components/salestown/app/salestown.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "salestown", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/salestown/package.json b/components/salestown/package.json index a97c2bc49aba4..da2d18995f3f9 100644 --- a/components/salestown/package.json +++ b/components/salestown/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/salestown", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Salestown Components", - "main": "dist/app/salestown.app.mjs", + "main": "salestown.app.mjs", "keywords": [ "pipedream", "salestown" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/salestown", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/salestown/salestown.app.mjs b/components/salestown/salestown.app.mjs new file mode 100644 index 0000000000000..2eee700483f23 --- /dev/null +++ b/components/salestown/salestown.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "salestown", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/samcart/.gitignore b/components/samcart/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/samcart/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/samcart/app/samcart.app.ts b/components/samcart/app/samcart.app.ts deleted file mode 100644 index 5fa609cd0b0b5..0000000000000 --- a/components/samcart/app/samcart.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "samcart", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/samcart/package.json b/components/samcart/package.json index a9f372e189754..dc91ecbe13c9f 100644 --- a/components/samcart/package.json +++ b/components/samcart/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/samcart", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream SamCart Components", - "main": "dist/app/samcart.app.mjs", + "main": "samcart.app.mjs", "keywords": [ "pipedream", "samcart" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/samcart", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/samcart/samcart.app.mjs b/components/samcart/samcart.app.mjs new file mode 100644 index 0000000000000..cfd7e99e968b1 --- /dev/null +++ b/components/samcart/samcart.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "samcart", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sanity/package.json b/components/sanity/package.json new file mode 100644 index 0000000000000..64abcab91c1b7 --- /dev/null +++ b/components/sanity/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/sanity", + "version": "0.0.1", + "description": "Pipedream Sanity Components", + "main": "sanity.app.mjs", + "keywords": [ + "pipedream", + "sanity" + ], + "homepage": "https://pipedream.com/apps/sanity", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/sanity/sanity.app.mjs b/components/sanity/sanity.app.mjs new file mode 100644 index 0000000000000..30c018480b5cf --- /dev/null +++ b/components/sanity/sanity.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sanity", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/sap_s_4hana_cloud/package.json b/components/sap_s_4hana_cloud/package.json new file mode 100644 index 0000000000000..00cb4ae7e3419 --- /dev/null +++ b/components/sap_s_4hana_cloud/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/sap_s_4hana_cloud", + "version": "0.0.1", + "description": "Pipedream SAP S/4HANA Cloud Components", + "main": "sap_s_4hana_cloud.app.mjs", + "keywords": [ + "pipedream", + "sap_s_4hana_cloud" + ], + "homepage": "https://pipedream.com/apps/sap_s_4hana_cloud", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/sap_s_4hana_cloud/sap_s_4hana_cloud.app.mjs b/components/sap_s_4hana_cloud/sap_s_4hana_cloud.app.mjs new file mode 100644 index 0000000000000..f6feb551e4d99 --- /dev/null +++ b/components/sap_s_4hana_cloud/sap_s_4hana_cloud.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sap_s_4hana_cloud", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/sap_s_4hana_cloud_sandbox/package.json b/components/sap_s_4hana_cloud_sandbox/package.json new file mode 100644 index 0000000000000..62be55bf01a03 --- /dev/null +++ b/components/sap_s_4hana_cloud_sandbox/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/sap_s_4hana_cloud_sandbox", + "version": "0.0.1", + "description": "Pipedream SAP S/4HANA Cloud (Sandbox) Components", + "main": "sap_s_4hana_cloud_sandbox.app.mjs", + "keywords": [ + "pipedream", + "sap_s_4hana_cloud_sandbox" + ], + "homepage": "https://pipedream.com/apps/sap_s_4hana_cloud_sandbox", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/sap_s_4hana_cloud_sandbox/sap_s_4hana_cloud_sandbox.app.mjs b/components/sap_s_4hana_cloud_sandbox/sap_s_4hana_cloud_sandbox.app.mjs new file mode 100644 index 0000000000000..fb6fc21f0941a --- /dev/null +++ b/components/sap_s_4hana_cloud_sandbox/sap_s_4hana_cloud_sandbox.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sap_s_4hana_cloud_sandbox", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/saucelabs/.gitignore b/components/saucelabs/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/saucelabs/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/saucelabs/app/saucelabs.app.ts b/components/saucelabs/app/saucelabs.app.ts deleted file mode 100644 index 478231f9e0385..0000000000000 --- a/components/saucelabs/app/saucelabs.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "saucelabs", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/saucelabs/package.json b/components/saucelabs/package.json index c045f1143bf58..7473c420cac8f 100644 --- a/components/saucelabs/package.json +++ b/components/saucelabs/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/saucelabs", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream SauceLabs Components", - "main": "dist/app/saucelabs.app.mjs", + "main": "saucelabs.app.mjs", "keywords": [ "pipedream", "saucelabs" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/saucelabs", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/saucelabs/saucelabs.app.mjs b/components/saucelabs/saucelabs.app.mjs new file mode 100644 index 0000000000000..ea2754f8bf59a --- /dev/null +++ b/components/saucelabs/saucelabs.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "saucelabs", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/savvycal/package.json b/components/savvycal/package.json index 60b37ce984b0c..e801e0fcc9950 100644 --- a/components/savvycal/package.json +++ b/components/savvycal/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/savvycal", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream SavvyCal Components", - "main": "dist/app/savvycal.app.mjs", + "main": "savvycal.app.mjs", "keywords": [ "pipedream", "savvycal" diff --git a/components/schedule_it/.gitignore b/components/schedule_it/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/schedule_it/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/schedule_it/app/schedule_it.app.ts b/components/schedule_it/app/schedule_it.app.ts deleted file mode 100644 index f5dfd6c1c7393..0000000000000 --- a/components/schedule_it/app/schedule_it.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "schedule_it", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/schedule_it/package.json b/components/schedule_it/package.json index 0990f60674a24..7c520995213cb 100644 --- a/components/schedule_it/package.json +++ b/components/schedule_it/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/schedule_it", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Schedule it Components", - "main": "dist/app/schedule_it.app.mjs", + "main": "schedule_it.app.mjs", "keywords": [ "pipedream", "schedule_it" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/schedule_it", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/schedule_it/schedule_it.app.mjs b/components/schedule_it/schedule_it.app.mjs new file mode 100644 index 0000000000000..1a5f5371a6b88 --- /dev/null +++ b/components/schedule_it/schedule_it.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "schedule_it", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/scopemaster/.gitignore b/components/scopemaster/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/scopemaster/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/scopemaster/app/scopemaster.app.ts b/components/scopemaster/app/scopemaster.app.ts deleted file mode 100644 index 46807d1b914ec..0000000000000 --- a/components/scopemaster/app/scopemaster.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "scopemaster", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/scopemaster/package.json b/components/scopemaster/package.json index f94af01f4eb2f..353763c2d99cd 100644 --- a/components/scopemaster/package.json +++ b/components/scopemaster/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/scopemaster", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream ScopeMaster Components", - "main": "dist/app/scopemaster.app.mjs", + "main": "scopemaster.app.mjs", "keywords": [ "pipedream", "scopemaster" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/scopemaster", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/scopemaster/scopemaster.app.mjs b/components/scopemaster/scopemaster.app.mjs new file mode 100644 index 0000000000000..24a0a51cae216 --- /dev/null +++ b/components/scopemaster/scopemaster.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "scopemaster", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/scoro/.gitignore b/components/scoro/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/scoro/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/scoro/app/scoro.app.ts b/components/scoro/app/scoro.app.ts deleted file mode 100644 index 6a5de25a539a5..0000000000000 --- a/components/scoro/app/scoro.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "scoro", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/scoro/package.json b/components/scoro/package.json index a2fe215591a1a..38a4b0a718944 100644 --- a/components/scoro/package.json +++ b/components/scoro/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/scoro", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Scoro Components", - "main": "dist/app/scoro.app.mjs", + "main": "scoro.app.mjs", "keywords": [ "pipedream", "scoro" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/scoro", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/scoro/scoro.app.mjs b/components/scoro/scoro.app.mjs new file mode 100644 index 0000000000000..59c26683c9068 --- /dev/null +++ b/components/scoro/scoro.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "scoro", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/scrapingbee/.gitignore b/components/scrapingbee/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/scrapingbee/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/scrapingbee/app/scrapingbee.app.ts b/components/scrapingbee/app/scrapingbee.app.ts deleted file mode 100644 index 603924899e096..0000000000000 --- a/components/scrapingbee/app/scrapingbee.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "scrapingbee", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/scrapingbee/package.json b/components/scrapingbee/package.json index bdd7232bde3cb..f2daf438c38e6 100644 --- a/components/scrapingbee/package.json +++ b/components/scrapingbee/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/scrapingbee", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream ScrapingBee Components", - "main": "dist/app/scrapingbee.app.mjs", + "main": "scrapingbee.app.mjs", "keywords": [ "pipedream", "scrapingbee" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/scrapingbee", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/scrapingbee/scrapingbee.app.mjs b/components/scrapingbee/scrapingbee.app.mjs new file mode 100644 index 0000000000000..5321ade728c9e --- /dev/null +++ b/components/scrapingbee/scrapingbee.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "scrapingbee", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/selectpdf/.gitignore b/components/selectpdf/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/selectpdf/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/selectpdf/app/selectpdf.app.ts b/components/selectpdf/app/selectpdf.app.ts deleted file mode 100644 index 50bbf0362820e..0000000000000 --- a/components/selectpdf/app/selectpdf.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "selectpdf", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/selectpdf/package.json b/components/selectpdf/package.json index 8f9e66a7ae610..988e34a6c742e 100644 --- a/components/selectpdf/package.json +++ b/components/selectpdf/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/selectpdf", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream SelectPdf Components", - "main": "dist/app/selectpdf.app.mjs", + "main": "selectpdf.app.mjs", "keywords": [ "pipedream", "selectpdf" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/selectpdf", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/selectpdf/selectpdf.app.mjs b/components/selectpdf/selectpdf.app.mjs new file mode 100644 index 0000000000000..a1655f0b20467 --- /dev/null +++ b/components/selectpdf/selectpdf.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "selectpdf", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sellix/.gitignore b/components/sellix/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sellix/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sellix/app/sellix.app.ts b/components/sellix/app/sellix.app.ts deleted file mode 100644 index 05b60839e9439..0000000000000 --- a/components/sellix/app/sellix.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sellix", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/sellix/package.json b/components/sellix/package.json index d6dd9d94bf9e3..087ad7cea6aa3 100644 --- a/components/sellix/package.json +++ b/components/sellix/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/sellix", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Sellix Components", - "main": "dist/app/sellix.app.mjs", + "main": "sellix.app.mjs", "keywords": [ "pipedream", "sellix" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/sellix", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sellix/sellix.app.mjs b/components/sellix/sellix.app.mjs new file mode 100644 index 0000000000000..f0ae1036f4d6a --- /dev/null +++ b/components/sellix/sellix.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sellix", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sendblue/.gitignore b/components/sendblue/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sendblue/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sendblue/app/sendblue.app.ts b/components/sendblue/app/sendblue.app.ts deleted file mode 100644 index 119bc46dd4aaf..0000000000000 --- a/components/sendblue/app/sendblue.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sendblue", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/sendblue/package.json b/components/sendblue/package.json index a9bc5f7ad7eac..b257ec0646eff 100644 --- a/components/sendblue/package.json +++ b/components/sendblue/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/sendblue", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Sendblue Components", - "main": "dist/app/sendblue.app.mjs", + "main": "sendblue.app.mjs", "keywords": [ "pipedream", "sendblue" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/sendblue", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sendblue/sendblue.app.mjs b/components/sendblue/sendblue.app.mjs new file mode 100644 index 0000000000000..4b7925db9cb57 --- /dev/null +++ b/components/sendblue/sendblue.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sendblue", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sendcloud/actions/bulk-pdf-label-printing/bulk-pdf-label-printing.mjs b/components/sendcloud/actions/bulk-pdf-label-printing/bulk-pdf-label-printing.mjs new file mode 100644 index 0000000000000..55d0e7c04494a --- /dev/null +++ b/components/sendcloud/actions/bulk-pdf-label-printing/bulk-pdf-label-printing.mjs @@ -0,0 +1,42 @@ +import app from "../../sendcloud.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + key: "sendcloud-bulk-pdf-label-printing", + name: "Bulk PDF Label Printing", + description: "Bulk PDF label printing. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/labels/operations/create-a-label)", + version: "0.0.1", + type: "action", + props: { + app, + parcels: { + type: "integer[]", + label: "Parcel IDs", + description: "IDs of parcels to print labels. Example: [1, 2, 3]", + propDefinition: [ + app, + "parcelId", + ], + }, + }, + async run({ $ }) { + const { + app, + parcels, + } = this; + + const response = await app.bulkPDFLabelPrinting({ + $, + data: { + label: { + parcels: utils.parseArray(parcels), + }, + }, + }); + + $.export("$summary", "Successfully triggered bulk label print"); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/create-a-parcel/create-a-parcel.mjs b/components/sendcloud/actions/create-a-parcel/create-a-parcel.mjs index 23e19acd80856..8a8bd44c55fbd 100644 --- a/components/sendcloud/actions/create-a-parcel/create-a-parcel.mjs +++ b/components/sendcloud/actions/create-a-parcel/create-a-parcel.mjs @@ -4,7 +4,7 @@ export default { key: "sendcloud-create-a-parcel", name: "Create a Parcel", description: "Creates a new parcel under your Sendcloud API credentials. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/parcels/operations/create-a-parcel)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/sendcloud/actions/create-return/create-return.mjs b/components/sendcloud/actions/create-return/create-return.mjs new file mode 100644 index 0000000000000..bc4ac943f3452 --- /dev/null +++ b/components/sendcloud/actions/create-return/create-return.mjs @@ -0,0 +1,120 @@ +import app from "../../sendcloud.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + key: "sendcloud-create-return", + name: "Create Return", + description: "Create a return. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/returns/operations/create-a-return)", + version: "0.0.1", + type: "action", + props: { + app, + fromAddress: { + label: "From Address", + propDefinition: [ + app, + "addressSetup", + ], + }, + toAddress: { + label: "To Address", + propDefinition: [ + app, + "addressSetup", + ], + }, + shipWith: { + propDefinition: [ + app, + "shipWith", + ], + }, + dimensionsLength: { + propDefinition: [ + app, + "dimensionsLength", + ], + }, + dimensionsWidth: { + propDefinition: [ + app, + "dimensionsWidth", + ], + }, + dimensionsHeight: { + propDefinition: [ + app, + "dimensionsHeight", + ], + }, + dimensionsUnit: { + propDefinition: [ + app, + "dimensionsUnit", + ], + }, + weightValue: { + propDefinition: [ + app, + "weightValue", + ], + }, + weightUnit: { + propDefinition: [ + app, + "weightUnit", + ], + }, + }, + async run({ $ }) { + const { + app, + fromAddress, + toAddress, + shipWith, + dimensionsLength, + dimensionsWidth, + dimensionsHeight, + dimensionsUnit, + weightValue, + weightUnit, + } = this; + + const response = await app.createReturn({ + $, + data: { + from_address: utils.parseJson(fromAddress), + to_address: utils.parseJson(toAddress), + ship_with: utils.parseJson(shipWith), + ...(dimensionsLength + && dimensionsWidth + && dimensionsHeight + && dimensionsUnit + ? { + dimensions: { + length: dimensionsLength, + width: dimensionsWidth, + height: dimensionsHeight, + unit: dimensionsUnit, + }, + } + : undefined + ), + ...(weightValue && weightUnit + ? { + weight: { + value: weightValue, + unit: weightUnit, + }, + } + : undefined + ), + }, + }); + + $.export("$summary", "Successfully created return"); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/create-update-integration-shipment/create-update-integration-shipment.mjs b/components/sendcloud/actions/create-update-integration-shipment/create-update-integration-shipment.mjs new file mode 100644 index 0000000000000..169e19e6ab0b3 --- /dev/null +++ b/components/sendcloud/actions/create-update-integration-shipment/create-update-integration-shipment.mjs @@ -0,0 +1,333 @@ +import app from "../../sendcloud.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + key: "sendcloud-create-update-integration-shipment", + name: "Create Or Update Integration Shipment", + description: "Create or update an integration shipment. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/integrations/operations/create-a-integration-shipment)", + version: "0.0.1", + type: "action", + props: { + app, + integrationId: { + propDefinition: [ + app, + "integrationId", + ], + }, + address: { + description: "The address of the shipment.", + propDefinition: [ + app, + "address", + ], + }, + address2: { + propDefinition: [ + app, + "address", + ], + label: "Address 2", + description: "A secondary address of the shipment.", + }, + companyName: { + propDefinition: [ + app, + "companyName", + ], + }, + createdAt: { + propDefinition: [ + app, + "createdAt", + ], + }, + currency: { + propDefinition: [ + app, + "currency", + ], + }, + customsInvoiceNr: { + propDefinition: [ + app, + "customsInvoiceNr", + ], + }, + customsShipmentType: { + propDefinition: [ + app, + "customsShipmentType", + ], + }, + email: { + propDefinition: [ + app, + "email", + ], + }, + externalOrderId: { + propDefinition: [ + app, + "externalOrderId", + ], + }, + externalShipmentId: { + propDefinition: [ + app, + "externalShipmentId", + ], + }, + houseNumber: { + propDefinition: [ + app, + "houseNumber", + ], + }, + name: { + propDefinition: [ + app, + "name", + ], + }, + orderNumber: { + propDefinition: [ + app, + "orderNumber", + ], + }, + orderStatusId: { + propDefinition: [ + app, + "orderStatusId", + ], + }, + orderStatusMessage: { + propDefinition: [ + app, + "orderStatusMessage", + ], + }, + parcelItems: { + propDefinition: [ + app, + "parcelItems", + ], + }, + paymentStatusId: { + propDefinition: [ + app, + "paymentStatusId", + ], + }, + paymentStatusMessage: { + propDefinition: [ + app, + "paymentStatusMessage", + ], + }, + postalCode: { + propDefinition: [ + app, + "postalCode", + ], + }, + + shippingMethodCheckoutName: { + propDefinition: [ + app, + "shippingMethodCheckoutName", + ], + }, + telephone: { + propDefinition: [ + app, + "telephone", + ], + }, + toPostNumber: { + propDefinition: [ + app, + "toPostNumber", + ], + }, + country: { + propDefinition: [ + app, + "country", + ], + }, + toServicePoint: { + propDefinition: [ + app, + "servicePointId", + ({ country }) => ({ + country, + }), + ], + }, + toState: { + propDefinition: [ + app, + "toState", + ], + }, + updatedAt: { + propDefinition: [ + app, + "updatedAt", + ], + }, + city: { + propDefinition: [ + app, + "city", + ], + description: "The city of the shipment.", + }, + shippingMethod: { + propDefinition: [ + app, + "shippingMethodId", + ], + }, + totalOrderValue: { + propDefinition: [ + app, + "totalOrderValue", + ], + }, + weight: { + propDefinition: [ + app, + "weight", + ], + }, + checkoutPayload: { + propDefinition: [ + app, + "checkoutPayload", + ], + }, + width: { + type: "string", + label: "Width", + description: "Volumetric width (decimal string)", + optional: true, + }, + height: { + type: "string", + label: "Height", + description: "Volumetric height (decimal string)", + optional: true, + }, + length: { + type: "string", + label: "Length", + description: "Volumetric length (decimal string)", + optional: true, + }, + customDetails: { + propDefinition: [ + app, + "customDetails", + ], + }, + }, + async run({ $ }) { + const { + app, + integrationId, + address, + address2, + city, + companyName, + country, + createdAt, + currency, + customsInvoiceNr, + customsShipmentType, + email, + externalOrderId, + externalShipmentId, + houseNumber, + name, + orderNumber, + orderStatusId, + orderStatusMessage, + parcelItems, + paymentStatusId, + paymentStatusMessage, + postalCode, + shippingMethod, + shippingMethodCheckoutName, + telephone, + toPostNumber, + toServicePoint, + toState, + totalOrderValue, + updatedAt, + weight, + checkoutPayload, + width, + height, + length, + customDetails, + } = this; + + const response = await app.upsertIntegrationShipment({ + $, + integrationId, + data: { + shipments: [ + { + address, + address2, + city, + company_name: companyName, + country, + created_at: createdAt, + currency, + customs_invoice_nr: customsInvoiceNr, + customs_shipment_type: customsShipmentType, + email, + external_order_id: externalOrderId, + external_shipment_id: externalShipmentId, + house_number: houseNumber, + name, + order_number: orderNumber, + order_status: { + id: orderStatusId, + message: orderStatusMessage, + }, + parcel_items: utils.parseArray(parcelItems), + payment_status: { + id: paymentStatusId, + message: paymentStatusMessage, + }, + postal_code: postalCode, + shipping_method: shippingMethod, + shipping_method_checkout_name: shippingMethodCheckoutName, + telephone, + to_post_number: toPostNumber, + to_service_point: toServicePoint, + to_state: toState, + total_order_value: totalOrderValue, + updated_at: updatedAt, + weight, + checkout_payload: utils.parseJson(checkoutPayload), + width, + height, + length, + custom_details: utils.parseJson(customDetails), + }, + ], + }, + }); + + $.export("$summary", "Successfully created or updated integration shipment"); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/get-current-user/get-current-user.mjs b/components/sendcloud/actions/get-current-user/get-current-user.mjs new file mode 100644 index 0000000000000..5ff452b93fdae --- /dev/null +++ b/components/sendcloud/actions/get-current-user/get-current-user.mjs @@ -0,0 +1,22 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-get-current-user", + name: "Get Current User", + description: "Get the authenticated user info. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/user/operations/list-user-auth-metadata)", + version: "0.0.1", + type: "action", + props: { + app, + }, + async run({ $ }) { + const response = await this.app.getCurrentUser({ + $, + }); + + $.export("$summary", "Successfully retrieved current user"); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/get-label/get-label.mjs b/components/sendcloud/actions/get-label/get-label.mjs new file mode 100644 index 0000000000000..0ac4167ad5360 --- /dev/null +++ b/components/sendcloud/actions/get-label/get-label.mjs @@ -0,0 +1,34 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-get-label", + name: "Get Label", + description: "Retrieve a label by parcel ID. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/labels/operations/get-a-label)", + version: "0.0.1", + type: "action", + props: { + app, + parcelId: { + propDefinition: [ + app, + "parcelId", + ], + }, + }, + async run({ $ }) { + const { + app, + parcelId, + } = this; + + const response = await app.getLabel({ + $, + parcelId, + }); + + $.export("$summary", `Successfully retrieved label for parcel \`${parcelId}\``); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/get-parcel/get-parcel.mjs b/components/sendcloud/actions/get-parcel/get-parcel.mjs new file mode 100644 index 0000000000000..0ad1116dfdd7a --- /dev/null +++ b/components/sendcloud/actions/get-parcel/get-parcel.mjs @@ -0,0 +1,34 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-get-parcel", + name: "Get Parcel", + description: "Retrieve a parcel by ID. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/parcels/operations/get-a-parcel)", + version: "0.0.1", + type: "action", + props: { + app, + parcelId: { + propDefinition: [ + app, + "parcelId", + ], + }, + }, + async run({ $ }) { + const { + app, + parcelId, + } = this; + + const response = await app.getParcel({ + $, + parcelId, + }); + + $.export("$summary", `Successfully retrieved parcel with ID \`${response.parcel?.id}\``); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/get-return-portal-settings/get-return-portal-settings.mjs b/components/sendcloud/actions/get-return-portal-settings/get-return-portal-settings.mjs new file mode 100644 index 0000000000000..4028c30d58209 --- /dev/null +++ b/components/sendcloud/actions/get-return-portal-settings/get-return-portal-settings.mjs @@ -0,0 +1,62 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-get-return-portal-settings", + name: "Get Return Portal Settings", + description: "Get return portal settings for the current brand/user. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/return-portal/operations/get-a-brand-return-portal)", + version: "0.0.1", + type: "action", + props: { + app, + brandDomain: { + propDefinition: [ + app, + "brandDomain", + () => ({ + mapper: ({ + name: label, + domain: value, + }) => ({ + label, + value, + }), + }), + ], + }, + language: { + type: "string", + label: "Language", + description: "Translate the portal and context to this language.", + optional: true, + options: [ + "en-GB", + "de-DE", + "es-ES", + "fr-FR", + "nl-NL", + "it-IT", + "en-US", + ], + }, + }, + async run({ $ }) { + const { + app, + brandDomain, + language, + } = this; + + const response = await app.getReturnPortalSettings({ + $, + brandDomain, + params: { + language, + }, + }); + + $.export("$summary", "Successfully retrieved return portal settings"); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/get-return/get-return.mjs b/components/sendcloud/actions/get-return/get-return.mjs new file mode 100644 index 0000000000000..9e4a38f6771be --- /dev/null +++ b/components/sendcloud/actions/get-return/get-return.mjs @@ -0,0 +1,52 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-get-return", + name: "Get Return", + description: "Retrieve a return by ID. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/returns/operations/get-a-return)", + version: "0.0.1", + type: "action", + props: { + app, + fromDate: { + propDefinition: [ + app, + "fromDate", + ], + }, + toDate: { + propDefinition: [ + app, + "toDate", + ], + }, + returnId: { + propDefinition: [ + app, + "returnId", + ({ + fromDate, toDate, + }) => ({ + fromDate, + toDate, + }), + ], + }, + }, + async run({ $ }) { + const { + app, + returnId, + } = this; + + const response = await app.getReturn({ + $, + returnId, + }); + + $.export("$summary", "Successfully retrieved return"); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/get-sender-address/get-sender-address.mjs b/components/sendcloud/actions/get-sender-address/get-sender-address.mjs new file mode 100644 index 0000000000000..5a88df0fbb21b --- /dev/null +++ b/components/sendcloud/actions/get-sender-address/get-sender-address.mjs @@ -0,0 +1,34 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-get-sender-address", + name: "Get Sender Address", + description: "Retrieve a sender address by ID. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/sender-addresses/operations/get-a-user-address-sender-1)", + version: "0.0.1", + type: "action", + props: { + app, + senderAddressId: { + propDefinition: [ + app, + "senderAddress", + ], + }, + }, + async run({ $ }) { + const { + app, + senderAddressId, + } = this; + + const response = await app.getSenderAddress({ + $, + senderAddressId, + }); + + $.export("$summary", `Successfully retrieved sender address \`${senderAddressId}\``); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/get-service-point/get-service-point.mjs b/components/sendcloud/actions/get-service-point/get-service-point.mjs new file mode 100644 index 0000000000000..4702f1e2ce7f3 --- /dev/null +++ b/components/sendcloud/actions/get-service-point/get-service-point.mjs @@ -0,0 +1,44 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-get-service-point", + name: "Get Service Point", + description: "Retrieve a service point by ID. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/service-points/operations/get-a-service-point)", + version: "0.0.1", + type: "action", + props: { + app, + country: { + propDefinition: [ + app, + "country", + ], + }, + servicePointId: { + label: "Service Point ID", + propDefinition: [ + app, + "servicePointId", + ({ country }) => ({ + country, + }), + ], + }, + }, + async run({ $ }) { + const { + app, + servicePointId, + } = this; + + const response = await app.getServicePoint({ + $, + servicePointId, + }); + + $.export("$summary", `Successfully retrieved service point \`${servicePointId}\``); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/get-shipping-method/get-shipping-method.mjs b/components/sendcloud/actions/get-shipping-method/get-shipping-method.mjs new file mode 100644 index 0000000000000..5f111fd6b626a --- /dev/null +++ b/components/sendcloud/actions/get-shipping-method/get-shipping-method.mjs @@ -0,0 +1,34 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-get-shipping-method", + name: "Get Shipping Method", + description: "Retrieve a shipping method by ID. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/shipping-methods/operations/get-a-shipping-method)", + version: "0.0.1", + type: "action", + props: { + app, + shippingMethodId: { + propDefinition: [ + app, + "shippingMethodId", + ], + }, + }, + async run({ $ }) { + const { + app, + shippingMethodId, + } = this; + + const response = await app.getShippingMethod({ + $, + shippingMethodId, + }); + + $.export("$summary", `Successfully retrieved shipping method \`${shippingMethodId}\``); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/list-integration-shipments/list-integration-shipments.mjs b/components/sendcloud/actions/list-integration-shipments/list-integration-shipments.mjs new file mode 100644 index 0000000000000..c48a6fedc5a55 --- /dev/null +++ b/components/sendcloud/actions/list-integration-shipments/list-integration-shipments.mjs @@ -0,0 +1,96 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-list-integration-shipments", + name: "List Integration Shipments", + description: "List integration shipments. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/integrations/operations/list-integration-shipments)", + version: "0.0.1", + type: "action", + props: { + app, + integrationId: { + propDefinition: [ + app, + "integrationId", + ], + }, + senderAddress: { + propDefinition: [ + app, + "senderAddress", + ], + }, + externalOrderIds: { + type: "string[]", + label: "External Order IDs", + description: "Filter to shipments where `external_order_id` matches one of these values.", + optional: true, + }, + externalShipmentIds: { + type: "string[]", + label: "External Shipment IDs", + description: "Filter to shipments where `external_shipment_id` matches one of these values.", + optional: true, + }, + endDate: { + type: "string", + label: "End Date", + description: "Displays orders up to the given date (inclusive). Format: `YYYY-MM-DD`. Defaults to current date.", + optional: true, + }, + orderNumber: { + type: "string", + label: "Order Number", + description: "Filter to shipments matching this order number.", + optional: true, + }, + shippingRules: { + type: "boolean", + label: "Enable Shipping Rules", + description: "Enable shipping rules when retrieving orders (impacts `allowed_shipping_methods`).", + optional: true, + }, + startDate: { + type: "string", + label: "Start Date", + description: "Displays orders from the given date (inclusive). Format: `YYYY-MM-DD`. Defaults to one year ago.", + optional: true, + }, + }, + async run({ $ }) { + const { + app, + integrationId, + endDate, + externalOrderIds, + externalShipmentIds, + orderNumber, + senderAddress, + shippingRules, + startDate, + } = this; + + const response = await app.paginate({ + requester: app.listIntegrationShipments, + requesterArgs: { + $, + integrationId, + params: { + end_date: endDate, + external_order_ids: externalOrderIds, + external_shipment_ids: externalShipmentIds, + order_number: orderNumber, + sender_address: senderAddress, + shipping_rules: shippingRules, + start_date: startDate, + }, + }, + resultsKey: "results", + }); + + $.export("$summary", `Successfully retrieved \`${response.length}\` integration shipment(s)`); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/list-parcel-documents/list-parcel-documents.mjs b/components/sendcloud/actions/list-parcel-documents/list-parcel-documents.mjs new file mode 100644 index 0000000000000..e2683e41b44ee --- /dev/null +++ b/components/sendcloud/actions/list-parcel-documents/list-parcel-documents.mjs @@ -0,0 +1,85 @@ +import fs from "fs"; +import path from "path"; +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-list-parcel-documents", + name: "List Parcel Documents", + description: "List parcel documents. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/parcel-documents/operations/get-a-parcel-document-1)", + version: "0.0.1", + type: "action", + props: { + app, + type: { + type: "string", + label: "Type", + description: "Document type you want to retrieve.", + options: [ + "label", + "customs-declaration", + "air-waybill", + ], + }, + parcels: { + type: "string[]", + label: "Parcels", + description: "IDs of parcels to retrieve documents. Example: [1, 2, 3]", + propDefinition: [ + app, + "parcelId", + ], + }, + paperSize: { + type: "string", + label: "Paper Size", + description: "Optional. One of `A4`, `A5`, `A6`. If omitted, the document's internal paper size is used.", + optional: true, + options: [ + "A4", + "A5", + "A6", + ], + }, + header: { + type: "string", + label: "Header", + description: "The type of document to return. Default is `application/pdf`.", + optional: true, + options: [ + "application/pdf", + "application/zpl", + ], + }, + }, + async run({ $ }) { + const { + app, + type, + parcels, + paperSize, + header, + } = this; + + const response = await app.listParcelDocuments({ + $, + type, + params: { + parcels, + paper_size: paperSize, + }, + headers: { + Accept: header || "application/pdf", + }, + }); + + const filePath = path.join("/tmp", `${type}-${Date.now()}.pdf`); + fs.writeFileSync(filePath, response); + + $.export("$summary", "Successfully listed parcel documents"); + + return { + filePath, + }; + }, +}; + diff --git a/components/sendcloud/actions/list-parcel-statuses/list-parcel-statuses.mjs b/components/sendcloud/actions/list-parcel-statuses/list-parcel-statuses.mjs new file mode 100644 index 0000000000000..ff574acd4d39a --- /dev/null +++ b/components/sendcloud/actions/list-parcel-statuses/list-parcel-statuses.mjs @@ -0,0 +1,22 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-list-parcel-statuses", + name: "List Parcel Statuses", + description: "List parcel statuses. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/parcel-statuses/operations/list-parcel-statuses)", + version: "0.0.1", + type: "action", + props: { + app, + }, + async run({ $ }) { + const response = await this.app.listParcelStatuses({ + $, + }); + + $.export("$summary", "Successfully listed parcel statuses"); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/list-parcels/list-parcels.mjs b/components/sendcloud/actions/list-parcels/list-parcels.mjs index ab7cbc4754325..62e9fe6176c08 100644 --- a/components/sendcloud/actions/list-parcels/list-parcels.mjs +++ b/components/sendcloud/actions/list-parcels/list-parcels.mjs @@ -4,7 +4,7 @@ export default { key: "sendcloud-list-parcels", name: "List Parcels", description: "Retrieves a list of all the parcels under your API credentials. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/parcels/operations/list-parcels)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/sendcloud/actions/list-returns/list-returns.mjs b/components/sendcloud/actions/list-returns/list-returns.mjs new file mode 100644 index 0000000000000..5ba303b204022 --- /dev/null +++ b/components/sendcloud/actions/list-returns/list-returns.mjs @@ -0,0 +1,88 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-list-returns", + name: "List Returns", + description: "List returns. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/returns/operations/list-returns)", + version: "0.0.1", + type: "action", + props: { + app, + fromDate: { + type: "string", + label: "From Date", + description: "Excludes all returns before this datetime. Example: `2022-04-06 00:00:00`", + }, + toDate: { + type: "string", + label: "To Date", + description: "Excludes all returns after this datetime. Example: `2022-04-07 00:00:00`", + }, + parentParcelStatus: { + type: "string", + label: "Parent Parcel Status", + description: "Search for returns with this parent status.", + optional: true, + options: [ + "ready-to-send", + "announced", + "to-sorting", + "delayed", + "sorted", + "unsorted", + "sorting", + "delivery-failed", + "delivery-forced", + "delivered", + "awaiting-customer-pickup", + "announced-uncollected", + "collect-error", + "unsorted2", + "undeliverable", + "shipment-on-route", + "driver-on-route", + "picked-up-by-driver", + "collected-by-customer", + "no-label", + "announcing", + "cancelling-upstream", + "cancelling", + "cancelled", + "cancelled-upstream", + "unknown", + "announcement-failed", + "at-customs", + "at-sorting-centre", + "refused-by-recipient", + "returned-to-sender", + "delivery-method-changed", + "delivery-date-changed", + "delivery-address-changed", + "exception", + "address-invalid", + ], + }, + }, + async run({ $ }) { + const { + app, + parentParcelStatus, + fromDate, + toDate, + } = this; + + const response = await app.listReturns({ + $, + params: { + parent_parcel_status: parentParcelStatus, + from_date: fromDate, + to_date: toDate, + }, + }); + + $.export("$summary", "Successfully listed returns"); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/list-sender-addresses/list-sender-addresses.mjs b/components/sendcloud/actions/list-sender-addresses/list-sender-addresses.mjs new file mode 100644 index 0000000000000..1e67661069924 --- /dev/null +++ b/components/sendcloud/actions/list-sender-addresses/list-sender-addresses.mjs @@ -0,0 +1,22 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-list-sender-addresses", + name: "List Sender Addresses", + description: "List sender addresses for the authenticated user. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/sender-addresses/operations/get-a-user-address-sender)", + version: "0.0.1", + type: "action", + props: { + app, + }, + async run({ $ }) { + const response = await this.app.listSenderAddresses({ + $, + }); + + $.export("$summary", "Successfully listed sender addresses"); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/list-service-point-carriers/list-service-point-carriers.mjs b/components/sendcloud/actions/list-service-point-carriers/list-service-point-carriers.mjs new file mode 100644 index 0000000000000..cb7d610d58e76 --- /dev/null +++ b/components/sendcloud/actions/list-service-point-carriers/list-service-point-carriers.mjs @@ -0,0 +1,36 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-list-service-point-carriers", + name: "List Service Point Carriers", + description: "List carriers that support service points. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/service-points/operations/list-carriers)", + version: "0.0.1", + type: "action", + props: { + app, + accessToken: { + propDefinition: [ + app, + "accessToken", + ], + }, + }, + async run({ $ }) { + const { + app, + accessToken, + } = this; + + const response = await app.listServicePointCarriers({ + $, + params: { + access_token: accessToken, + }, + }); + + $.export("$summary", "Successfully listed service point carriers"); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/list-service-points/list-service-points.mjs b/components/sendcloud/actions/list-service-points/list-service-points.mjs new file mode 100644 index 0000000000000..0e034acd2f720 --- /dev/null +++ b/components/sendcloud/actions/list-service-points/list-service-points.mjs @@ -0,0 +1,191 @@ +import app from "../../sendcloud.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + key: "sendcloud-list-service-points", + name: "List Service Points", + description: "List service points. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/service-points/operations/list-service-points)", + version: "0.0.1", + type: "action", + props: { + app, + country: { + propDefinition: [ + app, + "country", + ], + }, + accessToken: { + propDefinition: [ + app, + "accessToken", + ], + }, + address: { + propDefinition: [ + app, + "address", + ], + description: "Destination address or postal code. Example: 'Stadhuisplein 10'", + optional: true, + }, + carrier: { + type: "string", + label: "Carrier Codes", + description: "Comma-separated list of carrier codes. Example: 'postnl,dpd'", + optional: true, + }, + city: { + propDefinition: [ + app, + "city", + ], + optional: true, + }, + generalShopType: { + type: "string[]", + label: "General Shop Type", + description: "Single value or comma-separated values (e.g., 'servicepoint' or 'servicepoint,locker,post_office').", + optional: true, + options: [ + "servicepoint", + "locker", + "post_office", + "carrier_depot", + ], + }, + houseNumber: { + propDefinition: [ + app, + "houseNumber", + ], + optional: true, + }, + latitude: { + propDefinition: [ + app, + "latitude", + ], + }, + longitude: { + propDefinition: [ + app, + "longitude", + ], + }, + neLatitude: { + propDefinition: [ + app, + "neLatitude", + ], + }, + neLongitude: { + propDefinition: [ + app, + "neLongitude", + ], + }, + postalCode: { + propDefinition: [ + app, + "postalCode", + ], + label: "Postal Code", + description: "Postal code of the destination. Example: '5611 EM'", + optional: true, + }, + pudoId: { + type: "string", + label: "PUDO ID", + description: "DPD-specific parameter (<= 7 characters).", + optional: true, + }, + radius: { + type: "integer", + label: "Radius (meters)", + description: "Radius (in meter) of a bounding circle. Can be used instead of the **NE Latitude**, **NE Longitude**, **SW Latitude**, and **SW Longitude** parameters to define a bounding box. Minimum value: 100 meters. Maximum value: 50 000 meters.", + optional: true, + }, + shopType: { + type: "string", + label: "Shop Type", + description: "Filter results by shop type.", + optional: true, + }, + swLatitude: { + propDefinition: [ + app, + "swLatitude", + ], + }, + swLongitude: { + propDefinition: [ + app, + "swLongitude", + ], + }, + weight: { + type: "string", + label: "Weight (kg)", + description: "Parcel weight in kilograms. Certain carriers have limits per service point.", + optional: true, + }, + }, + async run({ $ }) { + const { + app, + country, + accessToken, + address, + carrier, + city, + generalShopType, + houseNumber, + latitude, + longitude, + neLatitude, + neLongitude, + postalCode, + pudoId, + radius, + shopType, + swLatitude, + swLongitude, + weight, + } = this; + + const response = await app.listServicePoints({ + $, + params: { + country, + access_token: accessToken, + address, + carrier, + city, + ...(generalShopType + ? { + general_shop_type: utils.parseArray(generalShopType)?.join(","), + } + : undefined + ), + house_number: houseNumber, + latitude, + longitude, + ne_latitude: neLatitude, + ne_longitude: neLongitude, + postal_code: postalCode, + pudo_id: pudoId, + radius, + shop_type: shopType, + sw_latitude: swLatitude, + sw_longitude: swLongitude, + weight, + }, + }); + + $.export("$summary", "Successfully listed service points"); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/list-shipping-methods/list-shipping-methods.mjs b/components/sendcloud/actions/list-shipping-methods/list-shipping-methods.mjs new file mode 100644 index 0000000000000..c1a4ae54ec1cf --- /dev/null +++ b/components/sendcloud/actions/list-shipping-methods/list-shipping-methods.mjs @@ -0,0 +1,94 @@ +import app from "../../sendcloud.app.mjs"; + +export default { + key: "sendcloud-list-shipping-methods", + name: "List Shipping Methods", + description: "List shipping methods. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/shipping-methods/operations/list-shipping-methods)", + version: "0.0.1", + type: "action", + props: { + app, + country: { + propDefinition: [ + app, + "country", + ], + }, + servicePointId: { + propDefinition: [ + app, + "servicePointId", + ({ country }) => ({ + country, + }), + ], + optional: true, + }, + fromPostalCode: { + type: "string", + label: "From Postal Code", + description: "Postal code of the sender (<= 12 chars). Required if the carrier is zonal.", + optional: true, + }, + isReturn: { + type: "boolean", + label: "Is Return", + description: "If true, returns shipping methods usable for return shipments.", + optional: true, + }, + senderAddress: { + description: "Sender address ID or `all` to retrieve all available shipping methods. Required if the carrier is zonal.", + optional: true, + propDefinition: [ + app, + "senderAddress", + ], + }, + toCountry: { + propDefinition: [ + app, + "country", + ], + label: "To Country", + description: "Recipient country (ISO 3166-1 alpha-2). Required if the carrier is zonal and to compute remote surcharges.", + optional: true, + }, + toPostalCode: { + propDefinition: [ + app, + "postalCode", + ], + label: "To Postal Code", + description: "Postal code of the recipient (<= 12 chars). Required if the carrier is zonal and to compute remote surcharges.", + optional: true, + }, + }, + async run({ $ }) { + const { + app, + fromPostalCode, + isReturn, + senderAddress, + servicePointId, + toCountry, + toPostalCode, + } = this; + + const response = await app.listShippingMethods({ + $, + params: { + from_postal_code: fromPostalCode, + is_return: isReturn, + sender_address: senderAddress, + service_point_id: servicePointId, + to_country: toCountry, + to_postal_code: toPostalCode, + }, + }); + + $.export("$summary", "Successfully listed shipping methods"); + + return response; + }, +}; + diff --git a/components/sendcloud/actions/update-a-parcel/update-a-parcel.mjs b/components/sendcloud/actions/update-a-parcel/update-a-parcel.mjs index d29edb84efbda..8f131e09b2363 100644 --- a/components/sendcloud/actions/update-a-parcel/update-a-parcel.mjs +++ b/components/sendcloud/actions/update-a-parcel/update-a-parcel.mjs @@ -4,7 +4,7 @@ export default { key: "sendcloud-update-a-parcel", name: "Update a Parcel", description: "Updates a parcel under your API credentials. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/parcels/operations/update-a-parcel)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/sendcloud/actions/validate-return/validate-return.mjs b/components/sendcloud/actions/validate-return/validate-return.mjs new file mode 100644 index 0000000000000..7cb7facc49baa --- /dev/null +++ b/components/sendcloud/actions/validate-return/validate-return.mjs @@ -0,0 +1,120 @@ +import app from "../../sendcloud.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + key: "sendcloud-validate-return", + name: "Validate Return", + description: "Validate a return. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/returns/operations/create-a-return-validate)", + version: "0.0.1", + type: "action", + props: { + app, + fromAddress: { + label: "From Address", + propDefinition: [ + app, + "addressSetup", + ], + }, + toAddress: { + label: "To Address", + propDefinition: [ + app, + "addressSetup", + ], + }, + shipWith: { + propDefinition: [ + app, + "shipWith", + ], + }, + dimensionsLength: { + propDefinition: [ + app, + "dimensionsLength", + ], + }, + dimensionsWidth: { + propDefinition: [ + app, + "dimensionsWidth", + ], + }, + dimensionsHeight: { + propDefinition: [ + app, + "dimensionsHeight", + ], + }, + dimensionsUnit: { + propDefinition: [ + app, + "dimensionsUnit", + ], + }, + weightValue: { + propDefinition: [ + app, + "weightValue", + ], + }, + weightUnit: { + propDefinition: [ + app, + "weightUnit", + ], + }, + }, + async run({ $ }) { + const { + app, + fromAddress, + toAddress, + shipWith, + dimensionsLength, + dimensionsWidth, + dimensionsHeight, + dimensionsUnit, + weightValue, + weightUnit, + } = this; + + const response = await app.validateReturn({ + $, + data: { + from_address: utils.parseJson(fromAddress), + to_address: utils.parseJson(toAddress), + ship_with: utils.parseJson(shipWith), + ...(dimensionsLength + && dimensionsWidth + && dimensionsHeight + && dimensionsUnit + ? { + dimensions: { + length: dimensionsLength, + width: dimensionsWidth, + height: dimensionsHeight, + unit: dimensionsUnit, + }, + } + : undefined + ), + ...(weightValue && weightUnit + ? { + weight: { + value: weightValue, + unit: weightUnit, + }, + } + : undefined + ), + }, + }); + + $.export("$summary", "Successfully validated return payload"); + + return response; + }, +}; + diff --git a/components/sendcloud/common/constants.mjs b/components/sendcloud/common/constants.mjs index 85c6ea7ac20ac..29b1ef124e9cf 100644 --- a/components/sendcloud/common/constants.mjs +++ b/components/sendcloud/common/constants.mjs @@ -1,89 +1,108 @@ export default { + // this is set to true for testing purposes + USE_MOCK: false, + VERSION_PATH: { + V2: "/api/v2", + V3: "/api/v3", + MOCK_V2: "/mocks/sendcloud/sendcloud-public-api:v2", + MOCK_V3: "/mocks/sendcloud/sendcloud-public-api", + }, + BASE_URL: "https://panel.sendcloud.sc", + MOCK_BASE_URL: "https://stoplight.io", + SERVICE_POINTS_BASE_URL: "https://servicepoints.sendcloud.sc", COUNTRIES: [ { - label: "Andorra", - value: "AD", - }, - { - label: "United Arab Emirates", - value: "AE", + label: "Aruba", + value: "AW", }, { label: "Afghanistan", value: "AF", }, { - label: "Antigua and Barbuda", - value: "AG", + label: "Angola", + value: "AO", }, { label: "Anguilla", value: "AI", }, { - label: "Albania", - value: "AL", + label: "ร…land Islands", + value: "AX", }, { - label: "Armenia", - value: "AM", + label: "Albania", + value: "AL", }, { - label: "Angola", - value: "AO", + label: "Andorra", + value: "AD", }, { - label: "Antarctica", - value: "AQ", + label: "United Arab Emirates", + value: "AE", }, { label: "Argentina", value: "AR", }, + { + label: "Armenia", + value: "AM", + }, { label: "American Samoa", value: "AS", }, { - label: "Austria", - value: "AT", + label: "Antarctica", + value: "AQ", }, { - label: "Australia", - value: "AU", + label: "French Southern Territories", + value: "TF", }, { - label: "Aruba", - value: "AW", + label: "Antigua and Barbuda", + value: "AG", }, { - label: "ร…land Islands", - value: "AX", + label: "Australia", + value: "AU", + }, + { + label: "Austria", + value: "AT", }, { label: "Azerbaijan", value: "AZ", }, { - label: "Bosnia and Herzegovina", - value: "BA", + label: "Burundi", + value: "BI", }, { - label: "Barbados", - value: "BB", + label: "Belgium", + value: "BE", }, { - label: "Bangladesh", - value: "BD", + label: "Benin", + value: "BJ", }, { - label: "Belgium", - value: "BE", + label: "Bonaire, Sint Eustatius and Saba", + value: "BQ", }, { label: "Burkina Faso", value: "BF", }, + { + label: "Bangladesh", + value: "BD", + }, { label: "Bulgaria", value: "BG", @@ -93,40 +112,44 @@ export default { value: "BH", }, { - label: "Burundi", - value: "BI", + label: "Bahamas", + value: "BS", }, { - label: "Benin", - value: "BJ", + label: "Bosnia and Herzegovina", + value: "BA", }, { label: "Saint Barthรฉlemy", value: "BL", }, { - label: "Bermuda", - value: "BM", + label: "Belarus", + value: "BY", }, { - label: "Brunei Darussalam", - value: "BN", + label: "Belize", + value: "BZ", }, { - label: "Bolivia, Plurinational State of", - value: "BO", + label: "Bermuda", + value: "BM", }, { - label: "Bonaire, Sint Eustatius and Saba", - value: "BQ", + label: "Bolivia, Plurinational State of", + value: "BO", }, { label: "Brazil", value: "BR", }, { - label: "Bahamas", - value: "BS", + label: "Barbados", + value: "BB", + }, + { + label: "Brunei Darussalam", + value: "BN", }, { label: "Bhutan", @@ -141,12 +164,8 @@ export default { value: "BW", }, { - label: "Belarus", - value: "BY", - }, - { - label: "Belize", - value: "BZ", + label: "Central African Republic", + value: "CF", }, { label: "Canada", @@ -157,45 +176,49 @@ export default { value: "CC", }, { - label: "Congo, Democratic Republic of the", - value: "CD", - }, - { - label: "Central African Republic", - value: "CF", + label: "Switzerland", + value: "CH", }, { - label: "Congo", - value: "CG", + label: "Chile", + value: "CL", }, { - label: "Switzerland", - value: "CH", + label: "China", + value: "CN", }, { label: "Cรดte d'Ivoire", value: "CI", }, { - label: "Cook Islands", - value: "CK", + label: "Cameroon", + value: "CM", }, { - label: "Chile", - value: "CL", + label: "Congo, Democratic Republic of the", + value: "CD", }, { - label: "Cameroon", - value: "CM", + label: "Congo", + value: "CG", }, { - label: "China", - value: "CN", + label: "Cook Islands", + value: "CK", }, { label: "Colombia", value: "CO", }, + { + label: "Comoros", + value: "KM", + }, + { + label: "Cabo Verde", + value: "CV", + }, { label: "Costa Rica", value: "CR", @@ -204,10 +227,6 @@ export default { label: "Cuba", value: "CU", }, - { - label: "Cabo Verde", - value: "CV", - }, { label: "Curaรงao", value: "CW", @@ -216,6 +235,10 @@ export default { label: "Christmas Island", value: "CX", }, + { + label: "Cayman Islands", + value: "KY", + }, { label: "Cyprus", value: "CY", @@ -232,14 +255,14 @@ export default { label: "Djibouti", value: "DJ", }, - { - label: "Denmark", - value: "DK", - }, { label: "Dominica", value: "DM", }, + { + label: "Denmark", + value: "DK", + }, { label: "Dominican Republic", value: "DO", @@ -252,26 +275,26 @@ export default { label: "Ecuador", value: "EC", }, - { - label: "Estonia", - value: "EE", - }, { label: "Egypt", value: "EG", }, - { - label: "Western Sahara", - value: "EH", - }, { label: "Eritrea", value: "ER", }, + { + label: "Western Sahara", + value: "EH", + }, { label: "Spain", value: "ES", }, + { + label: "Estonia", + value: "EE", + }, { label: "Ethiopia", value: "ET", @@ -289,16 +312,16 @@ export default { value: "FK", }, { - label: "Micronesia, Federated States of", - value: "FM", + label: "France", + value: "FR", }, { label: "Faroe Islands", value: "FO", }, { - label: "France", - value: "FR", + label: "Micronesia, Federated States of", + value: "FM", }, { label: "Gabon", @@ -308,18 +331,10 @@ export default { label: "United Kingdom of Great Britain and Northern Ireland", value: "GB", }, - { - label: "Grenada", - value: "GD", - }, { label: "Georgia", value: "GE", }, - { - label: "French Guiana", - value: "GF", - }, { label: "Guernsey", value: "GG", @@ -332,14 +347,6 @@ export default { label: "Gibraltar", value: "GI", }, - { - label: "Greenland", - value: "GL", - }, - { - label: "Gambia", - value: "GM", - }, { label: "Guinea", value: "GN", @@ -348,6 +355,14 @@ export default { label: "Guadeloupe", value: "GP", }, + { + label: "Gambia", + value: "GM", + }, + { + label: "Guinea-Bissau", + value: "GW", + }, { label: "Equatorial Guinea", value: "GQ", @@ -357,20 +372,24 @@ export default { value: "GR", }, { - label: "South Georgia and the South Sandwich Islands", - value: "GS", + label: "Grenada", + value: "GD", + }, + { + label: "Greenland", + value: "GL", }, { label: "Guatemala", value: "GT", }, { - label: "Guam", - value: "GU", + label: "French Guiana", + value: "GF", }, { - label: "Guinea-Bissau", - value: "GW", + label: "Guam", + value: "GU", }, { label: "Guyana", @@ -404,14 +423,6 @@ export default { label: "Indonesia", value: "ID", }, - { - label: "Ireland", - value: "IE", - }, - { - label: "Israel", - value: "IL", - }, { label: "Isle of Man", value: "IM", @@ -425,29 +436,37 @@ export default { value: "IO", }, { - label: "Iraq", - value: "IQ", + label: "Ireland", + value: "IE", }, { label: "Iran, Islamic Republic of", value: "IR", }, + { + label: "Iraq", + value: "IQ", + }, { label: "Iceland", value: "IS", }, { - label: "Italy", - value: "IT", + label: "Israel", + value: "IL", }, { - label: "Jersey", - value: "JE", + label: "Italy", + value: "IT", }, { label: "Jamaica", value: "JM", }, + { + label: "Jersey", + value: "JE", + }, { label: "Jordan", value: "JO", @@ -456,6 +475,10 @@ export default { label: "Japan", value: "JP", }, + { + label: "Kazakhstan", + value: "KZ", + }, { label: "Kenya", value: "KE", @@ -472,18 +495,10 @@ export default { label: "Kiribati", value: "KI", }, - { - label: "Comoros", - value: "KM", - }, { label: "Saint Kitts and Nevis", value: "KN", }, - { - label: "Korea, Democratic People's Republic of", - value: "KP", - }, { label: "Korea, Republic of", value: "KR", @@ -492,14 +507,6 @@ export default { label: "Kuwait", value: "KW", }, - { - label: "Cayman Islands", - value: "KY", - }, - { - label: "Kazakhstan", - value: "KZ", - }, { label: "Lao People's Democratic Republic", value: "LA", @@ -508,6 +515,14 @@ export default { label: "Lebanon", value: "LB", }, + { + label: "Liberia", + value: "LR", + }, + { + label: "Libya", + value: "LY", + }, { label: "Saint Lucia", value: "LC", @@ -520,10 +535,6 @@ export default { label: "Sri Lanka", value: "LK", }, - { - label: "Liberia", - value: "LR", - }, { label: "Lesotho", value: "LS", @@ -541,8 +552,12 @@ export default { value: "LV", }, { - label: "Libya", - value: "LY", + label: "Macao", + value: "MO", + }, + { + label: "Saint Martin (French part)", + value: "MF", }, { label: "Morocco", @@ -557,16 +572,16 @@ export default { value: "MD", }, { - label: "Montenegro", - value: "ME", + label: "Madagascar", + value: "MG", }, { - label: "Saint Martin (French part)", - value: "MF", + label: "Maldives", + value: "MV", }, { - label: "Madagascar", - value: "MG", + label: "Mexico", + value: "MX", }, { label: "Marshall Islands", @@ -580,25 +595,29 @@ export default { label: "Mali", value: "ML", }, + { + label: "Malta", + value: "MT", + }, { label: "Myanmar", value: "MM", }, { - label: "Mongolia", - value: "MN", + label: "Montenegro", + value: "ME", }, { - label: "Macao", - value: "MO", + label: "Mongolia", + value: "MN", }, { label: "Northern Mariana Islands", value: "MP", }, { - label: "Martinique", - value: "MQ", + label: "Mozambique", + value: "MZ", }, { label: "Mauritania", @@ -609,32 +628,24 @@ export default { value: "MS", }, { - label: "Malta", - value: "MT", + label: "Martinique", + value: "MQ", }, { label: "Mauritius", value: "MU", }, - { - label: "Maldives", - value: "MV", - }, { label: "Malawi", value: "MW", }, - { - label: "Mexico", - value: "MX", - }, { label: "Malaysia", value: "MY", }, { - label: "Mozambique", - value: "MZ", + label: "Mayotte", + value: "YT", }, { label: "Namibia", @@ -660,6 +671,10 @@ export default { label: "Nicaragua", value: "NI", }, + { + label: "Niue", + value: "NU", + }, { label: "Netherlands, Kingdom of the", value: "NL", @@ -676,10 +691,6 @@ export default { label: "Nauru", value: "NR", }, - { - label: "Niue", - value: "NU", - }, { label: "New Zealand", value: "NZ", @@ -689,61 +700,61 @@ export default { value: "OM", }, { - label: "Panama", - value: "PA", + label: "Pakistan", + value: "PK", }, { - label: "Peru", - value: "PE", + label: "Panama", + value: "PA", }, { - label: "French Polynesia", - value: "PF", + label: "Pitcairn", + value: "PN", }, { - label: "Papua New Guinea", - value: "PG", + label: "Peru", + value: "PE", }, { label: "Philippines", value: "PH", }, { - label: "Pakistan", - value: "PK", - }, - { - label: "Poland", - value: "PL", + label: "Palau", + value: "PW", }, { - label: "Saint Pierre and Miquelon", - value: "PM", + label: "Papua New Guinea", + value: "PG", }, { - label: "Pitcairn", - value: "PN", + label: "Poland", + value: "PL", }, { label: "Puerto Rico", value: "PR", }, { - label: "Palestine, State of", - value: "PS", + label: "Korea, Democratic People's Republic of", + value: "KP", }, { label: "Portugal", value: "PT", }, - { - label: "Palau", - value: "PW", - }, { label: "Paraguay", value: "PY", }, + { + label: "Palestine, State of", + value: "PS", + }, + { + label: "French Polynesia", + value: "PF", + }, { label: "Qatar", value: "QA", @@ -756,10 +767,6 @@ export default { label: "Romania", value: "RO", }, - { - label: "Serbia", - value: "RS", - }, { label: "Russian Federation", value: "RU", @@ -772,61 +779,57 @@ export default { label: "Saudi Arabia", value: "SA", }, - { - label: "Solomon Islands", - value: "SB", - }, - { - label: "Seychelles", - value: "SC", - }, { label: "Sudan", value: "SD", }, { - label: "Sweden", - value: "SE", + label: "Senegal", + value: "SN", }, { label: "Singapore", value: "SG", }, { - label: "Saint Helena, Ascension and Tristan da Cunha", - value: "SH", + label: "South Georgia and the South Sandwich Islands", + value: "GS", }, { - label: "Slovenia", - value: "SI", + label: "Saint Helena, Ascension and Tristan da Cunha", + value: "SH", }, { label: "Svalbard and Jan Mayen", value: "SJ", }, { - label: "Slovakia", - value: "SK", + label: "Solomon Islands", + value: "SB", }, { label: "Sierra Leone", value: "SL", }, { - label: "San Marino", - value: "SM", + label: "El Salvador", + value: "SV", }, { - label: "Senegal", - value: "SN", + label: "San Marino", + value: "SM", }, { label: "Somalia", value: "SO", }, { - label: "Suriname", - value: "SR", + label: "Saint Pierre and Miquelon", + value: "PM", + }, + { + label: "Serbia", + value: "RS", }, { label: "South Sudan", @@ -837,21 +840,37 @@ export default { value: "ST", }, { - label: "El Salvador", - value: "SV", + label: "Suriname", + value: "SR", }, { - label: "Sint Maarten (Dutch part)", - value: "SX", + label: "Slovakia", + value: "SK", }, { - label: "Syrian Arab Republic", - value: "SY", + label: "Slovenia", + value: "SI", + }, + { + label: "Sweden", + value: "SE", }, { label: "Eswatini", value: "SZ", }, + { + label: "Sint Maarten (Dutch part)", + value: "SX", + }, + { + label: "Seychelles", + value: "SC", + }, + { + label: "Syrian Arab Republic", + value: "SY", + }, { label: "Turks and Caicos Islands", value: "TC", @@ -860,10 +879,6 @@ export default { label: "Chad", value: "TD", }, - { - label: "French Southern Territories", - value: "TF", - }, { label: "Togo", value: "TG", @@ -880,30 +895,30 @@ export default { label: "Tokelau", value: "TK", }, - { - label: "Timor-Leste", - value: "TL", - }, { label: "Turkmenistan", value: "TM", }, { - label: "Tunisia", - value: "TN", + label: "Timor-Leste", + value: "TL", }, { label: "Tonga", value: "TO", }, - { - label: "Turkey", - value: "TR", - }, { label: "Trinidad and Tobago", value: "TT", }, + { + label: "Tunisia", + value: "TN", + }, + { + label: "Turkey", + value: "TR", + }, { label: "Tuvalu", value: "TV", @@ -916,26 +931,26 @@ export default { label: "Tanzania, United Republic of", value: "TZ", }, - { - label: "Ukraine", - value: "UA", - }, { label: "Uganda", value: "UG", }, { - label: "United States Minor Outlying Islands", - value: "UM", + label: "Ukraine", + value: "UA", }, { - label: "United States of America", - value: "US", + label: "United States Minor Outlying Islands", + value: "UM", }, { label: "Uruguay", value: "UY", }, + { + label: "United States of America", + value: "US", + }, { label: "Uzbekistan", value: "UZ", @@ -980,10 +995,6 @@ export default { label: "Yemen", value: "YE", }, - { - label: "Mayotte", - value: "YT", - }, { label: "South Africa", value: "ZA", @@ -996,5 +1007,13 @@ export default { label: "Zimbabwe", value: "ZW", }, + { + label: "Canary Islands", + value: "IC", + }, + { + label: "Kosovo", + value: "XK", + }, ], }; diff --git a/components/sendcloud/common/utils.mjs b/components/sendcloud/common/utils.mjs new file mode 100644 index 0000000000000..4101f481bbacc --- /dev/null +++ b/components/sendcloud/common/utils.mjs @@ -0,0 +1,68 @@ +const parseJson = (input, maxDepth = 100) => { + const seen = new WeakSet(); + const parse = (value) => { + if (maxDepth <= 0) { + return value; + } + if (typeof(value) === "string") { + // Only parse if the string looks like a JSON object or array + const trimmed = value.trim(); + if ( + (trimmed.startsWith("{") && trimmed.endsWith("}")) || + (trimmed.startsWith("[") && trimmed.endsWith("]")) + ) { + try { + return parseJson(JSON.parse(value), maxDepth - 1); + } catch (e) { + return value; + } + } + return value; + } else if (typeof(value) === "object" && value !== null && !Array.isArray(value)) { + if (seen.has(value)) { + return value; + } + seen.add(value); + return Object.entries(value) + .reduce((acc, [ + key, + val, + ]) => Object.assign(acc, { + [key]: parse(val), + }), {}); + } else if (Array.isArray(value)) { + return value.map((item) => parse(item)); + } + return value; + }; + + return parse(input); +}; + +function parseArray (input, maxDepth = 100) { + if (typeof input === "string") { + const trimmed = input.trim(); + if (trimmed.startsWith("[") && trimmed.endsWith("]")) { + try { + const parsed = JSON.parse(trimmed); + if (Array.isArray(parsed)) { + return parsed.map((item) => parseArray(item, maxDepth - 1)); + } + } catch (e) { + throw new Error(`Invalid JSON array format: ${e.message}`); + } + } + return parseJson(input, maxDepth); + } + + if (Array.isArray(input)) { + return input.map((item) => parseArray(item, maxDepth)); + } + + return input; +} + +export default { + parseJson, + parseArray, +}; diff --git a/components/sendcloud/package.json b/components/sendcloud/package.json index 7d47208589981..fdea32cd80933 100644 --- a/components/sendcloud/package.json +++ b/components/sendcloud/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/sendcloud", - "version": "0.1.0", + "version": "0.2.0", "description": "Pipedream Sendcloud Components", "main": "sendcloud.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.6.0" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/sendcloud/sendcloud.app.mjs b/components/sendcloud/sendcloud.app.mjs index d8266d3da695e..a192a03aaadbb 100644 --- a/components/sendcloud/sendcloud.app.mjs +++ b/components/sendcloud/sendcloud.app.mjs @@ -47,6 +47,7 @@ export default { type: "string", label: "City", description: "City of the recipient", + optional: true, }, houseNumber: { type: "string", @@ -64,49 +65,864 @@ export default { description: "Country of the recipient", options: constants.COUNTRIES, }, + integrationId: { + type: "string", + label: "Integration ID", + description: "The ID of the integration", + async options() { + const integrations = await this.listIntegrations(); + + return integrations.map(({ + id: value, shop_name: label, + }) => ({ + value, + label, + })); + }, + }, + currency: { + type: "string", + label: "Currency", + description: "ISO 4217 currency code", + options: [ + "EUR", + "USD", + "GBP", + ], + }, + senderAddress: { + type: "string", + label: "Sender Address ID", + description: "Specify a sender address ID to display proper allowed_shipping_methods.", + async options() { + const { sender_addresses: senderAddresses } = await this.listSenderAddresses({ + params: { + page_size: 100, + }, + }); + + return senderAddresses.map(({ + id: value, contact_name: name, email, + }) => ({ + value, + label: `${name} (${email})`, + })); + }, + }, + companyName: { + type: "string", + label: "Company Name", + description: "The company name of the shipment.", + }, + createdAt: { + type: "string", + label: "Created At", + description: "Timestamp when the shipment was created in the shop system. Example: `2022-05-07T15:08:12.152000Z`", + }, + customsInvoiceNr: { + type: "string", + label: "Customs Invoice Number", + description: "Commercial invoice number", + }, + customsShipmentType: { + type: "string", + label: "Customs Shipment Type", + description: "The type of shipment for customs purposes.", + options: [ + { + value: "0", + label: "Gift", + }, + { + value: "1", + label: "Documents", + }, + + { + value: "2", + label: "Commercial Goods", + }, + { + value: "3", + label: "Commercial Sample", + }, + { + value: "4", + label: "Returned Goods", + }, + ], + }, + email: { + type: "string", + label: "Email", + description: "The email of the recipient.", + }, + externalOrderId: { + type: "string", + label: "External Order ID", + description: "External order ID assigned by the shop system", + }, + externalShipmentId: { + type: "string", + label: "External Shipment ID", + description: "External shipment ID assigned by the shop system", + }, + orderNumber: { + type: "string", + label: "Order Number", + description: "Unique order number generated manually or by the shop system", + }, + orderStatusId: { + type: "string", + label: "Order Status ID", + description: "Custom internal shop status ID", + }, + orderStatusMessage: { + type: "string", + label: "Order Status Message", + description: "User-defined human readable status", + }, + parcelItems: { + type: "string[]", + label: "Parcel Items", + description: `Array of JSON objects describing each item in the parcel. Each item must include the following fields: +- \`description\` (string, required): Description of the product. Example: \`Bag\` +- \`hs_code\` (string): Harmonized System Code (<= 12 chars). Example: \`01013000\` +- \`origin_country\` (string | null): ISO 3166-1 alpha-2 country code where the product was produced. Example: \`NL\` +- \`product_id\` (string): Internal product ID. Example: \`1458734634\` +- \`properties\` (object): Key-value pairs with additional product properties (e.g., \`{ "color": "Black" }\`) +- \`quantity\` (integer, required): Number of units (>= 1). Example: \`2\` +- \`sku\` (string): Internal stock keeping unit. Example: \`WW-DR-GR-XS-001\` +- \`value\` (string, required): Price per item as a decimal string. Example: \`19.99\` +- \`weight\` (string | null): Weight per item as a decimal string. Example: \`0.5\` +- \`mid_code\` (string | null): Manufacturer's Identification code. Example: \`NLOZR92MEL\` +- \`material_content\` (string | null): Description of materials. Example: \`100% Cotton\` +- \`intended_use\` (string | null): Intended use of the contents. Example: \`Personal use\` + +Example item JSON: +\`\`\`json +{ + "description": "Bag", + "hs_code": "01013000", + "origin_country": "NL", + "product_id": "1458734634", + "properties": { "color": "Black" }, + "quantity": 2, + "sku": "WW-DR-GR-XS-001", + "value": "19.99", + "weight": "0.5", + "mid_code": "NLOZR92MEL", + "material_content": "100% Cotton", + "intended_use": "Personal use" +} +\`\`\` + +Provide each array element as a JSON object string in the UI, or programmatically as an array of objects.`, + }, + paymentStatusId: { + type: "string", + label: "Payment Status ID", + description: "Custom internal payment status ID", + }, + paymentStatusMessage: { + type: "string", + label: "Payment Status Message", + description: "User-defined payment status", + }, + shippingMethodCheckoutName: { + type: "string", + label: "Shipping Method Checkout Name", + description: "Human readable shipping method name", + }, + telephone: { + type: "string", + label: "Telephone", + description: "The telephone number of the recipient.", + }, + toPostNumber: { + type: "string", + label: "To Post Number", + description: "The post number of the recipient.", + }, + servicePointId: { + type: "integer", + label: "Service Point", + description: "The service point ID of the recipient.", + async options({ country }) { + const servicePoints = await this.listServicePoints({ + params: { + country, + }, + }); + + return servicePoints.map(({ + id: value, name, + }) => ({ + value, + label: name, + })); + }, + }, + toState: { + type: "string", + label: "To State", + description: "The state of the recipient.", + }, + totalOrderValue: { + type: "string", + label: "Total Order Value", + description: "Total price of the order (decimal string)", + optional: true, + }, + updatedAt: { + type: "string", + label: "Updated At", + description: "Timestamp when the shipment was updated in the shop system. Example: `2022-05-07T15:08:12.152000Z`", + }, + weight: { + type: "string", + label: "Weight", + description: "Total weight of the order (decimal string)", + optional: true, + }, + checkoutPayload: { + type: "object", + label: "Checkout Payload", + description: `Object capturing checkout selections made by the end-consumer. + +Required keys: +- \`sender_address_id\` (integer): The sender address ID associated with the order. +- \`shipping_product\` (object): The shipping product chosen at checkout. Must include: + - \`code\` (string) + - \`name\` (string) + - \`selected_functionalities\` (array): Functionalities selected for this product. +- \`delivery_method_type\` (string): One of "standard_delivery", "nominated_day_delivery", or "same_day_delivery". +- \`delivery_method_data\` (object): + - \`delivery_date\` (string, date-time): Delivery date required by the end-consumer. + - \`formatted_delivery_date\` (string): Human-readable date (e.g., "February 21, 2012"). + - \`parcel_handover_date\` (string, date-time): Date the parcel must be handed to the carrier. + +Example: +\`\`\`json +{ + "sender_address_id": 12345, + "shipping_product": { + "code": "pd-pickup", + "name": "Pickup Point", + "selected_functionalities": ["signature", "age_check"] + }, + "delivery_method_type": "nominated_day_delivery", + "delivery_method_data": { + "delivery_date": "2025-02-20T09:00:00Z", + "formatted_delivery_date": "February 20, 2025", + "parcel_handover_date": "2025-02-19T18:00:00Z" + } +} +\`\`\``, + optional: true, + }, + customDetails: { + type: "object", + label: "Costs & Tax Details", + description: `Optional object to provide order-level costs and tax numbers. + +- \`discount_granted\` (object): Discount granted on the total order + - \`value\` (string | null): Decimal amount (e.g., "3.99"), pattern: [\\d]+(\\.[\\d]+)? + - \`currency\` (string | null): ISO 4217 code (e.g., "EUR") +- \`insurance_costs\` (object): Amount the order is insured for + - \`value\` (string | null): Decimal amount (e.g., "3.99"), pattern: [\\d]+(\\.[\\d]+)? + - \`currency\` (string | null): ISO 4217 code (e.g., "EUR") +- \`freight_costs\` (object): Shipping cost of the order + - \`value\` (string | null): Decimal amount (e.g., "3.99"), pattern: [\\d]+(\\.[\\d]+)? + - \`currency\` (string | null): ISO 4217 code (e.g., "EUR") +- \`other_costs\` (object): Any other costs (e.g., wrapping costs) + - \`value\` (string | null): Decimal amount (e.g., "3.99"), pattern: [\\d]+(\\.[\\d]+)? + - \`currency\` (string | null): ISO 4217 code (e.g., "EUR") +- \`tax_numbers\` (object | null): Tax info about sender, receiver, and importer of records + - \`sender\` (array of Tax Number): Each has { name (string|null), country_code (string|null), value (string|null) } + - \`receiver\` (array of Tax Number): Same structure as sender + - \`importer_of_records\` (array of Tax Number): Same structure as sender + +Example: +\`\`\`json +{ + "discount_granted": { "value": "3.99", "currency": "EUR" }, + "insurance_costs": { "value": "2.50", "currency": "EUR" }, + "freight_costs": { "value": "5.00", "currency": "EUR" }, + "other_costs": { "value": null, "currency": null }, + "tax_numbers": { + "sender": [{ "name": "VAT", "country_code": "NL", "value": "NL987654321B02" }], + "receiver": [], + "importer_of_records": [] + } +} +\`\`\``, + optional: true, + }, + latitude: { + type: "string", + label: "Latitude", + description: "Reference latitude for distance calculation.", + optional: true, + }, + longitude: { + type: "string", + label: "Longitude", + description: "Reference longitude for distance calculation.", + optional: true, + }, + neLatitude: { + type: "string", + label: "NE Latitude", + description: "Latitude of the northeast corner of the bounding box.", + optional: true, + }, + neLongitude: { + type: "string", + label: "NE Longitude", + description: "Longitude of the northeast corner of the bounding box.", + optional: true, + }, + swLatitude: { + type: "string", + label: "SW Latitude", + description: "Latitude of the southwest corner of the bounding box.", + optional: true, + }, + swLongitude: { + type: "string", + label: "SW Longitude", + description: "Longitude of the southwest corner of the bounding box.", + optional: true, + }, + accessToken: { + type: "string", + label: "Access Token", + description: "JWT containing user 'id' or 'iid' (integration ID), or a public API key.", + optional: true, + }, + returnId: { + type: "string", + label: "Return ID", + description: "The unique identifier of the return", + async options({ + fromDate, toDate, + }) { + if (!fromDate || !toDate) { + return []; + } + + const { data } = await this.listReturns({ + params: { + from_date: fromDate, + to_date: toDate, + }, + }); + + return data.map(({ + reason: { + id: value, + description: label, + }, + }) => ({ + value, + label, + })); + }, + }, + addressSetup: { + type: "object", + label: "From Address", + description: `Required fields: +- \`name\` (string): Name associated with the address. Example: \`John Doe\` +- \`address_line_1\` (string): First line of the address. Example: \`Stadhuisplein\` +- \`postal_code\` (string): Zip code. Example: \`1013 AB\` +- \`city\` (string): City. Example: \`Eindhoven\` +- \`country_code\` (string): ISO 3166-1 alpha-2 code. Example: \`NL\` + +Optional fields: +- \`company_name\` (string): Company name. Example: \`Sendcloud\` +- \`house_number\` (string): House number. Example: \`50\` +- \`address_line_2\` (string): Additional info. Example: \`Apartment 17B\` +- \`po_box\` (string | null): PO box code +- \`state_province_code\` (string): ISO 3166-2 code. Example: \`IT-RM\` +- \`email\` (string): Email. Example: \`johndoe@gmail.com\` +- \`phone_number\` (string): Phone number. Example: \`+319881729999\` + +Example: +\`\`\`json +{ + "name": "John Doe", + "address_line_1": "Stadhuisplein", + "postal_code": "1013 AB", + "city": "Eindhoven", + "country_code": "NL" +} +\`\`\` +`, + }, + shipWith: { + type: "object", + label: "Ship With", + description: `Shipping specifications chosen for the return. + +Fields: +- type (string): How the carrier/method is selected. One of \`shipping_option_code\` or \`shipping_product_code\` (default is \`shipping_product_code\`). +- \`shipping_option_code\` (string): Required if type = \`shipping_option_code\`. Example: \`dpd:return/return\` +- \`shipping_product_code\` (string): Required if type = \`shipping_product_code\`. Example: \`dpd:return/return\` +- \`functionalities\` (object): Shipping functionalities. Provide only when type = \`shipping_product_code\`. +- \`contract\` (integer): Contract ID to ship the return with. +- \`dimensions\` (object): + - \`length\` (number, >= 0) + - \`width\` (number, >= 0) + - \`height\` (number, >= 0) + - \`unit\` (string): One of \`cm\`, \`mm\`, \`m\`, \`yd\`, \`ft\`, \`in\` +- \`weight\` (object): + - \`value\` (number, > 0) + - \`unit\` (string): One of \`kg\`, \`g\`, \`lbs\`, \`oz\` + +Example: +\`\`\`json +{ + "type": "shipping_option_code", + "shipping_option_code": "dpd:return/return", + "contract": 1234, + "dimensions": { "length": 15, "width": 20.5, "height": 37, "unit": "mm" }, + "weight": { "value": 14.5, "unit": "g" } +} +\`\`\``, + }, + dimensionsLength: { + type: "integer", + label: "Dimensions Length", + description: "Length in the specified unit.", + optional: true, + }, + dimensionsWidth: { + type: "integer", + label: "Dimensions Width", + description: "Width in the specified unit.", + optional: true, + }, + dimensionsHeight: { + type: "integer", + label: "Dimensions Height", + description: "Height in the specified unit.", + optional: true, + }, + dimensionsUnit: { + type: "string", + label: "Dimensions Unit", + description: "Unit of the dimensions.", + options: [ + "cm", + "mm", + "m", + "yd", + "ft", + "in", + ], + optional: true, + }, + weightValue: { + type: "integer", + label: "Weight Value", + description: "Weight value in the specified unit.", + }, + weightUnit: { + type: "string", + label: "Weight Unit", + description: "Unit of the weight.", + options: [ + "kg", + "g", + "lbs", + "oz", + ], + }, + brandDomain: { + type: "string", + label: "Brand Domain", + description: "Domain of the brand configured for your return portal (e.g., `my-shop`).", + async options({ + mapper = ({ + id: value, + name: label, + }) => ({ + value, + label, + }), + }) { + const { brands } = await this.listBrands(); + + return brands.map(mapper); + }, + }, + shippingMethodId: { + type: "string", + label: "Shipping Method ID", + description: "The unique identifier of the shipping method", + async options() { + const { shipping_methods: data } = await this.listShippingMethods(); + + return data.map(({ + id: value, + name: label, + }) => ({ + value, + label, + })); + }, + }, + fromDate: { + type: "string", + label: "From Date", + description: "Excludes all returns before this datetime. Example: `2022-04-06 00:00:00`", + }, + toDate: { + type: "string", + label: "To Date", + description: "Excludes all returns after this datetime. Example: `2022-04-07 00:00:00`", + }, }, methods: { - _baseUrl() { - return "https://panel.sendcloud.sc/api/v2"; + getMockUrl(path, versionPath = constants.VERSION_PATH.MOCK_V2) { + return `${constants.MOCK_BASE_URL}${versionPath}${path}`; + }, + getUrl(path, versionPath = constants.VERSION_PATH.V2, baseUrl = constants.BASE_URL) { + return `${baseUrl}${versionPath}${path}`; + }, + getAuth(auth) { + const { + public_key: username, + secret_key: password, + } = this.$auth; + + return { + ...auth, + username, + password, + }; }, - async _makeRequest(opts = {}) { + getHeaders(headers) { const { - $ = this, - path, - auth, - ...otherOpts - } = opts; + username, + password, + } = this.getAuth(); + + const token = Buffer.from(`${username}:${password}`).toString("base64"); + + return { + ...headers, + Authorization: `Basic ${token}`, + }; + }, + _makeRequest({ + $ = this, + path, auth, headers, versionPath, + mockPath, mockVersionPath, + baseUrl, hasHeadersAuth = false, + ...otherOpts + } = {}) { return axios($, { ...otherOpts, - url: this._baseUrl() + path, - auth: { - ...auth, - username: `${this.$auth.public_key}`, - password: `${this.$auth.secret_key}`, - }, + headers, + url: constants.USE_MOCK + ? this.getMockUrl(mockPath, mockVersionPath) + : this.getUrl(path, versionPath, baseUrl), + ...(hasHeadersAuth + ? { + headers: this.getHeaders(headers), + } + : { + auth: this.getAuth(auth), + } + ), }); }, - async createParcel(args = {}) { + post(args = {}) { return this._makeRequest({ method: "POST", + ...args, + }); + }, + put(args = {}) { + return this._makeRequest({ + method: "PUT", + ...args, + }); + }, + createParcel(args = {}) { + return this.post({ path: "/parcels", ...args, }); }, - async updateParcel({ + updateParcel({ id, ...args }) { - return this._makeRequest({ - method: "PUT", + return this.put({ path: `/parcels/${id}`, ...args, }); }, - async listParcels(args = {}) { + listParcels(args = {}) { return this._makeRequest({ path: "/parcels", + mockPath: "/299107074/parcels", + ...args, + }); + }, + getParcel({ + parcelId, ...args + } = {}) { + return this._makeRequest({ + path: `/parcels/${parcelId}`, + mockPath: `/299107074/parcels/${parcelId}`, + ...args, + }); + }, + listIntegrations(args = {}) { + return this._makeRequest({ + path: "/integrations", + mockPath: "/299107069/integrations", + ...args, + }); + }, + listIntegrationShipments({ + integrationId, ...args + } = {}) { + return this._makeRequest({ + path: `/integrations/${integrationId}/shipments`, + mockPath: `/299107069/integrations/${integrationId}/shipments`, + ...args, + }); + }, + upsertIntegrationShipment({ + integrationId, ...args + } = {}) { + return this.post({ + path: `/integrations/${integrationId}/shipments`, + mockPath: `/299107069/integrations/${integrationId}/shipments`, + ...args, + }); + }, + listParcelDocuments({ + type, ...args + } = {}) { + return this._makeRequest({ + versionPath: constants.VERSION_PATH.V3, + mockVersionPath: constants.VERSION_PATH.MOCK_V3, + path: `/parcel-documents/${type}`, + mockPath: `/299107072/parcel-documents/${type}`, + hasHeadersAuth: true, + paramsSerializer: (params) => { + return Object.entries(params) + .map(([ + key, + value, + ]) => { + if (Array.isArray(value)) { + return value.map((id) => `${key}=${id}`).join("&"); + } + return `${key}=${value}`; + }) + .join("&"); + }, + ...args, + }); + }, + getLabel({ + parcelId, ...args + } = {}) { + return this._makeRequest({ + path: `/labels/${parcelId}`, + mockPath: `/299107071/labels/${parcelId}`, + ...args, + }); + }, + bulkPDFLabelPrinting(args = {}) { + return this.post({ + path: "/labels", + mockPath: "/299107071/labels", + ...args, + }); + }, + listServicePoints(args = {}) { + return this._makeRequest({ + hasHeadersAuth: true, + baseUrl: constants.SERVICE_POINTS_BASE_URL, + path: "/service-points", + mockPath: "/299107080/service-points", + ...args, + }); + }, + getServicePoint({ + servicePointId, ...args + } = {}) { + return this._makeRequest({ + hasHeadersAuth: true, + baseUrl: constants.SERVICE_POINTS_BASE_URL, + path: `/service-points/${servicePointId}`, + mockPath: `/299107080/service-points/${servicePointId}`, + ...args, + }); + }, + listServicePointCarriers(args = {}) { + return this._makeRequest({ + hasHeadersAuth: true, + baseUrl: constants.SERVICE_POINTS_BASE_URL, + path: "/carriers", + mockPath: "/299107080/carriers", + ...args, + }); + }, + listSenderAddresses(args = {}) { + return this._makeRequest({ + path: "/user/addresses/sender", + mockPath: "/299107079/user/addresses/sender", + ...args, + }); + }, + getSenderAddress({ + senderAddressId, ...args + } = {}) { + return this._makeRequest({ + path: `/user/addresses/sender/${senderAddressId}`, + mockPath: `/299107079/user/addresses/sender/${senderAddressId}`, + ...args, + }); + }, + listParcelStatuses(args = {}) { + return this._makeRequest({ + versionPath: constants.VERSION_PATH.V3, + mockVersionPath: constants.VERSION_PATH.MOCK_V3, + path: "/parcels/statuses", + mockPath: "/299107073/parcels/statuses", + ...args, + }); + }, + listReturns(args = {}) { + return this._makeRequest({ + versionPath: constants.VERSION_PATH.V3, + mockVersionPath: constants.VERSION_PATH.MOCK_V3, + path: "/returns", + mockPath: "/299107077/returns", + ...args, + }); + }, + getReturn({ + returnId, ...args + } = {}) { + return this._makeRequest({ + versionPath: constants.VERSION_PATH.V3, + mockVersionPath: constants.VERSION_PATH.MOCK_V3, + path: `/returns/${returnId}`, + mockPath: `/299107077/returns/${returnId}`, + ...args, + }); + }, + createReturn(args = {}) { + return this.post({ + versionPath: constants.VERSION_PATH.V3, + mockVersionPath: constants.VERSION_PATH.MOCK_V3, + path: "/returns", + mockPath: "/299107077/returns", + ...args, + }); + }, + validateReturn(args = {}) { + return this.post({ + versionPath: constants.VERSION_PATH.V3, + mockVersionPath: constants.VERSION_PATH.MOCK_V3, + path: "/returns/validate", + mockPath: "/299107077/returns/validate", + ...args, + }); + }, + getReturnPortalSettings({ + brandDomain, ...args + } = {}) { + return this._makeRequest({ + path: `/brand/${brandDomain}/return-portal`, + mockPath: `/299107078/brand/${brandDomain}/return-portal`, + ...args, + }); + }, + getCurrentUser(args = {}) { + return this._makeRequest({ + versionPath: constants.VERSION_PATH.V3, + mockVersionPath: constants.VERSION_PATH.MOCK_V3, + path: "/user/auth/metadata", + mockPath: "/979441214/user/auth/metadata", ...args, }); }, + listShippingMethods(args = {}) { + return this._makeRequest({ + path: "/shipping_methods", + mockPath: "/299107081/shipping_methods", + ...args, + }); + }, + getShippingMethod({ + shippingMethodId, ...args + } = {}) { + return this._makeRequest({ + path: `/shipping_methods/${shippingMethodId}`, + mockPath: `/299107081/shipping_methods/${shippingMethodId}`, + ...args, + }); + }, + listBrands(args = {}) { + return this._makeRequest({ + path: "/brands", + mockPath: "/299107066/brands", + ...args, + }); + }, + async paginate({ + requester, + requesterArgs = {}, + resultsKey, + maxRequests = 3, + } = {}) { + const results = []; + let requests = 0; + let cursor; + + do { + const response = await requester({ + ...requesterArgs, + params: { + ...(requesterArgs.params || {}), + cursor, + }, + }); + + const items = resultsKey + ? response[resultsKey] + : response; + + if (Array.isArray(items)) { + results.push(...items); + } + + const next = response?.next; + if (next) { + const url = new URL(next); + cursor = url.searchParams.get("cursor"); + } + + if (typeof maxRequests === "number" && requests >= maxRequests) { + break; + } + + requests++; + + } while (cursor); + + return results; + }, }, }; diff --git a/components/sendcloud/sources/common/polling.mjs b/components/sendcloud/sources/common/polling.mjs new file mode 100644 index 0000000000000..e0e4414a41649 --- /dev/null +++ b/components/sendcloud/sources/common/polling.mjs @@ -0,0 +1,106 @@ +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import app from "../../sendcloud.app.mjs"; + +export default { + props: { + app, + db: "$.service.db", + timer: { + type: "$.interface.timer", + label: "Polling Schedule", + description: "How often to poll the API", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + methods: { + setCheckpoint(key, value) { + this.db.set(key, value); + }, + getCheckpoint(key) { + return this.db.get(key); + }, + /** + * Override this method to return true if your source needs date string conversion + * @returns {boolean} Whether to use stringToDate conversion + */ + shouldConvertDateString() { + return false; + }, + stringToDate(str) { + const isoString = str.replace(/(\d{2})-(\d{2})-(\d{4}) (\d{2}:\d{2}:\d{2})/, "$3-$2-$1T$4"); + return new Date(isoString); + }, + /** + * Converts a date string to a Date object, optionally using stringToDate conversion + * @param {string} dateStr - The date string to convert + * @returns {Date|null} The Date object or null if invalid + */ + parseDate(dateStr) { + if (!dateStr) { + return null; + } + + if (this.shouldConvertDateString()) { + return this.stringToDate(dateStr); + } + + return new Date(dateStr); + }, + /** + * Sorts items by timestamp in descending order (newest to oldest) + * @param {Array} items - Array of items to sort + * @param {Function} getTs - Function to extract timestamp from each item, + * defaults to date_updated or date_created + * @returns {Array} Sorted array of items + */ + getSortedItems(items = [], getTs = (r) => r?.updated_at || r?.created_at) { + return Array.from(items).sort((a, b) => { + const dateA = this.parseDate(getTs(a)); + const dateB = this.parseDate(getTs(b)); + return (dateB || 0) - (dateA || 0); + }); + }, + emitNewItems({ + items = [], checkpointKey, getId, getTs, getSummary, + }) { + const last = this.getCheckpoint(checkpointKey); + let newest = last + ? new Date(last) + : null; + + items.forEach((item) => { + const tsStr = getTs(item); + const ts = this.parseDate(tsStr); + + if (!ts || isNaN(ts.getTime())) { + console.log("Timestamp is not a valid date", item); + return; + } + + const isNew = !last || ts >= new Date(last); + + if (!isNew) { + console.log("Item is not new", item); + return; + } + + this.$emit(item, { + id: getId(item, ts), + summary: getSummary(item), + ts: ts.getTime(), + }); + + if (!newest || ts < newest) { + newest = ts; + } + }); + + if (newest) { + this.setCheckpoint(checkpointKey, newest.toISOString()); + } + }, + }, +}; + diff --git a/components/sendcloud/sources/parcel-created/parcel-created.mjs b/components/sendcloud/sources/parcel-created/parcel-created.mjs new file mode 100644 index 0000000000000..38feae01d2cc6 --- /dev/null +++ b/components/sendcloud/sources/parcel-created/parcel-created.mjs @@ -0,0 +1,48 @@ +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "sendcloud-parcel-created", + name: "New Parcel Created", + description: "Emit new event each time a parcel is created.", + type: "source", + version: "0.0.1", + dedupe: "unique", + methods: { + ...common.methods, + shouldConvertDateString() { + return true; + }, + }, + async run() { + const { + app, + getSortedItems, + emitNewItems, + } = this; + + const parcels = await app.paginate({ + requester: app.listParcels, + requesterArgs: { + debug: true, + }, + resultsKey: "parcels", + maxRequests: 5, + }); + + if (!parcels?.length) { + return; + } + + const items = getSortedItems(parcels, (r) => r?.date_created); + + emitNewItems({ + items, + checkpointKey: "parcels.lastCreatedAt", + getTs: (r) => r?.date_created, + getId: (r) => r.id, + getSummary: (r) => `Parcel ${r.id} created`, + }); + }, +}; + diff --git a/components/sendcloud/sources/parcel-status-changed/parcel-status-changed.mjs b/components/sendcloud/sources/parcel-status-changed/parcel-status-changed.mjs new file mode 100644 index 0000000000000..ccde30f2632b2 --- /dev/null +++ b/components/sendcloud/sources/parcel-status-changed/parcel-status-changed.mjs @@ -0,0 +1,89 @@ +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "sendcloud-parcel-status-changed", + name: "Parcel Status Changed", + description: "Emit new event each time a parcel status changes.", + type: "source", + version: "0.0.1", + dedupe: "unique", + methods: { + ...common.methods, + shouldConvertDateString() { + return true; + }, + setLastStatusAt(value) { + this.db.set("parcels.lastStatusAt", value); + }, + getLastStatusAt() { + return this.db.get("parcels.lastStatusAt"); + }, + getStatusStore() { + return this.db.get("parcels.statusById") || {}; + }, + setStatusStore(store) { + this.db.set("parcels.statusById", store); + }, + getStatusLabel(parcel) { + return parcel?.status?.message || "Status changed"; + }, + }, + async run() { + const { + app, + getSortedItems, + emitNewItems, + getStatusStore, + setStatusStore, + getStatusLabel, + } = this; + + const parcels = await app.paginate({ + requester: app.listParcels, + requesterArgs: { + debug: true, + }, + resultsKey: "parcels", + maxRequests: 5, + }); + + if (!parcels?.length) { + return; + } + + const items = getSortedItems(parcels, (r) => r?.date_updated || r?.date_created); + + const statusStore = getStatusStore(); + const isFirstRun = !Object.keys(statusStore).length; + const changed = items.filter((parcel) => { + const key = String(parcel?.id); + const hasNumericId = parcel?.status?.id !== null && parcel?.status?.id !== undefined; + const current = hasNumericId + ? String(parcel.status.id) + : parcel?.status?.message; + const prev = statusStore[key]; + statusStore[key] = current; + return isFirstRun || (prev !== undefined && prev !== current); + }); + + if (changed.length) { + emitNewItems({ + items: changed, + checkpointKey: "parcels.lastStatusAt", + getTs: (r) => r?.date_updated || r?.date_created, + getId: (r, ts) => `${r.id}-${ts.getTime()}`, + getSummary: (r) => { + const label = getStatusLabel(r); + const statusId = r?.status?.id; + return statusId != null + ? `Parcel ${r.id}: [${statusId}] ${label}` + : `Parcel ${r.id}: ${label}`; + }, + }); + } + + setStatusStore(statusStore); + }, +}; + diff --git a/components/sendcloud/sources/parcel-updated/parcel-updated.mjs b/components/sendcloud/sources/parcel-updated/parcel-updated.mjs new file mode 100644 index 0000000000000..87db33e5b4f1c --- /dev/null +++ b/components/sendcloud/sources/parcel-updated/parcel-updated.mjs @@ -0,0 +1,48 @@ +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "sendcloud-parcel-updated", + name: "Parcel Updated", + description: "Emit new event each time a parcel is updated.", + type: "source", + version: "0.0.1", + dedupe: "unique", + methods: { + ...common.methods, + shouldConvertDateString() { + return true; + }, + }, + async run() { + const { + app, + getSortedItems, + emitNewItems, + } = this; + + const parcels = await app.paginate({ + requester: app.listParcels, + requesterArgs: { + debug: true, + }, + resultsKey: "parcels", + maxRequests: 5, + }); + + if (!parcels?.length) { + return; + } + + const items = getSortedItems(parcels, (r) => r?.date_updated); + + emitNewItems({ + items, + checkpointKey: "parcels.lastUpdatedAt", + getTs: (r) => r?.date_updated, + getId: (r, ts) => `${r.id}-${ts.getTime()}`, + getSummary: (r) => `Parcel ${r.id} updated`, + }); + }, +}; + diff --git a/components/sendcloud/sources/return-created/return-created.mjs b/components/sendcloud/sources/return-created/return-created.mjs new file mode 100644 index 0000000000000..d71f97b93c765 --- /dev/null +++ b/components/sendcloud/sources/return-created/return-created.mjs @@ -0,0 +1,63 @@ +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "sendcloud-return-created", + name: "New Return Created", + description: "Emit new event each time a return is created.", + type: "source", + version: "0.0.1", + dedupe: "unique", + props: { + ...common.props, + fromDate: { + propDefinition: [ + common.props.app, + "fromDate", + ], + }, + toDate: { + propDefinition: [ + common.props.app, + "toDate", + ], + }, + }, + async run() { + const { + app, + getSortedItems, + emitNewItems, + fromDate, + toDate, + } = this; + + const returns = await app.paginate({ + requester: app.listReturns, + requesterArgs: { + debug: true, + params: { + from_date: fromDate, + to_date: toDate, + }, + }, + resultsKey: "data", + maxRequests: 5, + }); + + if (!returns?.length) { + return; + } + + const items = getSortedItems(returns, (r) => r?.created_at); + + emitNewItems({ + items, + checkpointKey: "returns.lastCreatedAt", + getTs: (r) => r?.created_at, + getId: (r) => r.id || r?.reason?.id, + getSummary: (r) => `Return ${r.id || r?.reason?.id} created`, + }); + }, +}; + diff --git a/components/sendcloud/sources/return-updated/return-updated.mjs b/components/sendcloud/sources/return-updated/return-updated.mjs new file mode 100644 index 0000000000000..839714e5819ef --- /dev/null +++ b/components/sendcloud/sources/return-updated/return-updated.mjs @@ -0,0 +1,63 @@ +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "sendcloud-return-updated", + name: "Return Updated", + description: "Emit new event each time a return is updated.", + type: "source", + version: "0.0.1", + dedupe: "unique", + props: { + ...common.props, + fromDate: { + propDefinition: [ + common.props.app, + "fromDate", + ], + }, + toDate: { + propDefinition: [ + common.props.app, + "toDate", + ], + }, + }, + async run() { + const { + app, + getSortedItems, + emitNewItems, + fromDate, + toDate, + } = this; + + const returns = await app.paginate({ + requester: app.listReturns, + requesterArgs: { + debug: true, + params: { + from_date: fromDate, + to_date: toDate, + }, + }, + resultsKey: "data", + maxRequests: 5, + }); + + if (!returns?.length) { + return; + } + + const items = getSortedItems(returns, (r) => r?.updated_at || r?.created_at); + + emitNewItems({ + items, + checkpointKey: "returns.lastUpdatedAt", + getTs: (r) => r?.updated_at || r?.created_at, + getId: (r, ts) => `${r.id || r?.reason?.id}-${ts.getTime()}`, + getSummary: (r) => `Return ${r.id || r?.reason?.id} updated`, + }); + }, +}; + diff --git a/components/sender/.gitignore b/components/sender/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sender/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sender/app/sender.app.ts b/components/sender/app/sender.app.ts deleted file mode 100644 index b70333289742f..0000000000000 --- a/components/sender/app/sender.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sender", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/sender/package.json b/components/sender/package.json index 71d422e889b29..c87a4130ddd89 100644 --- a/components/sender/package.json +++ b/components/sender/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/sender", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Sender Components", - "main": "dist/app/sender.app.mjs", + "main": "sender.app.mjs", "keywords": [ "pipedream", "sender" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/sender", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sender/sender.app.mjs b/components/sender/sender.app.mjs new file mode 100644 index 0000000000000..3394b0aaa8399 --- /dev/null +++ b/components/sender/sender.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sender", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sendlane/.gitignore b/components/sendlane/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sendlane/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sendlane/app/sendlane.app.ts b/components/sendlane/app/sendlane.app.ts deleted file mode 100644 index 4681ce27fb441..0000000000000 --- a/components/sendlane/app/sendlane.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sendlane", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/sendlane/package.json b/components/sendlane/package.json index cc72a9fb1805f..958d540670961 100644 --- a/components/sendlane/package.json +++ b/components/sendlane/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/sendlane", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Sendlane Components", - "main": "dist/app/sendlane.app.mjs", + "main": "sendlane.app.mjs", "keywords": [ "pipedream", "sendlane" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/sendlane", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sendlane/sendlane.app.mjs b/components/sendlane/sendlane.app.mjs new file mode 100644 index 0000000000000..0299026f519d3 --- /dev/null +++ b/components/sendlane/sendlane.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sendlane", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sendle/.gitignore b/components/sendle/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sendle/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sendle/app/sendle.app.ts b/components/sendle/app/sendle.app.ts deleted file mode 100644 index a35afe6faf422..0000000000000 --- a/components/sendle/app/sendle.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sendle", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/sendle/package.json b/components/sendle/package.json index 67f242c7f6691..7ffdf72fc4999 100644 --- a/components/sendle/package.json +++ b/components/sendle/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/sendle", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Sendle Components", - "main": "dist/app/sendle.app.mjs", + "main": "sendle.app.mjs", "keywords": [ "pipedream", "sendle" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/sendle", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sendle/sendle.app.mjs b/components/sendle/sendle.app.mjs new file mode 100644 index 0000000000000..3dba8935be538 --- /dev/null +++ b/components/sendle/sendle.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sendle", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/serenity_ai_hub/package.json b/components/serenity_ai_hub/package.json new file mode 100644 index 0000000000000..2b1fb6d75a9f6 --- /dev/null +++ b/components/serenity_ai_hub/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/serenity_ai_hub", + "version": "0.0.1", + "description": "Pipedream Serenity* AI Hub Components", + "main": "serenity_ai_hub.app.mjs", + "keywords": [ + "pipedream", + "serenity_ai_hub" + ], + "homepage": "https://pipedream.com/apps/serenity_ai_hub", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/serenity_ai_hub/serenity_ai_hub.app.mjs b/components/serenity_ai_hub/serenity_ai_hub.app.mjs new file mode 100644 index 0000000000000..4931082efdf87 --- /dev/null +++ b/components/serenity_ai_hub/serenity_ai_hub.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "serenity_ai_hub", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/serveravatar/package.json b/components/serveravatar/package.json index 6fb2990675d65..57cc91f41e0ca 100644 --- a/components/serveravatar/package.json +++ b/components/serveravatar/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/serveravatar", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Server Avatar Components", "main": "dist/app/serveravatar.app.mjs", "types": "dist/app/serveravatar.app.d.ts", @@ -18,10 +18,11 @@ "access": "public" }, "devDependencies": { - "@types/node": "^17.0.36" + "@types/node": "^17.0.36", + "@pipedream/types": "^0.3.2" }, "dependencies": { "@pipedream/helpers": "^1.3.9", - "@pipedream/platform": "^0.10.0" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/serveravatar/tsconfig.json b/components/serveravatar/tsconfig.json index 335fa6f1cf6ec..3a9389484d040 100644 --- a/components/serveravatar/tsconfig.json +++ b/components/serveravatar/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/serwersms_pl/.gitignore b/components/serwersms_pl/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/serwersms_pl/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/serwersms_pl/app/serwersms_pl.app.ts b/components/serwersms_pl/app/serwersms_pl.app.ts deleted file mode 100644 index 7f8d59efc823e..0000000000000 --- a/components/serwersms_pl/app/serwersms_pl.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "serwersms_pl", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/serwersms_pl/package.json b/components/serwersms_pl/package.json index 0a06158958c10..acc760bf46570 100644 --- a/components/serwersms_pl/package.json +++ b/components/serwersms_pl/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/serwersms_pl", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream SerwerSMS.pl Components", - "main": "dist/app/serwersms_pl.app.mjs", + "main": "serwersms_pl.app.mjs", "keywords": [ "pipedream", "serwersms_pl" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/serwersms_pl", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/serwersms_pl/serwersms_pl.app.mjs b/components/serwersms_pl/serwersms_pl.app.mjs new file mode 100644 index 0000000000000..0981eff2cfd22 --- /dev/null +++ b/components/serwersms_pl/serwersms_pl.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "serwersms_pl", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sevdesk/actions/cancel-invoice/cancel-invoice.mjs b/components/sevdesk/actions/cancel-invoice/cancel-invoice.mjs index d3d4274848c44..b6bbd3d04c382 100644 --- a/components/sevdesk/actions/cancel-invoice/cancel-invoice.mjs +++ b/components/sevdesk/actions/cancel-invoice/cancel-invoice.mjs @@ -5,7 +5,7 @@ export default { key: "sevdesk-cancel-invoice", name: "Cancel Invoice", description: "Cancels an existing invoice in sevDesk. [See the documentation](https://api.sevdesk.de/#tag/Invoice/operation/cancelInvoice)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { sevdesk, diff --git a/components/sevdesk/actions/create-contact/create-contact.mjs b/components/sevdesk/actions/create-contact/create-contact.mjs index 4d77364a663de..d940ea5ae962a 100644 --- a/components/sevdesk/actions/create-contact/create-contact.mjs +++ b/components/sevdesk/actions/create-contact/create-contact.mjs @@ -5,7 +5,7 @@ export default { key: "sevdesk-create-contact", name: "Create Contact", description: "Create a new contact. [See the documentation](https://api.sevdesk.de/#tag/Contact/operation/createContact)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { sevdesk, diff --git a/components/sevdesk/actions/create-invoice/create-invoice.mjs b/components/sevdesk/actions/create-invoice/create-invoice.mjs index c99a0aeaf6605..d518b61953971 100644 --- a/components/sevdesk/actions/create-invoice/create-invoice.mjs +++ b/components/sevdesk/actions/create-invoice/create-invoice.mjs @@ -12,7 +12,7 @@ export default { key: "sevdesk-create-invoice", name: "Create Invoice", description: "Creates a new invoice with optional details like invoice date, due date, discount amount, and invoice items. [See the documentation](https://api.sevdesk.de/)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { sevdesk, diff --git a/components/sevdesk/actions/get-invoice/get-invoice.mjs b/components/sevdesk/actions/get-invoice/get-invoice.mjs new file mode 100644 index 0000000000000..c3fef49bf8b2f --- /dev/null +++ b/components/sevdesk/actions/get-invoice/get-invoice.mjs @@ -0,0 +1,33 @@ +import app from "../../sevdesk.app.mjs"; + +export default { + key: "sevdesk-get-invoice", + name: "Get Invoice", + description: "Find and retrieve a single invoice by its ID. [See the documentation](https://api.sevdesk.de/#tag/Invoice/operation/getInvoiceById)", + version: "0.0.1", + type: "action", + props: { + app, + invoiceId: { + propDefinition: [ + app, + "invoiceId", + ], + description: "ID of the invoice to retrieve", + }, + }, + async run({ $ }) { + const { + app, + invoiceId, + } = this; + + const response = await app.getInvoice({ + $, + invoiceId, + }); + + $.export("$summary", `Successfully retrieved invoice with ID ${invoiceId}`); + return response; + }, +}; diff --git a/components/sevdesk/actions/get-invoices/get-invoices.mjs b/components/sevdesk/actions/get-invoices/get-invoices.mjs new file mode 100644 index 0000000000000..3d0c67b220dfe --- /dev/null +++ b/components/sevdesk/actions/get-invoices/get-invoices.mjs @@ -0,0 +1,122 @@ +import app from "../../sevdesk.app.mjs"; + +export default { + key: "sevdesk-get-invoices", + name: "Get Invoices", + description: "Retrieve invoices with optional filtering by status, invoice number, date range, and contact. [See the documentation](https://api.sevdesk.de/#tag/Invoice/operation/getInvoices)", + version: "0.0.1", + type: "action", + props: { + app, + status: { + type: "string", + label: "Status", + description: "Status of the invoices to filter by", + options: [ + { + label: "Draft", + value: "100", + }, + { + label: "Open", + value: "200", + }, + { + label: "Paid", + value: "1000", + }, + ], + optional: true, + }, + invoiceNumber: { + type: "string", + label: "Invoice Number", + description: "Retrieve all invoices with this invoice number", + optional: true, + }, + startDate: { + type: "string", + label: "Start Date", + description: "Retrieve all invoices with a date equal or higher (ISO 8601 format: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS)", + optional: true, + }, + endDate: { + type: "string", + label: "End Date", + description: "Retrieve all invoices with a date equal or lower (ISO 8601 format: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS)", + optional: true, + }, + contactId: { + propDefinition: [ + app, + "contactId", + ], + optional: true, + }, + limit: { + type: "integer", + label: "Limit", + description: "Maximum number of invoices to retrieve", + optional: true, + min: 1, + max: 999, + }, + }, + methods: { + convertDateToTimestamp(dateString) { + if (!dateString) return undefined; + + const date = new Date(dateString); + if (isNaN(date.getTime())) { + throw new Error(`Invalid date format: ${dateString}. Please use ISO 8601 format (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS)`); + } + + return Math.floor(date.getTime() / 1000); + }, + }, + async run({ $ }) { + const { + app, + status, + invoiceNumber, + startDate, + endDate, + contactId, + limit, + } = this; + + let startTimestamp, endTimestamp; + + try { + startTimestamp = this.convertDateToTimestamp(startDate); + endTimestamp = this.convertDateToTimestamp(endDate); + } catch (error) { + throw new Error(`Date validation error: ${error.message}`); + } + + if (startTimestamp && endTimestamp && startTimestamp > endTimestamp) { + throw new Error("Start date cannot be later than end date"); + } + + const response = await app.listInvoices({ + $, + params: { + status, + invoiceNumber, + startDate: startTimestamp, + endDate: endTimestamp, + ...(contactId + ? { + "contact[id]": contactId, + "contact[objectName]": "Contact", + } + : {} + ), + limit, + }, + }); + + $.export("$summary", `Successfully retrieved ${response.objects?.length || 0} invoice(s)`); + return response; + }, +}; diff --git a/components/sevdesk/actions/send-invoice-email/send-invoice-email.mjs b/components/sevdesk/actions/send-invoice-email/send-invoice-email.mjs index aac5740699e7b..ea3b05198057b 100644 --- a/components/sevdesk/actions/send-invoice-email/send-invoice-email.mjs +++ b/components/sevdesk/actions/send-invoice-email/send-invoice-email.mjs @@ -5,7 +5,7 @@ export default { key: "sevdesk-send-invoice-email", name: "Send Invoice Email", description: "Sends an invoice via email. [See the documentation](https://api.sevdesk.de/#tag/Invoice/operation/sendInvoiceViaEMail)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { sevdesk, diff --git a/components/sevdesk/package.json b/components/sevdesk/package.json index 212e696c08bd7..a7de594c3d951 100644 --- a/components/sevdesk/package.json +++ b/components/sevdesk/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/sevdesk", - "version": "0.2.0", + "version": "0.3.0", "description": "Pipedream sevDesk Components", "main": "sevdesk.app.mjs", "keywords": [ diff --git a/components/sevdesk/sevdesk.app.mjs b/components/sevdesk/sevdesk.app.mjs index c9baddfbd81b6..647cd8ea2078f 100644 --- a/components/sevdesk/sevdesk.app.mjs +++ b/components/sevdesk/sevdesk.app.mjs @@ -159,6 +159,14 @@ export default { ...opts, }); }, + getInvoice({ + invoiceId, ...opts + }) { + return this._makeRequest({ + path: `/Invoice/${invoiceId}`, + ...opts, + }); + }, listOrders(opts = {}) { return this._makeRequest({ path: "/Order", diff --git a/components/sevdesk/sources/new-contact/new-contact.mjs b/components/sevdesk/sources/new-contact/new-contact.mjs index 008f096e2182b..cf7f377a84e5f 100644 --- a/components/sevdesk/sources/new-contact/new-contact.mjs +++ b/components/sevdesk/sources/new-contact/new-contact.mjs @@ -6,7 +6,7 @@ export default { key: "sevdesk-new-contact", name: "New Contact Created", description: "Emit new event when a contact is created in SevDesk.", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", methods: { diff --git a/components/sevdesk/sources/new-order/new-order.mjs b/components/sevdesk/sources/new-order/new-order.mjs index 807642091a2a9..2e264efc0fdd3 100644 --- a/components/sevdesk/sources/new-order/new-order.mjs +++ b/components/sevdesk/sources/new-order/new-order.mjs @@ -6,7 +6,7 @@ export default { key: "sevdesk-new-order", name: "New Order Created", description: "Emit new event for each new order created in SevDesk.", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", methods: { diff --git a/components/sevdesk/sources/new-voucher/new-voucher.mjs b/components/sevdesk/sources/new-voucher/new-voucher.mjs index 7ab25eff809bd..72a9252adf901 100644 --- a/components/sevdesk/sources/new-voucher/new-voucher.mjs +++ b/components/sevdesk/sources/new-voucher/new-voucher.mjs @@ -6,7 +6,7 @@ export default { key: "sevdesk-new-voucher", name: "New Voucher Created", description: "Emit new event when a new voucher is created.", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", methods: { diff --git a/components/sherpa/package.json b/components/sherpa/package.json new file mode 100644 index 0000000000000..5a1a6dcd2fef8 --- /dev/null +++ b/components/sherpa/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/sherpa", + "version": "0.0.1", + "description": "Pipedream Sherpa Components", + "main": "sherpa.app.mjs", + "keywords": [ + "pipedream", + "sherpa" + ], + "homepage": "https://pipedream.com/apps/sherpa", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/sherpa/sherpa.app.mjs b/components/sherpa/sherpa.app.mjs new file mode 100644 index 0000000000000..7db3221f8f95f --- /dev/null +++ b/components/sherpa/sherpa.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sherpa", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/shipcloud/tsconfig.json b/components/shipcloud/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/shipcloud/tsconfig.json +++ b/components/shipcloud/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/shiphero/package.json b/components/shiphero/package.json index b5c0d73a97dd6..63c499f4857de 100644 --- a/components/shiphero/package.json +++ b/components/shiphero/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/shiphero", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream ShipHero Components", - "main": "dist/app/shiphero.app.mjs", + "main": "shiphero.app.mjs", "keywords": [ "pipedream", "shiphero" diff --git a/components/shippotoken/.gitignore b/components/shippotoken/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/shippotoken/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/shippotoken/app/shippotoken.app.ts b/components/shippotoken/app/shippotoken.app.ts deleted file mode 100644 index 247fe3b4c31b2..0000000000000 --- a/components/shippotoken/app/shippotoken.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "shippotoken", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/shippotoken/package.json b/components/shippotoken/package.json index ab51781517c99..333daef9cbe8d 100644 --- a/components/shippotoken/package.json +++ b/components/shippotoken/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/shippotoken", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream ShippoToken Components", - "main": "dist/app/shippotoken.app.mjs", + "main": "shippotoken.app.mjs", "keywords": [ "pipedream", "shippotoken" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/shippotoken", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/shippotoken/shippotoken.app.mjs b/components/shippotoken/shippotoken.app.mjs new file mode 100644 index 0000000000000..62af602dae47a --- /dev/null +++ b/components/shippotoken/shippotoken.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "shippotoken", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/shopify_developer_app/actions/add-product-to-custom-collection/add-product-to-custom-collection.mjs b/components/shopify_developer_app/actions/add-product-to-custom-collection/add-product-to-custom-collection.mjs index 0cbf28f2552b5..dc37c4f2762d2 100644 --- a/components/shopify_developer_app/actions/add-product-to-custom-collection/add-product-to-custom-collection.mjs +++ b/components/shopify_developer_app/actions/add-product-to-custom-collection/add-product-to-custom-collection.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-add-product-to-custom-collection", - version: "0.0.7", + version: "0.0.9", name, description, type, diff --git a/components/shopify_developer_app/actions/add-tags/add-tags.mjs b/components/shopify_developer_app/actions/add-tags/add-tags.mjs index 2292140bc53c3..b5fca539e041d 100644 --- a/components/shopify_developer_app/actions/add-tags/add-tags.mjs +++ b/components/shopify_developer_app/actions/add-tags/add-tags.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-add-tags", - version: "0.0.7", + version: "0.0.9", name, description, type, diff --git a/components/shopify_developer_app/actions/create-article/create-article.mjs b/components/shopify_developer_app/actions/create-article/create-article.mjs index 646291b56829e..6f593d8387826 100644 --- a/components/shopify_developer_app/actions/create-article/create-article.mjs +++ b/components/shopify_developer_app/actions/create-article/create-article.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-create-article", - version: "0.0.9", + version: "0.0.11", name, description, type, diff --git a/components/shopify_developer_app/actions/create-blog/create-blog.mjs b/components/shopify_developer_app/actions/create-blog/create-blog.mjs index 68c4beaa6a36b..09438f6a51c29 100644 --- a/components/shopify_developer_app/actions/create-blog/create-blog.mjs +++ b/components/shopify_developer_app/actions/create-blog/create-blog.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-create-blog", - version: "0.0.9", + version: "0.0.11", name, description, type, diff --git a/components/shopify_developer_app/actions/create-custom-collection/create-custom-collection.mjs b/components/shopify_developer_app/actions/create-custom-collection/create-custom-collection.mjs index 810b8aa21a657..0034f10fd8382 100644 --- a/components/shopify_developer_app/actions/create-custom-collection/create-custom-collection.mjs +++ b/components/shopify_developer_app/actions/create-custom-collection/create-custom-collection.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-create-custom-collection", - version: "0.0.7", + version: "0.0.9", name, description, type, diff --git a/components/shopify_developer_app/actions/create-customer/create-customer.mjs b/components/shopify_developer_app/actions/create-customer/create-customer.mjs index c4ff7e142a3fa..a313f2f63987f 100644 --- a/components/shopify_developer_app/actions/create-customer/create-customer.mjs +++ b/components/shopify_developer_app/actions/create-customer/create-customer.mjs @@ -4,7 +4,7 @@ export default { key: "shopify_developer_app-create-customer", name: "Create Customer", description: "Create a new customer. [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customercreate)", - version: "0.0.7", + version: "0.0.9", type: "action", props: { shopify, diff --git a/components/shopify_developer_app/actions/create-fulfillment/create-fulfillment.mjs b/components/shopify_developer_app/actions/create-fulfillment/create-fulfillment.mjs new file mode 100644 index 0000000000000..4cc195234fc05 --- /dev/null +++ b/components/shopify_developer_app/actions/create-fulfillment/create-fulfillment.mjs @@ -0,0 +1,77 @@ +import shopify from "../../shopify_developer_app.app.mjs"; + +export default { + key: "shopify_developer_app-create-fulfillment", + name: "Create Fulfillment", + description: "Create a fulfillment. [See the documentation](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/fulfillmentcreate)", + version: "0.0.1", + type: "action", + props: { + shopify, + fulfillmentOrderId: { + propDefinition: [ + shopify, + "fulfillmentOrderId", + ], + }, + fulfillmentOrderLineItemIds: { + propDefinition: [ + shopify, + "fulfillmentOrderLineItemIds", + (c) => ({ + fulfillmentOrderId: c.fulfillmentOrderId, + }), + ], + reloadProps: true, + }, + notifyCustomer: { + type: "boolean", + label: "Notify Customer", + description: "Whether to notify the customer", + optional: true, + }, + message: { + type: "string", + label: "Message", + description: "An optional message for the fulfillment request.", + optional: true, + }, + }, + async additionalProps() { + const props = {}; + if (!this.fulfillmentOrderLineItemIds) { + return props; + } + + for (const id of this.fulfillmentOrderLineItemIds) { + props[`quantity_${id}`] = { + type: "integer", + label: `Quantity for Line Item - ${id}`, + description: "The quantity of the line item to fulfill", + }; + } + return props; + }, + async run({ $ }) { + const fulfillment = await this.shopify.createFulfillment({ + fulfillment: { + lineItemsByFulfillmentOrder: [ + { + fulfillmentOrderId: this.fulfillmentOrderId, + fulfillmentOrderLineItems: this.fulfillmentOrderLineItemIds.map((id) => ({ + id, + quantity: this[`quantity_${id}`], + })), + }, + ], + notifyCustomer: this.notifyCustomer, + }, + message: this.message, + }); + if (fulfillment.fulfillmentCreate.userErrors.length > 0) { + throw new Error(fulfillment.fulfillmentCreate.userErrors[0].message); + } + $.export("$summary", `Created fulfillment with ID: ${fulfillment.fulfillmentCreate.fulfillment.id}`); + return fulfillment; + }, +}; diff --git a/components/shopify_developer_app/actions/create-metafield/create-metafield.mjs b/components/shopify_developer_app/actions/create-metafield/create-metafield.mjs index fce5dd1a11f3b..4f9e288532896 100644 --- a/components/shopify_developer_app/actions/create-metafield/create-metafield.mjs +++ b/components/shopify_developer_app/actions/create-metafield/create-metafield.mjs @@ -10,7 +10,7 @@ const { export default { ...others, key: "shopify_developer_app-create-metafield", - version: "0.0.8", + version: "0.0.10", name, description, type, diff --git a/components/shopify_developer_app/actions/create-metaobject/create-metaobject.mjs b/components/shopify_developer_app/actions/create-metaobject/create-metaobject.mjs index 0aab11ee65f91..306873170ec90 100644 --- a/components/shopify_developer_app/actions/create-metaobject/create-metaobject.mjs +++ b/components/shopify_developer_app/actions/create-metaobject/create-metaobject.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-create-metaobject", - version: "0.0.9", + version: "0.0.11", name, description, type, diff --git a/components/shopify_developer_app/actions/create-order/create-order.mjs b/components/shopify_developer_app/actions/create-order/create-order.mjs index d6bc78bd383a0..28833d32e406d 100644 --- a/components/shopify_developer_app/actions/create-order/create-order.mjs +++ b/components/shopify_developer_app/actions/create-order/create-order.mjs @@ -5,7 +5,7 @@ export default { key: "shopify_developer_app-create-order", name: "Create Order", description: "Creates a new order. For full order object details [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/ordercreate)", - version: "0.0.7", + version: "0.0.9", type: "action", props: { shopify, diff --git a/components/shopify_developer_app/actions/create-page/create-page.mjs b/components/shopify_developer_app/actions/create-page/create-page.mjs index e8a0b4002fa91..03d306210928f 100644 --- a/components/shopify_developer_app/actions/create-page/create-page.mjs +++ b/components/shopify_developer_app/actions/create-page/create-page.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-create-page", - version: "0.0.9", + version: "0.0.11", name, description, type, diff --git a/components/shopify_developer_app/actions/create-product-variant/create-product-variant.mjs b/components/shopify_developer_app/actions/create-product-variant/create-product-variant.mjs index 77cdc8fd955c7..b6d6342c775ea 100644 --- a/components/shopify_developer_app/actions/create-product-variant/create-product-variant.mjs +++ b/components/shopify_developer_app/actions/create-product-variant/create-product-variant.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-create-product-variant", - version: "0.0.8", + version: "0.0.10", name, description, type, diff --git a/components/shopify_developer_app/actions/create-product/create-product.mjs b/components/shopify_developer_app/actions/create-product/create-product.mjs index 1fbb8a0641782..8ef5eb9fde153 100644 --- a/components/shopify_developer_app/actions/create-product/create-product.mjs +++ b/components/shopify_developer_app/actions/create-product/create-product.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-create-product", - version: "0.0.7", + version: "0.0.9", name, description, type, diff --git a/components/shopify_developer_app/actions/create-smart-collection/create-smart-collection.mjs b/components/shopify_developer_app/actions/create-smart-collection/create-smart-collection.mjs index 83409d49dfd14..51cf7a4011f5b 100644 --- a/components/shopify_developer_app/actions/create-smart-collection/create-smart-collection.mjs +++ b/components/shopify_developer_app/actions/create-smart-collection/create-smart-collection.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-create-smart-collection", - version: "0.0.7", + version: "0.0.9", name, description, type, diff --git a/components/shopify_developer_app/actions/delete-article/delete-article.mjs b/components/shopify_developer_app/actions/delete-article/delete-article.mjs index 749b2812c04ae..20f9b461fcc56 100644 --- a/components/shopify_developer_app/actions/delete-article/delete-article.mjs +++ b/components/shopify_developer_app/actions/delete-article/delete-article.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-delete-article", - version: "0.0.9", + version: "0.0.11", name, description, type, diff --git a/components/shopify_developer_app/actions/delete-blog/delete-blog.mjs b/components/shopify_developer_app/actions/delete-blog/delete-blog.mjs index b217e2e456134..f11d55a3ef590 100644 --- a/components/shopify_developer_app/actions/delete-blog/delete-blog.mjs +++ b/components/shopify_developer_app/actions/delete-blog/delete-blog.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-delete-blog", - version: "0.0.9", + version: "0.0.11", name, description, type, diff --git a/components/shopify_developer_app/actions/delete-metafield/delete-metafield.mjs b/components/shopify_developer_app/actions/delete-metafield/delete-metafield.mjs index 0ecc121bc4eb3..80ed50f0bcce4 100644 --- a/components/shopify_developer_app/actions/delete-metafield/delete-metafield.mjs +++ b/components/shopify_developer_app/actions/delete-metafield/delete-metafield.mjs @@ -9,7 +9,7 @@ const { export default { ...others, key: "shopify_developer_app-delete-metafield", - version: "0.0.8", + version: "0.0.10", name, description, type, diff --git a/components/shopify_developer_app/actions/delete-page/delete-page.mjs b/components/shopify_developer_app/actions/delete-page/delete-page.mjs index 6da49d3eabc3e..9a120378b1e02 100644 --- a/components/shopify_developer_app/actions/delete-page/delete-page.mjs +++ b/components/shopify_developer_app/actions/delete-page/delete-page.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-delete-page", - version: "0.0.9", + version: "0.0.11", name, description, type, diff --git a/components/shopify_developer_app/actions/get-articles/get-articles.mjs b/components/shopify_developer_app/actions/get-articles/get-articles.mjs index bbe8c12f5bb1b..09e7c5b5d0352 100644 --- a/components/shopify_developer_app/actions/get-articles/get-articles.mjs +++ b/components/shopify_developer_app/actions/get-articles/get-articles.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-get-articles", - version: "0.0.9", + version: "0.0.11", name, description, type, diff --git a/components/shopify_developer_app/actions/get-metafields/get-metafields.mjs b/components/shopify_developer_app/actions/get-metafields/get-metafields.mjs index b21d64ef3f269..ae4c7037f21b9 100644 --- a/components/shopify_developer_app/actions/get-metafields/get-metafields.mjs +++ b/components/shopify_developer_app/actions/get-metafields/get-metafields.mjs @@ -8,7 +8,7 @@ const { export default { key: "shopify_developer_app-get-metafields", - version: "0.0.8", + version: "0.0.10", name, description, type, diff --git a/components/shopify_developer_app/actions/get-metaobjects/get-metaobjects.mjs b/components/shopify_developer_app/actions/get-metaobjects/get-metaobjects.mjs index 4a64daf883d8b..818f6cd99d5df 100644 --- a/components/shopify_developer_app/actions/get-metaobjects/get-metaobjects.mjs +++ b/components/shopify_developer_app/actions/get-metaobjects/get-metaobjects.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-get-metaobjects", - version: "0.0.8", + version: "0.0.10", name, description, type, diff --git a/components/shopify_developer_app/actions/get-order/get-order.mjs b/components/shopify_developer_app/actions/get-order/get-order.mjs index b7c0784a8dca4..e65f746f0b628 100644 --- a/components/shopify_developer_app/actions/get-order/get-order.mjs +++ b/components/shopify_developer_app/actions/get-order/get-order.mjs @@ -5,7 +5,7 @@ export default { key: "shopify_developer_app-get-order", name: "Get Order", description: "Retrieve an order by specifying the order ID. [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/queries/order)", - version: "0.0.5", + version: "0.0.7", type: "action", props: { shopify, diff --git a/components/shopify_developer_app/actions/get-pages/get-pages.mjs b/components/shopify_developer_app/actions/get-pages/get-pages.mjs index fc9f7036519e6..8f1c2da9d503a 100644 --- a/components/shopify_developer_app/actions/get-pages/get-pages.mjs +++ b/components/shopify_developer_app/actions/get-pages/get-pages.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-get-pages", - version: "0.0.9", + version: "0.0.11", name, description, type, diff --git a/components/shopify_developer_app/actions/refund-order/refund-order.mjs b/components/shopify_developer_app/actions/refund-order/refund-order.mjs new file mode 100644 index 0000000000000..2e2b3ab20ea08 --- /dev/null +++ b/components/shopify_developer_app/actions/refund-order/refund-order.mjs @@ -0,0 +1,100 @@ +import shopify from "../../shopify_developer_app.app.mjs"; +import { MAX_LIMIT } from "@pipedream/shopify/common/constants.mjs"; + +export default { + key: "shopify_developer_app-refund-order", + name: "Refund Order", + description: "Refund an order. [See the documentation](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/refundcreate)", + version: "0.0.1", + type: "action", + props: { + shopify, + orderId: { + propDefinition: [ + shopify, + "orderId", + ], + }, + note: { + type: "string", + label: "Note", + description: "An optional note that's attached to the refund", + optional: true, + }, + lineItemIds: { + propDefinition: [ + shopify, + "lineItemIds", + (c) => ({ + orderId: c.orderId, + }), + ], + reloadProps: true, + }, + }, + async additionalProps() { + const props = {}; + if (!this.lineItemIds) { + return props; + } + const order = await this.shopify.getOrder({ + id: this.orderId, + first: MAX_LIMIT, + }); + for (const id of this.lineItemIds) { + const lineItem = order.order.lineItems.edges.find((item) => item.node.id === id); + props[`quantity_${id}`] = { + type: "integer", + label: `Quantity for line item - ${lineItem.node.title}`, + description: "The quantity of the line item to refund", + }; + props[`restockType_${id}`] = { + type: "string", + label: `Restock type for line item - ${lineItem.node.title}`, + description: "The restock type for the line item", + options: [ + "CANCEL", + "NO_RESTOCK", + "RETURN", + ], + default: "RETURN", + }; + props[`locationId_${id}`] = { + type: "string", + label: `Location ID for line item - ${lineItem.node.title}`, + description: "The location ID for the line item", + options: async ({ prevContext }) => { + return this.shopify.getPropOptions({ + resourceFn: this.shopify.listLocations, + resourceKeys: [ + "locations", + ], + labelKey: "name", + prevContext, + }); + }, + }; + } + return props; + }, + async run({ $ }) { + const response = await this.shopify.refundOrder({ + input: { + note: this.note, + orderId: this.orderId, + refundLineItems: this.lineItemIds.map((id) => ({ + lineItemId: id, + quantity: this[`quantity_${id}`], + locationId: this[`locationId_${id}`], + restockType: this[`restockType_${id}`], + })), + }, + }); + + if (response.refundCreate.userErrors.length > 0) { + throw new Error(response.refundCreate.userErrors[0].message); + } + $.export("$summary", `Refunded order with ID: ${this.orderId}`); + return response; + }, +}; diff --git a/components/shopify_developer_app/actions/search-custom-collection-by-name/search-custom-collection-by-name.mjs b/components/shopify_developer_app/actions/search-custom-collection-by-name/search-custom-collection-by-name.mjs index 5978eba30f77e..e2e3cbb6b299c 100644 --- a/components/shopify_developer_app/actions/search-custom-collection-by-name/search-custom-collection-by-name.mjs +++ b/components/shopify_developer_app/actions/search-custom-collection-by-name/search-custom-collection-by-name.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-search-custom-collection-by-name", - version: "0.0.7", + version: "0.0.9", name, description, type, diff --git a/components/shopify_developer_app/actions/search-customers/search-customers.mjs b/components/shopify_developer_app/actions/search-customers/search-customers.mjs index f5cc4b79fd624..7529d63d20481 100644 --- a/components/shopify_developer_app/actions/search-customers/search-customers.mjs +++ b/components/shopify_developer_app/actions/search-customers/search-customers.mjs @@ -4,7 +4,7 @@ export default { key: "shopify_developer_app-search-customers", name: "Search for Customers", description: "Search for a customer or a list of customers. [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/queries/customers)", - version: "0.0.7", + version: "0.0.9", type: "action", props: { shopify, diff --git a/components/shopify_developer_app/actions/search-fulfillment-orders/search-fulfillment-orders.mjs b/components/shopify_developer_app/actions/search-fulfillment-orders/search-fulfillment-orders.mjs new file mode 100644 index 0000000000000..1458e830ac599 --- /dev/null +++ b/components/shopify_developer_app/actions/search-fulfillment-orders/search-fulfillment-orders.mjs @@ -0,0 +1,40 @@ +import shopify from "../../shopify_developer_app.app.mjs"; + +export default { + key: "shopify_developer_app-search-fulfillment-orders", + name: "Search for Fulfillment Orders", + description: "Search for a fulfillment order or a list of fulfillment orders. [See the documentation](https://shopify.dev/docs/api/admin-graphql/unstable/queries/fulfillmentorders)", + version: "0.0.1", + type: "action", + props: { + shopify, + query: { + type: "string", + label: "Query", + description: "A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).", + optional: true, + }, + max: { + type: "integer", + label: "Max Records", + description: "Optionally limit the maximum number of records to return. Leave blank to retrieve all records.", + optional: true, + }, + }, + async run({ $ }) { + const orders = await this.shopify.getPaginated({ + resourceFn: this.shopify.listFulfillmentOrders, + resourceKeys: [ + "fulfillmentOrders", + ], + variables: { + query: this.query, + }, + max: this.max, + }); + $.export("$summary", `Found ${orders.length} fulfillment order${orders.length === 1 + ? "" + : "s"}`); + return orders; + }, +}; diff --git a/components/shopify_developer_app/actions/search-orders/search-orders.mjs b/components/shopify_developer_app/actions/search-orders/search-orders.mjs index fec6e1ee88346..5222deccd35c7 100644 --- a/components/shopify_developer_app/actions/search-orders/search-orders.mjs +++ b/components/shopify_developer_app/actions/search-orders/search-orders.mjs @@ -4,7 +4,7 @@ export default { key: "shopify_developer_app-search-orders", name: "Search for Orders", description: "Search for an order or a list of orders. [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/queries/orders)", - version: "0.0.1", + version: "0.0.3", type: "action", props: { shopify, diff --git a/components/shopify_developer_app/actions/search-product-variant/search-product-variant.mjs b/components/shopify_developer_app/actions/search-product-variant/search-product-variant.mjs index c510113e16826..1178182bfd8be 100644 --- a/components/shopify_developer_app/actions/search-product-variant/search-product-variant.mjs +++ b/components/shopify_developer_app/actions/search-product-variant/search-product-variant.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-search-product-variant", - version: "0.0.7", + version: "0.0.9", name, description, type, diff --git a/components/shopify_developer_app/actions/search-products/search-products.mjs b/components/shopify_developer_app/actions/search-products/search-products.mjs index 09ffad0763f96..4058b9fbe69bb 100644 --- a/components/shopify_developer_app/actions/search-products/search-products.mjs +++ b/components/shopify_developer_app/actions/search-products/search-products.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-search-products", - version: "0.0.7", + version: "0.0.9", name, description, type, diff --git a/components/shopify_developer_app/actions/update-article/update-article.mjs b/components/shopify_developer_app/actions/update-article/update-article.mjs index eb64ca93e2643..42c0561cd65c8 100644 --- a/components/shopify_developer_app/actions/update-article/update-article.mjs +++ b/components/shopify_developer_app/actions/update-article/update-article.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-update-article", - version: "0.0.9", + version: "0.0.11", name, description, type, diff --git a/components/shopify_developer_app/actions/update-customer/update-customer.mjs b/components/shopify_developer_app/actions/update-customer/update-customer.mjs index f7906d1c3ca38..4386589469b08 100644 --- a/components/shopify_developer_app/actions/update-customer/update-customer.mjs +++ b/components/shopify_developer_app/actions/update-customer/update-customer.mjs @@ -6,7 +6,7 @@ export default { key: "shopify_developer_app-update-customer", name: "Update Customer", description: "Update a existing customer. [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerupdate)", - version: "0.0.8", + version: "0.0.10", type: "action", props: { shopify, diff --git a/components/shopify_developer_app/actions/update-fulfillment-tracking-info/update-fulfillment-tracking-info.mjs b/components/shopify_developer_app/actions/update-fulfillment-tracking-info/update-fulfillment-tracking-info.mjs new file mode 100644 index 0000000000000..a9e27265b63b8 --- /dev/null +++ b/components/shopify_developer_app/actions/update-fulfillment-tracking-info/update-fulfillment-tracking-info.mjs @@ -0,0 +1,68 @@ +import shopify from "../../shopify_developer_app.app.mjs"; + +export default { + key: "shopify_developer_app-update-fulfillment-tracking-info", + name: "Update Fulfillment Tracking Info", + description: "Update the tracking info for a fulfillment. [See the documentation](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/fulfillmenttrackinginfoupdate)", + version: "0.0.1", + type: "action", + props: { + shopify, + orderId: { + propDefinition: [ + shopify, + "orderId", + ], + }, + fulfillmentId: { + propDefinition: [ + shopify, + "fulfillmentId", + (c) => ({ + orderId: c.orderId, + }), + ], + }, + company: { + type: "string", + label: "Company", + description: "The name of the tracking company", + optional: true, + }, + number: { + type: "string", + label: "Tracking Number", + description: "The tracking number for the fulfillment", + optional: true, + }, + url: { + type: "string", + label: "Tracking URL", + description: "The URL for the tracking information", + optional: true, + }, + notifyCustomer: { + type: "boolean", + label: "Notify Customer", + description: "Whether to notify the customer", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.shopify.updateFulfillmentTrackingInfo({ + fulfillmentId: this.fulfillmentId, + trackingInfoInput: { + company: this.company, + number: this.number, + url: this.url, + }, + notifyCustomer: this.notifyCustomer, + }); + + if (response.fulfillmentTrackingInfoUpdate.userErrors.length > 0) { + throw new Error(response.fulfillmentTrackingInfoUpdate.userErrors[0].message); + } + $.export("$summary", `Updated fulfillment tracking info for fulfillment with ID: ${this.fulfillmentId}`); + return response; + }, +}; diff --git a/components/shopify_developer_app/actions/update-inventory-level/update-inventory-level.mjs b/components/shopify_developer_app/actions/update-inventory-level/update-inventory-level.mjs index 8eb8196f76288..d66287eaac240 100644 --- a/components/shopify_developer_app/actions/update-inventory-level/update-inventory-level.mjs +++ b/components/shopify_developer_app/actions/update-inventory-level/update-inventory-level.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-update-inventory-level", - version: "0.0.7", + version: "0.0.9", name, description, type, diff --git a/components/shopify_developer_app/actions/update-metafield/update-metafield.mjs b/components/shopify_developer_app/actions/update-metafield/update-metafield.mjs index c06065844e965..c92b1c5511877 100644 --- a/components/shopify_developer_app/actions/update-metafield/update-metafield.mjs +++ b/components/shopify_developer_app/actions/update-metafield/update-metafield.mjs @@ -9,7 +9,7 @@ const { export default { ...others, key: "shopify_developer_app-update-metafield", - version: "0.0.8", + version: "0.0.10", name, description, type, diff --git a/components/shopify_developer_app/actions/update-metaobject/update-metaobject.mjs b/components/shopify_developer_app/actions/update-metaobject/update-metaobject.mjs index f2b7b2564e875..8fa70df502af3 100644 --- a/components/shopify_developer_app/actions/update-metaobject/update-metaobject.mjs +++ b/components/shopify_developer_app/actions/update-metaobject/update-metaobject.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-update-metaobject", - version: "0.0.10", + version: "0.0.12", name, description, type, diff --git a/components/shopify_developer_app/actions/update-page/update-page.mjs b/components/shopify_developer_app/actions/update-page/update-page.mjs index 2061f96031ce3..be852f56bd13f 100644 --- a/components/shopify_developer_app/actions/update-page/update-page.mjs +++ b/components/shopify_developer_app/actions/update-page/update-page.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-update-page", - version: "0.0.9", + version: "0.0.11", name, description, type, diff --git a/components/shopify_developer_app/actions/update-product-variant/update-product-variant.mjs b/components/shopify_developer_app/actions/update-product-variant/update-product-variant.mjs index 58f3d1468767b..3beaf41c28c9c 100644 --- a/components/shopify_developer_app/actions/update-product-variant/update-product-variant.mjs +++ b/components/shopify_developer_app/actions/update-product-variant/update-product-variant.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-update-product-variant", - version: "0.0.9", + version: "0.0.11", name, description, type, diff --git a/components/shopify_developer_app/actions/update-product/update-product.mjs b/components/shopify_developer_app/actions/update-product/update-product.mjs index cbee70151f670..6c94428fd7dda 100644 --- a/components/shopify_developer_app/actions/update-product/update-product.mjs +++ b/components/shopify_developer_app/actions/update-product/update-product.mjs @@ -6,7 +6,7 @@ export default { key: "shopify_developer_app-update-product", name: "Update Product", description: "Update an existing product. [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productupdate)", - version: "0.0.8", + version: "0.0.10", type: "action", props: { shopify, diff --git a/components/shopify_developer_app/common/mutations.mjs b/components/shopify_developer_app/common/mutations.mjs index 1c675dac8cd6e..7314daf0616c3 100644 --- a/components/shopify_developer_app/common/mutations.mjs +++ b/components/shopify_developer_app/common/mutations.mjs @@ -116,9 +116,97 @@ const UPDATE_PRODUCT = ` } `; +const REFUND_ORDER = ` +mutation RefundLineItem($input: RefundInput!) { + refundCreate(input: $input) { + refund { + id + totalRefundedSet { + presentmentMoney { + amount + currencyCode + } + } + order { + id + totalPriceSet { + presentmentMoney { + amount + currencyCode + } + } + } + refundLineItems(first: 10) { + nodes { + id + lineItem { + id + title + quantity + product { + id + title + } + variant { + id + title + price + } + } + } + } + } + userErrors { + field + message + } + } + } +`; + +const UPDATE_FULFILLMENT_TRACKING_INFO = ` + mutation FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) { + fulfillmentTrackingInfoUpdate(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) { + fulfillment { + id + status + trackingInfo { + company + number + url + } + } + userErrors { + field + message + } + } + } +`; + +const CREATE_FULFILLMENT = ` +mutation fulfillmentCreate($fulfillment: FulfillmentInput!, $message: String) { + fulfillmentCreate(fulfillment: $fulfillment, message: $message) { + fulfillment { + id + name + status + createdAt + } + userErrors { + field + message + } + } +} +`; + export default { CREATE_ORDER, CREATE_CUSTOMER, UPDATE_CUSTOMER, UPDATE_PRODUCT, + REFUND_ORDER, + UPDATE_FULFILLMENT_TRACKING_INFO, + CREATE_FULFILLMENT, }; diff --git a/components/shopify_developer_app/common/queries.mjs b/components/shopify_developer_app/common/queries.mjs index 82ed65a7f914d..aa48bd8c6364f 100644 --- a/components/shopify_developer_app/common/queries.mjs +++ b/components/shopify_developer_app/common/queries.mjs @@ -1,45 +1,369 @@ const GET_ORDER = ` - query SuggestedRefund($id: ID!, $refundLineItems: [RefundLineItemInput!], $first: Int, $after: String) { + query GetOrder($id: ID!, $first: Int, $after: String) { order(id: $id) { id - metafields (first: $first, after: $after) { - nodes { - id - key - namespace - value - type + name + createdAt + updatedAt + processedAt + cancelledAt + cancelReason + closedAt + confirmed + note + tags + test + currencyCode + displayFinancialStatus + displayFulfillmentStatus + closed + requiresShipping + riskLevel + customerAcceptsMarketing + paymentGatewayNames + + totalPriceSet { + shopMoney { + amount + currencyCode } - pageInfo { - endCursor + presentmentMoney { + amount + currencyCode + } + } + + subtotalPriceSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode } } + + currentTotalPriceSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + + totalDiscountsSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + + totalShippingPriceSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + + totalTaxSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + customer { id displayName + firstName + lastName email phone - addresses (first: $first) { + note + createdAt + updatedAt + verifiedEmail + tags + defaultAddress { + id address1 address2 city + province zip country + countryCodeV2 company + firstName + lastName + phone } } - totalPriceSet { - shopMoney { - amount - currencyCode + + billingAddress { + address1 + address2 + city + province + zip + country + countryCodeV2 + company + firstName + lastName + phone + } + + shippingAddress { + address1 + address2 + city + province + zip + country + countryCodeV2 + company + firstName + lastName + phone + } + + lineItems(first: 250) { + edges { + node { + id + title + quantity + variantTitle + vendor + fulfillmentStatus + fulfillableQuantity + refundableQuantity + requiresShipping + restockable + + originalUnitPriceSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + + discountedUnitPriceSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + + totalDiscountSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + + variant { + id + title + sku + barcode + inventoryItem { + id + measurement { + weight { + value + unit + } + } + } + inventoryQuantity + price + compareAtPrice + availableForSale + image { + url + altText + } + } + + product { + id + title + handle + vendor + productType + tags + status + createdAt + updatedAt + images(first: 1) { + edges { + node { + url + altText + } + } + } + } + + taxLines { + title + rate + ratePercentage + priceSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + } + + discountAllocations { + allocatedAmountSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + discountApplication { + ... on DiscountCodeApplication { + code + } + ... on AutomaticDiscountApplication { + title + } + ... on ManualDiscountApplication { + title + description + } + } + } + } } - presentmentMoney { - amount - currencyCode + } + + shippingLine { + title + code + source + carrierIdentifier + requestedFulfillmentService { + id + serviceName + handle + } + deliveryCategory + originalPriceSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + discountedPriceSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + taxLines { + title + rate + ratePercentage + priceSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + } + } + + fulfillments { + id + status + displayStatus + createdAt + updatedAt + estimatedDeliveryAt + inTransitAt + deliveredAt + service { + id + serviceName + handle + } + fulfillmentLineItems(first: 250) { + edges { + node { + id + quantity + lineItem { + id + title + } + } + } } } - suggestedRefund(refundLineItems: $refundLineItems) { - subtotalSet { + + transactions(first: 250) { + id + status + kind + gateway + test + createdAt + processedAt + amountSet { shopMoney { amount currencyCode @@ -49,11 +373,103 @@ const GET_ORDER = ` currencyCode } } - refundLineItems { - lineItem { + fees { + amount { + amount + currencyCode + } + flatFee { + amount + currencyCode + } + rate + rateName + type + } + } + + refunds { + id + createdAt + note + totalRefundedSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + refundLineItems(first: 250) { + edges { + node { + id + quantity + restockType + location { + id + name + } + lineItem { + id + title + quantity + } + subtotalSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + totalTaxSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + } + } + } + transactions { + nodes { id + status + kind + gateway + amountSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } } - quantity + } + } + + metafields (first: $first, after: $after) { + nodes { + id + key + namespace + value + type + } + pageInfo { + endCursor } } } @@ -127,36 +543,156 @@ const GET_DRAFT_ORDER = ` } `; +const GET_FULFILLMENT_ORDER = ` + query LocationsForMoveList($fulfillmentOrderId: ID!, $first: Int) { + fulfillmentOrder(id: $fulfillmentOrderId) { + lineItems (first: $first) { + nodes { + id + } + } + } + } +`; + const LIST_ORDERS = ` query ($first: Int, $after: String, $reverse: Boolean, $query: String){ orders(first: $first, after: $after, reverse: $reverse, query: $query) { nodes { id + name + createdAt updatedAt + processedAt + currencyCode + displayFinancialStatus + displayFulfillmentStatus + closed + confirmed + test + note + tags + totalPriceSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + subtotalPriceSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + totalTaxSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + totalShippingPriceSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } customer { id displayName + firstName + lastName email phone - addresses (first: $first) { + defaultAddress { + id address1 address2 city + province zip country company } } - totalPriceSet { - shopMoney { - amount - currencyCode - } - presentmentMoney { - amount - currencyCode + shippingAddress { + address1 + address2 + city + province + zip + country + company + firstName + lastName + } + lineItems(first: 50) { + edges { + node { + id + title + quantity + variantTitle + vendor + fulfillmentStatus + originalUnitPriceSet { + shopMoney { + amount + currencyCode + } + presentmentMoney { + amount + currencyCode + } + } + variant { + id + title + sku + price + image { + url + altText + } + } + product { + id + title + handle + vendor + productType + images(first: 1) { + edges { + node { + url + altText + } + } + } + } + } } } + fulfillments { + id + status + displayStatus + } metafields (first: $first) { nodes { id @@ -169,6 +705,7 @@ const LIST_ORDERS = ` } pageInfo { endCursor + hasNextPage } } } @@ -234,11 +771,46 @@ const LIST_CUSTOMERS = ` } `; +const LIST_FULFILLMENT_ORDERS = ` + query ($first: Int, $after: String, $query: String) { + fulfillmentOrders(first: $first, after: $after, query: $query) { + nodes { + id + status + createdAt + updatedAt + fulfillAt + orderId + orderName + fulfillments (first: $first) { + nodes { + id + name + } + } + lineItems (first: $first) { + nodes { + id + productTitle + totalQuantity + } + } + } + pageInfo { + endCursor + hasNextPage + } + } + } +`; + export default { GET_ORDER, GET_CUSTOMER, GET_DRAFT_ORDER, + GET_FULFILLMENT_ORDER, LIST_ORDERS, LIST_DRAFT_ORDERS, LIST_CUSTOMERS, + LIST_FULFILLMENT_ORDERS, }; diff --git a/components/shopify_developer_app/package.json b/components/shopify_developer_app/package.json index 73e9258469ab0..9be81670b14eb 100644 --- a/components/shopify_developer_app/package.json +++ b/components/shopify_developer_app/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/shopify_developer_app", - "version": "0.8.0", + "version": "0.9.0", "description": "Pipedream Shopify (Developer App) Components", "main": "shopify_developer_app.app.mjs", "keywords": [ diff --git a/components/shopify_developer_app/shopify_developer_app.app.mjs b/components/shopify_developer_app/shopify_developer_app.app.mjs index bf383457409f4..110f451f49125 100644 --- a/components/shopify_developer_app/shopify_developer_app.app.mjs +++ b/components/shopify_developer_app/shopify_developer_app.app.mjs @@ -2,7 +2,9 @@ import commonApp from "@pipedream/shopify"; import Shopify from "shopify-api-node"; import queries from "./common/queries.mjs"; import mutations from "./common/mutations.mjs"; -import { API_VERSION } from "@pipedream/shopify/common/constants.mjs"; +import { + API_VERSION, MAX_LIMIT, +} from "@pipedream/shopify/common/constants.mjs"; export default { ...commonApp, @@ -40,6 +42,60 @@ export default { }); }, }, + lineItemIds: { + type: "string[]", + label: "Line Item IDs", + description: "An array of line item IDs", + async options({ orderId }) { + const order = await this.getOrder({ + id: orderId, + first: MAX_LIMIT, + }); + return order.order.lineItems.edges.map(({ node }) => ({ + label: node.title, + value: node.id, + })); + }, + }, + fulfillmentId: { + type: "string", + label: "Fulfillment ID", + description: "The identifier of a fulfillment", + async options({ orderId }) { + const order = await this.getOrder({ + id: orderId, + first: MAX_LIMIT, + }); + return order.order.fulfillments?.map(({ id }) => id) ?? []; + }, + }, + fulfillmentOrderId: { + type: "string", + label: "Fulfillment Order ID", + description: "The identifier of a fulfillment order", + async options({ prevContext }) { + return this.getPropOptions({ + resourceFn: this.listFulfillmentOrders, + resourceKeys: [ + "fulfillmentOrders", + ], + labelKey: "id", + prevContext, + }); + }, + }, + fulfillmentOrderLineItemIds: { + type: "string[]", + label: "Fulfillment Order Line Item IDs", + description: "An array of fulfillment order line item IDs", + async options({ fulfillmentOrderId }) { + const fulfillmentOrder = await this.getFulfillmentOrder({ + fulfillmentOrderId, + first: MAX_LIMIT, + }); + return fulfillmentOrder.fulfillmentOrder.lineItems.nodes.map(({ id }) => id); + }, + }, firstName: { type: "string", label: "First Name", @@ -122,6 +178,9 @@ export default { getDraftOrder(variables) { return this._makeGraphQlRequest(queries.GET_DRAFT_ORDER, variables); }, + getFulfillmentOrder(variables) { + return this._makeGraphQlRequest(queries.GET_FULFILLMENT_ORDER, variables); + }, getCustomer(variables) { return this._makeGraphQlRequest(queries.GET_CUSTOMER, variables); }, @@ -134,14 +193,26 @@ export default { listCustomers(variables) { return this._makeGraphQlRequest(queries.LIST_CUSTOMERS, variables); }, + listFulfillmentOrders(variables) { + return this._makeGraphQlRequest(queries.LIST_FULFILLMENT_ORDERS, variables); + }, createOrder(variables) { return this._makeGraphQlRequest(mutations.CREATE_ORDER, variables); }, createCustomer(variables) { return this._makeGraphQlRequest(mutations.CREATE_CUSTOMER, variables); }, + createFulfillment(variables) { + return this._makeGraphQlRequest(mutations.CREATE_FULFILLMENT, variables); + }, updateCustomer(variables) { return this._makeGraphQlRequest(mutations.UPDATE_CUSTOMER, variables); }, + refundOrder(variables) { + return this._makeGraphQlRequest(mutations.REFUND_ORDER, variables); + }, + updateFulfillmentTrackingInfo(variables) { + return this._makeGraphQlRequest(mutations.UPDATE_FULFILLMENT_TRACKING_INFO, variables); + }, }, }; diff --git a/components/shopify_developer_app/sources/cart-updated/cart-updated.mjs b/components/shopify_developer_app/sources/cart-updated/cart-updated.mjs new file mode 100644 index 0000000000000..d5a0dfe9cb959 --- /dev/null +++ b/components/shopify_developer_app/sources/cart-updated/cart-updated.mjs @@ -0,0 +1,25 @@ +import common from "../common/webhook.mjs"; + +export default { + ...common, + key: "shopify_developer_app-cart-updated", + name: "Cart Updated (Instant)", + description: "Emit new event when a cart is updated.", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getTopic() { + return "CARTS_UPDATE"; + }, + generateMeta(resource) { + const ts = Date.parse(resource.updated_at); + return { + id: `${resource.id}-${ts}`, + summary: `Cart Updated ${resource.id}`, + ts, + }; + }, + }, +}; diff --git a/components/shopify_developer_app/sources/inventory-level-updated/inventory-level-updated.mjs b/components/shopify_developer_app/sources/inventory-level-updated/inventory-level-updated.mjs new file mode 100644 index 0000000000000..e46e2b8cbd262 --- /dev/null +++ b/components/shopify_developer_app/sources/inventory-level-updated/inventory-level-updated.mjs @@ -0,0 +1,25 @@ +import common from "../common/webhook.mjs"; + +export default { + ...common, + key: "shopify_developer_app-inventory-level-updated", + name: "Inventory Level Updated (Instant)", + description: "Emit new event when an inventory level is updated.", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getTopic() { + return "INVENTORY_LEVELS_UPDATE"; + }, + generateMeta(resource) { + const ts = Date.parse(resource.updated_at); + return { + id: `${resource.inventory_item_id}-${ts}`, + summary: `Inventory Level Updated ${resource.inventory_item_id}`, + ts, + }; + }, + }, +}; diff --git a/components/shopify_developer_app/sources/new-abandoned-cart/new-abandoned-cart.mjs b/components/shopify_developer_app/sources/new-abandoned-cart/new-abandoned-cart.mjs index f6e4fbec1bf7a..a045afd7c8d5d 100644 --- a/components/shopify_developer_app/sources/new-abandoned-cart/new-abandoned-cart.mjs +++ b/components/shopify_developer_app/sources/new-abandoned-cart/new-abandoned-cart.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-new-abandoned-cart", - version: "0.0.8", + version: "0.0.10", name, description, type, diff --git a/components/shopify_developer_app/sources/new-article/new-article.mjs b/components/shopify_developer_app/sources/new-article/new-article.mjs index 112c3801018c5..db8980dc35a15 100644 --- a/components/shopify_developer_app/sources/new-article/new-article.mjs +++ b/components/shopify_developer_app/sources/new-article/new-article.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-new-article", - version: "0.0.7", + version: "0.0.9", name, description, type, diff --git a/components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjs b/components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjs index 6da590dfd0bcb..8bac6f71742f9 100644 --- a/components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjs +++ b/components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjs @@ -6,7 +6,7 @@ export default { name: "New Cancelled Order (Instant)", type: "source", description: "Emit new event each time a new order is cancelled.", - version: "0.0.11", + version: "0.0.13", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-cart-created/new-cart-created.mjs b/components/shopify_developer_app/sources/new-cart-created/new-cart-created.mjs new file mode 100644 index 0000000000000..ed6f0859dbe50 --- /dev/null +++ b/components/shopify_developer_app/sources/new-cart-created/new-cart-created.mjs @@ -0,0 +1,25 @@ +import common from "../common/webhook.mjs"; + +export default { + ...common, + key: "shopify_developer_app-new-cart-created", + name: "New Cart Created (Instant)", + description: "Emit new event when a new cart is created.", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getTopic() { + return "CARTS_CREATE"; + }, + generateMeta(resource) { + const ts = Date.parse(resource.created_at); + return { + id: `${resource.id}-${ts}`, + summary: `Cart Created ${resource.id}`, + ts, + }; + }, + }, +}; diff --git a/components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjs b/components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjs index 9944c234b4822..33b1d069ca8de 100644 --- a/components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjs +++ b/components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjs @@ -6,7 +6,7 @@ export default { name: "New Customer Created (Instant)", type: "source", description: "Emit new event for each new customer added to a store.", - version: "0.0.11", + version: "0.0.13", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-draft-order/new-draft-order.mjs b/components/shopify_developer_app/sources/new-draft-order/new-draft-order.mjs index 14b0b7594e133..db77a30725ae0 100644 --- a/components/shopify_developer_app/sources/new-draft-order/new-draft-order.mjs +++ b/components/shopify_developer_app/sources/new-draft-order/new-draft-order.mjs @@ -6,7 +6,7 @@ export default { name: "New Draft Order (Instant)", type: "source", description: "Emit new event for each new draft order submitted to a store.", - version: "0.0.11", + version: "0.0.13", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs b/components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs index 788c3fde7d9d0..d922c88fb577f 100644 --- a/components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs +++ b/components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs @@ -7,7 +7,7 @@ export default { name: "New Event Emitted (Instant)", type: "source", description: "Emit new event for each new Shopify event.", - version: "0.0.12", + version: "0.0.14", dedupe: "unique", props: { ...common.props, diff --git a/components/shopify_developer_app/sources/new-fulfillment-event/new-fulfillment-event.mjs b/components/shopify_developer_app/sources/new-fulfillment-event/new-fulfillment-event.mjs index bd9ff5525ef29..a92ef8a578608 100644 --- a/components/shopify_developer_app/sources/new-fulfillment-event/new-fulfillment-event.mjs +++ b/components/shopify_developer_app/sources/new-fulfillment-event/new-fulfillment-event.mjs @@ -6,7 +6,7 @@ export default { name: "New Fulfillment Event (Instant)", type: "source", description: "Emit new event for each new fulfillment event for a store.", - version: "0.0.9", + version: "0.0.11", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-order-created/new-order-created.mjs b/components/shopify_developer_app/sources/new-order-created/new-order-created.mjs index a29bdeae49967..86d3fbeaa632f 100644 --- a/components/shopify_developer_app/sources/new-order-created/new-order-created.mjs +++ b/components/shopify_developer_app/sources/new-order-created/new-order-created.mjs @@ -6,7 +6,7 @@ export default { name: "New Order Created (Instant)", type: "source", description: "Emit new event for each new order submitted to a store.", - version: "0.0.11", + version: "0.0.13", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-order-fulfilled/new-order-fulfilled.mjs b/components/shopify_developer_app/sources/new-order-fulfilled/new-order-fulfilled.mjs index 56b2f941ee82b..af6a09ecee503 100644 --- a/components/shopify_developer_app/sources/new-order-fulfilled/new-order-fulfilled.mjs +++ b/components/shopify_developer_app/sources/new-order-fulfilled/new-order-fulfilled.mjs @@ -6,7 +6,7 @@ export default { name: "New Order Fulfilled (Instant)", type: "source", description: "Emit new event whenever an order is fulfilled.", - version: "0.0.8", + version: "0.0.10", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-page/new-page.mjs b/components/shopify_developer_app/sources/new-page/new-page.mjs index 2266428ee1f02..9af3340eadf5b 100644 --- a/components/shopify_developer_app/sources/new-page/new-page.mjs +++ b/components/shopify_developer_app/sources/new-page/new-page.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-new-page", - version: "0.0.7", + version: "0.0.9", name, description, type, diff --git a/components/shopify_developer_app/sources/new-paid-order/new-paid-order.mjs b/components/shopify_developer_app/sources/new-paid-order/new-paid-order.mjs index cb2389d1e5338..dca04d21bf2db 100644 --- a/components/shopify_developer_app/sources/new-paid-order/new-paid-order.mjs +++ b/components/shopify_developer_app/sources/new-paid-order/new-paid-order.mjs @@ -6,7 +6,7 @@ export default { name: "New Paid Order (Instant)", type: "source", description: "Emit new event each time a new order is paid.", - version: "0.0.11", + version: "0.0.13", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-product-created/new-product-created.mjs b/components/shopify_developer_app/sources/new-product-created/new-product-created.mjs index 7b673c123b15a..912decb8f91a6 100644 --- a/components/shopify_developer_app/sources/new-product-created/new-product-created.mjs +++ b/components/shopify_developer_app/sources/new-product-created/new-product-created.mjs @@ -6,7 +6,7 @@ export default { name: "New Product Created (Instant)", type: "source", description: "Emit new event for each product added to a store.", - version: "0.0.11", + version: "0.0.13", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs b/components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs index 503226a8550b7..1b730e17acc82 100644 --- a/components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs +++ b/components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs @@ -5,7 +5,7 @@ export default { key: "shopify_developer_app-new-product-updated", name: "New Product Updated (Instant)", description: "Emit new event for each product updated in a store.", - version: "0.0.9", + version: "0.0.11", type: "source", dedupe: "unique", props: { diff --git a/components/shopify_developer_app/sources/new-refund-created/new-refund-created.mjs b/components/shopify_developer_app/sources/new-refund-created/new-refund-created.mjs index 8e549e7a26066..833519b7749c3 100644 --- a/components/shopify_developer_app/sources/new-refund-created/new-refund-created.mjs +++ b/components/shopify_developer_app/sources/new-refund-created/new-refund-created.mjs @@ -5,7 +5,7 @@ export default { key: "shopify_developer_app-new-refund-created", name: "New Refund Created (Instant)", description: "Emit new event when a new refund is created.", - version: "0.0.8", + version: "0.0.10", type: "source", dedupe: "unique", methods: { diff --git a/components/shopify_developer_app/sources/new-updated-customer/new-updated-customer.mjs b/components/shopify_developer_app/sources/new-updated-customer/new-updated-customer.mjs index b8f683784f0e1..85ac02fe619c7 100644 --- a/components/shopify_developer_app/sources/new-updated-customer/new-updated-customer.mjs +++ b/components/shopify_developer_app/sources/new-updated-customer/new-updated-customer.mjs @@ -6,7 +6,7 @@ export default { name: "New Updated Customer (Instant)", type: "source", description: "Emit new event each time a customer's information is updated.", - version: "0.0.11", + version: "0.0.13", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-updated-order/new-updated-order.mjs b/components/shopify_developer_app/sources/new-updated-order/new-updated-order.mjs index 562ae76744aa3..46c8026c95741 100644 --- a/components/shopify_developer_app/sources/new-updated-order/new-updated-order.mjs +++ b/components/shopify_developer_app/sources/new-updated-order/new-updated-order.mjs @@ -6,7 +6,7 @@ export default { name: "New Updated Order (Instant)", type: "source", description: "Emit new event each time an order is updated.", - version: "0.0.11", + version: "0.0.13", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/product-added-to-custom-collection/product-added-to-custom-collection.mjs b/components/shopify_developer_app/sources/product-added-to-custom-collection/product-added-to-custom-collection.mjs index 80b87fcbca9d5..9f8c33b1c7698 100644 --- a/components/shopify_developer_app/sources/product-added-to-custom-collection/product-added-to-custom-collection.mjs +++ b/components/shopify_developer_app/sources/product-added-to-custom-collection/product-added-to-custom-collection.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, shopify); export default { ...others, key: "shopify_developer_app-product-added-to-custom-collection", - version: "0.0.7", + version: "0.0.9", name, description, type, diff --git a/components/shopify_developer_app/sources/shop-update/shop-update.mjs b/components/shopify_developer_app/sources/shop-update/shop-update.mjs new file mode 100644 index 0000000000000..0d8f04f428826 --- /dev/null +++ b/components/shopify_developer_app/sources/shop-update/shop-update.mjs @@ -0,0 +1,25 @@ +import common from "../common/webhook.mjs"; + +export default { + ...common, + key: "shopify_developer_app-shop-update", + name: "Shop Updated (Instant)", + description: "Emit new event when a shop is updated.", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getTopic() { + return "SHOP_UPDATE"; + }, + generateMeta(resource) { + const ts = Date.parse(resource.updated_at); + return { + id: `${resource.id}-${ts}`, + summary: `Shop Updated ${resource.id}`, + ts, + }; + }, + }, +}; diff --git a/components/shortcut/actions/create-story/create-story.js b/components/shortcut/actions/create-story/create-story.js deleted file mode 100644 index 9c155f16fc154..0000000000000 --- a/components/shortcut/actions/create-story/create-story.js +++ /dev/null @@ -1,370 +0,0 @@ -const shortcut = require("../../shortcut.app"); -const get = require("lodash/get"); -const validate = require("validate.js"); -const utils = require("../../utils"); -const constants = require("../../constants"); - -module.exports = { - key: "shortcut-create-story", - name: "Create Story", - description: "Creates a new story in your Shortcut account. See [Create Story](https://shortcut.com/api/rest/v3#Create-Story) in Shortcut Rest API, V3 reference for endpoint documentation.", - version: "0.0.1", - type: "action", - props: { - shortcut, - archived: { - type: "boolean", - label: "Archived", - description: "Controls the story's archived state.", - default: false, - }, - comment: { - type: "object", - label: "Comment", - description: - "A comment object attached to the story must have the following structure: `author_id` which is the member ID of the Commentโ€™s author (defaults to the user identified by the API token), `created_at` which defaults to the time/date the comment is created, but can be set to reflect another date, `external_id` field that can be set to another unique ID. In the case that the comment has been imported from another tool, the ID in the other tool can be indicated here, `text` is the comment text, and `updated_at` which defaults to the time/date the comment is last updated in Shortcut but can be set to reflect another time/date. See [CreateStoryCommentParams](https://shortcut.com/api/rest/v3#CreateStoryCommentParams) for more info.", - optional: true, - }, - completedAtOverride: { - type: "string", - label: "Completed at Override Date", - description: - "A manual override for the time/date the Story was completed.", - optional: true, - }, - createdAt: { - type: "string", - label: "Created at Date", - description: "The time/date the Story was created.", - optional: true, - }, - dueDate: { - type: "string", - label: "Due Date", - description: "The due date of the story.", - optional: true, - }, - description: { - type: "string", - label: "Description", - description: "The description of the story.", - default: "", - optional: true, - }, - epicId: { - type: "integer", - label: "Epic ID", - description: "The unique identifier of the epic the story belongs to.", - async options() { - let options = []; - const epics = await this.shortcut.callWithRetry("listEpics"); - const isEpicDataAvailable = get(epics, [ - "data", - "length", - ]); - if (!isEpicDataAvailable) { - return options; - } - options = epics.data.map((epic) => ({ - label: epic.name, - value: epic.id, - })); - return options; - }, - optional: true, - }, - estimate: { - type: "integer", - label: "Estimate", - description: - "The numeric point estimate of the story. Can also be null, which means unestimated.", - optional: true, - }, - externalId: { - type: "string", - label: "External Id", - description: - "This field can be set to another unique ID. In the case that the Story has been imported from another tool, the ID in the other tool can be indicated here.", - optional: true, - }, - externalLinks: { - type: "string[]", - label: "External Links", - description: "A string array of External Links associated with this story.", - optional: true, - }, - fileIds: { - type: "integer[]", - label: "File Ids", - description: "An array of IDs of files attached to the story.", - async options() { - let options = []; - const files = await this.shortcut.callWithRetry("listFiles"); - const isFileDataAvailable = get(files, [ - "data", - "length", - ]); - if (!isFileDataAvailable) { - return options; - } - options = files.data.map((file) => ({ - label: file.name, - value: file.id, - })); - return options; - }, - optional: true, - }, - followerIds: { - type: "string[]", - label: "Follower Ids", - description: "A string array of UUIDs of the followers of this story.", - async options() { - return await this.shortcut.listMembersAsOptions(); - }, - optional: true, - }, - iterationId: { - type: "integer", - label: "Iteration Id", - description: "The ID of the iteration the story belongs to.", - async options() { - let options = []; - const iterations = await this.shortcut.callWithRetry("listIterations"); - const isIterationDataAvailable = get(iterations, [ - "data", - "length", - ]); - if (!isIterationDataAvailable) { - return options; - } - options = iterations.data.map((iteration) => ({ - label: iteration.name, - value: iteration.id, - })); - return options; - }, - optional: true, - }, - label: { - type: "object", - label: "Label", - description: - "A label object attached to the story. Each label object must have the following structure: `color` which is an string with the hex color to be displayed with the Label i.e. \"#ff0000\", and a string `name` for the name of the Label. See [CreateLabelParams](https://shortcut.com/api/rest/v3#CreateLabelParams) for more info.", - optional: true, - }, - linkedFileIds: { - type: "integer[]", - label: "Linked File Ids", - description: - "An array of IDs of linked files attached to the story.", - async options() { - let options = []; - const linkedFiles = await this.shortcut.callWithRetry("listLinkedFiles"); - const isLinkedFilesDataAvailable = get(linkedFiles, [ - "data", - "length", - ]); - if (!isLinkedFilesDataAvailable) { - return options; - } - options = linkedFiles.data.map((linkedFile) => ({ - label: linkedFile.name, - value: linkedFile.id, - })); - return options; - }, - optional: true, - }, - name: { - type: "string", - label: "Name", - description: "The name of the story.", - }, - ownerIds: { - type: "string[]", - label: "Owner Ids", - description: "A string array of UUIDs of the owners of this story.", - async options() { - return await this.shortcut.listMembersAsOptions(); - }, - optional: true, - }, - projectId: { - type: "integer", - label: "Project Id", - description: "The ID of the project the story belongs to.", - async options() { - let options = []; - const projects = await this.shortcut.callWithRetry("listProjects"); - const isProjectDataAvailable = get(projects, [ - "data", - "length", - ]); - if (!isProjectDataAvailable) { - return options; - } - options = projects.data.map((project) => ({ - label: project.name, - value: project.id, - })); - return options; - }, - }, - requestedById: { - type: "string", - label: "Requested by ID", - description: "The ID of the member that requested the story.", - async options() { - return await this.shortcut.listMembersAsOptions(); - }, - optional: true, - }, - startedAtOverride: { - type: "string", - label: "Started at Override Date", - description: "A manual override for the time/date the Story was started.", - optional: true, - }, - storyLink: { - type: "object", - label: "Story Link", - description: - "An story link object attached to the story must have the following structure: `object_id` is the unique ID of the story defined as object, `subject_id` is the unique ID of the story defined as subject, and `verb` which indicates how the subject story acts on the object story, valid values are `blocks`, `duplicates`, or `relates to`. See [CreateStoryLinkParams](https://shortcut.com/api/rest/v3#CreateStoryLinkParams) for more info.", - optional: true, - }, - storyType: { - type: "string", - label: "Story Type", - description: "The type of story (feature, bug, chore).", - options: constants.STORY_TYPES, - default: "feature", - optional: true, - }, - task: { - type: "object", - label: "Task", - description: - "A task object attached to the story must have the following structure: `complete` which is a boolean, indicating whether the task is completed (defaults to `false`), `created_at` which defaults to the time/date the task is created but can be set to reflect another creation time/date, `description` as a description for the task, `external_id` a field can be set to another unique ID. In the case that the task has been imported from another tool, the ID in the other tool can be indicated here, `owner_ids` as an array of UUIDs for any members you want to add as owners on this new task, `updated_at` which defaults to the time/date the task was last updated in Shortcut but can be set to reflect another time/date. See [CreateTaskParams](https://shortcut.com/api/rest/v3#CreateTaskParams) for more info.", - optional: true, - }, - updatedAt: { - type: "string", - label: "Updated at Date", - description: "The time/date the story was updated.", - optional: true, - }, - workflowStateId: { - type: "integer", - label: "Workflow State Id", - description: "The ID of the workflow state the story will be in.", - async options() { - let options = []; - const workflows = await this.shortcut.callWithRetry("listWorkflows"); - const isWorkflowDataAvailable = get(workflows, [ - "data", - "length", - ]); - if (!isWorkflowDataAvailable) { - return options; - } - return workflows.data.reduce(function (options, workflow) { - const hasState = get(workflow, [ - "states", - "length", - ]); - if (!hasState) { - return options; - } - const optionsToAdd = workflow.states.map((state) => ({ - label: `${state.name} (${workflow.name})`, - value: `${state.id}`, - })); - return options.concat(optionsToAdd); - }, []); - }, - optional: true, - }, - }, - async run() { - const constraints = { - name: { - length: { - maximum: 512, - }, - }, - description: { - length: { - maximum: 100000, - }, - }, - externalLinks: utils.validateArrayWhenPresent, - fileIds: utils.validateArrayWhenPresent, - followerIds: utils.validateArrayWhenPresent, - inkedFileIds: utils.validateArrayWhenPresent, - ownerIds: utils.validateArrayWhenPresent, - }; - const validationResult = validate( - { - name: this.name, - description: this.description, - externalLinks: this.externalLinks, - fileIds: this.fileIds, - followerIds: this.followerIds, - linkedFileIds: this.linkedFileIds, - ownerIds: this.ownerIds, - }, - constraints, - ); - utils.checkValidationResults(validationResult); - const story = { - archived: this.archived, - completed_at_override: this.completedAtOverride, - created_at: this.createdAt, - deadline: this.dueDate, - description: this.description, - epic_id: this.epicId, - estimate: this.estimate, - external_id: this.externalId, - external_links: this.externalLinks, - file_ids: this.fileIds, - follower_ids: this.followerIds, - iteration_id: this.iterationId, - linked_file_ids: this.linkedFileIds, - name: this.name, - owner_ids: this.ownerIds, - project_id: this.projectId, - requested_by_id: this.requestedById, - started_at_override: this.startedAtOverride, - story_type: this.storyType, - updated_at: this.updatedAt, - workflow_state_id: this.workflowStateId, - }; - const comment = utils.convertEmptyStringToUndefined(this.comment); - if (comment) { - story.comments = [ - comment, - ]; - } - const label = utils.convertEmptyStringToUndefined(this.label); - if (label) { - story.labels = [ - label, - ]; - } - const storyLink = utils.convertEmptyStringToUndefined(this.storyLink); - if (storyLink) { - story.story_links = [ - storyLink, - ]; - } - const task = utils.convertEmptyStringToUndefined(this.task); - if (task) { - story.tasks = [ - task, - ]; - } - const resp = await this.shortcut.callWithRetry("createStory", story); - return resp.data; - }, -}; diff --git a/components/shortcut/actions/create-story/create-story.mjs b/components/shortcut/actions/create-story/create-story.mjs new file mode 100644 index 0000000000000..080e58b3a5425 --- /dev/null +++ b/components/shortcut/actions/create-story/create-story.mjs @@ -0,0 +1,356 @@ +import shortcut from "../../shortcut.app.mjs"; +import lodash from "lodash"; +import validate from "validate.js"; +import utils from "../../common/utils.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "shortcut-create-story", + name: "Create Story", + description: "Creates a new story in your Shortcut account. See [Create Story](https://shortcut.com/api/rest/v3#Create-Story) in Shortcut Rest API, V3 reference for endpoint documentation.", + version: "1.0.0", + type: "action", + props: { + shortcut, + workflowStateId: { + type: "integer", + label: "Workflow State Id", + description: "The ID of the workflow state the story will be in.", + async options() { + let options = []; + const workflows = await this.shortcut.callWithRetry("listWorkflows"); + const isWorkflowDataAvailable = lodash.get(workflows, [ + "data", + "length", + ]); + if (!isWorkflowDataAvailable) { + return options; + } + return workflows.data.reduce(function (options, workflow) { + const hasState = lodash.get(workflow, [ + "states", + "length", + ]); + if (!hasState) { + return options; + } + const optionsToAdd = workflow.states.map((state) => ({ + label: `${state.name} (${workflow.name})`, + value: state.id, + })); + return options.concat(optionsToAdd); + }, []); + }, + }, + name: { + type: "string", + label: "Name", + description: "The name of the story.", + }, + archived: { + type: "boolean", + label: "Archived", + description: "Controls the story's archived state.", + optional: true, + }, + comment: { + type: "object", + label: "Comment", + description: + "A comment object attached to the story must have the following structure: `author_id` which is the member ID of the Comment's author (defaults to the user identified by the API token), `created_at` which defaults to the time/date the comment is created, but can be set to reflect another date, `external_id` field that can be set to another unique ID. In the case that the comment has been imported from another tool, the ID in the other tool can be indicated here, `text` is the comment text, and `updated_at` which defaults to the time/date the comment is last updated in Shortcut but can be set to reflect another time/date. See [CreateStoryCommentParams](https://shortcut.com/api/rest/v3#CreateStoryCommentParams) for more info.", + optional: true, + }, + completedAtOverride: { + type: "string", + label: "Completed at Override Date", + description: + "A manual override for the time/date the Story was completed.", + optional: true, + }, + createdAt: { + type: "string", + label: "Created at Date", + description: "The time/date the Story was created.", + optional: true, + }, + dueDate: { + type: "string", + label: "Due Date", + description: "The due date of the story.", + optional: true, + }, + description: { + type: "string", + label: "Description", + description: "The description of the story.", + default: "", + optional: true, + }, + epicId: { + type: "integer", + label: "Epic ID", + description: "The unique identifier of the epic the story belongs to.", + async options() { + let options = []; + const epics = await this.shortcut.callWithRetry("listEpics"); + const isEpicDataAvailable = lodash.get(epics, [ + "data", + "length", + ]); + if (!isEpicDataAvailable) { + return options; + } + options = epics.data.map((epic) => ({ + label: epic.name, + value: epic.id, + })); + return options; + }, + optional: true, + }, + estimate: { + type: "integer", + label: "Estimate", + description: + "The numeric point estimate of the story. Can also be null, which means unestimated.", + optional: true, + }, + externalId: { + type: "string", + label: "External Id", + description: + "This field can be set to another unique ID. In the case that the Story has been imported from another tool, the ID in the other tool can be indicated here.", + optional: true, + }, + externalLinks: { + type: "string[]", + label: "External Links", + description: "A string array of External Links associated with this story.", + optional: true, + }, + fileIds: { + type: "integer[]", + label: "File Ids", + description: "An array of IDs of files attached to the story.", + async options() { + let options = []; + const files = await this.shortcut.callWithRetry("listFiles"); + const isFileDataAvailable = lodash.get(files, [ + "data", + "length", + ]); + if (!isFileDataAvailable) { + return options; + } + options = files.data.map((file) => ({ + label: file.name, + value: file.id, + })); + return options; + }, + optional: true, + }, + followerIds: { + type: "string[]", + label: "Follower Ids", + description: "A string array of UUIDs of the followers of this story.", + async options() { + return await this.shortcut.listMembersAsOptions(); + }, + optional: true, + }, + iterationId: { + type: "integer", + label: "Iteration Id", + description: "The ID of the iteration the story belongs to.", + async options() { + let options = []; + const iterations = await this.shortcut.callWithRetry("listIterations"); + const isIterationDataAvailable = lodash.get(iterations, [ + "data", + "length", + ]); + if (!isIterationDataAvailable) { + return options; + } + options = iterations.data.map((iteration) => ({ + label: iteration.name, + value: iteration.id, + })); + return options; + }, + optional: true, + }, + label: { + type: "object", + label: "Label", + description: + "A label object attached to the story. Each label object must have the following structure: `color` which is an string with the hex color to be displayed with the Label i.e. \"#ff0000\", and a string `name` for the name of the Label. See [CreateLabelParams](https://shortcut.com/api/rest/v3#CreateLabelParams) for more info.", + optional: true, + }, + linkedFileIds: { + type: "integer[]", + label: "Linked File Ids", + description: + "An array of IDs of linked files attached to the story.", + async options() { + let options = []; + const linkedFiles = await this.shortcut.callWithRetry("listLinkedFiles"); + const isLinkedFilesDataAvailable = lodash.get(linkedFiles, [ + "data", + "length", + ]); + if (!isLinkedFilesDataAvailable) { + return options; + } + options = linkedFiles.data.map((linkedFile) => ({ + label: linkedFile.name, + value: linkedFile.id, + })); + return options; + }, + optional: true, + }, + ownerIds: { + type: "string[]", + label: "Owner Ids", + description: "A string array of UUIDs of the owners of this story.", + async options() { + return await this.shortcut.listMembersAsOptions(); + }, + optional: true, + }, + requestedById: { + type: "string", + label: "Requested by ID", + description: "The ID of the member that requested the story.", + async options() { + return await this.shortcut.listMembersAsOptions(); + }, + optional: true, + }, + startedAtOverride: { + type: "string", + label: "Started at Override Date", + description: "A manual override for the time/date the Story was started.", + optional: true, + }, + storyLink: { + type: "object", + label: "Story Link", + description: + "An story link object attached to the story must have the following structure: `object_id` is the unique ID of the story defined as object, `subject_id` is the unique ID of the story defined as subject, and `verb` which indicates how the subject story acts on the object story, valid values are `blocks`, `duplicates`, or `relates to`. See [CreateStoryLinkParams](https://shortcut.com/api/rest/v3#CreateStoryLinkParams) for more info.", + optional: true, + }, + storyType: { + type: "string", + label: "Story Type", + description: "The type of story (feature, bug, chore).", + options: constants.STORY_TYPES, + default: "feature", + optional: true, + }, + task: { + type: "object", + label: "Task", + description: + "A task object attached to the story must have the following structure: `complete` which is a boolean, indicating whether the task is completed (defaults to `false`), `created_at` which defaults to the time/date the task is created but can be set to reflect another creation time/date, `description` as a description for the task, `external_id` a field can be set to another unique ID. In the case that the task has been imported from another tool, the ID in the other tool can be indicated here, `owner_ids` as an array of UUIDs for any members you want to add as owners on this new task, `updated_at` which defaults to the time/date the task was last updated in Shortcut but can be set to reflect another time/date. See [CreateTaskParams](https://shortcut.com/api/rest/v3#CreateTaskParams) for more info.", + optional: true, + }, + updatedAt: { + type: "string", + label: "Updated at Date", + description: "The time/date the story was updated.", + optional: true, + }, + }, + async run() { + const constraints = { + name: { + length: { + maximum: 512, + }, + }, + description: { + length: { + maximum: 100000, + }, + }, + externalLinks: utils.validateArrayWhenPresent, + fileIds: utils.validateArrayWhenPresent, + followerIds: utils.validateArrayWhenPresent, + inkedFileIds: utils.validateArrayWhenPresent, + ownerIds: utils.validateArrayWhenPresent, + }; + const validationResult = validate( + { + name: this.name, + description: this.description, + externalLinks: this.externalLinks, + fileIds: this.fileIds, + followerIds: this.followerIds, + linkedFileIds: this.linkedFileIds, + ownerIds: this.ownerIds, + }, + constraints, + ); + utils.checkValidationResults(validationResult); + const story = { + archived: this.archived, + completed_at_override: this.completedAtOverride, + created_at: this.createdAt, + deadline: this.dueDate, + description: this.description, + epic_id: this.epicId, + estimate: this.estimate, + external_id: this.externalId, + external_links: this.externalLinks, + file_ids: this.fileIds, + follower_ids: this.followerIds, + iteration_id: this.iterationId, + linked_file_ids: this.linkedFileIds, + name: this.name, + owner_ids: this.ownerIds, + requested_by_id: this.requestedById, + started_at_override: this.startedAtOverride, + story_type: this.storyType, + updated_at: this.updatedAt, + workflow_state_id: this.workflowStateId, + ...(this.comment + ? { + comments: [ + utils.parseJson(this.comment), + ], + } + : undefined + ), + ...(this.label + ? { + labels: [ + utils.parseJson(this.label), + ], + } + : undefined + ), + ...(this.storyLink + ? { + story_links: [ + utils.parseJson(this.storyLink), + ], + } + : undefined + ), + ...(this.task + ? { + tasks: [ + utils.parseJson(this.task), + ], + } + : undefined + ), + }; + + const resp = await this.shortcut.callWithRetry("createStory", story); + return resp.data; + }, +}; diff --git a/components/shortcut/actions/search-stories/search-stories.js b/components/shortcut/actions/search-stories/search-stories.js deleted file mode 100644 index 6e81d023be4e8..0000000000000 --- a/components/shortcut/actions/search-stories/search-stories.js +++ /dev/null @@ -1,27 +0,0 @@ -const shortcut = require("../../shortcut.app"); - -module.exports = { - key: "shortcut-search-stories", - name: "Search Stories", - description: "Searches for stories in your Shortcut account.", - version: "0.0.1", - type: "action", - props: { - shortcut, - query: { - type: "string", - label: "Query", - description: - "The search query based on the [Search page](https://help.shortcut.com/hc/en-us/articles/115005967026) [search operators](https://help.shortcut.com/hc/en-us/articles/360000046646-Search-Operators) to use for finding stories.", - }, - numberOfStories: { - type: "integer", - label: "Number of Stories", - description: "The number of stories to return.", - default: 25, - }, - }, - async run() { - return this.shortcut.searchStories(this.query, this.numberOfStories); - }, -}; diff --git a/components/shortcut/actions/search-stories/search-stories.mjs b/components/shortcut/actions/search-stories/search-stories.mjs new file mode 100644 index 0000000000000..30448b2f77c74 --- /dev/null +++ b/components/shortcut/actions/search-stories/search-stories.mjs @@ -0,0 +1,27 @@ +import shortcut from "../../shortcut.app.mjs"; + +export default { + key: "shortcut-search-stories", + name: "Search Stories", + description: "Searches for stories in your Shortcut account.", + version: "1.0.0", + type: "action", + props: { + shortcut, + query: { + type: "string", + label: "Query", + description: + "The search query based on the [Search page](https://help.shortcut.com/hc/en-us/articles/115005967026) [search operators](https://help.shortcut.com/hc/en-us/articles/360000046646-Search-Operators) to use for finding stories.", + }, + numberOfStories: { + type: "integer", + label: "Number of Stories", + description: "The number of stories to return.", + default: 25, + }, + }, + async run() { + return this.shortcut.searchStories(this.query, this.numberOfStories); + }, +}; diff --git a/components/shortcut/common/constants.mjs b/components/shortcut/common/constants.mjs new file mode 100644 index 0000000000000..6026163f7a940 --- /dev/null +++ b/components/shortcut/common/constants.mjs @@ -0,0 +1,7 @@ +export default { + STORY_TYPES: [ + "bug", + "chore", + "feature", + ], +}; diff --git a/components/shortcut/common/utils.mjs b/components/shortcut/common/utils.mjs new file mode 100644 index 0000000000000..0a9fdf1b45bc5 --- /dev/null +++ b/components/shortcut/common/utils.mjs @@ -0,0 +1,85 @@ +const parseJson = (input, maxDepth = 100) => { + const seen = new WeakSet(); + const parse = (value) => { + if (maxDepth <= 0) { + return value; + } + if (typeof(value) === "string") { + // Only parse if the string looks like a JSON object or array + const trimmed = value.trim(); + if ( + (trimmed.startsWith("{") && trimmed.endsWith("}")) || + (trimmed.startsWith("[") && trimmed.endsWith("]")) + ) { + try { + return parseJson(JSON.parse(value), maxDepth - 1); + } catch (e) { + return value; + } + } + return value; + } else if (typeof(value) === "object" && value !== null && !Array.isArray(value)) { + if (seen.has(value)) { + return value; + } + seen.add(value); + return Object.entries(value) + .reduce((acc, [ + key, + val, + ]) => Object.assign(acc, { + [key]: parse(val), + }), {}); + } else if (Array.isArray(value)) { + return value.map((item) => parse(item)); + } + return value; + }; + + return parse(input); +}; + +export default { + /** + * Returns a validation message + * + * @param {object} validationResults a validation results object from validate.js library + * @returns it will generate validation message for each of the validation results present in + * `validationResults`. + */ + checkValidationResults(validationResults) { + if (validationResults) { + const validationErrorMsg = Object.keys(validationResults) + .map((key) => `\t${validationResults[key]}`) + .join("\n"); + const errorMsg = `Parameter validation failed with the following errors:\n${validationErrorMsg}`; + throw new Error(errorMsg); + } + }, + /** + * Returns `undefined` when `value` is an empty string or `null`. + * + * @param {object} value the value to check for returning `null`. + * @returns If `value` is defined, it will return `value`. Otherwise on an empty string, or + * `null` it will return `undefined`. + */ + convertEmptyStringToUndefined(value) { + return value || undefined; + }, + /** + * * Returns a constraint for `validate.js` library to validate for array if needed. + * + * @param {object} value the value to check if an array should be validated. + * @returns A constraint for `validate.js` library to validate for arrays if `value` + * is provided. When `value` is `null` or `undefined` no constraint is returned. + */ + validateArrayWhenPresent(value) { + if (value === null || value === undefined) { + return; + } + return { + type: "array", + }; + }, + parseJson, +}; diff --git a/components/shortcut/constants.js b/components/shortcut/constants.js deleted file mode 100644 index c3673be0c6aa1..0000000000000 --- a/components/shortcut/constants.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - STORY_TYPES: [ - "bug", - "chore", - "feature", - ], -}; diff --git a/components/shortcut/package.json b/components/shortcut/package.json index 9cee520b5cb47..3afb558fc23ce 100644 --- a/components/shortcut/package.json +++ b/components/shortcut/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/shortcut", - "version": "0.3.6", + "version": "1.0.0", "description": "Pipedream Shortcut Components", "main": "shortcut.app.mjs", "keywords": [ @@ -10,9 +10,8 @@ "homepage": "https://pipedream.com/apps/shortcut", "author": "Pipedream (https://pipedream.com/)", "dependencies": { + "@shortcut/client": "^2.2.0", "async-retry": "^1.3.1", - "axios": "^0.21.1", - "clubhouse-lib": "^0.12.0", "lodash": "^4.17.20", "validate.js": "^0.13.1" }, diff --git a/components/shortcut/shortcut.app.js b/components/shortcut/shortcut.app.js deleted file mode 100644 index 8b504219a0d1b..0000000000000 --- a/components/shortcut/shortcut.app.js +++ /dev/null @@ -1,111 +0,0 @@ -const { ShortcutClient } = require("@useshortcut/client"); -const get = require("lodash/get"); -const retry = require("async-retry"); - -module.exports = { - type: "app", - app: "shortcut", - methods: { - api() { - return new ShortcutClient(this.$auth.api_key); - }, - _isRetriableStatusCode(statusCode) { - return [ - 408, - 429, - 500, - ].includes(statusCode); - }, - async _withRetries(apiCall) { - const retryOpts = { - retries: 3, - factor: 2, - }; - return retry(async (bail) => { - try { - return await apiCall(); - } catch (err) { - const statusCode = get(err, [ - "response", - "status", - ]); - if (!this._isRetriableStatusCode(statusCode)) { - bail(` - Unexpected error (status code: ${statusCode}): - ${JSON.stringify(err.message)} - `); - } - console.warn(`Temporary error: ${err.message}`); - throw err; - } - }, retryOpts); - }, - callWithRetry(method, ...args) { - return this._withRetries( - () => this.api()[method](...args), - ); - }, - /** - * Returns a list of all Members as options to use as dynamically populated prop's options. - * @returns {members: array } An array where each element has the `value` and `label` - * properties, to be used as dynamically populated prop's options. `value` is set to the `id` - * of the shortcut member, and `label` to the member's name. - */ - async listMembersAsOptions() { - let options = []; - const members = await this.callWithRetry("listMembers"); - const isMembersDataAvailable = get(members, [ - "data", - "length", - ]); - if (!isMembersDataAvailable) { - return options; - } - options = members.data.map((member) => ({ - label: member.profile.name, - value: member.id, - })); - return options; - }, - /** - * Searches for stories in your Shortcut account. - * @params {string} query - The search query based on the - * [Search page](https://help.shortcut.com/hc/en-us/articles/115005967026) - * [search operators] - * (https://help.shortcut.com/hc/en-us/articles/360000046646-Search-Operators) - * to use for finding stories. - * @params {integer} numberOfStories - The number of stories to return. - * @returns {stories: array } An array stories matching the `query` parameter. Number of - * results are limited by `numberOfStories`. - */ - async searchStories(query, numberOfStories) { - let stories = []; - // eslint-disable-next-line camelcase - const pageSize = Math.min(numberOfStories, 25); - let next = undefined; - do { - const results = await this._withRetries(() => - this.api().searchStories({ - query, - page_size: pageSize, - next, - })); - const isStoryDataAvailable = get(results, [ - "data", - "data", - "length", - ]); - if (!isStoryDataAvailable) { - break; - } - stories.push(...results.data.data); - const decodedNext = decodeURIComponent(results.data.next); - const idxQuestionMark = decodedNext.indexOf("?"); - const nextQueryString = decodedNext.substring(idxQuestionMark + 1); - let searchParams = new URLSearchParams(nextQueryString); - next = searchParams.get("next"); - } while (stories.length < numberOfStories && next); - return stories.slice(0, numberOfStories); - }, - }, -}; diff --git a/components/shortcut/shortcut.app.mjs b/components/shortcut/shortcut.app.mjs new file mode 100644 index 0000000000000..9a4734f178c72 --- /dev/null +++ b/components/shortcut/shortcut.app.mjs @@ -0,0 +1,114 @@ +import { ShortcutClient } from "@shortcut/client"; +import lodash from "lodash"; +import retry from "async-retry"; + +export default { + type: "app", + app: "shortcut", + methods: { + api() { + return new ShortcutClient(this.$auth.api_key); + }, + _isRetriableStatusCode(statusCode) { + return [ + 408, + 429, + 500, + ].includes(statusCode); + }, + async _withRetries(apiCall) { + const retryOpts = { + retries: 3, + factor: 2, + }; + return retry(async (bail) => { + try { + return await apiCall(); + } catch (err) { + const statusCode = lodash.get(err, [ + "response", + "status", + ]); + if (!this._isRetriableStatusCode(statusCode)) { + if (err.response?.data) { + bail(JSON.stringify({ + statusCode, + data: err.response?.data, + }, null, 2)); + } else { + bail(`Unexpected error (status code: ${statusCode}): ${JSON.stringify(err.message)}`); + } + } + throw err; + } + }, retryOpts); + }, + callWithRetry(method, ...args) { + return this._withRetries( + () => this.api()[method](...args), + ); + }, + /** + * Returns a list of all Members as options to use as dynamically populated prop's options. + * @returns {members: array } An array where each element has the `value` and `label` + * properties, to be used as dynamically populated prop's options. `value` is set to the `id` + * of the shortcut member, and `label` to the member's name. + */ + async listMembersAsOptions() { + let options = []; + const members = await this.callWithRetry("listMembers"); + const isMembersDataAvailable = lodash.get(members, [ + "data", + "length", + ]); + if (!isMembersDataAvailable) { + return options; + } + options = members.data.map((member) => ({ + label: member.profile.name, + value: member.id, + })); + return options; + }, + /** + * Searches for stories in your Shortcut account. + * @params {string} query - The search query based on the + * [Search page](https://help.shortcut.com/hc/en-us/articles/115005967026) + * [search operators] + * (https://help.shortcut.com/hc/en-us/articles/360000046646-Search-Operators) + * to use for finding stories. + * @params {integer} numberOfStories - The number of stories to return. + * @returns {stories: array } An array stories matching the `query` parameter. Number of + * results are limited by `numberOfStories`. + */ + async searchStories(query, numberOfStories) { + let stories = []; + // eslint-disable-next-line camelcase + const pageSize = Math.min(numberOfStories, 25); + let next = undefined; + do { + const results = await this._withRetries(() => + this.api().searchStories({ + query, + page_size: pageSize, + next, + })); + const isStoryDataAvailable = lodash.get(results, [ + "data", + "data", + "length", + ]); + if (!isStoryDataAvailable) { + break; + } + stories.push(...results.data.data); + const decodedNext = decodeURIComponent(results.data.next); + const idxQuestionMark = decodedNext.indexOf("?"); + const nextQueryString = decodedNext.substring(idxQuestionMark + 1); + let searchParams = new URLSearchParams(nextQueryString); + next = searchParams.get("next"); + } while (stories.length < numberOfStories && next); + return stories.slice(0, numberOfStories); + }, + }, +}; diff --git a/components/shortcut/utils.js b/components/shortcut/utils.js deleted file mode 100644 index d41e251f7be3c..0000000000000 --- a/components/shortcut/utils.js +++ /dev/null @@ -1,43 +0,0 @@ -module.exports = { - /** - * Returns a validation message - * - * @param {object} validationResults a validation results object from validate.js library - * @returns it will generate validation message for each of the validation results present in - * `validationResults`. - */ - checkValidationResults(validationResults) { - if (validationResults) { - const validationErrorMsg = Object.keys(validationResults) - .map((key) => `\t${validationResults[key]}`) - .join("\n"); - const errorMsg = `Parameter validation failed with the following errors:\n${validationErrorMsg}`; - throw new Error(errorMsg); - } - }, - /** - * Returns `undefined` when `value` is an empty string or `null`. - * - * @param {object} value the value to check for returning `null`. - * @returns If `value` is defined, it will return `value`. Otherwise on an empty string, or - * `null` it will return `undefined`. - */ - convertEmptyStringToUndefined(value) { - return value || undefined; - }, - /** - * * Returns a constraint for `validate.js` library to validate for array if needed. - * - * @param {object} value the value to check if an array should be validated. - * @returns A constraint for `validate.js` library to validate for arrays if `value` - * is provided. When `value` is `null` or `undefined` no constraint is returned. - */ - validateArrayWhenPresent(value) { - if (value === null || value === undefined) { - return; - } - return { - type: "array", - }; - }, -}; diff --git a/components/showpad/.gitignore b/components/showpad/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/showpad/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/showpad/app/showpad.app.ts b/components/showpad/app/showpad.app.ts deleted file mode 100644 index 1e3e44a8e4e97..0000000000000 --- a/components/showpad/app/showpad.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "showpad", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/showpad/package.json b/components/showpad/package.json index 2fdcdd7205ae7..8d68b3b16d369 100644 --- a/components/showpad/package.json +++ b/components/showpad/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/showpad", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Showpad Components", - "main": "dist/app/showpad.app.mjs", + "main": "showpad.app.mjs", "keywords": [ "pipedream", "showpad" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/showpad", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/showpad/showpad.app.mjs b/components/showpad/showpad.app.mjs new file mode 100644 index 0000000000000..166b571392a97 --- /dev/null +++ b/components/showpad/showpad.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "showpad", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sierra_interactive/.gitignore b/components/sierra_interactive/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sierra_interactive/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sierra_interactive/app/sierra_interactive.app.ts b/components/sierra_interactive/app/sierra_interactive.app.ts deleted file mode 100644 index c9ede4824a03e..0000000000000 --- a/components/sierra_interactive/app/sierra_interactive.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sierra_interactive", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/sierra_interactive/package.json b/components/sierra_interactive/package.json index 1424c86c96338..4fc9bda7f0999 100644 --- a/components/sierra_interactive/package.json +++ b/components/sierra_interactive/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/sierra_interactive", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Sierra Interactive Components", - "main": "dist/app/sierra_interactive.app.mjs", + "main": "sierra_interactive.app.mjs", "keywords": [ "pipedream", "sierra_interactive" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/sierra_interactive", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sierra_interactive/sierra_interactive.app.mjs b/components/sierra_interactive/sierra_interactive.app.mjs new file mode 100644 index 0000000000000..bfb54cac05c48 --- /dev/null +++ b/components/sierra_interactive/sierra_interactive.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sierra_interactive", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/signalwire/package.json b/components/signalwire/package.json index ce700db41ba1b..6b2bf2485e71e 100644 --- a/components/signalwire/package.json +++ b/components/signalwire/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/signalwire", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream SignalWire Components", "main": "signalwire.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/signrequest/.gitignore b/components/signrequest/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/signrequest/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/signrequest/app/signrequest.app.ts b/components/signrequest/app/signrequest.app.ts deleted file mode 100644 index 1b3d400161cf1..0000000000000 --- a/components/signrequest/app/signrequest.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "signrequest", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/signrequest/package.json b/components/signrequest/package.json index a6bf09604e634..c73fb501bce06 100644 --- a/components/signrequest/package.json +++ b/components/signrequest/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/signrequest", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream SignRequest Components", - "main": "dist/app/signrequest.app.mjs", + "main": "signrequest.app.mjs", "keywords": [ "pipedream", "signrequest" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/signrequest", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/signrequest/signrequest.app.mjs b/components/signrequest/signrequest.app.mjs new file mode 100644 index 0000000000000..9d70d7c01357a --- /dev/null +++ b/components/signrequest/signrequest.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "signrequest", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/signwell/.gitignore b/components/signwell/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/signwell/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/signwell/app/signwell.app.ts b/components/signwell/app/signwell.app.ts deleted file mode 100644 index 1690d2c9f9ab5..0000000000000 --- a/components/signwell/app/signwell.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "signwell", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/signwell/package.json b/components/signwell/package.json index a997b834c887f..4fc5fbfab4f83 100644 --- a/components/signwell/package.json +++ b/components/signwell/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/signwell", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream SignWell Components", - "main": "dist/app/signwell.app.mjs", + "main": "signwell.app.mjs", "keywords": [ "pipedream", "signwell" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/signwell", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/signwell/signwell.app.mjs b/components/signwell/signwell.app.mjs new file mode 100644 index 0000000000000..e96310e436de7 --- /dev/null +++ b/components/signwell/signwell.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "signwell", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/simple_analytics/.gitignore b/components/simple_analytics/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/simple_analytics/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/simple_analytics/app/simple_analytics.app.ts b/components/simple_analytics/app/simple_analytics.app.ts deleted file mode 100644 index dab3b243c361e..0000000000000 --- a/components/simple_analytics/app/simple_analytics.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "simple_analytics", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/simple_analytics/package.json b/components/simple_analytics/package.json index d29e55fa03171..1eea4deacc65d 100644 --- a/components/simple_analytics/package.json +++ b/components/simple_analytics/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/simple_analytics", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Simple Analytics Components", - "main": "dist/app/simple_analytics.app.mjs", + "main": "simple_analytics.app.mjs", "keywords": [ "pipedream", "simple_analytics" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/simple_analytics", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/simple_analytics/simple_analytics.app.mjs b/components/simple_analytics/simple_analytics.app.mjs new file mode 100644 index 0000000000000..c179b928317fc --- /dev/null +++ b/components/simple_analytics/simple_analytics.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "simple_analytics", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/simplehash/.gitignore b/components/simplehash/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/simplehash/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/simplehash/app/simplehash.app.ts b/components/simplehash/app/simplehash.app.ts deleted file mode 100644 index e6609809923cf..0000000000000 --- a/components/simplehash/app/simplehash.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "simplehash", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/simplehash/package.json b/components/simplehash/package.json index 0f18c36a7d681..72fcab6619eb2 100644 --- a/components/simplehash/package.json +++ b/components/simplehash/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/simplehash", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream SimpleHash Components", - "main": "dist/app/simplehash.app.mjs", + "main": "simplehash.app.mjs", "keywords": [ "pipedream", "simplehash" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/simplehash", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/simplehash/simplehash.app.mjs b/components/simplehash/simplehash.app.mjs new file mode 100644 index 0000000000000..a72afa30bf259 --- /dev/null +++ b/components/simplehash/simplehash.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "simplehash", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/simplekpi/.gitignore b/components/simplekpi/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/simplekpi/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/simplekpi/app/simplekpi.app.ts b/components/simplekpi/app/simplekpi.app.ts deleted file mode 100644 index 44b46a0c1bdd5..0000000000000 --- a/components/simplekpi/app/simplekpi.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "simplekpi", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/simplekpi/package.json b/components/simplekpi/package.json index 84cff4736a227..134a13bcd952e 100644 --- a/components/simplekpi/package.json +++ b/components/simplekpi/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/simplekpi", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream SimpleKPI Components", - "main": "dist/app/simplekpi.app.mjs", + "main": "simplekpi.app.mjs", "keywords": [ "pipedream", "simplekpi" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/simplekpi", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/simplekpi/simplekpi.app.mjs b/components/simplekpi/simplekpi.app.mjs new file mode 100644 index 0000000000000..843203b0cd7ed --- /dev/null +++ b/components/simplekpi/simplekpi.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "simplekpi", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/simpletexting/.gitignore b/components/simpletexting/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/simpletexting/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/simpletexting/app/simpletexting.app.ts b/components/simpletexting/app/simpletexting.app.ts deleted file mode 100644 index 4ae893e9440e4..0000000000000 --- a/components/simpletexting/app/simpletexting.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "simpletexting", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/simpletexting/package.json b/components/simpletexting/package.json index a48f05038e9f5..c24abe64f81a5 100644 --- a/components/simpletexting/package.json +++ b/components/simpletexting/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/simpletexting", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream SimpleTexting Components", - "main": "dist/app/simpletexting.app.mjs", + "main": "simpletexting.app.mjs", "keywords": [ "pipedream", "simpletexting" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/simpletexting", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/simpletexting/simpletexting.app.mjs b/components/simpletexting/simpletexting.app.mjs new file mode 100644 index 0000000000000..22a8ebc9baf82 --- /dev/null +++ b/components/simpletexting/simpletexting.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "simpletexting", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/siteglide/package.json b/components/siteglide/package.json new file mode 100644 index 0000000000000..e3c7a2b469f3b --- /dev/null +++ b/components/siteglide/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/siteglide", + "version": "0.0.1", + "description": "Pipedream Siteglide Components", + "main": "siteglide.app.mjs", + "keywords": [ + "pipedream", + "siteglide" + ], + "homepage": "https://pipedream.com/apps/siteglide", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/siteglide/siteglide.app.mjs b/components/siteglide/siteglide.app.mjs new file mode 100644 index 0000000000000..98a4031abeba9 --- /dev/null +++ b/components/siteglide/siteglide.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "siteglide", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/slack/README.md b/components/slack/README.md index 72f31a7d6dcc7..2d08d7b6f042b 100644 --- a/components/slack/README.md +++ b/components/slack/README.md @@ -1,8 +1,8 @@ # Overview -The Pipedream Slack app enables you to build event-driven workflows that interact with the Slack API. Once you authorize the Pipedream app's access to your workspace, you can use [Pipedream workflows](/workflows/) to perform common Slack [actions](#workflow-actions) or [write your own code](/code/) against the Slack API. +The Pipedream app for Slack enables you to build event-driven workflows that interact with the Slack API. Once you authorize the app's access to your workspace, you can use [Pipedream workflows](/workflows/) to perform common Slack [actions](#workflow-actions) or [write your own code](/code/) against the Slack API. -The Pipedream Slack app is not a typical app. You don't interact with it directly as a bot, and it doesn't add custom functionality to your workspace out of the box. It makes it easier to automate anything you'd typically use the Slack API for, using Pipedream workflows. +The Pipedream app for Slack is not a typical app. You don't interact with it directly as a bot, and it doesn't add custom functionality to your workspace out of the box. It makes it easier to automate anything you'd typically use the Slack API for, using Pipedream workflows. - Automate posting updates to your team channels - Create a bot to answer common questions @@ -11,13 +11,13 @@ The Pipedream Slack app is not a typical app. You don't interact with it directl # Getting Started -## Should I use the Slack or Slack Bot app on Pipedream? +## Should I use the app for Slack or bot for Slack on Pipedream? -The Slack app is the easiest and most convenient option to get started. It installs the official Pipedream bot into your Slack workspace with just a few clicks. +The app for Slack is the easiest and most convenient option to get started. It installs the official Pipedream bot into your Slack workspace with just a few clicks. -However, if you'd like to use your own bot registered with the [Slack API](https://api.slack.com), you can use the [Slack Bot app](https://pipedream.com/apps/slack-bot) instead. +However, if you'd like to use your own bot registered with the [Slack API](https://api.slack.com), you can use the [bot for Slack](https://pipedream.com/apps/slack-bot) instead. -The Slack Bot requires a bot token to allow your Pipedream workflows to authenticate as your bot. The extra setup steps allow you to list your custom bot on the Slack Marketplace or install the bot on other workspaces as your bot's name instead of as Pipedream. +The bot for Slack requires a bot token to allow your Pipedream workflows to authenticate as your bot. The extra setup steps allow you to list your custom bot on the Slack Marketplace or install the bot on other workspaces as your bot's name instead of as Pipedream. ## Accounts @@ -44,7 +44,6 @@ The Slack Bot requires a bot token to allow your Pipedream workflows to authenti - **Real-time CRM Updates**: Configure a Pipedream workflow to listen for specific trigger words in sales-related Slack channels. When mentioned, the workflow fetches corresponding data from a CRM tool like Salesforce and posts the latest deal status or customer information in the Slack conversation for quick reference. - # Troubleshooting ## Error Responses @@ -64,6 +63,7 @@ Example of a successful response: If the `ok` property is false, Slack will also include an `error` property with a short machine-readable code that describes the error. Example of a failure: + ```json { "ok": false, diff --git a/components/slack_bot/README.md b/components/slack_bot/README.md index 7b9534b1c6879..9fdd2be82dab8 100644 --- a/components/slack_bot/README.md +++ b/components/slack_bot/README.md @@ -1,11 +1,11 @@ # Overview -The Slack Bot API allows you to build rich, interactive bots for Slack workspaces. These bots can respond to messages, post updates, and interact with users in various ways. With the Slack Bot API on Pipedream, developers can create automated workflows that trigger on specific events in Slack, such as new messages or reactions, and then perform defined actions, like sending data to other apps or processing the information within Pipedream's serverless platform. This tight integration with Pipedream enables both simple and complex automations, leveraging Pipedream's ability to connect with numerous apps and its powerful built-in code steps. +The bot for Slack allows you to build rich, interactive bots for Slack workspaces. These bots can respond to messages, post updates, and interact with users in various ways. With the bot for Slack on Pipedream, developers can create automated workflows that trigger on specific events in Slack, such as new messages or reactions, and then perform defined actions, like sending data to other apps or processing the information within Pipedream's serverless platform. This tight integration with Pipedream enables both simple and complex automations, leveraging Pipedream's ability to connect with numerous apps and its powerful built-in code steps. # Example Use Cases - **Issue Tracker Integration**: When a user mentions a bug in a Slack channel, the bot can capture the message, format it, and create an issue in a tool like GitHub or Jira. This streamlines the bug reporting process and ensures that issues are tracked and managed efficiently. -- **Customer Support Ticket Creation**: If a customer asks for help in a dedicated support channel, the Slack Bot can trigger a workflow that creates a support ticket in a CRM or helpdesk software like Zendesk. The bot can also reply to the customer with a ticket number and expected response time, improving the customer service experience. +- **Customer Support Ticket Creation**: If a customer asks for help in a dedicated support channel, the bot for Slack can trigger a workflow that creates a support ticket in a CRM or helpdesk software like Zendesk. The bot can also reply to the customer with a ticket number and expected response time, improving the customer service experience. -- **Daily Stand-up Automation**: The Slack Bot can initiate daily stand-up meetings by sending a message to a team channel asking for updates. It then collects responses, formats them into a report, and sends the compiled update to a project management app like Trello or Asana, or even emails it to stakeholders, keeping everyone informed with minimal manual intervention. +- **Daily Stand-up Automation**: The bot for Slack can initiate daily stand-up meetings by sending a message to a team channel asking for updates. It then collects responses, formats them into a report, and sends the compiled update to a project management app like Trello or Asana, or even emails it to stakeholders, keeping everyone informed with minimal manual intervention. diff --git a/components/slack_bot/actions/add-emoji-reaction/add-emoji-reaction.mjs b/components/slack_bot/actions/add-emoji-reaction/add-emoji-reaction.mjs index b2cbd842ef5d8..006e4be92fbeb 100644 --- a/components/slack_bot/actions/add-emoji-reaction/add-emoji-reaction.mjs +++ b/components/slack_bot/actions/add-emoji-reaction/add-emoji-reaction.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/add-emoji-reaction/add-emoji-reaction.mjs"; +import component from "@pipedream/slack/actions/add-emoji-reaction/add-emoji-reaction.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-add-emoji-reaction", description: "Add an emoji reaction to a message. [See the documentation](https://api.slack.com/methods/reactions.add)", - version: "0.0.2", + version: "0.0.3", }; diff --git a/components/slack_bot/actions/archive-channel/archive-channel.mjs b/components/slack_bot/actions/archive-channel/archive-channel.mjs index ff30f5dc3f953..15669ad6f07d4 100644 --- a/components/slack_bot/actions/archive-channel/archive-channel.mjs +++ b/components/slack_bot/actions/archive-channel/archive-channel.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/archive-channel/archive-channel.mjs"; +import component from "@pipedream/slack/actions/archive-channel/archive-channel.mjs"; import constants from "../../common/constants.mjs"; import utils from "../../common/utils.mjs"; @@ -27,5 +27,5 @@ export default { }), key: "slack_bot-archive-channel", description: "Archive a channel (Bot). [See the documentation](https://api.slack.com/methods/conversations.archive)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/create-channel/create-channel.mjs b/components/slack_bot/actions/create-channel/create-channel.mjs index 38e483a573076..7e7d7e1fc7e62 100644 --- a/components/slack_bot/actions/create-channel/create-channel.mjs +++ b/components/slack_bot/actions/create-channel/create-channel.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/create-channel/create-channel.mjs"; +import component from "@pipedream/slack/actions/create-channel/create-channel.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-create-channel", description: "Create a new channel (Bot). [See the documentation](https://api.slack.com/methods/conversations.create)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/delete-file/delete-file.mjs b/components/slack_bot/actions/delete-file/delete-file.mjs index f78a6c22c670f..90cd46266690b 100644 --- a/components/slack_bot/actions/delete-file/delete-file.mjs +++ b/components/slack_bot/actions/delete-file/delete-file.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/delete-file/delete-file.mjs"; +import component from "@pipedream/slack/actions/delete-file/delete-file.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-delete-file", description: "Delete a file (Bot). [See the documentation](https://api.slack.com/methods/files.delete)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/delete-message/delete-message.mjs b/components/slack_bot/actions/delete-message/delete-message.mjs index 024b0c0bd4bdc..3162aa24678e7 100644 --- a/components/slack_bot/actions/delete-message/delete-message.mjs +++ b/components/slack_bot/actions/delete-message/delete-message.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/delete-message/delete-message.mjs"; +import component from "@pipedream/slack/actions/delete-message/delete-message.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -14,5 +14,5 @@ export default { }), key: "slack_bot-delete-message", description: "Delete a message (Bot). [See the documentation](https://api.slack.com/methods/chat.delete)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/find-user-by-email/find-user-by-email.mjs b/components/slack_bot/actions/find-user-by-email/find-user-by-email.mjs index 7b5ad6006b82b..d3d580d551073 100644 --- a/components/slack_bot/actions/find-user-by-email/find-user-by-email.mjs +++ b/components/slack_bot/actions/find-user-by-email/find-user-by-email.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/find-user-by-email/find-user-by-email.mjs"; +import component from "@pipedream/slack/actions/find-user-by-email/find-user-by-email.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-find-user-by-email", description: "Find a user by matching against their email (Bot). [See the documentation](https://api.slack.com/methods/users.lookupByEmail)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/get-file/get-file.mjs b/components/slack_bot/actions/get-file/get-file.mjs index 979416d402537..a2b65d4160050 100644 --- a/components/slack_bot/actions/get-file/get-file.mjs +++ b/components/slack_bot/actions/get-file/get-file.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/get-file/get-file.mjs"; +import component from "@pipedream/slack/actions/get-file/get-file.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-get-file", description: "Return information about a file (Bot). [See the documentation](https://api.slack.com/methods/files.info)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/invite-user-to-channel/invite-user-to-channel.mjs b/components/slack_bot/actions/invite-user-to-channel/invite-user-to-channel.mjs index 05dde4f7b9c55..16e30950ad239 100644 --- a/components/slack_bot/actions/invite-user-to-channel/invite-user-to-channel.mjs +++ b/components/slack_bot/actions/invite-user-to-channel/invite-user-to-channel.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/invite-user-to-channel/invite-user-to-channel.mjs"; +import component from "@pipedream/slack/actions/invite-user-to-channel/invite-user-to-channel.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-invite-user-to-channel", description: "Invite a user to an existing channel (Bot). [See the documentation](https://api.slack.com/methods/conversations.invite)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/list-channels/list-channels.mjs b/components/slack_bot/actions/list-channels/list-channels.mjs index adf71170d26cb..3ebade623ea6d 100644 --- a/components/slack_bot/actions/list-channels/list-channels.mjs +++ b/components/slack_bot/actions/list-channels/list-channels.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/list-channels/list-channels.mjs"; +import component from "@pipedream/slack/actions/list-channels/list-channels.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-list-channels", description: "Return a list of all channels in a workspace (Bot). [See the documentation](https://api.slack.com/methods/conversations.list)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/list-files/list-files.mjs b/components/slack_bot/actions/list-files/list-files.mjs index d016f72012dd6..fbf30b57d0c6e 100644 --- a/components/slack_bot/actions/list-files/list-files.mjs +++ b/components/slack_bot/actions/list-files/list-files.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/list-files/list-files.mjs"; +import component from "@pipedream/slack/actions/list-files/list-files.mjs"; import constants from "../../common/constants.mjs"; import utils from "../../common/utils.mjs"; @@ -30,5 +30,5 @@ export default { }), key: "slack_bot-list-files", description: "Return a list of files within a team (Bot). [See the documentation](https://api.slack.com/methods/files.list)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/list-group-members/list-group-members.mjs b/components/slack_bot/actions/list-group-members/list-group-members.mjs index cf461541c4dd7..dad7e7e1d4383 100644 --- a/components/slack_bot/actions/list-group-members/list-group-members.mjs +++ b/components/slack_bot/actions/list-group-members/list-group-members.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/list-group-members/list-group-members.mjs"; +import component from "@pipedream/slack/actions/list-group-members/list-group-members.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-list-group-members", description: "List all users in a User Group (Bot). [See the documentation](https://api.slack.com/methods/usergroups.users.list)", - version: "0.0.2", + version: "0.0.3", }; diff --git a/components/slack_bot/actions/list-members-in-channel/list-members-in-channel.mjs b/components/slack_bot/actions/list-members-in-channel/list-members-in-channel.mjs index 1e0785b59b0ae..0ad1aa8cad669 100644 --- a/components/slack_bot/actions/list-members-in-channel/list-members-in-channel.mjs +++ b/components/slack_bot/actions/list-members-in-channel/list-members-in-channel.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/list-members-in-channel/list-members-in-channel.mjs"; +import component from "@pipedream/slack/actions/list-members-in-channel/list-members-in-channel.mjs"; import constants from "../../common/constants.mjs"; import utils from "../../common/utils.mjs"; @@ -30,5 +30,5 @@ export default { }), key: "slack_bot-list-members-in-channel", description: "Retrieve members of a channel (Bot). [See the documentation](https://api.slack.com/methods/conversations.members)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/list-replies/list-replies.mjs b/components/slack_bot/actions/list-replies/list-replies.mjs index 410be522a946c..30cd72626ccc8 100644 --- a/components/slack_bot/actions/list-replies/list-replies.mjs +++ b/components/slack_bot/actions/list-replies/list-replies.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/list-replies/list-replies.mjs"; +import component from "@pipedream/slack/actions/list-replies/list-replies.mjs"; import constants from "../../common/constants.mjs"; import utils from "../../common/utils.mjs"; @@ -39,5 +39,5 @@ export default { }), key: "slack_bot-list-replies", description: "Retrieve a thread of messages posted to a conversation (Bot). [See the documentation](https://api.slack.com/methods/conversations.replies)", - version: "0.0.5", + version: "0.0.6", }; diff --git a/components/slack_bot/actions/list-users/list-users.mjs b/components/slack_bot/actions/list-users/list-users.mjs index 71d7d375a161b..460bf3fe0153a 100644 --- a/components/slack_bot/actions/list-users/list-users.mjs +++ b/components/slack_bot/actions/list-users/list-users.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/list-users/list-users.mjs"; +import component from "@pipedream/slack/actions/list-users/list-users.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-list-users", description: "Return a list of all users in a workspace (Bot). [See the documentation](https://api.slack.com/methods/users.list)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/reply-to-a-message/reply-to-a-message.mjs b/components/slack_bot/actions/reply-to-a-message/reply-to-a-message.mjs index bd66ae9aa8362..a3f24997442f3 100644 --- a/components/slack_bot/actions/reply-to-a-message/reply-to-a-message.mjs +++ b/components/slack_bot/actions/reply-to-a-message/reply-to-a-message.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/reply-to-a-message/reply-to-a-message.mjs"; +import component from "@pipedream/slack/actions/reply-to-a-message/reply-to-a-message.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -14,5 +14,5 @@ export default { }), key: "slack_bot-reply-to-a-message", description: "Send a message as a threaded reply (Bot). See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here", - version: "0.0.5", + version: "0.0.6", }; diff --git a/components/slack_bot/actions/send-large-message/send-large-message.mjs b/components/slack_bot/actions/send-large-message/send-large-message.mjs index 4465741376ce6..74ca706cfbc46 100644 --- a/components/slack_bot/actions/send-large-message/send-large-message.mjs +++ b/components/slack_bot/actions/send-large-message/send-large-message.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/send-large-message/send-large-message.mjs"; +import component from "@pipedream/slack/actions/send-large-message/send-large-message.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -14,5 +14,5 @@ export default { }), key: "slack_bot-send-large-message", description: "Send a large message (more than 3000 characters) to a channel, group or user (Bot). See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here", - version: "0.0.5", + version: "0.0.6", }; diff --git a/components/slack_bot/actions/send-message-advanced/send-message-advanced.mjs b/components/slack_bot/actions/send-message-advanced/send-message-advanced.mjs index b58e3cbc9ea85..92b30f259afab 100644 --- a/components/slack_bot/actions/send-message-advanced/send-message-advanced.mjs +++ b/components/slack_bot/actions/send-message-advanced/send-message-advanced.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/send-message-advanced/send-message-advanced.mjs"; +import component from "@pipedream/slack/actions/send-message-advanced/send-message-advanced.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -14,5 +14,5 @@ export default { }), key: "slack_bot-send-message-advanced", description: "Customize advanced setttings and send a message to a channel, group or user (Bot). See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here", - version: "0.0.5", + version: "0.0.6", }; diff --git a/components/slack_bot/actions/send-message/send-message.mjs b/components/slack_bot/actions/send-message/send-message.mjs index 8002ecce52d61..b928f75ab1122 100644 --- a/components/slack_bot/actions/send-message/send-message.mjs +++ b/components/slack_bot/actions/send-message/send-message.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/send-message/send-message.mjs"; +import component from "@pipedream/slack/actions/send-message/send-message.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -14,5 +14,5 @@ export default { }), key: "slack_bot-send-message", description: "Send a message to a user, group, private channel or public channel (Bot). See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/set-channel-description/set-channel-description.mjs b/components/slack_bot/actions/set-channel-description/set-channel-description.mjs index ed8f440429ad0..88819d37d9aaf 100644 --- a/components/slack_bot/actions/set-channel-description/set-channel-description.mjs +++ b/components/slack_bot/actions/set-channel-description/set-channel-description.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/set-channel-description/set-channel-description.mjs"; +import component from "@pipedream/slack/actions/set-channel-description/set-channel-description.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-set-channel-description", description: "Change the description or purpose of a channel (Bot). [See the documentation](https://api.slack.com/methods/conversations.setPurpose)", - version: "0.0.2", + version: "0.0.3", }; diff --git a/components/slack_bot/actions/set-channel-topic/set-channel-topic.mjs b/components/slack_bot/actions/set-channel-topic/set-channel-topic.mjs index b845b906580c8..83ba223a1c76f 100644 --- a/components/slack_bot/actions/set-channel-topic/set-channel-topic.mjs +++ b/components/slack_bot/actions/set-channel-topic/set-channel-topic.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/set-channel-topic/set-channel-topic.mjs"; +import component from "@pipedream/slack/actions/set-channel-topic/set-channel-topic.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-set-channel-topic", description: "Set the topic on a selected channel (Bot). [See the documentation](https://api.slack.com/methods/conversations.setTopic)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/update-group-members/update-group-members.mjs b/components/slack_bot/actions/update-group-members/update-group-members.mjs index d9aedd2658964..d88aebfa22ae7 100644 --- a/components/slack_bot/actions/update-group-members/update-group-members.mjs +++ b/components/slack_bot/actions/update-group-members/update-group-members.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/update-group-members/update-group-members.mjs"; +import component from "@pipedream/slack/actions/update-group-members/update-group-members.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-update-group-members", description: "Update the list of users for a User Group (Bot). [See docs here](https://api.slack.com/methods/usergroups.users.update)", - version: "0.0.2", + version: "0.0.3", }; diff --git a/components/slack_bot/actions/update-message/update-message.mjs b/components/slack_bot/actions/update-message/update-message.mjs index 376d9402ee5a7..ae5a8a28574fa 100644 --- a/components/slack_bot/actions/update-message/update-message.mjs +++ b/components/slack_bot/actions/update-message/update-message.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/update-message/update-message.mjs"; +import component from "@pipedream/slack/actions/update-message/update-message.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -14,5 +14,5 @@ export default { }), key: "slack_bot-update-message", description: "Update a message (Bot). [See the documentation](https://api.slack.com/methods/chat.update)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/upload-file/upload-file.mjs b/components/slack_bot/actions/upload-file/upload-file.mjs index 940b8f29e47e8..1b1e95660dda6 100644 --- a/components/slack_bot/actions/upload-file/upload-file.mjs +++ b/components/slack_bot/actions/upload-file/upload-file.mjs @@ -1,4 +1,4 @@ -import component from "../../../slack/actions/upload-file/upload-file.mjs"; +import component from "@pipedream/slack/actions/upload-file/upload-file.mjs"; import utils from "../../common/utils.mjs"; /* eslint-disable pipedream/required-properties-type */ @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-upload-file", description: "Upload a file (Bot). [See the documentation](https://api.slack.com/methods/files.upload)", - version: "0.0.5", + version: "0.0.6", }; diff --git a/components/slack_bot/common/constants.mjs b/components/slack_bot/common/constants.mjs index a63f4b71837cc..2e40ebe0a5f2c 100644 --- a/components/slack_bot/common/constants.mjs +++ b/components/slack_bot/common/constants.mjs @@ -1,4 +1,4 @@ -import constants from "../../slack/common/constants.mjs"; +import constants from "@pipedream/slack/common/constants.mjs"; const LAST_TIMESTAMP = "lastTimestamp"; diff --git a/components/slack_bot/package.json b/components/slack_bot/package.json index 3d69251679617..543fb4d1e65e5 100644 --- a/components/slack_bot/package.json +++ b/components/slack_bot/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/slack_bot", - "version": "0.5.5", + "version": "0.5.6", "description": "Pipedream Slack_bot Components", "main": "slack_bot.app.mjs", "keywords": [ @@ -15,6 +15,7 @@ }, "dependencies": { "@pipedream/platform": "^3.0.0", - "@slack/web-api": "^5.15.0" + "@slack/web-api": "^5.15.0", + "@pipedream/slack": "^0.10.2" } } diff --git a/components/slack_bot/slack_bot.app.mjs b/components/slack_bot/slack_bot.app.mjs index 1555d867ef4d2..4eaaa7effddce 100644 --- a/components/slack_bot/slack_bot.app.mjs +++ b/components/slack_bot/slack_bot.app.mjs @@ -1,4 +1,4 @@ -import slack from "../slack/slack.app.mjs"; +import slack from "@pipedream/slack"; export default { ...slack, diff --git a/components/slack_bot/sources/new-direct-message/new-direct-message.mjs b/components/slack_bot/sources/new-direct-message/new-direct-message.mjs index 866dacb30d375..67e28fd7c7c9b 100644 --- a/components/slack_bot/sources/new-direct-message/new-direct-message.mjs +++ b/components/slack_bot/sources/new-direct-message/new-direct-message.mjs @@ -6,7 +6,7 @@ export default { ...common, key: "slack_bot-new-direct-message", name: "New Direct Message", - version: "0.0.4", + version: "0.0.5", description: "Emit new event when a message is posted in a direct message channel (Bot). To open a conversation, use the Pipedream Action \"Send a Direct Message\" to send a message from the Bot, or enable direct messages to the Bot in your App Settings (Settings->App Home->Show Tabs->Messages Tab), and send a direct message to the Bot.", type: "source", dedupe: "unique", diff --git a/components/slack_bot/sources/new-message-in-channel/new-message-in-channel.mjs b/components/slack_bot/sources/new-message-in-channel/new-message-in-channel.mjs index c08ae2aa5c953..31280aa10dac3 100644 --- a/components/slack_bot/sources/new-message-in-channel/new-message-in-channel.mjs +++ b/components/slack_bot/sources/new-message-in-channel/new-message-in-channel.mjs @@ -6,7 +6,7 @@ export default { ...common, key: "slack_bot-new-message-in-channel", name: "New Message In Channel", - version: "0.0.4", + version: "0.0.5", description: "Emit new event when a new message is posted to a public, private or group channel (Bot)", type: "source", dedupe: "unique", diff --git a/components/slack_demo_app/.gitignore b/components/slack_demo_app/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/slack_demo_app/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/slack_demo_app/app/slack_demo_app.app.ts b/components/slack_demo_app/app/slack_demo_app.app.ts deleted file mode 100644 index 40febd3d1a159..0000000000000 --- a/components/slack_demo_app/app/slack_demo_app.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "slack_demo_app", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/slack_demo_app/package.json b/components/slack_demo_app/package.json index 1f70001799a3c..38dd4644c8c18 100644 --- a/components/slack_demo_app/package.json +++ b/components/slack_demo_app/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/slack_demo_app", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Slack Demo App Components", - "main": "dist/app/slack_demo_app.app.mjs", + "main": "slack_demo_app.app.mjs", "keywords": [ "pipedream", "slack_demo_app" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/slack_demo_app", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/slack_demo_app/slack_demo_app.app.mjs b/components/slack_demo_app/slack_demo_app.app.mjs new file mode 100644 index 0000000000000..cdd80add6b34c --- /dev/null +++ b/components/slack_demo_app/slack_demo_app.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "slack_demo_app", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/slack_demo_app_1/.gitignore b/components/slack_demo_app_1/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/slack_demo_app_1/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/slack_demo_app_1/app/slack_demo_app_1.app.ts b/components/slack_demo_app_1/app/slack_demo_app_1.app.ts deleted file mode 100644 index 27b1d9a0caa5c..0000000000000 --- a/components/slack_demo_app_1/app/slack_demo_app_1.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "slack_demo_app_1", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/slack_demo_app_1/package.json b/components/slack_demo_app_1/package.json index 6f210d330f46b..01a0d719df7ae 100644 --- a/components/slack_demo_app_1/package.json +++ b/components/slack_demo_app_1/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/slack_demo_app_1", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Slack Demo App 1 Components", - "main": "dist/app/slack_demo_app_1.app.mjs", + "main": "slack_demo_app_1.app.mjs", "keywords": [ "pipedream", "slack_demo_app_1" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/slack_demo_app_1", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/slack_demo_app_1/slack_demo_app_1.app.mjs b/components/slack_demo_app_1/slack_demo_app_1.app.mjs new file mode 100644 index 0000000000000..6e307e75ba09b --- /dev/null +++ b/components/slack_demo_app_1/slack_demo_app_1.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "slack_demo_app_1", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/smaily/package.json b/components/smaily/package.json index 266e0e104cf36..83e90ea2d6ec6 100644 --- a/components/smaily/package.json +++ b/components/smaily/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/smaily", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Smaily Components", "main": "dist/app/smaily.app.mjs", "keywords": [ @@ -16,6 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.1.0" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/smaily/tsconfig.json b/components/smaily/tsconfig.json index 9a39aa83b2c27..3a9389484d040 100644 --- a/components/smaily/tsconfig.json +++ b/components/smaily/tsconfig.json @@ -1,23 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/smartreach/.gitignore b/components/smartreach/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/smartreach/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/smartreach/app/smartreach.app.ts b/components/smartreach/app/smartreach.app.ts deleted file mode 100644 index 4dc90d430bbc4..0000000000000 --- a/components/smartreach/app/smartreach.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "smartreach", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/smartreach/package.json b/components/smartreach/package.json index 6dbcd95ab851e..b79d5cbd21a11 100644 --- a/components/smartreach/package.json +++ b/components/smartreach/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/smartreach", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream SmartReach Components", - "main": "dist/app/smartreach.app.mjs", + "main": "smartreach.app.mjs", "keywords": [ "pipedream", "smartreach" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/smartreach", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/smartreach/smartreach.app.mjs b/components/smartreach/smartreach.app.mjs new file mode 100644 index 0000000000000..303c92719006b --- /dev/null +++ b/components/smartreach/smartreach.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "smartreach", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/smartrmail/.gitignore b/components/smartrmail/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/smartrmail/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/smartrmail/app/smartrmail.app.ts b/components/smartrmail/app/smartrmail.app.ts deleted file mode 100644 index 94d7745c648bd..0000000000000 --- a/components/smartrmail/app/smartrmail.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "smartrmail", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/smartrmail/package.json b/components/smartrmail/package.json index f59334080fca9..bb27a6e535ec1 100644 --- a/components/smartrmail/package.json +++ b/components/smartrmail/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/smartrmail", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream SmartrMail Components", - "main": "dist/app/smartrmail.app.mjs", + "main": "smartrmail.app.mjs", "keywords": [ "pipedream", "smartrmail" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/smartrmail", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/smartrmail/smartrmail.app.mjs b/components/smartrmail/smartrmail.app.mjs new file mode 100644 index 0000000000000..f33345af80b6d --- /dev/null +++ b/components/smartrmail/smartrmail.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "smartrmail", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/smarty/.gitignore b/components/smarty/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/smarty/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/smarty/app/smarty.app.ts b/components/smarty/app/smarty.app.ts deleted file mode 100644 index 5e9d5360cdd8a..0000000000000 --- a/components/smarty/app/smarty.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "smarty", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/smarty/package.json b/components/smarty/package.json index 2d81ef19fde1e..5ed0e3f66fe89 100644 --- a/components/smarty/package.json +++ b/components/smarty/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/smarty", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Smarty Components", - "main": "dist/app/smarty.app.mjs", + "main": "smarty.app.mjs", "keywords": [ "pipedream", "smarty" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/smarty", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/smarty/smarty.app.mjs b/components/smarty/smarty.app.mjs new file mode 100644 index 0000000000000..34012ad2c721b --- /dev/null +++ b/components/smarty/smarty.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "smarty", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sms/package.json b/components/sms/package.json index 442c5a622a0c2..62380ae0662e0 100644 --- a/components/sms/package.json +++ b/components/sms/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/sms", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream SMS Components", - "main": "dist/app/sms.app.mjs", + "main": "sms.app.mjs", "keywords": [ "pipedream", "sms" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/sms", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sms_it/.gitignore b/components/sms_it/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sms_it/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sms_it/app/sms_it.app.ts b/components/sms_it/app/sms_it.app.ts deleted file mode 100644 index 1290eff9a4edb..0000000000000 --- a/components/sms_it/app/sms_it.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sms_it", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/sms_it/package.json b/components/sms_it/package.json index 6499233f0a7b5..18a1c2f470cf0 100644 --- a/components/sms_it/package.json +++ b/components/sms_it/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/sms_it", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream SMS-IT Components", - "main": "dist/app/sms_it.app.mjs", + "main": "sms_it.app.mjs", "keywords": [ "pipedream", "sms_it" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/sms_it", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sms_it/sms_it.app.mjs b/components/sms_it/sms_it.app.mjs new file mode 100644 index 0000000000000..02820be01bf4a --- /dev/null +++ b/components/sms_it/sms_it.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sms_it", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sms_magic/.gitignore b/components/sms_magic/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sms_magic/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sms_magic/app/sms_magic.app.ts b/components/sms_magic/app/sms_magic.app.ts deleted file mode 100644 index 32f69a10f44ba..0000000000000 --- a/components/sms_magic/app/sms_magic.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sms_magic", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/sms_magic/package.json b/components/sms_magic/package.json index 6fad2ef90934c..a7c2e3b7ae728 100644 --- a/components/sms_magic/package.json +++ b/components/sms_magic/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/sms_magic", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream SMS Magic Components", - "main": "dist/app/sms_magic.app.mjs", + "main": "sms_magic.app.mjs", "keywords": [ "pipedream", "sms_magic" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/sms_magic", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sms_magic/sms_magic.app.mjs b/components/sms_magic/sms_magic.app.mjs new file mode 100644 index 0000000000000..0d518bb902bb3 --- /dev/null +++ b/components/sms_magic/sms_magic.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sms_magic", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sms_messages/package.json b/components/sms_messages/package.json new file mode 100644 index 0000000000000..da5fb314bafdb --- /dev/null +++ b/components/sms_messages/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/sms_messages", + "version": "0.0.1", + "description": "Pipedream SMS Messages Components", + "main": "sms_messages.app.mjs", + "keywords": [ + "pipedream", + "sms_messages" + ], + "homepage": "https://pipedream.com/apps/sms_messages", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/sms_messages/sms_messages.app.mjs b/components/sms_messages/sms_messages.app.mjs new file mode 100644 index 0000000000000..cf0b7a47062f4 --- /dev/null +++ b/components/sms_messages/sms_messages.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sms_messages", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/smtp2go/tsconfig.json b/components/smtp2go/tsconfig.json index 0eec7d2e5b109..3a9389484d040 100644 --- a/components/smtp2go/tsconfig.json +++ b/components/smtp2go/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/snapchat_marketing/.gitignore b/components/snapchat_marketing/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/snapchat_marketing/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/snapchat_marketing/app/snapchat_marketing.app.ts b/components/snapchat_marketing/app/snapchat_marketing.app.ts deleted file mode 100644 index b3ff1e52ce84a..0000000000000 --- a/components/snapchat_marketing/app/snapchat_marketing.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "snapchat_marketing", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/snapchat_marketing/package.json b/components/snapchat_marketing/package.json index 6a17ddd2900b1..5999f4c78b2b8 100644 --- a/components/snapchat_marketing/package.json +++ b/components/snapchat_marketing/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/snapchat_marketing", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Snapchat Marketing Components", - "main": "dist/app/snapchat_marketing.app.mjs", + "main": "snapchat_marketing.app.mjs", "keywords": [ "pipedream", "snapchat_marketing" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/snapchat_marketing", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/snapchat_marketing/snapchat_marketing.app.mjs b/components/snapchat_marketing/snapchat_marketing.app.mjs new file mode 100644 index 0000000000000..f1f6859c37e44 --- /dev/null +++ b/components/snapchat_marketing/snapchat_marketing.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "snapchat_marketing", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/snapdocs/.gitignore b/components/snapdocs/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/snapdocs/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/snapdocs/app/snapdocs.app.ts b/components/snapdocs/app/snapdocs.app.ts deleted file mode 100644 index 0e42ac8d2d567..0000000000000 --- a/components/snapdocs/app/snapdocs.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "snapdocs", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/snapdocs/package.json b/components/snapdocs/package.json index 39c3d0cf41693..591180bbab1f9 100644 --- a/components/snapdocs/package.json +++ b/components/snapdocs/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/snapdocs", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Snapdocs Components", - "main": "dist/app/snapdocs.app.mjs", + "main": "snapdocs.app.mjs", "keywords": [ "pipedream", "snapdocs" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/snapdocs", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/snapdocs/snapdocs.app.mjs b/components/snapdocs/snapdocs.app.mjs new file mode 100644 index 0000000000000..3a847dae59d3e --- /dev/null +++ b/components/snapdocs/snapdocs.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "snapdocs", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/snipe_it/actions/create-hardware/create-hardware.mjs b/components/snipe_it/actions/create-hardware/create-hardware.mjs new file mode 100644 index 0000000000000..78644a24737bb --- /dev/null +++ b/components/snipe_it/actions/create-hardware/create-hardware.mjs @@ -0,0 +1,228 @@ +import app from "../../snipe_it.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + key: "snipe_it-create-hardware", + name: "Create Hardware Asset", + description: "Creates a new hardware asset in Snipe-IT. [See the documentation](https://snipe-it.readme.io/reference/hardware-create)", + version: "0.0.1", + type: "action", + props: { + app, + modelId: { + propDefinition: [ + app, + "modelId", + ], + }, + statusId: { + propDefinition: [ + app, + "statusId", + ], + }, + assetTag: { + propDefinition: [ + app, + "assetTag", + ], + }, + name: { + propDefinition: [ + app, + "name", + ], + }, + image: { + propDefinition: [ + app, + "image", + ], + }, + serial: { + propDefinition: [ + app, + "serial", + ], + }, + purchaseDate: { + propDefinition: [ + app, + "purchaseDate", + ], + }, + purchaseCost: { + propDefinition: [ + app, + "purchaseCost", + ], + }, + orderNumber: { + propDefinition: [ + app, + "orderNumber", + ], + }, + notes: { + propDefinition: [ + app, + "notes", + ], + }, + archived: { + propDefinition: [ + app, + "archived", + ], + }, + warrantyMonths: { + propDefinition: [ + app, + "warrantyMonths", + ], + }, + depreciate: { + propDefinition: [ + app, + "depreciate", + ], + }, + supplierId: { + propDefinition: [ + app, + "supplierId", + ], + }, + requestable: { + propDefinition: [ + app, + "requestable", + ], + }, + rtdLocationId: { + label: "RTD Location", + description: "Select the default location for this asset", + propDefinition: [ + app, + "locationId", + ], + }, + lastAuditDate: { + propDefinition: [ + app, + "lastAuditDate", + ], + }, + locationId: { + propDefinition: [ + app, + "locationId", + ], + }, + byod: { + propDefinition: [ + app, + "byod", + ], + }, + customFields: { + propDefinition: [ + app, + "customFields", + ], + }, + }, + async run({ $ }) { + const { + app, + modelId, + statusId, + assetTag, + name, + image, + serial, + purchaseDate, + purchaseCost, + orderNumber, + notes, + archived, + warrantyMonths, + depreciate, + supplierId, + requestable, + rtdLocationId, + lastAuditDate, + locationId, + byod, + customFields, + } = this; + + const parsedCustomFields = utils.parseJson(customFields); + + const response = await app.createHardware({ + $, + data: { + model_id: modelId, + status_id: statusId, + ...(name && { + name, + }), + ...(assetTag && { + asset_tag: assetTag, + }), + ...(image && { + image, + }), + ...(serial && { + serial, + }), + ...(purchaseDate && { + purchase_date: purchaseDate, + }), + ...(purchaseCost && { + purchase_cost: purchaseCost, + }), + ...(orderNumber && { + order_number: orderNumber, + }), + ...(notes && { + notes, + }), + ...(archived !== undefined && { + archived, + }), + ...(warrantyMonths && { + warranty_months: warrantyMonths, + }), + ...(depreciate !== undefined && { + depreciate, + }), + ...(supplierId && { + supplier_id: supplierId, + }), + ...(requestable !== undefined && { + requestable, + }), + ...(rtdLocationId && { + rtd_location_id: rtdLocationId, + }), + ...(lastAuditDate && { + last_audit_date: lastAuditDate, + }), + ...(locationId && { + location_id: locationId, + }), + ...(byod !== undefined && { + byod, + }), + ...(typeof(parsedCustomFields) === "object" + ? parsedCustomFields + : {} + ), + }, + }); + + $.export("$summary", `Successfully created hardware asset with ID \`${response.payload.id}\``); + return response; + }, +}; diff --git a/components/snipe_it/actions/create-user/create-user.mjs b/components/snipe_it/actions/create-user/create-user.mjs new file mode 100644 index 0000000000000..422b4155fd577 --- /dev/null +++ b/components/snipe_it/actions/create-user/create-user.mjs @@ -0,0 +1,211 @@ +import app from "../../snipe_it.app.mjs"; + +export default { + key: "snipe_it-create-user", + name: "Create User", + description: "Creates a new user in Snipe-IT with profile information required for asset or license assignments. [See the documentation](https://snipe-it.readme.io/reference/users-2)", + version: "0.0.1", + type: "action", + props: { + app, + firstName: { + propDefinition: [ + app, + "firstName", + ], + }, + username: { + propDefinition: [ + app, + "username", + ], + }, + password: { + propDefinition: [ + app, + "password", + ], + }, + passwordConfirmation: { + propDefinition: [ + app, + "passwordConfirmation", + ], + }, + lastName: { + propDefinition: [ + app, + "lastName", + ], + }, + email: { + propDefinition: [ + app, + "email", + ], + }, + activated: { + propDefinition: [ + app, + "activated", + ], + }, + phone: { + propDefinition: [ + app, + "phone", + ], + }, + jobtitle: { + propDefinition: [ + app, + "jobtitle", + ], + }, + managerId: { + propDefinition: [ + app, + "managerId", + ], + }, + employeeNum: { + propDefinition: [ + app, + "employeeNum", + ], + }, + notes: { + description: "Notes about the user", + propDefinition: [ + app, + "notes", + ], + }, + companyId: { + propDefinition: [ + app, + "companyId", + ], + }, + twoFactorEnrolled: { + propDefinition: [ + app, + "twoFactorEnrolled", + ], + }, + twoFactorOptIn: { + propDefinition: [ + app, + "twoFactorOptIn", + ], + }, + departmentId: { + propDefinition: [ + app, + "departmentId", + ], + }, + locationId: { + propDefinition: [ + app, + "locationId", + ], + }, + remote: { + propDefinition: [ + app, + "remote", + ], + }, + groups: { + propDefinition: [ + app, + "groupIds", + ], + }, + autoAssignLicenses: { + propDefinition: [ + app, + "autoAssignLicenses", + ], + }, + vip: { + propDefinition: [ + app, + "vip", + ], + }, + startDate: { + propDefinition: [ + app, + "startDate", + ], + }, + endDate: { + propDefinition: [ + app, + "endDate", + ], + }, + }, + async run({ $ }) { + const { + app, + firstName, + username, + password, + passwordConfirmation, + lastName, + email, + activated, + phone, + jobtitle, + managerId, + employeeNum, + notes, + companyId, + twoFactorEnrolled, + twoFactorOptIn, + departmentId, + locationId, + remote, + groups, + autoAssignLicenses, + vip, + startDate, + endDate, + } = this; + + const response = await app.createUser({ + $, + data: { + first_name: firstName, + username, + password, + password_confirmation: passwordConfirmation, + last_name: lastName, + email, + activated, + phone, + jobtitle, + manager_id: managerId, + employee_num: employeeNum, + notes, + company_id: companyId, + two_factor_enrolled: twoFactorEnrolled, + two_factor_optin: twoFactorOptIn, + department_id: departmentId, + location_id: locationId, + remote, + groups, + autoassign_licenses: autoAssignLicenses, + vip, + start_date: startDate, + end_date: endDate, + }, + }); + + $.export("$summary", `Successfully created user with ID \`${response.payload.id}\``); + return response; + }, +}; diff --git a/components/snipe_it/actions/get-hardware/get-hardware.mjs b/components/snipe_it/actions/get-hardware/get-hardware.mjs new file mode 100644 index 0000000000000..bff2d401ded8a --- /dev/null +++ b/components/snipe_it/actions/get-hardware/get-hardware.mjs @@ -0,0 +1,27 @@ +import app from "../../snipe_it.app.mjs"; + +export default { + key: "snipe_it-get-hardware", + name: "Get Hardware Asset", + description: "Retrieves details of a specific hardware asset by ID. [See the documentation](https://snipe-it.readme.io/reference/hardware-by-id)", + version: "0.0.1", + type: "action", + props: { + app, + hardwareId: { + propDefinition: [ + app, + "hardwareId", + ], + }, + }, + async run({ $ }) { + const response = await this.app.getHardware({ + $, + hardwareId: this.hardwareId, + }); + + $.export("$summary", `Successfully retrieved hardware asset details with ID \`${response.id}\``); + return response; + }, +}; diff --git a/components/snipe_it/actions/get-license/get-license.mjs b/components/snipe_it/actions/get-license/get-license.mjs new file mode 100644 index 0000000000000..97693f14b026b --- /dev/null +++ b/components/snipe_it/actions/get-license/get-license.mjs @@ -0,0 +1,32 @@ +import app from "../../snipe_it.app.mjs"; + +export default { + key: "snipe_it-get-license", + name: "Get License", + description: "Retrieves license details including seat count, expiration, and current usage metrics. Note: The response returns 'product_key' but uses 'serial' field for POST/PUT/PATCH requests. [See the documentation](https://snipe-it.readme.io/reference/licensesid)", + version: "0.0.1", + type: "action", + props: { + app, + licenseId: { + propDefinition: [ + app, + "licenseId", + ], + }, + }, + async run({ $ }) { + const { + app, + licenseId, + } = this; + + const response = await app.getLicense({ + $, + licenseId, + }); + + $.export("$summary", `Successfully retrieved license with ID \`${response.id}\``); + return response; + }, +}; diff --git a/components/snipe_it/actions/get-user-assets/get-user-assets.mjs b/components/snipe_it/actions/get-user-assets/get-user-assets.mjs new file mode 100644 index 0000000000000..3585ccacab10c --- /dev/null +++ b/components/snipe_it/actions/get-user-assets/get-user-assets.mjs @@ -0,0 +1,32 @@ +import app from "../../snipe_it.app.mjs"; + +export default { + key: "snipe_it-get-user-assets", + name: "Get User Assets", + description: "Retrieves all assets currently assigned to a specific user. Useful for audits and inventory reviews. [See the documentation](https://snipe-it.readme.io/reference/usersidassets)", + version: "0.0.1", + type: "action", + props: { + app, + userId: { + propDefinition: [ + app, + "userId", + ], + }, + }, + async run({ $ }) { + const { + app, + userId, + } = this; + + const response = await app.getUserAssets({ + $, + userId, + }); + + $.export("$summary", `Successfully retrieved \`${response.rows.length}\` assets for user ID \`${userId}\``); + return response; + }, +}; diff --git a/components/snipe_it/actions/update-hardware/update-hardware.mjs b/components/snipe_it/actions/update-hardware/update-hardware.mjs new file mode 100644 index 0000000000000..e4396ac2acac2 --- /dev/null +++ b/components/snipe_it/actions/update-hardware/update-hardware.mjs @@ -0,0 +1,284 @@ +import app from "../../snipe_it.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + key: "snipe_it-update-hardware", + name: "Update Hardware Asset", + description: "Partially updates information about an existing hardware asset. [See the documentation](https://snipe-it.readme.io/reference/hardware-partial-update)", + version: "0.0.1", + type: "action", + props: { + app, + hardwareId: { + propDefinition: [ + app, + "hardwareId", + ], + description: "Select the hardware asset to update", + }, + assetTag: { + propDefinition: [ + app, + "assetTag", + ], + description: "Update the asset tag", + }, + notes: { + propDefinition: [ + app, + "notes", + ], + description: "Update notes about the asset", + }, + statusId: { + optional: true, + propDefinition: [ + app, + "statusId", + ], + description: "Update the status of the asset", + }, + modelId: { + optional: true, + propDefinition: [ + app, + "modelId", + ], + description: "Update the model of the asset", + }, + lastCheckout: { + propDefinition: [ + app, + "lastCheckout", + ], + description: "Update the last checkout date", + }, + assignedUser: { + optional: true, + propDefinition: [ + app, + "userId", + ], + label: "Assigned User", + description: "The ID of the user the asset should be checked out to", + }, + assignedLocation: { + optional: true, + propDefinition: [ + app, + "userId", + ], + label: "Assigned Location", + description: "The ID of the user the location should be checked out to", + }, + assignedAsset: { + optional: true, + propDefinition: [ + app, + "hardwareId", + ], + label: "Assigned Asset", + description: "The ID of the asset the asset should be checked out to", + }, + companyId: { + propDefinition: [ + app, + "companyId", + ], + description: "The ID of an associated company id", + }, + serial: { + propDefinition: [ + app, + "serial", + ], + description: "Serial number of the asset", + }, + orderNumber: { + propDefinition: [ + app, + "orderNumber", + ], + description: "Update the order number", + }, + warrantyMonths: { + propDefinition: [ + app, + "warrantyMonths", + ], + description: "Update the warranty period", + }, + purchaseCost: { + propDefinition: [ + app, + "purchaseCost", + ], + description: "Update the purchase cost", + }, + purchaseDate: { + propDefinition: [ + app, + "purchaseDate", + ], + description: "Update the purchase date", + }, + requestable: { + propDefinition: [ + app, + "requestable", + ], + description: "Update whether the asset can be requested", + }, + archived: { + propDefinition: [ + app, + "archived", + ], + description: "Update the archived status", + }, + rtdLocationId: { + propDefinition: [ + app, + "locationId", + ], + description: "Update the RTD location", + }, + name: { + propDefinition: [ + app, + "name", + ], + description: "Update the name of the asset", + }, + locationId: { + propDefinition: [ + app, + "locationId", + ], + description: "Update the location of the asset", + }, + byod: { + propDefinition: [ + app, + "byod", + ], + description: "Update the BYOD", + }, + customFields: { + propDefinition: [ + app, + "customFields", + ], + description: "Update custom fields using DB field names from Settings > Custom Fields", + }, + }, + async run({ $ }) { + const { + app, + hardwareId, + assetTag, + notes, + statusId, + modelId, + lastCheckout, + assignedUser, + assignedLocation, + assignedAsset, + companyId, + serial, + orderNumber, + warrantyMonths, + purchaseCost, + purchaseDate, + requestable, + archived, + rtdLocationId, + name, + locationId, + byod, + customFields, + } = this; + + const parsedCustomFields = utils.parseJson(customFields); + + const data = { + ...(assetTag && { + asset_tag: assetTag, + }), + ...(notes && { + notes, + }), + ...(statusId && { + status_id: statusId, + }), + ...(modelId && { + model_id: modelId, + }), + ...(lastCheckout && { + last_checkout: lastCheckout, + }), + ...(assignedUser && { + assigned_user_id: assignedUser, + }), + ...(assignedLocation && { + assigned_location_id: assignedLocation, + }), + ...(assignedAsset && { + assigned_asset_id: assignedAsset, + }), + ...(companyId && { + company_id: companyId, + }), + ...(serial && { + serial, + }), + ...(orderNumber && { + order_number: orderNumber, + }), + ...(warrantyMonths && { + warranty_months: warrantyMonths, + }), + ...(purchaseCost && { + purchase_cost: purchaseCost, + }), + ...(purchaseDate && { + purchase_date: purchaseDate, + }), + ...(requestable && { + requestable, + }), + ...(archived && { + archived, + }), + ...(rtdLocationId && { + rtd_location_id: rtdLocationId, + }), + ...(name && { + name, + }), + ...(locationId && { + location_id: locationId, + }), + ...(byod && { + byod, + }), + ...(typeof(parsedCustomFields) === "object" + ? parsedCustomFields + : {} + ), + }; + + if (Object.keys(data).length === 0) { + throw new Error("At least one field must be provided to update"); + } + + const response = await app.updateHardware({ + $, + hardwareId, + data, + }); + + $.export("$summary", `Successfully updated hardware asset with ID \`${response.payload.id}\``); + return response; + }, +}; diff --git a/components/snipe_it/common/utils.mjs b/components/snipe_it/common/utils.mjs new file mode 100644 index 0000000000000..2adf04343104f --- /dev/null +++ b/components/snipe_it/common/utils.mjs @@ -0,0 +1,44 @@ +const parseJson = (input, maxDepth = 100) => { + const seen = new WeakSet(); + const parse = (value) => { + if (maxDepth <= 0) { + return value; + } + if (typeof(value) === "string") { + // Only parse if the string looks like a JSON object or array + const trimmed = value.trim(); + if ( + (trimmed.startsWith("{") && trimmed.endsWith("}")) || + (trimmed.startsWith("[") && trimmed.endsWith("]")) + ) { + try { + return parseJson(JSON.parse(value), maxDepth - 1); + } catch (e) { + return value; + } + } + return value; + } else if (typeof(value) === "object" && value !== null && !Array.isArray(value)) { + if (seen.has(value)) { + return value; + } + seen.add(value); + return Object.entries(value) + .reduce((acc, [ + key, + val, + ]) => Object.assign(acc, { + [key]: parse(val), + }), {}); + } else if (Array.isArray(value)) { + return value.map((item) => parse(item)); + } + return value; + }; + + return parse(input); +}; + +export default { + parseJson, +}; diff --git a/components/snipe_it/package.json b/components/snipe_it/package.json index cea32e5940bdb..fe79bf48989a2 100644 --- a/components/snipe_it/package.json +++ b/components/snipe_it/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/snipe_it", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream Snipe-IT Components", "main": "snipe_it.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } -} \ No newline at end of file +} diff --git a/components/snipe_it/snipe_it.app.mjs b/components/snipe_it/snipe_it.app.mjs index f0411fdaba9e1..a988e3e0059ed 100644 --- a/components/snipe_it/snipe_it.app.mjs +++ b/components/snipe_it/snipe_it.app.mjs @@ -1,11 +1,572 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "snipe_it", - propDefinitions: {}, + propDefinitions: { + modelId: { + type: "integer", + label: "Model", + description: "Select the model for this asset", + async options({ page }) { + const { rows } = await this.listModels({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return rows?.map(({ + id: value, name: label, + }) => ({ + label, + value, + })) || []; + }, + }, + statusId: { + type: "integer", + label: "Status", + description: "Select the status label for this asset", + async options({ page }) { + const { rows } = await this.listStatusLabels({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return rows?.map(({ + id: value, name: label, + }) => ({ + label, + value, + })) || []; + }, + }, + assetTag: { + type: "string", + label: "Asset Tag", + description: "The asset tag for the asset", + optional: true, + }, + name: { + type: "string", + label: "Asset Name", + description: "The name of the asset", + optional: true, + }, + image: { + type: "string", + label: "Image", + description: "Base64 encoded image. Eg. `data:@[mime];base64,[base64encodeddata]`.", + optional: true, + }, + serial: { + type: "string", + label: "Serial Number", + description: "The serial number of the asset", + optional: true, + }, + purchaseDate: { + type: "string", + label: "Purchase Date", + description: "The purchase date of the asset (YYYY-MM-DD format)", + optional: true, + }, + purchaseCost: { + type: "string", + label: "Purchase Cost", + description: "The purchase cost of the asset", + optional: true, + }, + orderNumber: { + type: "string", + label: "Order Number", + description: "The order number of the asset", + optional: true, + }, + notes: { + type: "string", + label: "Notes", + description: "Notes about the asset", + optional: true, + }, + archived: { + type: "boolean", + label: "Archived", + description: "Whether the asset is archived", + optional: true, + }, + warrantyMonths: { + type: "integer", + label: "Warranty Months", + description: "The warranty period in months", + optional: true, + }, + depreciate: { + type: "boolean", + label: "Depreciate", + description: "Whether the asset is depreciated", + optional: true, + }, + supplierId: { + type: "integer", + label: "Supplier", + description: "Select the supplier for this asset", + optional: true, + async options({ page }) { + const { rows } = await this.listSuppliers({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return rows?.map(({ + id: value, name: label, + }) => ({ + label, + value, + })) || []; + }, + }, + requestable: { + type: "boolean", + label: "Requestable", + description: "Whether this asset can be requested by users", + optional: true, + }, + lastAuditDate: { + type: "string", + label: "Last Audit Date", + description: "The date of the last audit for this asset (YYYY-MM-DD format)", + optional: true, + }, + locationId: { + type: "integer", + label: "Location", + description: "Select the location where this asset is located", + optional: true, + async options({ page }) { + const { rows } = await this.listLocations({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return rows?.map(({ + id: value, name: label, + }) => ({ + label, + value, + })) || []; + }, + }, + byod: { + type: "boolean", + label: "BYOD", + description: "Whether this asset is a BYOD device.", + optional: true, + }, + customFields: { + type: "object", + label: "Custom Fields", + description: "Custom fields for the asset", + optional: true, + }, + hardwareId: { + type: "integer", + label: "Hardware Asset", + description: "Select the hardware asset to retrieve details for", + async options({ page }) { + const { rows } = await this.listHardware({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return rows?.map(({ + id: value, name, asset_tag: assetTag, + }) => ({ + label: name + ? `${name} (${assetTag || `ID: ${value}`})` + : assetTag || `Asset ID: ${value}`, + value, + })) || []; + }, + }, + userId: { + type: "integer", + label: "User", + description: "Select the user to retrieve assigned assets for", + async options({ page }) { + const { rows } = await this.listUsers({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return rows?.map(({ + id: value, name, username, email, + }) => ({ + label: name + ? `${name} (${email || username})` + : email || username || `User ID: ${value}`, + value, + })) || []; + }, + }, + firstName: { + type: "string", + label: "First Name", + description: "The first name of the user", + }, + lastName: { + type: "string", + label: "Last Name", + description: "The last name of the user", + optional: true, + }, + username: { + type: "string", + label: "Username", + description: "The username for the user (required for login)", + }, + password: { + type: "string", + label: "Password", + description: "The password for the user account", + secret: true, + }, + passwordConfirmation: { + type: "string", + label: "Password Confirmation", + description: "The password confirmation for the user account", + secret: true, + }, + email: { + type: "string", + label: "Email", + description: "The email address of the user", + optional: true, + }, + activated: { + type: "boolean", + label: "Activated", + description: "Whether the user account is activated", + optional: true, + }, + phone: { + type: "string", + label: "Phone", + description: "The phone number of the user", + optional: true, + }, + jobtitle: { + type: "string", + label: "Job Title", + description: "The job title of the user", + optional: true, + }, + managerId: { + type: "integer", + label: "Manager", + description: "Select the manager for this user", + optional: true, + async options({ page }) { + const { rows } = await this.listUsers({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return rows?.map(({ + id: value, name, username, email, + }) => ({ + label: name + ? `${name} (${email || username})` + : email || username || `User ID: ${value}`, + value, + })) || []; + }, + }, + employeeNum: { + type: "string", + label: "Employee Number", + description: "The employee number of the user", + optional: true, + }, + companyId: { + type: "integer", + label: "Company", + description: "Select the company for this user", + optional: true, + async options({ page }) { + const { rows } = await this.listCompanies({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return rows?.map(({ + id: value, name: label, + }) => ({ + label, + value, + })) || []; + }, + }, + twoFactorEnrolled: { + type: "boolean", + label: "Two Factor Enrolled", + description: "Whether the user is enrolled in two-factor authentication", + optional: true, + }, + twoFactorOptIn: { + type: "boolean", + label: "Two Factor Opt In", + description: "Whether the user has opted in to two-factor authentication", + optional: true, + }, + departmentId: { + type: "integer", + label: "Department", + description: "Select the department for this user", + optional: true, + async options({ page }) { + const { rows } = await this.listDepartments({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return rows?.map(({ + id: value, name: label, + }) => ({ + label, + value, + })) || []; + }, + }, + remote: { + type: "boolean", + label: "Remote", + description: "Whether or not the user is a remote worker", + optional: true, + }, + groupIds: { + type: "string[]", + label: "Groups", + description: "Select the groups for this user", + optional: true, + async options({ page }) { + const { rows } = await this.listGroups({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return rows?.map(({ + id: value, name: label, + }) => ({ + label, + value, + })) || []; + }, + }, + autoAssignLicenses: { + type: "boolean", + label: "Auto Assign Licenses", + description: "Whether to automatically assign licenses to the user", + optional: true, + }, + vip: { + type: "boolean", + label: "VIP", + description: "Whether this user is a VIP", + optional: true, + }, + startDate: { + type: "string", + label: "Start Date", + description: "The user's start date (YYYY-MM-DD format)", + optional: true, + }, + endDate: { + type: "string", + label: "End Date", + description: "The user's end date (YYYY-MM-DD format)", + optional: true, + }, + licenseId: { + type: "integer", + label: "License", + description: "Select the license to retrieve details for", + async options({ page }) { + const { rows } = await this.listLicenses({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return rows?.map(({ + id: value, name, product_key: productKey, manufacturer, + }) => ({ + label: name + ? `${name} ${productKey + ? `(${productKey})` + : ""} - ${manufacturer?.name || "No manufacturer"}` + : productKey || `License ID: ${value}`, + value, + })) || []; + }, + }, + lastCheckout: { + type: "string", + label: "Last Checkout", + description: "The last checkout date of the asset (YYYY-MM-DD format)", + optional: true, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + getUrl(path) { + return `${this.$auth.api_url}/api/v1${path}`; + }, + getHeaders() { + return { + "Authorization": `Bearer ${this.$auth.api_key}`, + "Accept": "application/json", + "Content-Type": "application/json", + }; + }, + async makeRequest({ + $ = this, path, ...args + } = {}) { + const response = await axios($, { + url: this.getUrl(path), + headers: this.getHeaders(), + ...args, + }); + + if (response.status === "error") { + throw JSON.stringify(response, null, 2); + } + + return response; + }, + post(args = {}) { + return this.makeRequest({ + ...args, + method: "POST", + }); + }, + patch(args = {}) { + return this.makeRequest({ + ...args, + method: "PATCH", + }); + }, + createHardware(args = {}) { + return this.post({ + path: "/hardware", + ...args, + }); + }, + getHardware({ + hardwareId, ...args + } = {}) { + return this.makeRequest({ + path: `/hardware/${hardwareId}`, + ...args, + }); + }, + updateHardware({ + hardwareId, ...args + } = {}) { + return this.patch({ + path: `/hardware/${hardwareId}`, + ...args, + }); + }, + listHardware(args = {}) { + return this.makeRequest({ + path: "/hardware", + ...args, + }); + }, + listModels(args = {}) { + return this.makeRequest({ + path: "/models", + ...args, + }); + }, + listStatusLabels(args = {}) { + return this.makeRequest({ + path: "/statuslabels", + ...args, + }); + }, + listSuppliers(args = {}) { + return this.makeRequest({ + path: "/suppliers", + ...args, + }); + }, + listLocations(args = {}) { + return this.makeRequest({ + path: "/locations", + ...args, + }); + }, + listUsers(args = {}) { + return this.makeRequest({ + path: "/users", + ...args, + }); + }, + getUserAssets({ + userId, ...args + } = {}) { + return this.makeRequest({ + path: `/users/${userId}/assets`, + ...args, + }); + }, + createUser(args = {}) { + return this.post({ + path: "/users", + ...args, + }); + }, + listDepartments(args = {}) { + return this.makeRequest({ + path: "/departments", + ...args, + }); + }, + listCompanies(args = {}) { + return this.makeRequest({ + path: "/companies", + ...args, + }); + }, + listGroups(args = {}) { + return this.makeRequest({ + path: "/groups", + ...args, + }); + }, + listLicenses(args = {}) { + return this.makeRequest({ + path: "/licenses", + ...args, + }); + }, + getLicense({ + licenseId, ...args + } = {}) { + return this.makeRequest({ + path: `/licenses/${licenseId}`, + ...args, + }); }, }, }; diff --git a/components/snyk/.gitignore b/components/snyk/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/snyk/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/snyk/app/snyk.app.ts b/components/snyk/app/snyk.app.ts deleted file mode 100644 index 8acd70c6953b0..0000000000000 --- a/components/snyk/app/snyk.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "snyk", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/snyk/package.json b/components/snyk/package.json index 3c181c942f58a..5eb7a51f5803d 100644 --- a/components/snyk/package.json +++ b/components/snyk/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/snyk", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Snyk Components", - "main": "dist/app/snyk.app.mjs", + "main": "snyk.app.mjs", "keywords": [ "pipedream", "snyk" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/snyk", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/snyk/snyk.app.mjs b/components/snyk/snyk.app.mjs new file mode 100644 index 0000000000000..5f6bc0749ce1c --- /dev/null +++ b/components/snyk/snyk.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "snyk", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/softledger/.gitignore b/components/softledger/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/softledger/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/softledger/app/softledger.app.ts b/components/softledger/app/softledger.app.ts deleted file mode 100644 index 2c4b7058a64b7..0000000000000 --- a/components/softledger/app/softledger.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "softledger", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/softledger/package.json b/components/softledger/package.json index efd6bb0a2bead..55563eb3cb8ba 100644 --- a/components/softledger/package.json +++ b/components/softledger/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/softledger", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream SoftLedger Components", - "main": "dist/app/softledger.app.mjs", + "main": "softledger.app.mjs", "keywords": [ "pipedream", "softledger" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/softledger", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/softledger/softledger.app.mjs b/components/softledger/softledger.app.mjs new file mode 100644 index 0000000000000..312394b738b50 --- /dev/null +++ b/components/softledger/softledger.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "softledger", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/solarwinds_service_desk/.gitignore b/components/solarwinds_service_desk/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/solarwinds_service_desk/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/solarwinds_service_desk/app/solarwinds_service_desk.app.ts b/components/solarwinds_service_desk/app/solarwinds_service_desk.app.ts deleted file mode 100644 index 2f803e60cd045..0000000000000 --- a/components/solarwinds_service_desk/app/solarwinds_service_desk.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "solarwinds_service_desk", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/solarwinds_service_desk/package.json b/components/solarwinds_service_desk/package.json index cd7811cf0f4f0..cc6c383cb5803 100644 --- a/components/solarwinds_service_desk/package.json +++ b/components/solarwinds_service_desk/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/solarwinds_service_desk", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream SolarWinds Service Desk Components", - "main": "dist/app/solarwinds_service_desk.app.mjs", + "main": "solarwinds_service_desk.app.mjs", "keywords": [ "pipedream", "solarwinds_service_desk" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/solarwinds_service_desk", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/solarwinds_service_desk/solarwinds_service_desk.app.mjs b/components/solarwinds_service_desk/solarwinds_service_desk.app.mjs new file mode 100644 index 0000000000000..3485bb3a11e18 --- /dev/null +++ b/components/solarwinds_service_desk/solarwinds_service_desk.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "solarwinds_service_desk", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sperse/package.json b/components/sperse/package.json new file mode 100644 index 0000000000000..8fb30ae07ec4e --- /dev/null +++ b/components/sperse/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/sperse", + "version": "0.0.1", + "description": "Pipedream Sperse Components", + "main": "sperse.app.mjs", + "keywords": [ + "pipedream", + "sperse" + ], + "homepage": "https://pipedream.com/apps/sperse", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/sperse/sperse.app.mjs b/components/sperse/sperse.app.mjs new file mode 100644 index 0000000000000..f42967ee1e5ef --- /dev/null +++ b/components/sperse/sperse.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sperse", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/sportsdata/.gitignore b/components/sportsdata/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sportsdata/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sportsdata/app/sportsdata.app.ts b/components/sportsdata/app/sportsdata.app.ts deleted file mode 100644 index 34999f3d1f103..0000000000000 --- a/components/sportsdata/app/sportsdata.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sportsdata", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/sportsdata/package.json b/components/sportsdata/package.json index c1fa12d57d0ac..18efd4bd0c4eb 100644 --- a/components/sportsdata/package.json +++ b/components/sportsdata/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/sportsdata", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream SportsData Components", - "main": "dist/app/sportsdata.app.mjs", + "main": "sportsdata.app.mjs", "keywords": [ "pipedream", "sportsdata" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/sportsdata", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sportsdata/sportsdata.app.mjs b/components/sportsdata/sportsdata.app.mjs new file mode 100644 index 0000000000000..3b7d5fe7bbb03 --- /dev/null +++ b/components/sportsdata/sportsdata.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sportsdata", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/spotify/actions/add-items-to-playlist/add-items-to-playlist.mjs b/components/spotify/actions/add-items-to-playlist/add-items-to-playlist.mjs index 318b2e76db6c1..fb9a28ef92230 100644 --- a/components/spotify/actions/add-items-to-playlist/add-items-to-playlist.mjs +++ b/components/spotify/actions/add-items-to-playlist/add-items-to-playlist.mjs @@ -6,7 +6,7 @@ export default { name: "Add Items to a Playlist", description: "Add one or more items to a userโ€™s playlist. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/add-tracks-to-playlist).", key: "spotify-add-items-to-playlist", - version: "0.1.1", + version: "0.1.2", type: "action", props: { spotify, diff --git a/components/spotify/actions/create-playlist/create-playlist.mjs b/components/spotify/actions/create-playlist/create-playlist.mjs index e6dd28f3d16d9..37f66da6b645a 100644 --- a/components/spotify/actions/create-playlist/create-playlist.mjs +++ b/components/spotify/actions/create-playlist/create-playlist.mjs @@ -5,7 +5,7 @@ export default { name: "Create a Playlist", description: "Create a playlist for a Spotify user. The playlist will be empty until you add tracks. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/create-playlist).", key: "spotify-create-playlist", - version: "0.1.1", + version: "0.1.2", type: "action", props: { spotify, diff --git a/components/spotify/actions/get-album-tracks/get-album-tracks.mjs b/components/spotify/actions/get-album-tracks/get-album-tracks.mjs index c4b7f5f2c7117..7f18ac2ca2dd2 100644 --- a/components/spotify/actions/get-album-tracks/get-album-tracks.mjs +++ b/components/spotify/actions/get-album-tracks/get-album-tracks.mjs @@ -7,7 +7,7 @@ export default { name: "Get Album Tracks", description: "Get all tracks in an album. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/get-an-albums-tracks)", key: "spotify-get-album-tracks", - version: "0.0.1", + version: "0.0.2", type: "action", props: { spotify, diff --git a/components/spotify/actions/get-all-tracks-by-artist/get-all-tracks-by-artist.mjs b/components/spotify/actions/get-all-tracks-by-artist/get-all-tracks-by-artist.mjs index 62ce097b5409f..10601bf4cfc93 100644 --- a/components/spotify/actions/get-all-tracks-by-artist/get-all-tracks-by-artist.mjs +++ b/components/spotify/actions/get-all-tracks-by-artist/get-all-tracks-by-artist.mjs @@ -5,7 +5,7 @@ export default { name: "Get All Tracks by Artist", description: "Get Spotify tracks information related with an artist's. [see docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-multiple-albums).", key: "spotify-get-all-tracks-by-artist", - version: "0.1.1", + version: "0.1.2", type: "action", props: { spotify, diff --git a/components/spotify/actions/get-artist-top-tracks/get-artist-top-tracks.mjs b/components/spotify/actions/get-artist-top-tracks/get-artist-top-tracks.mjs index 782b498cf58e8..b92757cd2703d 100644 --- a/components/spotify/actions/get-artist-top-tracks/get-artist-top-tracks.mjs +++ b/components/spotify/actions/get-artist-top-tracks/get-artist-top-tracks.mjs @@ -6,7 +6,7 @@ export default { name: "Get an Artist's Top Tracks", description: "Get Spotify catalog information about an artistโ€™s top tracks by country. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-an-artists-top-tracks).", key: "spotify-get-artist-top-tracks", - version: "0.1.1", + version: "0.1.2", type: "action", props: { spotify, diff --git a/components/spotify/actions/get-audio-features-for-a-track/get-audio-features-for-a-track.mjs b/components/spotify/actions/get-audio-features-for-a-track/get-audio-features-for-a-track.mjs index 05d3372ed5dfa..910b50e2ea2f4 100644 --- a/components/spotify/actions/get-audio-features-for-a-track/get-audio-features-for-a-track.mjs +++ b/components/spotify/actions/get-audio-features-for-a-track/get-audio-features-for-a-track.mjs @@ -6,7 +6,7 @@ export default { name: "Get Audio Features for a Track", description: "Get audio feature information for a single track identified by its unique Spotify ID. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-audio-features).", key: "spotify-get-audio-features-for-a-track", - version: "0.1.1", + version: "0.1.2", type: "action", props: { spotify, diff --git a/components/spotify/actions/get-categorys-playlist/get-categorys-playlist.mjs b/components/spotify/actions/get-categorys-playlist/get-categorys-playlist.mjs index a147791988da3..a6e9759a70a8b 100644 --- a/components/spotify/actions/get-categorys-playlist/get-categorys-playlist.mjs +++ b/components/spotify/actions/get-categorys-playlist/get-categorys-playlist.mjs @@ -6,7 +6,7 @@ export default { name: "Get a Category's Playlists", description: "Get a list of Spotify playlists tagged with a particular category. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-a-categories-playlists).", key: "spotify-get-categorys-playlist", - version: "0.1.1", + version: "0.1.2", type: "action", props: { spotify, diff --git a/components/spotify/actions/get-currently-playing-track/get-currently-playing-track.mjs b/components/spotify/actions/get-currently-playing-track/get-currently-playing-track.mjs index 3103ecaafbbf2..98ccfab3c6abf 100644 --- a/components/spotify/actions/get-currently-playing-track/get-currently-playing-track.mjs +++ b/components/spotify/actions/get-currently-playing-track/get-currently-playing-track.mjs @@ -7,7 +7,7 @@ export default { description: "Get the object currently being played on the user's Spotify account. [See the documentation](https://developer.spotify.com/documentation/web-api/reference/get-the-users-currently-playing-track)", key: "spotify-get-currently-playing-track", - version: "0.0.1", + version: "0.0.2", type: "action", props: { spotify, diff --git a/components/spotify/actions/get-playlist-items/get-playlist-items.mjs b/components/spotify/actions/get-playlist-items/get-playlist-items.mjs index 1bb48d32df86d..1e0d1f1ab7345 100644 --- a/components/spotify/actions/get-playlist-items/get-playlist-items.mjs +++ b/components/spotify/actions/get-playlist-items/get-playlist-items.mjs @@ -6,7 +6,7 @@ export default { name: "Get a Playlist's Items", description: "Get full details of the items of a playlist owned by a Spotify user. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-playlists-tracks).", key: "spotify-get-playlist-items", - version: "0.1.1", + version: "0.1.2", type: "action", props: { spotify, diff --git a/components/spotify/actions/get-playlist/get-playlist.mjs b/components/spotify/actions/get-playlist/get-playlist.mjs index bc61b2e4db4d9..3f22c7d730511 100644 --- a/components/spotify/actions/get-playlist/get-playlist.mjs +++ b/components/spotify/actions/get-playlist/get-playlist.mjs @@ -4,7 +4,7 @@ export default { name: "Get a Playlist", description: "Get a playlist owned by a Spotify user. [See the documentation](https://developer.spotify.com/documentation/web-api/reference/get-playlist).", key: "spotify-get-playlist", - version: "0.0.1", + version: "0.0.3", type: "action", props: { spotify, @@ -23,10 +23,10 @@ export default { const response = await spotify.getPlaylist({ $, - playlistId: playlistId.value, + playlistId, }); - $.export("$summary", `The playlist with Id: ${playlistId.value} was successfully fetched!`); + $.export("$summary", `The playlist with Id: ${playlistId} was successfully fetched!`); return response; }, diff --git a/components/spotify/actions/get-recommendations/get-recommendations.mjs b/components/spotify/actions/get-recommendations/get-recommendations.mjs index 15da4c173af8c..9b3248ed9be54 100644 --- a/components/spotify/actions/get-recommendations/get-recommendations.mjs +++ b/components/spotify/actions/get-recommendations/get-recommendations.mjs @@ -5,7 +5,7 @@ export default { name: "Get Recommendations", description: "Create a list of recommendations based on the available information for a given seed entity and matched against similar artists and tracks. If there is sufficient information about the provided seeds, a list of tracks will be returned together with pool size details. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-recommendations).", key: "spotify-get-recommendations", - version: "0.1.1", + version: "0.1.2", type: "action", props: { spotify, diff --git a/components/spotify/actions/get-track/get-track.mjs b/components/spotify/actions/get-track/get-track.mjs index 3c55f2d149894..0d25b7f61c475 100644 --- a/components/spotify/actions/get-track/get-track.mjs +++ b/components/spotify/actions/get-track/get-track.mjs @@ -6,7 +6,7 @@ export default { name: "Get a Track", description: "Get a track by its name or ID. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/search)", key: "spotify-get-track", - version: "0.1.1", + version: "0.1.2", type: "action", props: { spotify, diff --git a/components/spotify/actions/remove-items-from-playlist/remove-items-from-playlist.mjs b/components/spotify/actions/remove-items-from-playlist/remove-items-from-playlist.mjs index f6f40c2d5d95a..2fb9afd7e4844 100644 --- a/components/spotify/actions/remove-items-from-playlist/remove-items-from-playlist.mjs +++ b/components/spotify/actions/remove-items-from-playlist/remove-items-from-playlist.mjs @@ -6,7 +6,7 @@ export default { name: "Remove Items from a Playlist", description: "Remove one or more items from a userโ€™s playlist. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/remove-tracks-playlist)", key: "spotify-remove-items-from-playlist", - version: "0.1.1", + version: "0.1.2", type: "action", props: { spotify, diff --git a/components/spotify/actions/remove-user-saved-tracks/remove-user-saved-tracks.mjs b/components/spotify/actions/remove-user-saved-tracks/remove-user-saved-tracks.mjs index 5d18afd977508..0434bc0ec66ed 100644 --- a/components/spotify/actions/remove-user-saved-tracks/remove-user-saved-tracks.mjs +++ b/components/spotify/actions/remove-user-saved-tracks/remove-user-saved-tracks.mjs @@ -5,7 +5,7 @@ export default { name: "Remove User's Saved Tracks", description: "Remove one or more tracks from the current userโ€™s โ€˜Your Musicโ€™ library. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/remove-tracks-user)", key: "spotify-remove-user-saved-tracks", - version: "0.1.1", + version: "0.1.2", type: "action", props: { spotify, diff --git a/components/spotify/actions/save-track/save-track.mjs b/components/spotify/actions/save-track/save-track.mjs index dc05c4a8dc0fb..c092ff695b78d 100644 --- a/components/spotify/actions/save-track/save-track.mjs +++ b/components/spotify/actions/save-track/save-track.mjs @@ -6,7 +6,7 @@ export default { name: "Save Tracks for User", description: "Save one or more tracks to the current userโ€™s \"Your Music\" library. [See the docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/save-tracks-user).", key: "spotify-save-track", - version: "0.1.1", + version: "0.1.2", type: "action", props: { spotify, diff --git a/components/spotify/package.json b/components/spotify/package.json index c7a467a69a3a0..317abb6022cf4 100644 --- a/components/spotify/package.json +++ b/components/spotify/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/spotify", - "version": "0.7.2", + "version": "0.7.3", "description": "Pipedream Spotify Components", "main": "spotify.app.mjs", "keywords": [ diff --git a/components/spotify/sources/new-playlist/new-playlist.mjs b/components/spotify/sources/new-playlist/new-playlist.mjs index 32feff6a29674..d82665b37fdaf 100644 --- a/components/spotify/sources/new-playlist/new-playlist.mjs +++ b/components/spotify/sources/new-playlist/new-playlist.mjs @@ -6,7 +6,7 @@ export default { key: "spotify-new-playlist", name: "New Playlist", description: "Emit new event when a new playlist is created or followed by the current Spotify user.", - version: "0.1.1", + version: "0.1.2", props: { ...common.props, }, diff --git a/components/spotify/sources/new-saved-track/new-saved-track.mjs b/components/spotify/sources/new-saved-track/new-saved-track.mjs index 829c1a681f430..d97a5ca235bc1 100644 --- a/components/spotify/sources/new-saved-track/new-saved-track.mjs +++ b/components/spotify/sources/new-saved-track/new-saved-track.mjs @@ -6,7 +6,7 @@ export default { key: "spotify-new-saved-track", name: "New Saved Track", description: "Emit new event for each new track saved to the current Spotify user's Music Library.", - version: "0.1.1", + version: "0.1.2", props: { ...common.props, db: "$.service.db", diff --git a/components/spotify/sources/new-track-by-artist/new-track-by-artist.mjs b/components/spotify/sources/new-track-by-artist/new-track-by-artist.mjs index aa16aee765452..a9e7d4a69abd5 100644 --- a/components/spotify/sources/new-track-by-artist/new-track-by-artist.mjs +++ b/components/spotify/sources/new-track-by-artist/new-track-by-artist.mjs @@ -7,7 +7,7 @@ export default { key: "spotify-new-track-by-artist", name: "New Track by Artist", description: "Emit new event for each new Spotify track related with an artist. [see docs here](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-multiple-albums)", - version: "0.1.1", + version: "0.1.2", props: { ...common.props, db: "$.service.db", diff --git a/components/spotify/sources/new-track-in-playlist/new-track-in-playlist.mjs b/components/spotify/sources/new-track-in-playlist/new-track-in-playlist.mjs index 1e03db2a0f8ac..68d1d98bb0d14 100644 --- a/components/spotify/sources/new-track-in-playlist/new-track-in-playlist.mjs +++ b/components/spotify/sources/new-track-in-playlist/new-track-in-playlist.mjs @@ -7,7 +7,7 @@ export default { key: "spotify-new-track-in-playlist", name: "New Track in Playlist", description: "Emit new event for each new Spotify track added to a playlist", - version: "0.1.1", + version: "0.1.2", props: { ...common.props, db: "$.service.db", diff --git a/components/spotify/spotify.app.mjs b/components/spotify/spotify.app.mjs index 2cdb4a9e7dc11..3636b3b1a4b06 100644 --- a/components/spotify/spotify.app.mjs +++ b/components/spotify/spotify.app.mjs @@ -95,7 +95,6 @@ export default { type: "string", label: "Playlist ID", description: "Select an existing playlist or pass a custom expression to reference a specific [`playlist_id`](https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids) (for example, `3cEYpjA9oz9GiPac4AsH4n`).", - withLabel: true, async options({ page }) { const limit = 20; const playlists = await this.getPlaylists({ diff --git a/components/spotlightr/package.json b/components/spotlightr/package.json index 82185e82ade20..a99bef306db8e 100644 --- a/components/spotlightr/package.json +++ b/components/spotlightr/package.json @@ -14,6 +14,7 @@ }, "dependencies": { "@pipedream/platform": "^3.1.0", + "axios": "^1.11.0", "form-data": "^4.0.0", "fs": "^0.0.1-security" } diff --git a/components/square/package.json b/components/square/package.json index c3e6f586c4028..30784aedf7e5e 100644 --- a/components/square/package.json +++ b/components/square/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/square", - "version": "0.0.5", + "version": "0.0.6", "description": "Pipedream Square Components", "main": "square.app.mjs", "keywords": [ @@ -14,6 +14,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.1" + "@pipedream/platform": "^3.1.0", + "uuid": "^9.0.0" } } diff --git a/components/stack_exchange/package.json b/components/stack_exchange/package.json index 666e7322456c8..e01e57d010f35 100644 --- a/components/stack_exchange/package.json +++ b/components/stack_exchange/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/stack_exchange", - "version": "0.3.7", + "version": "0.3.8", "description": "Pipedream Stack_exchange Components", - "main": "stack_exchange.app.mjs", + "main": "stack_exchange.app.js", "keywords": [ "pipedream", "stack_exchange" diff --git a/components/starshipit/package.json b/components/starshipit/package.json index 95f74cf513e83..905c7e47c4a24 100644 --- a/components/starshipit/package.json +++ b/components/starshipit/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/starshipit", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Starshipit Components", "main": "starshipit.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/starton/.gitignore b/components/starton/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/starton/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/starton/app/starton.app.ts b/components/starton/app/starton.app.ts deleted file mode 100644 index fe14493fd1168..0000000000000 --- a/components/starton/app/starton.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "starton", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/starton/package.json b/components/starton/package.json index 2124e64931c12..1b14330dd6f0d 100644 --- a/components/starton/package.json +++ b/components/starton/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/starton", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Starton Components", - "main": "dist/app/starton.app.mjs", + "main": "starton.app.mjs", "keywords": [ "pipedream", "starton" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/starton", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/starton/starton.app.mjs b/components/starton/starton.app.mjs new file mode 100644 index 0000000000000..2bfe296f519c8 --- /dev/null +++ b/components/starton/starton.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "starton", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/stealthseminar/.gitignore b/components/stealthseminar/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/stealthseminar/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/stealthseminar/app/stealthseminar.app.ts b/components/stealthseminar/app/stealthseminar.app.ts deleted file mode 100644 index 475a374d1c066..0000000000000 --- a/components/stealthseminar/app/stealthseminar.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "stealthseminar", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/stealthseminar/package.json b/components/stealthseminar/package.json index ce23748f3525f..de5bc84f98c3b 100644 --- a/components/stealthseminar/package.json +++ b/components/stealthseminar/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/stealthseminar", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream StealthSeminar Components", - "main": "dist/app/stealthseminar.app.mjs", + "main": "stealthseminar.app.mjs", "keywords": [ "pipedream", "stealthseminar" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/stealthseminar", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/stealthseminar/stealthseminar.app.mjs b/components/stealthseminar/stealthseminar.app.mjs new file mode 100644 index 0000000000000..a484fcb6e563c --- /dev/null +++ b/components/stealthseminar/stealthseminar.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "stealthseminar", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/stormboard/package.json b/components/stormboard/package.json index 904396f2160dd..d950697dfd3bb 100644 --- a/components/stormboard/package.json +++ b/components/stormboard/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/stormboard", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Stormboard Components", "main": "stormboard.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/stormglass_io/.gitignore b/components/stormglass_io/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/stormglass_io/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/stormglass_io/app/stormglass_io.app.ts b/components/stormglass_io/app/stormglass_io.app.ts deleted file mode 100644 index 2b7d8ac06d7e8..0000000000000 --- a/components/stormglass_io/app/stormglass_io.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "stormglass_io", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/stormglass_io/package.json b/components/stormglass_io/package.json index bfaf9842e3d91..ba4c852b30829 100644 --- a/components/stormglass_io/package.json +++ b/components/stormglass_io/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/stormglass_io", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream stormglass.io Components", - "main": "dist/app/stormglass_io.app.mjs", + "main": "stormglass_io.app.mjs", "keywords": [ "pipedream", "stormglass_io" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/stormglass_io", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/stormglass_io/stormglass_io.app.mjs b/components/stormglass_io/stormglass_io.app.mjs new file mode 100644 index 0000000000000..d754de1f0b0f2 --- /dev/null +++ b/components/stormglass_io/stormglass_io.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "stormglass_io", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/strapi/package.json b/components/strapi/package.json new file mode 100644 index 0000000000000..0fd3f4d777ac7 --- /dev/null +++ b/components/strapi/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/strapi", + "version": "0.0.1", + "description": "Pipedream Strapi Components", + "main": "strapi.app.mjs", + "keywords": [ + "pipedream", + "strapi" + ], + "homepage": "https://pipedream.com/apps/strapi", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/strapi/strapi.app.mjs b/components/strapi/strapi.app.mjs new file mode 100644 index 0000000000000..6bff44037f099 --- /dev/null +++ b/components/strapi/strapi.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "strapi", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/strava/package.json b/components/strava/package.json index b0a7a477ea4ed..2de0892fbd35a 100644 --- a/components/strava/package.json +++ b/components/strava/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/strava", - "version": "0.3.6", + "version": "0.3.7", "description": "Pipedream Strava Components", "main": "strava.app.mjs", "keywords": [ @@ -10,7 +10,7 @@ "homepage": "https://pipedream.com/apps/strava", "author": "Pipedream (https://pipedream.com/)", "dependencies": { - "axios": "^0.21.1" + "@pipedream/platform": "^3.0.3" }, "gitHead": "e12480b94cc03bed4808ebc6b13e7fdb3a1ba535", "publishConfig": { diff --git a/components/stripe/actions/cancel-subscription/cancel-subscription.mjs b/components/stripe/actions/cancel-subscription/cancel-subscription.mjs new file mode 100644 index 0000000000000..71ab44173edc4 --- /dev/null +++ b/components/stripe/actions/cancel-subscription/cancel-subscription.mjs @@ -0,0 +1,25 @@ +import stripe from "../../stripe.app.mjs"; + +export default { + key: "stripe-cancel-subscription", + name: "Cancel Subscription", + description: "Cancel a subscription. [See the documentation](https://docs.stripe.com/api/subscriptions/cancel?lang=node)", + version: "0.0.1", + type: "action", + props: { + stripe, + subscriptionId: { + propDefinition: [ + stripe, + "subscription", + ], + }, + }, + async run({ $ }) { + const response = await this.stripe.sdk().subscriptions.cancel(this.subscriptionId); + + $.export("$summary", `Cancelled subscription ${this.subscriptionId}`); + + return response; + }, +}; diff --git a/components/stripe/actions/search-subscriptions/search-subscriptions.mjs b/components/stripe/actions/search-subscriptions/search-subscriptions.mjs new file mode 100644 index 0000000000000..a96b5f6d9fa6c --- /dev/null +++ b/components/stripe/actions/search-subscriptions/search-subscriptions.mjs @@ -0,0 +1,52 @@ +import stripe from "../../stripe.app.mjs"; + +export default { + key: "stripe-search-subscriptions", + name: "Search Subscriptions", + description: "Search for subscriptions. [See the documentation](https://docs.stripe.com/api/subscriptions/search?lang=node)", + version: "0.0.1", + type: "action", + props: { + stripe, + query: { + type: "string", + label: "Query", + description: "The search query string. See [search query language](https://docs.stripe.com/search#search-query-language) and the list of supported [query fields for subscriptions](https://docs.stripe.com/search#query-fields-for-subscriptions).", + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of results to return", + default: 100, + optional: true, + }, + }, + async run({ $ }) { + const params = { + query: this.query, + limit: 100, + }; + let hasMore, count = 0; + + const results = []; + do { + const response = await this.stripe.sdk().subscriptions.search(params); + if (!response?.data?.length) { + break; + } + for (const subscription of response.data) { + results.push(subscription); + count++; + if (count >= this.maxResults) { + break; + } + } + hasMore = response.has_more; + params.page = response.next_page; + } while (hasMore && count < this.maxResults); + + $.export("$summary", `Retrieved ${results.length} subscriptions`); + + return results; + }, +}; diff --git a/components/stripe/package.json b/components/stripe/package.json index b6443685a8356..6413c50787b5a 100644 --- a/components/stripe/package.json +++ b/components/stripe/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/stripe", - "version": "0.7.2", + "version": "0.8.0", "description": "Pipedream Stripe Components", "main": "stripe.app.mjs", "keywords": [ diff --git a/components/studio_by_ai21_labs/.gitignore b/components/studio_by_ai21_labs/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/studio_by_ai21_labs/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/studio_by_ai21_labs/app/studio_by_ai21_labs.app.ts b/components/studio_by_ai21_labs/app/studio_by_ai21_labs.app.ts deleted file mode 100644 index 521fb3ffaf9fc..0000000000000 --- a/components/studio_by_ai21_labs/app/studio_by_ai21_labs.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "studio_by_ai21_labs", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/studio_by_ai21_labs/package.json b/components/studio_by_ai21_labs/package.json index 730c09c64451d..257bce2254586 100644 --- a/components/studio_by_ai21_labs/package.json +++ b/components/studio_by_ai21_labs/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/studio_by_ai21_labs", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Studio by AI21 Labs Components", - "main": "dist/app/studio_by_ai21_labs.app.mjs", + "main": "studio_by_ai21_labs.app.mjs", "keywords": [ "pipedream", "studio_by_ai21_labs" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/studio_by_ai21_labs", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/studio_by_ai21_labs/studio_by_ai21_labs.app.mjs b/components/studio_by_ai21_labs/studio_by_ai21_labs.app.mjs new file mode 100644 index 0000000000000..2df0bc40bfde9 --- /dev/null +++ b/components/studio_by_ai21_labs/studio_by_ai21_labs.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "studio_by_ai21_labs", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/successeve/.gitignore b/components/successeve/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/successeve/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/successeve/app/successeve.app.ts b/components/successeve/app/successeve.app.ts deleted file mode 100644 index 2b2309dd854cd..0000000000000 --- a/components/successeve/app/successeve.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "successeve", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/successeve/package.json b/components/successeve/package.json index 5aa01658d3d49..26ecf489d393b 100644 --- a/components/successeve/package.json +++ b/components/successeve/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/successeve", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Successeve Components", - "main": "dist/app/successeve.app.mjs", + "main": "successeve.app.mjs", "keywords": [ "pipedream", "successeve" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/successeve", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/successeve/successeve.app.mjs b/components/successeve/successeve.app.mjs new file mode 100644 index 0000000000000..7d44d254ecbe1 --- /dev/null +++ b/components/successeve/successeve.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "successeve", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sugarcrm_/.gitignore b/components/sugarcrm_/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/sugarcrm_/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/sugarcrm_/app/sugarcrm_.app.ts b/components/sugarcrm_/app/sugarcrm_.app.ts deleted file mode 100644 index ebae59c974f78..0000000000000 --- a/components/sugarcrm_/app/sugarcrm_.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "sugarcrm_", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/sugarcrm_/package.json b/components/sugarcrm_/package.json index 1bffd37c22662..a7ebd9ad84df6 100644 --- a/components/sugarcrm_/package.json +++ b/components/sugarcrm_/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/sugarcrm_", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream SugarCRM Components", - "main": "dist/app/sugarcrm_.app.mjs", + "main": "sugarcrm_.app.mjs", "keywords": [ "pipedream", "sugarcrm_" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/sugarcrm_", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/sugarcrm_/sugarcrm_.app.mjs b/components/sugarcrm_/sugarcrm_.app.mjs new file mode 100644 index 0000000000000..0a6362940958f --- /dev/null +++ b/components/sugarcrm_/sugarcrm_.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "sugarcrm_", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/suitedash/package.json b/components/suitedash/package.json index ea621228da30d..629c1747333a1 100644 --- a/components/suitedash/package.json +++ b/components/suitedash/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/suitedash", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream SuiteDash Components", - "main": "dist/app/suitedash.app.mjs", + "main": "suitedash.app.mjs", "keywords": [ "pipedream", "suitedash" diff --git a/components/supernotes/package.json b/components/supernotes/package.json index 5396c3da0fa9c..94bc5e5a1bfc7 100644 --- a/components/supernotes/package.json +++ b/components/supernotes/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/supernotes", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Supernotes Components", "main": "supernotes.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/superphone/package.json b/components/superphone/package.json index d10089bebab85..ce82acd99728d 100644 --- a/components/superphone/package.json +++ b/components/superphone/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/superphone", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream SuperPhone Components", "main": "superphone.app.mjs", "keywords": [ @@ -10,7 +10,8 @@ "homepage": "https://pipedream.com/apps/superphone", "author": "Pipedream (https://pipedream.com/)", "dependencies": { - "@pipedream/platform": "^1.5.1" + "@pipedream/platform": "^1.5.1", + "graphql-request": "^7.2.0" }, "publishConfig": { "access": "public" diff --git a/components/survey2connect/.gitignore b/components/survey2connect/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/survey2connect/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/survey2connect/app/survey2connect.app.ts b/components/survey2connect/app/survey2connect.app.ts deleted file mode 100644 index 0277669777e0b..0000000000000 --- a/components/survey2connect/app/survey2connect.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "survey2connect", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/survey2connect/package.json b/components/survey2connect/package.json index 3845ef6d230f0..f4bc0b5a09251 100644 --- a/components/survey2connect/package.json +++ b/components/survey2connect/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/survey2connect", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Survey2Connect Components", - "main": "dist/app/survey2connect.app.mjs", + "main": "survey2connect.app.mjs", "keywords": [ "pipedream", "survey2connect" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/survey2connect", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/survey2connect/survey2connect.app.mjs b/components/survey2connect/survey2connect.app.mjs new file mode 100644 index 0000000000000..218843f389850 --- /dev/null +++ b/components/survey2connect/survey2connect.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "survey2connect", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/survicate/.gitignore b/components/survicate/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/survicate/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/survicate/app/survicate.app.ts b/components/survicate/app/survicate.app.ts deleted file mode 100644 index 975cf88582e33..0000000000000 --- a/components/survicate/app/survicate.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "survicate", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/survicate/package.json b/components/survicate/package.json index 24a0e71e782d0..911a586df866c 100644 --- a/components/survicate/package.json +++ b/components/survicate/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/survicate", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Survicate Components", - "main": "dist/app/survicate.app.mjs", + "main": "survicate.app.mjs", "keywords": [ "pipedream", "survicate" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/survicate", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/survicate/survicate.app.mjs b/components/survicate/survicate.app.mjs new file mode 100644 index 0000000000000..e3ab6fee54dc6 --- /dev/null +++ b/components/survicate/survicate.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "survicate", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/swarmnode/swarmnode.app.mjs b/components/swarmnode/swarmnode.app.mjs index 0412f74d62051..86fb5d3e93a24 100644 --- a/components/swarmnode/swarmnode.app.mjs +++ b/components/swarmnode/swarmnode.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/swiftype/.gitignore b/components/swiftype/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/swiftype/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/swiftype/app/swiftype.app.ts b/components/swiftype/app/swiftype.app.ts deleted file mode 100644 index 35b02af80749b..0000000000000 --- a/components/swiftype/app/swiftype.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "swiftype", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/swiftype/package.json b/components/swiftype/package.json index 813805a31b866..7011beb0a354f 100644 --- a/components/swiftype/package.json +++ b/components/swiftype/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/swiftype", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Swiftype Components", - "main": "dist/app/swiftype.app.mjs", + "main": "swiftype.app.mjs", "keywords": [ "pipedream", "swiftype" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/swiftype", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/swiftype/swiftype.app.mjs b/components/swiftype/swiftype.app.mjs new file mode 100644 index 0000000000000..015937b9cbb23 --- /dev/null +++ b/components/swiftype/swiftype.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "swiftype", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/switchboard/.gitignore b/components/switchboard/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/switchboard/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/switchboard/app/switchboard.app.ts b/components/switchboard/app/switchboard.app.ts deleted file mode 100644 index e2519031df6d5..0000000000000 --- a/components/switchboard/app/switchboard.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "switchboard", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/switchboard/package.json b/components/switchboard/package.json index 53f05039a9941..1546cdc4e355a 100644 --- a/components/switchboard/package.json +++ b/components/switchboard/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/switchboard", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Switchboard Components", - "main": "dist/app/switchboard.app.mjs", + "main": "switchboard.app.mjs", "keywords": [ "pipedream", "switchboard" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/switchboard", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/switchboard/switchboard.app.mjs b/components/switchboard/switchboard.app.mjs new file mode 100644 index 0000000000000..aa4e58f7abce4 --- /dev/null +++ b/components/switchboard/switchboard.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "switchboard", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/sympla/package.json b/components/sympla/package.json index 5c7fd31925592..00dbbab889ed0 100644 --- a/components/sympla/package.json +++ b/components/sympla/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/sympla", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Sympla Components", - "main": "dist/app/sympla.app.mjs", + "main": "sympla.app.mjs", "keywords": [ "pipedream", "sympla" diff --git a/components/syncro/.gitignore b/components/syncro/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/syncro/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/syncro/app/syncro.app.ts b/components/syncro/app/syncro.app.ts deleted file mode 100644 index fd5b3a392b6cc..0000000000000 --- a/components/syncro/app/syncro.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "syncro", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/syncro/package.json b/components/syncro/package.json index 7696204e879af..7167a3e447fdf 100644 --- a/components/syncro/package.json +++ b/components/syncro/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/syncro", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Syncro Components", - "main": "dist/app/syncro.app.mjs", + "main": "syncro.app.mjs", "keywords": [ "pipedream", "syncro" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/syncro", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/syncro/syncro.app.mjs b/components/syncro/syncro.app.mjs new file mode 100644 index 0000000000000..de3debee8946c --- /dev/null +++ b/components/syncro/syncro.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "syncro", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/systeme_io/systeme_io.app.mjs b/components/systeme_io/systeme_io.app.mjs index 8f1bc6252ac7b..85117e7da39f9 100644 --- a/components/systeme_io/systeme_io.app.mjs +++ b/components/systeme_io/systeme_io.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/t2m_url_shortener/.gitignore b/components/t2m_url_shortener/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/t2m_url_shortener/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/t2m_url_shortener/app/t2m_url_shortener.app.ts b/components/t2m_url_shortener/app/t2m_url_shortener.app.ts deleted file mode 100644 index 182ad5499002e..0000000000000 --- a/components/t2m_url_shortener/app/t2m_url_shortener.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "t2m_url_shortener", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/t2m_url_shortener/package.json b/components/t2m_url_shortener/package.json index b91d2dfd574a8..688d6302986d6 100644 --- a/components/t2m_url_shortener/package.json +++ b/components/t2m_url_shortener/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/t2m_url_shortener", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream T2M URL Shortener Components", - "main": "dist/app/t2m_url_shortener.app.mjs", + "main": "t2m_url_shortener.app.mjs", "keywords": [ "pipedream", "t2m_url_shortener" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/t2m_url_shortener", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/t2m_url_shortener/t2m_url_shortener.app.mjs b/components/t2m_url_shortener/t2m_url_shortener.app.mjs new file mode 100644 index 0000000000000..355c078689519 --- /dev/null +++ b/components/t2m_url_shortener/t2m_url_shortener.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "t2m_url_shortener", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/tableau/actions/create-project/create-project.mjs b/components/tableau/actions/create-project/create-project.mjs index 494b3c4152b14..5142791da6642 100644 --- a/components/tableau/actions/create-project/create-project.mjs +++ b/components/tableau/actions/create-project/create-project.mjs @@ -4,7 +4,7 @@ export default { key: "tableau-create-project", name: "Create Project", description: "Creates a project on the specified site. You can also create project hierarchies by creating a project under the specified parent project on the site. [See the documentation](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_projects.htm#create_project)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/tableau/actions/download-pdf/download-pdf.mjs b/components/tableau/actions/download-pdf/download-pdf.mjs new file mode 100644 index 0000000000000..10e1cb1f7c00e --- /dev/null +++ b/components/tableau/actions/download-pdf/download-pdf.mjs @@ -0,0 +1,130 @@ +import app from "../../tableau.app.mjs"; +import fs from "fs"; +import path from "path"; + +export default { + key: "tableau-download-pdf", + name: "Download PDF", + description: "Downloads images of the sheets of a workbook as a PDF file. [See the documentation](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_workbooks_and_views.htm#download_workbook_pdf)", + version: "0.0.1", + type: "action", + props: { + app, + siteId: { + propDefinition: [ + app, + "siteId", + ], + }, + workbookId: { + propDefinition: [ + app, + "workbookId", + ({ siteId }) => ({ + siteId, + }), + ], + }, + maxAge: { + type: "integer", + label: "Max Age", + description: "The maximum number of minutes a workbook PDF will be cached before being refreshed. Minimum interval is one minute", + optional: true, + min: 1, + }, + orientation: { + type: "string", + label: "Page Orientation", + description: "The orientation of the pages in the PDF file produced", + options: [ + "Portrait", + "Landscape", + ], + default: "Portrait", + optional: true, + }, + pageType: { + type: "string", + label: "Page Type", + description: "The type of page, which determines the page dimensions of the PDF file returned", + options: [ + "A3", + "A4", + "A5", + "B5", + "Executive", + "Folio", + "Ledger", + "Legal", + "Letter", + "Note", + "Quarto", + "Tabloid", + ], + default: "Legal", + optional: true, + }, + vizHeight: { + type: "integer", + label: "Viz Height", + description: "The height of the rendered PDF image in pixels that, along with `Viz Width`, determines its resolution and aspect ratio", + optional: true, + }, + vizWidth: { + type: "integer", + label: "Viz Width", + description: "The width of the rendered PDF image in pixels that, along with `Viz Height`, determines its resolution and aspect ratio", + optional: true, + }, + outputFilename: { + type: "string", + label: "Output Filename", + description: "The filename for the downloaded PDF file, which will be saved to the `/tmp` folder", + default: "workbook.pdf", + optional: true, + }, + syncDir: { + type: "dir", + accessMode: "write", + sync: true, + }, + }, + async run({ $ }) { + const { + siteId, + workbookId, + maxAge, + orientation, + pageType, + vizHeight, + vizWidth, + outputFilename, + } = this; + + const response = await this.app.downloadWorkbookPdf({ + $, + siteId, + workbookId, + params: { + "max-age-minutes": maxAge, + orientation, + "page-type": pageType, + "viz-height": vizHeight, + "viz-width": vizWidth, + }, + responseType: "arraybuffer", + }); + + // Write the PDF to the /tmp folder + const filename = outputFilename || "workbook.pdf"; + const filePath = path.join("/tmp", filename); + + await fs.promises.writeFile(filePath, Buffer.from(response)); + + $.export("$summary", `Successfully downloaded workbook PDF to \`${filePath}\``); + return { + filePath, + fileContent: response, + }; + }, +}; diff --git a/components/tableau/actions/query-projects/query-projects.mjs b/components/tableau/actions/query-projects/query-projects.mjs index ab8849969fd9f..6679bc3e34c30 100644 --- a/components/tableau/actions/query-projects/query-projects.mjs +++ b/components/tableau/actions/query-projects/query-projects.mjs @@ -5,7 +5,7 @@ export default { key: "tableau-query-projects", name: "Query Projects", description: "Returns a list of projects on the specified site. [See the documentation](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_projects.htm)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/tableau/package.json b/components/tableau/package.json index efc08815fa3f4..090963c638c97 100644 --- a/components/tableau/package.json +++ b/components/tableau/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/tableau", - "version": "0.1.0", + "version": "0.2.0", "description": "Pipedream Tableau Components", "main": "tableau.app.mjs", "keywords": [ diff --git a/components/tableau/sources/label-created-instant/label-created-instant.mjs b/components/tableau/sources/label-created-instant/label-created-instant.mjs index 5edb223ce33b7..b58f1a57911ab 100644 --- a/components/tableau/sources/label-created-instant/label-created-instant.mjs +++ b/components/tableau/sources/label-created-instant/label-created-instant.mjs @@ -6,7 +6,7 @@ export default { key: "tableau-label-created-instant", name: "New Label Created (Instant)", description: "Emit new event when a label is created in Tableau. [See the documentation](https://help.tableau.com/current/developer/webhooks/en-us/docs/webhooks-events-payload.html)", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", methods: { diff --git a/components/tableau/sources/workbook-created-instant/workbook-created-instant.mjs b/components/tableau/sources/workbook-created-instant/workbook-created-instant.mjs index 0553bb9c7f421..a5ae42bd0f9ff 100644 --- a/components/tableau/sources/workbook-created-instant/workbook-created-instant.mjs +++ b/components/tableau/sources/workbook-created-instant/workbook-created-instant.mjs @@ -6,7 +6,7 @@ export default { key: "tableau-workbook-created-instant", name: "New Workbook Created (Instant)", description: "Emit new event each time a new workbook is created in Tableau. [See the documentation](https://help.tableau.com/current/developer/webhooks/en-us/docs/webhooks-events-payload.html)", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", methods: { diff --git a/components/tableau/tableau.app.mjs b/components/tableau/tableau.app.mjs index 2264b9e9b3ebc..857c393e4a4bb 100644 --- a/components/tableau/tableau.app.mjs +++ b/components/tableau/tableau.app.mjs @@ -47,6 +47,32 @@ export default { })); }, }, + workbookId: { + type: "string", + label: "Workbook ID", + description: "The ID of the workbook to download as PDF", + async options({ + siteId, page, + }) { + if (!siteId) { + return []; + } + const { workbooks: { workbook: data } } = + await this.listWorkbooks({ + siteId, + params: { + pageSize: constants.DEFAULT_LIMIT, + pageNumber: page + 1, + }, + }); + return data?.map(({ + id: value, name: label, + }) => ({ + label, + value, + })) || []; + }, + }, }, methods: { getUrl(path) { @@ -95,6 +121,22 @@ export default { ...args, }); }, + listWorkbooks({ + siteId, ...args + }) { + return this._makeRequest({ + path: `/sites/${siteId}/workbooks`, + ...args, + }); + }, + downloadWorkbookPdf({ + siteId, workbookId, ...args + }) { + return this._makeRequest({ + path: `/sites/${siteId}/workbooks/${workbookId}/pdf`, + ...args, + }); + }, async *getIterations({ resourcesFn, resourcesFnArgs, resourceName, max = constants.DEFAULT_MAX, diff --git a/components/taiga/package.json b/components/taiga/package.json new file mode 100644 index 0000000000000..ad12132baf535 --- /dev/null +++ b/components/taiga/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/taiga", + "version": "0.0.1", + "description": "Pipedream Taiga Components", + "main": "taiga.app.mjs", + "keywords": [ + "pipedream", + "taiga" + ], + "homepage": "https://pipedream.com/apps/taiga", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/taiga/taiga.app.mjs b/components/taiga/taiga.app.mjs new file mode 100644 index 0000000000000..74edb05ef1988 --- /dev/null +++ b/components/taiga/taiga.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "taiga", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/tailscale/tailscale.app.mjs b/components/tailscale/tailscale.app.mjs index a96637d6f8788..6bae89a708b0c 100644 --- a/components/tailscale/tailscale.app.mjs +++ b/components/tailscale/tailscale.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/talend/package.json b/components/talend/package.json index d96aa741bf1ae..bc0fecc472d93 100644 --- a/components/talend/package.json +++ b/components/talend/package.json @@ -1,16 +1,18 @@ { "name": "@pipedream/talend", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Talend Components", - "main": "dist/app/talend.app.mjs", + "main": "talend.app.mjs", "keywords": [ "pipedream", "talend" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/talend", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/talenox/.gitignore b/components/talenox/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/talenox/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/talenox/app/talenox.app.ts b/components/talenox/app/talenox.app.ts deleted file mode 100644 index 031ea9d0deebb..0000000000000 --- a/components/talenox/app/talenox.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "talenox", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/talenox/package.json b/components/talenox/package.json index da3e05286d50d..2e03d58729529 100644 --- a/components/talenox/package.json +++ b/components/talenox/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/talenox", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Talenox Components", - "main": "dist/app/talenox.app.mjs", + "main": "talenox.app.mjs", "keywords": [ "pipedream", "talenox" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/talenox", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/talenox/talenox.app.mjs b/components/talenox/talenox.app.mjs new file mode 100644 index 0000000000000..63e84092bd718 --- /dev/null +++ b/components/talenox/talenox.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "talenox", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/talentlms/.gitignore b/components/talentlms/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/talentlms/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/talentlms/app/talentlms.app.ts b/components/talentlms/app/talentlms.app.ts deleted file mode 100644 index ccef27e2474ca..0000000000000 --- a/components/talentlms/app/talentlms.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "talentlms", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/talentlms/package.json b/components/talentlms/package.json index d7c16bf43e527..c828338fe06aa 100644 --- a/components/talentlms/package.json +++ b/components/talentlms/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/talentlms", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream TalentLMS Components", - "main": "dist/app/talentlms.app.mjs", + "main": "talentlms.app.mjs", "keywords": [ "pipedream", "talentlms" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/talentlms", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/talentlms/talentlms.app.mjs b/components/talentlms/talentlms.app.mjs new file mode 100644 index 0000000000000..3fb73285caf05 --- /dev/null +++ b/components/talentlms/talentlms.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "talentlms", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/talkspirit/.gitignore b/components/talkspirit/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/talkspirit/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/talkspirit/app/talkspirit.app.ts b/components/talkspirit/app/talkspirit.app.ts deleted file mode 100644 index a1ec11e28b5b0..0000000000000 --- a/components/talkspirit/app/talkspirit.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "talkspirit", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/talkspirit/package.json b/components/talkspirit/package.json index e197a6dd1ad5b..e1df6f90bb30a 100644 --- a/components/talkspirit/package.json +++ b/components/talkspirit/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/talkspirit", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream talkSpirit Components", - "main": "dist/app/talkspirit.app.mjs", + "main": "talkspirit.app.mjs", "keywords": [ "pipedream", "talkspirit" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/talkspirit", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/talkspirit/talkspirit.app.mjs b/components/talkspirit/talkspirit.app.mjs new file mode 100644 index 0000000000000..f6e611155fbc7 --- /dev/null +++ b/components/talkspirit/talkspirit.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "talkspirit", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/tapfiliate/.gitignore b/components/tapfiliate/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/tapfiliate/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/tapfiliate/app/tapfiliate.app.ts b/components/tapfiliate/app/tapfiliate.app.ts deleted file mode 100644 index d3a01bfa21dfc..0000000000000 --- a/components/tapfiliate/app/tapfiliate.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "tapfiliate", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/tapfiliate/package.json b/components/tapfiliate/package.json index 2cfa78f25ca3d..1386700335742 100644 --- a/components/tapfiliate/package.json +++ b/components/tapfiliate/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/tapfiliate", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Tapfiliate Components", - "main": "dist/app/tapfiliate.app.mjs", + "main": "tapfiliate.app.mjs", "keywords": [ "pipedream", "tapfiliate" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/tapfiliate", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/tapfiliate/tapfiliate.app.mjs b/components/tapfiliate/tapfiliate.app.mjs new file mode 100644 index 0000000000000..c9fbb6f38976d --- /dev/null +++ b/components/tapfiliate/tapfiliate.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "tapfiliate", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/td_ameritrade/.gitignore b/components/td_ameritrade/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/td_ameritrade/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/td_ameritrade/app/td_ameritrade.app.ts b/components/td_ameritrade/app/td_ameritrade.app.ts deleted file mode 100644 index fce96def76336..0000000000000 --- a/components/td_ameritrade/app/td_ameritrade.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "td_ameritrade", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/td_ameritrade/package.json b/components/td_ameritrade/package.json index c830c7c784948..a2971a7f18d24 100644 --- a/components/td_ameritrade/package.json +++ b/components/td_ameritrade/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/td_ameritrade", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream TD Ameritrade Components", - "main": "dist/app/td_ameritrade.app.mjs", + "main": "td_ameritrade.app.mjs", "keywords": [ "pipedream", "td_ameritrade" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/td_ameritrade", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/td_ameritrade/td_ameritrade.app.mjs b/components/td_ameritrade/td_ameritrade.app.mjs new file mode 100644 index 0000000000000..a87bbc9166c20 --- /dev/null +++ b/components/td_ameritrade/td_ameritrade.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "td_ameritrade", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/team_up/package.json b/components/team_up/package.json index f487442012a64..6416f8ecb0c5f 100644 --- a/components/team_up/package.json +++ b/components/team_up/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/team_up", - "version": "0.1.1", + "version": "0.1.2", "description": "Pipedream Team Up Components", "main": "dist/app/team_up.app.mjs", "keywords": [ @@ -14,7 +14,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.4.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/team_up/tsconfig.json b/components/team_up/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/team_up/tsconfig.json +++ b/components/team_up/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/teamdeck/.gitignore b/components/teamdeck/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/teamdeck/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/teamdeck/app/teamdeck.app.ts b/components/teamdeck/app/teamdeck.app.ts deleted file mode 100644 index d3f5a26d8814b..0000000000000 --- a/components/teamdeck/app/teamdeck.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "teamdeck", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/teamdeck/package.json b/components/teamdeck/package.json index e24454559a5f8..c1c7e66b18cfd 100644 --- a/components/teamdeck/package.json +++ b/components/teamdeck/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/teamdeck", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Teamdeck Components", - "main": "dist/app/teamdeck.app.mjs", + "main": "teamdeck.app.mjs", "keywords": [ "pipedream", "teamdeck" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/teamdeck", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/teamdeck/teamdeck.app.mjs b/components/teamdeck/teamdeck.app.mjs new file mode 100644 index 0000000000000..8a17ad9478255 --- /dev/null +++ b/components/teamdeck/teamdeck.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "teamdeck", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/teamwave/.gitignore b/components/teamwave/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/teamwave/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/teamwave/app/teamwave.app.ts b/components/teamwave/app/teamwave.app.ts deleted file mode 100644 index a69a4df8ec215..0000000000000 --- a/components/teamwave/app/teamwave.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "teamwave", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/teamwave/package.json b/components/teamwave/package.json index 23208b68443c5..c2bd1ac3fdb28 100644 --- a/components/teamwave/package.json +++ b/components/teamwave/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/teamwave", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream TeamWave Components", - "main": "dist/app/teamwave.app.mjs", + "main": "teamwave.app.mjs", "keywords": [ "pipedream", "teamwave" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/teamwave", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/teamwave/teamwave.app.mjs b/components/teamwave/teamwave.app.mjs new file mode 100644 index 0000000000000..6a4f387520c44 --- /dev/null +++ b/components/teamwave/teamwave.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "teamwave", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/teamwork_desk/package.json b/components/teamwork_desk/package.json index 3313894406c2a..7e5ab290c3076 100644 --- a/components/teamwork_desk/package.json +++ b/components/teamwork_desk/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/teamwork_desk", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Teamwork Desk Components", "main": "teamwork_desk.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/telesign/.gitignore b/components/telesign/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/telesign/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/telesign/app/telesign.app.ts b/components/telesign/app/telesign.app.ts deleted file mode 100644 index 69eae41005e32..0000000000000 --- a/components/telesign/app/telesign.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "telesign", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/telesign/package.json b/components/telesign/package.json index 6cb1b624810d2..9cecea9f0106d 100644 --- a/components/telesign/package.json +++ b/components/telesign/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/telesign", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream TeleSign Components", - "main": "dist/app/telesign.app.mjs", + "main": "telesign.app.mjs", "keywords": [ "pipedream", "telesign" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/telesign", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/telesign/telesign.app.mjs b/components/telesign/telesign.app.mjs new file mode 100644 index 0000000000000..6179ab3e2ceec --- /dev/null +++ b/components/telesign/telesign.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "telesign", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/templatedocs/package.json b/components/templatedocs/package.json new file mode 100644 index 0000000000000..be3292b9ceb15 --- /dev/null +++ b/components/templatedocs/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/templatedocs", + "version": "0.0.1", + "description": "Pipedream TemplateDocs Components", + "main": "templatedocs.app.mjs", + "keywords": [ + "pipedream", + "templatedocs" + ], + "homepage": "https://pipedream.com/apps/templatedocs", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/templatedocs/templatedocs.app.mjs b/components/templatedocs/templatedocs.app.mjs new file mode 100644 index 0000000000000..c16021a3439f5 --- /dev/null +++ b/components/templatedocs/templatedocs.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "templatedocs", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/terminus_app/.gitignore b/components/terminus_app/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/terminus_app/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/terminus_app/app/terminus_app.app.ts b/components/terminus_app/app/terminus_app.app.ts deleted file mode 100644 index e6a788eab9326..0000000000000 --- a/components/terminus_app/app/terminus_app.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "terminus_app", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/terminus_app/package.json b/components/terminus_app/package.json index 95e17c23910c4..5ba21fa738faa 100644 --- a/components/terminus_app/package.json +++ b/components/terminus_app/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/terminus_app", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Terminus App Components", - "main": "dist/app/terminus_app.app.mjs", + "main": "terminus_app.app.mjs", "keywords": [ "pipedream", "terminus_app" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/terminus_app", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/terminus_app/terminus_app.app.mjs b/components/terminus_app/terminus_app.app.mjs new file mode 100644 index 0000000000000..801636d9ebf41 --- /dev/null +++ b/components/terminus_app/terminus_app.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "terminus_app", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/test_apps_for_switching_appslug_009/test_apps_for_switching_appslug_009.app.mjs b/components/test_apps_for_switching_appslug_009/test_apps_for_switching_appslug_009.app.mjs index 06b4262318b77..ad43c7878e2af 100644 --- a/components/test_apps_for_switching_appslug_009/test_apps_for_switching_appslug_009.app.mjs +++ b/components/test_apps_for_switching_appslug_009/test_apps_for_switching_appslug_009.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/textgain/.gitignore b/components/textgain/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/textgain/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/textgain/app/textgain.app.ts b/components/textgain/app/textgain.app.ts deleted file mode 100644 index aa93bcbf474d5..0000000000000 --- a/components/textgain/app/textgain.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "textgain", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/textgain/package.json b/components/textgain/package.json index 8f41950fd2fa6..46af91cba426a 100644 --- a/components/textgain/package.json +++ b/components/textgain/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/textgain", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Textgain Components", - "main": "dist/app/textgain.app.mjs", + "main": "textgain.app.mjs", "keywords": [ "pipedream", "textgain" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/textgain", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/textgain/textgain.app.mjs b/components/textgain/textgain.app.mjs new file mode 100644 index 0000000000000..414e39872c652 --- /dev/null +++ b/components/textgain/textgain.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "textgain", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/textmagic/.gitignore b/components/textmagic/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/textmagic/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/textmagic/app/textmagic.app.ts b/components/textmagic/app/textmagic.app.ts deleted file mode 100644 index 93343817dae83..0000000000000 --- a/components/textmagic/app/textmagic.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "textmagic", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/textmagic/package.json b/components/textmagic/package.json index aa34d3a416eab..a31025a4a8d19 100644 --- a/components/textmagic/package.json +++ b/components/textmagic/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/textmagic", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream TextMagic Components", - "main": "dist/app/textmagic.app.mjs", + "main": "textmagic.app.mjs", "keywords": [ "pipedream", "textmagic" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/textmagic", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/textmagic/textmagic.app.mjs b/components/textmagic/textmagic.app.mjs new file mode 100644 index 0000000000000..0a29e63a8617e --- /dev/null +++ b/components/textmagic/textmagic.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "textmagic", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/thankster/.gitignore b/components/thankster/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/thankster/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/thankster/app/thankster.app.ts b/components/thankster/app/thankster.app.ts deleted file mode 100644 index 3025dd79acdb8..0000000000000 --- a/components/thankster/app/thankster.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "thankster", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/thankster/package.json b/components/thankster/package.json index 1a54d52c9c761..d939b75f0721d 100644 --- a/components/thankster/package.json +++ b/components/thankster/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/thankster", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Thankster Components", - "main": "dist/app/thankster.app.mjs", + "main": "thankster.app.mjs", "keywords": [ "pipedream", "thankster" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/thankster", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/thankster/thankster.app.mjs b/components/thankster/thankster.app.mjs new file mode 100644 index 0000000000000..4a042b8f58b1a --- /dev/null +++ b/components/thankster/thankster.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "thankster", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/thehive/package.json b/components/thehive/package.json new file mode 100644 index 0000000000000..b457654f6c24b --- /dev/null +++ b/components/thehive/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/thehive", + "version": "0.0.1", + "description": "Pipedream TheHive Components", + "main": "thehive.app.mjs", + "keywords": [ + "pipedream", + "thehive" + ], + "homepage": "https://pipedream.com/apps/thehive", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/thehive/thehive.app.mjs b/components/thehive/thehive.app.mjs new file mode 100644 index 0000000000000..162dc6502b92b --- /dev/null +++ b/components/thehive/thehive.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "thehive", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/threescribe/.gitignore b/components/threescribe/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/threescribe/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/threescribe/app/threescribe.app.ts b/components/threescribe/app/threescribe.app.ts deleted file mode 100644 index f56842efde96f..0000000000000 --- a/components/threescribe/app/threescribe.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "threescribe", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/threescribe/package.json b/components/threescribe/package.json index a4f53ff699a10..22eb60cc48777 100644 --- a/components/threescribe/package.json +++ b/components/threescribe/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/threescribe", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream 3Scribe Components", - "main": "dist/app/threescribe.app.mjs", + "main": "threescribe.app.mjs", "keywords": [ "pipedream", "threescribe" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/threescribe", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/threescribe/threescribe.app.mjs b/components/threescribe/threescribe.app.mjs new file mode 100644 index 0000000000000..be6f57415fcf3 --- /dev/null +++ b/components/threescribe/threescribe.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "threescribe", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/ticket_tailor/package.json b/components/ticket_tailor/package.json index e43c6c9bce268..cdca237444d27 100644 --- a/components/ticket_tailor/package.json +++ b/components/ticket_tailor/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/ticket_tailor", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Ticket Tailor Components", - "main": "dist/app/ticket_tailor.app.mjs", + "main": "ticket_tailor.app.mjs", "keywords": [ "pipedream", "ticket_tailor" diff --git a/components/time_tracker_by_ebillity/.gitignore b/components/time_tracker_by_ebillity/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/time_tracker_by_ebillity/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/time_tracker_by_ebillity/app/time_tracker_by_ebillity.app.ts b/components/time_tracker_by_ebillity/app/time_tracker_by_ebillity.app.ts deleted file mode 100644 index 8ffb1e2248c50..0000000000000 --- a/components/time_tracker_by_ebillity/app/time_tracker_by_ebillity.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "time_tracker_by_ebillity", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/time_tracker_by_ebillity/package.json b/components/time_tracker_by_ebillity/package.json index 6433d3fafeb31..e6f0dbec5416a 100644 --- a/components/time_tracker_by_ebillity/package.json +++ b/components/time_tracker_by_ebillity/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/time_tracker_by_ebillity", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Time Tracker by eBillity Components", - "main": "dist/app/time_tracker_by_ebillity.app.mjs", + "main": "time_tracker_by_ebillity.app.mjs", "keywords": [ "pipedream", "time_tracker_by_ebillity" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/time_tracker_by_ebillity", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/time_tracker_by_ebillity/time_tracker_by_ebillity.app.mjs b/components/time_tracker_by_ebillity/time_tracker_by_ebillity.app.mjs new file mode 100644 index 0000000000000..a685956746226 --- /dev/null +++ b/components/time_tracker_by_ebillity/time_tracker_by_ebillity.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "time_tracker_by_ebillity", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/tmetric/.gitignore b/components/tmetric/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/tmetric/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/tmetric/app/tmetric.app.ts b/components/tmetric/app/tmetric.app.ts deleted file mode 100644 index e45b85dc1b663..0000000000000 --- a/components/tmetric/app/tmetric.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "tmetric", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/tmetric/package.json b/components/tmetric/package.json index b967c60bd7de3..34adf9f6fdb26 100644 --- a/components/tmetric/package.json +++ b/components/tmetric/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/tmetric", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream TMetric Components", - "main": "dist/app/tmetric.app.mjs", + "main": "tmetric.app.mjs", "keywords": [ "pipedream", "tmetric" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/tmetric", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/tmetric/tmetric.app.mjs b/components/tmetric/tmetric.app.mjs new file mode 100644 index 0000000000000..36e4bc6d266f4 --- /dev/null +++ b/components/tmetric/tmetric.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "tmetric", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/token_metrics/README.md b/components/token_metrics/README.md index 9abd1ec9eee07..04144710b79a3 100644 --- a/components/token_metrics/README.md +++ b/components/token_metrics/README.md @@ -1,11 +1,82 @@ # Overview -The Token Metrics API offers access to a trove of cryptocurrency data, including analytics, rankings, and predictions that leverage artificial intelligence and expert insights. With this API, you can automate investment strategies, integrate up-to-date crypto data into your applications, and stay informed with the latest market trends. When used on Pipedream, it allows you to build robust, serverless workflows that can react to various triggers and integrate with numerous services for a seamless data handling experience. +The Token Metrics API integration for Pipedream provides comprehensive access to cryptocurrency data, analytics, and AI-powered insights. This component enables seamless integration of advanced token metrics, market analysis, and trading intelligence into your automated workflows. + +Token Metrics delivers institutional-grade cryptocurrency analytics, including AI-generated reports, trading signals, fundamental and technical analysis, market metrics, and performance data across thousands of digital assets. + +# Key Features + +- **Comprehensive Token Data**: Access detailed information for thousands of cryptocurrencies including prices, market metrics, and historical data +- **AI-Powered Analytics**: Leverage AI-generated reports, trading signals, and investment analysis +- **Advanced Grading Systems**: Access TM Grades, Fundamental Grades, and Technology Grades for informed decision-making +- **Market Intelligence**: Get market metrics, correlation analysis, and scenario-based price predictions +- **Professional Indices**: Access crypto indices with holdings and performance data +- **OHLCV Data**: Retrieve hourly and daily Open, High, Low, Close, Volume data +- **Quantitative Metrics**: Advanced quantitative analysis and resistance/support levels + +# Authentication + +To use the Token Metrics API component, you'll need: + +1. A Token Metrics account with API access +2. An API key from your Token Metrics dashboard + +The API uses API key authentication via the `x-api-key` header. Your API key should be kept secure and not shared publicly. + +## Setup Instructions + +1. Sign up for a Token Metrics account at https://www.tokenmetrics.com/api +2. Navigate to your [api keys dashboard](https://app.tokenmetrics.com/en/api?tab=keys) and generate an API key +3. In Pipedream, connect the Token Metrics app using your API key +4. The API key will be automatically included in all requests via the `x-api-key` header + +# Available Components + +This component provides pre-built actions for all major Token Metrics API endpoints, covering token data, AI-powered analytics, market metrics, trading signals, grading systems, and more. All actions support filtering, pagination, and use API key authentication. # Example Use Cases -- **Crypto Alert System**: Build a workflow on Pipedream that monitors the Token Metrics API for significant changes in crypto ratings or predictions. When certain thresholds are met, use the integrated Twilio app to send SMS alerts, ensuring you or your audience stay up-to-date on important market movements. +- **Automated Trading Systems**: Monitor AI-generated trading signals and execute automated trades +- **Portfolio Management**: Track cryptocurrency portfolios with comprehensive token metrics and grades +- **Market Research**: Generate detailed investment analysis using AI reports and fundamental data +- **Risk Management**: Monitor market conditions, correlations, and implement risk strategies +- **Price Monitoring**: Track token prices and receive alerts on significant market movements + +# API Endpoint + +Base URL: `https://api.tokenmetrics.com/v2` + +All requests require the `x-api-key` header for authentication. + +# Rate Limits & Usage + +Please refer to the [Token Metrics API documentation](https://developers.tokenmetrics.com/) for current rate limits, usage guidelines, and pricing information. + +# Data Filtering & Pagination + +Actions support comprehensive filtering by token identifiers, market criteria, date ranges, and standard pagination controls. See the [Token Metrics API documentation](https://developers.tokenmetrics.com/) for specific filter options. + +# Error Handling + +The component includes comprehensive error handling for common scenarios: + +- **401 Unauthorized**: Invalid or expired API key +- **403 Forbidden**: Insufficient API key permissions +- **429 Rate Limited**: API rate limit exceeded +- **5xx Server Errors**: Token Metrics API server issues + +# Support & Resources + +## Official Token Metrics Resources + +- **API Dashboard**: [app.tokenmetrics.com/en/api](https://app.tokenmetrics.com/en/api) - Manage your API keys and access +- **API Pricing Plans**: [app.tokenmetrics.com/en/api-plans](https://app.tokenmetrics.com/en/api-plans) - View pricing and plan details +- **Token Metrics API Documentation**: [developers.tokenmetrics.com](https://developers.tokenmetrics.com/) - Complete API reference +- **API Support (Telegram)**: [t.me/tokenmetricsapi](https://t.me/tokenmetricsapi) - Developer community and support +- **Contact Us**: [tokenmetrics.com/contact-us](https://www.tokenmetrics.com/contact-us) - General support and inquiries -- **Investment Tracker**: Create a Pipedream workflow that pulls daily investment insights and portfolio analytics from the Token Metrics API and logs them to a Google Sheets document. This allows for easy tracking and historical data analysis, helping to refine investment strategies over time. +## Community & Support -- **Market Dashboard Sync**: Use Pipedream to set up a workflow where market data and analytics from the Token Metrics API are fetched periodically and pushed to a real-time dashboard built with Geckoboard. This keeps your team or clients informed with the latest crypto market trends and forecasts. +- **Pipedream Community**: For integration and workflow assistance +- **Component Issues**: Report bugs or request features via the Pipedream platform +- **Email Support**: support@tokenmetrics.com for API-related issues diff --git a/components/token_metrics/actions/get-ai-reports/get-ai-reports.mjs b/components/token_metrics/actions/get-ai-reports/get-ai-reports.mjs new file mode 100644 index 0000000000000..611d5622ee59e --- /dev/null +++ b/components/token_metrics/actions/get-ai-reports/get-ai-reports.mjs @@ -0,0 +1,68 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.AI_REPORTS; + +export default { + key: "token_metrics-get-ai-reports", + name: "Get AI Reports", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/ai-reports)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props using propDefinitions from the app + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + description: "Select Token IDs to get AI reports for. Example: `37493,3484`", + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + description: "Select token symbols to get AI reports for. Example: `APX,PAAL`", + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getAiReports({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved AI reports for ${dataLength} tokens${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-correlation/get-correlation.mjs b/components/token_metrics/actions/get-correlation/get-correlation.mjs new file mode 100644 index 0000000000000..2e4197d4c3dbe --- /dev/null +++ b/components/token_metrics/actions/get-correlation/get-correlation.mjs @@ -0,0 +1,80 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.CORRELATION; + +export default { + key: "token_metrics-get-correlation", + name: "Get Correlation", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/correlation)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + category: { + propDefinition: [ + tokenMetrics, + "category", + ], + description: "Select categories to filter results. Example: `layer-1,nft`", + }, + exchange: { + propDefinition: [ + tokenMetrics, + "exchange", + ], + description: "Select exchanges to filter results. Example: `gate,binance`", + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getCorrelation({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved correlation data for ${dataLength} tokens${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-crypto-investors/get-crypto-investors.mjs b/components/token_metrics/actions/get-crypto-investors/get-crypto-investors.mjs new file mode 100644 index 0000000000000..95646bd785da9 --- /dev/null +++ b/components/token_metrics/actions/get-crypto-investors/get-crypto-investors.mjs @@ -0,0 +1,53 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.CRYPTO_INVESTORS; + +export default { + key: "token_metrics-get-crypto-investors", + name: "Get Crypto Investors", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/crypto-investors)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getCryptoInvestors({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved ${dataLength} crypto investors${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-daily-ohlcv/get-daily-ohlcv.mjs b/components/token_metrics/actions/get-daily-ohlcv/get-daily-ohlcv.mjs new file mode 100644 index 0000000000000..638aa0edf873b --- /dev/null +++ b/components/token_metrics/actions/get-daily-ohlcv/get-daily-ohlcv.mjs @@ -0,0 +1,87 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.DAILY_OHLCV; + +export default { + key: "token_metrics-get-daily-ohlcv", + name: "Get Daily OHLCV", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/daily-ohlcv)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and screenshot + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + tokenName: { + propDefinition: [ + tokenMetrics, + "tokenName", + ], + description: "Select crypto asset names to filter results. Example: `Bitcoin`", + }, + startDate: { + propDefinition: [ + tokenMetrics, + "startDate", + ], + description: "Start Date accepts date as a string - `YYYY-MM-DD` format. Note: The Start Date cannot be earlier than the past 30 days from the current date. Example: `2025-01-01`", + }, + endDate: { + propDefinition: [ + tokenMetrics, + "endDate", + ], + description: "End Date accepts date as a string - `YYYY-MM-DD` format. Example: `2025-01-23`", + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getDailyOhlcv({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved ${dataLength} daily OHLCV records${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-fundamental-grades-historical/get-fundamental-grades-historical.mjs b/components/token_metrics/actions/get-fundamental-grades-historical/get-fundamental-grades-historical.mjs new file mode 100644 index 0000000000000..a7b32e6fe3e38 --- /dev/null +++ b/components/token_metrics/actions/get-fundamental-grades-historical/get-fundamental-grades-historical.mjs @@ -0,0 +1,87 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.FUNDAMENTAL_GRADES_HISTORICAL; + +export default { + key: "token_metrics-get-fundamental-grades-historical", + name: "Get Fundamental Grades Historical", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/fundamental-grade-history)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + tokenName: { + propDefinition: [ + tokenMetrics, + "tokenName", + ], + description: "Crypto Asset Names (e.g., Bitcoin, Ethereum) to filter results. Select token names.", + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + startDate: { + propDefinition: [ + tokenMetrics, + "startDate", + ], + description: "Start Date accepts date as a string - `YYYY-MM-DD` format. Example: `2025-07-01`", + }, + endDate: { + propDefinition: [ + tokenMetrics, + "endDate", + ], + description: "End Date accepts date as a string - `YYYY-MM-DD` format. Example: `2025-07-05`", + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getFundamentalGradesHistorical({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved historical fundamental grades for ${dataLength} records${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-fundamental-grades/get-fundamental-grades.mjs b/components/token_metrics/actions/get-fundamental-grades/get-fundamental-grades.mjs new file mode 100644 index 0000000000000..0519c28d79c88 --- /dev/null +++ b/components/token_metrics/actions/get-fundamental-grades/get-fundamental-grades.mjs @@ -0,0 +1,73 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.FUNDAMENTAL_GRADES; + +export default { + key: "token_metrics-get-fundamental-grades", + name: "Get Fundamental Grades", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/fundamental-grade)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + tokenName: { + propDefinition: [ + tokenMetrics, + "tokenName", + ], + description: "Crypto Asset Names (e.g., Bitcoin, Ethereum) to filter results. Select token names.", + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getFundamentalGrades({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved fundamental grades for ${dataLength} tokens${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-hourly-ohlcv/get-hourly-ohlcv.mjs b/components/token_metrics/actions/get-hourly-ohlcv/get-hourly-ohlcv.mjs new file mode 100644 index 0000000000000..0e8240e7cba81 --- /dev/null +++ b/components/token_metrics/actions/get-hourly-ohlcv/get-hourly-ohlcv.mjs @@ -0,0 +1,87 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.HOURLY_OHLCV; + +export default { + key: "token_metrics-get-hourly-ohlcv", + name: "Get Hourly OHLCV", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/hourly-ohlcv)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and screenshot + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + tokenName: { + propDefinition: [ + tokenMetrics, + "tokenName", + ], + description: "Select crypto asset names to filter results. Example: `Bitcoin,Ethereum`", + }, + startDate: { + propDefinition: [ + tokenMetrics, + "startDate", + ], + description: "Start Date accepts date as a string - `YYYY-MM-DD` format. Note: The Start Date cannot be earlier than the past 30 days from the current date. Example: `2025-03-01`", + }, + endDate: { + propDefinition: [ + tokenMetrics, + "endDate", + ], + description: "End Date accepts date as a string - `YYYY-MM-DD` format. Example: `2025-03-20`", + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getHourlyOhlcv({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved ${dataLength} hourly OHLCV records${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-hourly-trading-signals/get-hourly-trading-signals.mjs b/components/token_metrics/actions/get-hourly-trading-signals/get-hourly-trading-signals.mjs new file mode 100644 index 0000000000000..3540e1153dfbd --- /dev/null +++ b/components/token_metrics/actions/get-hourly-trading-signals/get-hourly-trading-signals.mjs @@ -0,0 +1,62 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.HOURLY_TRADING_SIGNALS; + +export default { + key: "token_metrics-get-hourly-trading-signals", + name: "Get Hourly Trading Signals", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/hourly-trading-signals)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + description: "Select Token IDs to filter results", + optional: false, + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getHourlyTradingSignals({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved hourly trading signals for ${dataLength} records${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-indices-holdings/get-indices-holdings.mjs b/components/token_metrics/actions/get-indices-holdings/get-indices-holdings.mjs new file mode 100644 index 0000000000000..bc7e6f2322c2e --- /dev/null +++ b/components/token_metrics/actions/get-indices-holdings/get-indices-holdings.mjs @@ -0,0 +1,44 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.INDICES_HOLDINGS; + +export default { + key: "token_metrics-get-indices-holdings", + name: "Get Indices Holdings", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/indices-holdings)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + id: { + propDefinition: [ + tokenMetrics, + "id", + ], + description: "ID of the index. Example: `1`", + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getIndicesHoldings({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved holdings for index with ${dataLength} tokens${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-indices-performance/get-indices-performance.mjs b/components/token_metrics/actions/get-indices-performance/get-indices-performance.mjs new file mode 100644 index 0000000000000..c77d6994780f4 --- /dev/null +++ b/components/token_metrics/actions/get-indices-performance/get-indices-performance.mjs @@ -0,0 +1,75 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.INDICES_PERFORMANCE; + +export default { + key: "token_metrics-get-indices-performance", + name: "Get Indices Performance", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/indices-performance)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + id: { + propDefinition: [ + tokenMetrics, + "id", + ], + description: "ID of the index. Example: `1`", + }, + startDate: { + propDefinition: [ + tokenMetrics, + "startDate", + ], + description: "Start Date accepts date as a string - `YYYY-MM-DD` format. Example: `2025-01-01`", + }, + endDate: { + propDefinition: [ + tokenMetrics, + "endDate", + ], + description: "End Date accepts date as a string - `YYYY-MM-DD` format. Example: `2025-06-01`", + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getIndicesPerformance({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved historical performance data for index with ${dataLength} data points${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-indices/get-indices.mjs b/components/token_metrics/actions/get-indices/get-indices.mjs new file mode 100644 index 0000000000000..664940f58bdd2 --- /dev/null +++ b/components/token_metrics/actions/get-indices/get-indices.mjs @@ -0,0 +1,61 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.INDICES; + +export default { + key: "token_metrics-get-indices", + name: "Get Indices", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/indices)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + indicesType: { + propDefinition: [ + tokenMetrics, + "indicesType", + ], + description: "Filter to return indices by type: 'active' for actively managed, 'passive' for passively managed", + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getIndices({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved ${dataLength} crypto indices${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-market-metrics/get-market-metrics.mjs b/components/token_metrics/actions/get-market-metrics/get-market-metrics.mjs index fd525bc2b9ca8..feff32ac5c186 100644 --- a/components/token_metrics/actions/get-market-metrics/get-market-metrics.mjs +++ b/components/token_metrics/actions/get-market-metrics/get-market-metrics.mjs @@ -1,43 +1,67 @@ -import app from "../../token_metrics.app.mjs"; +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.MARKET_METRICS; export default { key: "token_metrics-get-market-metrics", name: "Get Market Metrics", - description: "Gets the market analytics from Token Metrics. [See the documentation](https://developers.tokenmetrics.com/reference/market-metrics)", - version: "0.0.1", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/market-metrics)`, + version: "0.0.2", type: "action", props: { - app, + tokenMetrics, + // Filter props based on endpoint configuration and API documentation startDate: { propDefinition: [ - app, + tokenMetrics, "startDate", ], + description: "Start Date accepts date as a string - `YYYY-MM-DD` format. Example: `2023-10-01`", }, endDate: { propDefinition: [ - app, + tokenMetrics, "endDate", ], + description: "End Date accepts date as a string - `YYYY-MM-DD` format. Example: `2023-10-10`", }, + // Pagination props limit: { propDefinition: [ - app, + tokenMetrics, "limit", ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, }, }, async run({ $ }) { - const response = await this.app.getMarketMetrics({ + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getMarketMetrics({ $, - params: { - startDate: this.startDate, - endDate: this.endDate, - limit: this.limit, - }, + params, }); - $.export("$summary", `Retrieved market metrics from ${this.startDate} to ${this.endDate}`); + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved market metrics for ${dataLength} records${filterSummary}`); return response; }, diff --git a/components/token_metrics/actions/get-moonshot-tokens/get-moonshot-tokens.mjs b/components/token_metrics/actions/get-moonshot-tokens/get-moonshot-tokens.mjs new file mode 100644 index 0000000000000..11ea5172d325f --- /dev/null +++ b/components/token_metrics/actions/get-moonshot-tokens/get-moonshot-tokens.mjs @@ -0,0 +1,61 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.MOONSHOT_TOKENS; + +export default { + key: "token_metrics-get-moonshot-tokens", + name: "Get Moonshot Tokens", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/moonshot-tokens)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and screenshot + type: { + propDefinition: [ + tokenMetrics, + "type", + ], + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getMoonshotTokens({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + const moonshotType = this.type || "active"; + $.export("$summary", `Successfully retrieved ${dataLength} ${moonshotType} moonshot tokens${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-price/get-price.mjs b/components/token_metrics/actions/get-price/get-price.mjs new file mode 100644 index 0000000000000..6743470d961ce --- /dev/null +++ b/components/token_metrics/actions/get-price/get-price.mjs @@ -0,0 +1,57 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.PRICE; + +export default { + key: "token_metrics-get-price", + name: "Get Price", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/price)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props using propDefinitions from the app + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + description: "Select Token IDs to get prices for. Example: `3375,3306`", + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getPrice({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved ${dataLength} price records${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-quantmetrics/get-quantmetrics.mjs b/components/token_metrics/actions/get-quantmetrics/get-quantmetrics.mjs new file mode 100644 index 0000000000000..e9a747ac4d18f --- /dev/null +++ b/components/token_metrics/actions/get-quantmetrics/get-quantmetrics.mjs @@ -0,0 +1,101 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.QUANTMETRICS; + +export default { + key: "token_metrics-get-quantmetrics", + name: "Get Quantmetrics", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/quantmetrics)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + category: { + propDefinition: [ + tokenMetrics, + "category", + ], + description: "Select categories to filter results. Example: `layer-1,nft`", + }, + exchange: { + propDefinition: [ + tokenMetrics, + "exchange", + ], + description: "Select exchanges to filter results. Example: `binance,gate`", + }, + marketCap: { + propDefinition: [ + tokenMetrics, + "marketCap", + ], + description: "Minimum MarketCap in $. Example: `1000000000`", + }, + volume: { + propDefinition: [ + tokenMetrics, + "volume", + ], + description: "Minimum 24h trading volume in $. Example: `1000000000`", + }, + fdv: { + propDefinition: [ + tokenMetrics, + "fdv", + ], + description: "Minimum fully diluted valuation in $. Example: `1000000000`", + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getQuantmetrics({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved quantmetrics for ${dataLength} tokens${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-resistance-support/get-resistance-support.mjs b/components/token_metrics/actions/get-resistance-support/get-resistance-support.mjs new file mode 100644 index 0000000000000..db0ec2d6cc924 --- /dev/null +++ b/components/token_metrics/actions/get-resistance-support/get-resistance-support.mjs @@ -0,0 +1,66 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.RESISTANCE_SUPPORT; + +export default { + key: "token_metrics-get-resistance-support", + name: "Get Resistance & Support", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/resistance-support)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getResistanceSupport({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved resistance & support data for ${dataLength} records${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-scenario-analysis/get-scenario-analysis.mjs b/components/token_metrics/actions/get-scenario-analysis/get-scenario-analysis.mjs new file mode 100644 index 0000000000000..5621644a0135e --- /dev/null +++ b/components/token_metrics/actions/get-scenario-analysis/get-scenario-analysis.mjs @@ -0,0 +1,66 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.SCENARIO_ANALYSIS; + +export default { + key: "token_metrics-get-scenario-analysis", + name: "Get Scenario Analysis", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/scenario-analysis)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getScenarioAnalysis({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved scenario analysis for ${dataLength} tokens${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-technology-grades-historical/get-technology-grades-historical.mjs b/components/token_metrics/actions/get-technology-grades-historical/get-technology-grades-historical.mjs new file mode 100644 index 0000000000000..418c1ea50bfeb --- /dev/null +++ b/components/token_metrics/actions/get-technology-grades-historical/get-technology-grades-historical.mjs @@ -0,0 +1,87 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.TECHNOLOGY_GRADES_HISTORICAL; + +export default { + key: "token_metrics-get-technology-grades-historical", + name: "Get Technology Grades Historical", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/technology-grade-history)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + tokenName: { + propDefinition: [ + tokenMetrics, + "tokenName", + ], + description: "Crypto Asset Names (e.g., Bitcoin, Ethereum) to filter results. Select token names.", + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + startDate: { + propDefinition: [ + tokenMetrics, + "startDate", + ], + description: "Start Date accepts date as a string - `YYYY-MM-DD` format. Example: `2025-07-01`", + }, + endDate: { + propDefinition: [ + tokenMetrics, + "endDate", + ], + description: "End Date accepts date as a string - `YYYY-MM-DD` format. Example: `2025-07-05`", + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getTechnologyGradesHistorical({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved historical technology grades for ${dataLength} records${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-technology-grades/get-technology-grades.mjs b/components/token_metrics/actions/get-technology-grades/get-technology-grades.mjs new file mode 100644 index 0000000000000..2da867b8d65d3 --- /dev/null +++ b/components/token_metrics/actions/get-technology-grades/get-technology-grades.mjs @@ -0,0 +1,73 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.TECHNOLOGY_GRADES; + +export default { + key: "token_metrics-get-technology-grades", + name: "Get Technology Grades", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/technology-grade)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + tokenName: { + propDefinition: [ + tokenMetrics, + "tokenName", + ], + description: "Crypto Asset Names (e.g., Bitcoin, Ethereum) to filter results. Select token names.", + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getTechnologyGrades({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved technology grades for ${dataLength} tokens${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-tm-grades-historical/get-tm-grades-historical.mjs b/components/token_metrics/actions/get-tm-grades-historical/get-tm-grades-historical.mjs new file mode 100644 index 0000000000000..ec6b342a1fef5 --- /dev/null +++ b/components/token_metrics/actions/get-tm-grades-historical/get-tm-grades-historical.mjs @@ -0,0 +1,87 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.TM_GRADES_HISTORICAL; + +export default { + key: "token_metrics-get-tm-grades-historical", + name: "Get TM Grades Historical", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/tm-grade-history)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + tokenName: { + propDefinition: [ + tokenMetrics, + "tokenName", + ], + description: "Crypto Asset Names (e.g., Bitcoin, Ethereum) to filter results. Select token names.", + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + startDate: { + propDefinition: [ + tokenMetrics, + "startDate", + ], + description: "Start Date accepts date as a string - `YYYY-MM-DD` format. Example: `2025-07-01`", + }, + endDate: { + propDefinition: [ + tokenMetrics, + "endDate", + ], + description: "End Date accepts date as a string - `YYYY-MM-DD` format. Example: `2025-07-05`", + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getTmGradesHistorical({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved historical TM grades for ${dataLength} records${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-tm-grades/get-tm-grades.mjs b/components/token_metrics/actions/get-tm-grades/get-tm-grades.mjs new file mode 100644 index 0000000000000..34d0553019420 --- /dev/null +++ b/components/token_metrics/actions/get-tm-grades/get-tm-grades.mjs @@ -0,0 +1,73 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.TM_GRADES; + +export default { + key: "token_metrics-get-tm-grades", + name: "Get TM Grades", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/tm-grade)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and screenshot + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + tokenName: { + propDefinition: [ + tokenMetrics, + "tokenName", + ], + description: "Crypto Asset Names (e.g., Bitcoin, Ethereum) to filter results. Select token names.", + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + description: "Limit the number of items in response. Defaults to 50", + default: 50, + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + min: 1, + default: 1, + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getTmGrades({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved TM grades for ${dataLength} tokens${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-tokens/get-tokens.mjs b/components/token_metrics/actions/get-tokens/get-tokens.mjs index c7a44cd82f4ad..0ec3e626f175d 100644 --- a/components/token_metrics/actions/get-tokens/get-tokens.mjs +++ b/components/token_metrics/actions/get-tokens/get-tokens.mjs @@ -1,29 +1,84 @@ -import app from "../../token_metrics.app.mjs"; +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.TOKENS; export default { key: "token_metrics-get-tokens", name: "Get Tokens", - description: "Gets the list of coins and their associated token_id supported by Token Metrics. [See the documentation](https://developers.tokenmetrics.com/reference/tokens)", - version: "0.0.1", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/tokens)`, + version: "0.0.2", type: "action", props: { - app, + tokenMetrics, + // Dynamically add filter props based on endpoint configuration + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + tokenName: { + propDefinition: [ + tokenMetrics, + "tokenName", + ], + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + category: { + propDefinition: [ + tokenMetrics, + "category", + ], + }, + exchange: { + propDefinition: [ + tokenMetrics, + "exchange", + ], + }, + blockchainAddress: { + propDefinition: [ + tokenMetrics, + "blockchainAddress", + ], + }, + // Pagination props limit: { propDefinition: [ - app, + tokenMetrics, "limit", ], }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + }, }, async run({ $ }) { - const response = await this.app.getTokens({ + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getTokens({ $, - params: { - limit: this.limit, - }, + params, }); - $.export("$summary", "Retrieved the list of tokens successfully"); + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + $.export("$summary", `Successfully retrieved tokens list${filterSummary}`); return response; }, diff --git a/components/token_metrics/actions/get-top-market-cap-tokens/get-top-market-cap-tokens.mjs b/components/token_metrics/actions/get-top-market-cap-tokens/get-top-market-cap-tokens.mjs new file mode 100644 index 0000000000000..47f2a50336c45 --- /dev/null +++ b/components/token_metrics/actions/get-top-market-cap-tokens/get-top-market-cap-tokens.mjs @@ -0,0 +1,44 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.TOP_MARKET_CAP_TOKENS; + +export default { + key: "token_metrics-get-top-market-cap-tokens", + name: "Get Top Market Cap Tokens", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/top-market-cap-tokens)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration and API documentation + topK: { + propDefinition: [ + tokenMetrics, + "topK", + ], + description: "Specifies the number of top cryptocurrencies to retrieve, based on their market capitalization. Example: `100`", + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getTopMarketCapTokens({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + const dataLength = response.data?.length || 0; + $.export("$summary", `Successfully retrieved ${dataLength} top market cap tokens${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/actions/get-trading-signals/get-trading-signals.mjs b/components/token_metrics/actions/get-trading-signals/get-trading-signals.mjs new file mode 100644 index 0000000000000..6d29800499f81 --- /dev/null +++ b/components/token_metrics/actions/get-trading-signals/get-trading-signals.mjs @@ -0,0 +1,109 @@ +import tokenMetrics from "../../token_metrics.app.mjs"; +import { ENDPOINTS } from "../../common/constants.mjs"; +import { + buildParams, generateFilterSummary, +} from "../../common/utils.mjs"; + +const endpoint = ENDPOINTS.TRADING_SIGNALS; + +export default { + key: "token_metrics-get-trading-signals", + name: "Get Trading Signals", + description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/trading-signals)`, + version: "0.0.1", + type: "action", + props: { + tokenMetrics, + // Filter props based on endpoint configuration + tokenId: { + propDefinition: [ + tokenMetrics, + "tokenId", + ], + }, + startDate: { + propDefinition: [ + tokenMetrics, + "startDate", + ], + }, + endDate: { + propDefinition: [ + tokenMetrics, + "endDate", + ], + }, + symbol: { + propDefinition: [ + tokenMetrics, + "symbol", + ], + }, + category: { + propDefinition: [ + tokenMetrics, + "category", + ], + }, + exchange: { + propDefinition: [ + tokenMetrics, + "exchange", + ], + }, + marketCap: { + propDefinition: [ + tokenMetrics, + "marketCap", + ], + }, + volume: { + propDefinition: [ + tokenMetrics, + "volume", + ], + }, + fdv: { + propDefinition: [ + tokenMetrics, + "fdv", + ], + }, + signal: { + propDefinition: [ + tokenMetrics, + "signal", + ], + }, + // Pagination props + limit: { + propDefinition: [ + tokenMetrics, + "limit", + ], + }, + page: { + propDefinition: [ + tokenMetrics, + "page", + ], + }, + }, + async run({ $ }) { + // Build parameters using utility function + const params = buildParams(this, endpoint.filters); + + const response = await this.tokenMetrics.getTradingSignals({ + $, + params, + }); + + // Generate summary using utility function + const filterSummary = generateFilterSummary(this, endpoint.filters); + + // Use $ context for export + $.export("$summary", `Successfully retrieved trading signals${filterSummary}`); + + return response; + }, +}; diff --git a/components/token_metrics/common/constants.mjs b/components/token_metrics/common/constants.mjs new file mode 100644 index 0000000000000..6731e41427227 --- /dev/null +++ b/components/token_metrics/common/constants.mjs @@ -0,0 +1,368 @@ +// API endpoints configuration +export const ENDPOINTS = { + TOKENS: { + path: "/tokens", + description: "Get the list of coins and their associated TOKEN_ID supported by Token Metrics", + filters: [ + "token_id", + "token_name", + "symbol", + "category", + "exchange", + "blockchain_address", + ], + }, + TRADING_SIGNALS: { + path: "/trading-signals", + description: "Get the AI generated trading signals for long and short positions for all tokens", + filters: [ + "token_id", + "start_date", + "end_date", + "symbol", + "category", + "exchange", + "market_cap", + "volume", + "fdv", + "signal", + ], + }, + PRICE: { + path: "/price", + description: "Get token prices based on the provided token IDs", + filters: [ + "token_id", + ], + }, + HOURLY_OHLCV: { + path: "/hourly-ohlcv", + description: "Get hourly OHLCV (Open, High, Low, Close, Volume) data for tokens", + filters: [ + "token_id", + "symbol", + "token_name", + "start_date", + "end_date", + ], + }, + DAILY_OHLCV: { + path: "/daily-ohlcv", + description: "Get daily OHLCV (Open, High, Low, Close, Volume) data for tokens", + filters: [ + "token_id", + "symbol", + "token_name", + "start_date", + "end_date", + ], + }, + MOONSHOT_TOKENS: { + path: "/moonshot-tokens", + description: "Get the AI-curated token picks (Moonshots) with high breakout potential based on grades, sentiment, volume, and on-chain data to help users trade smarter and faster", + filters: [ + "type", + ], + }, + TM_GRADES: { + path: "/tm-grade", + description: "Get the latest TM Grade for a token, including trader grade change, quant grade, signals, momentum, and 24-hour percentage changes for both TM Grade and Trader Grade", + filters: [ + "token_id", + "token_name", + "symbol", + ], + }, + TM_GRADES_HISTORICAL: { + path: "/tm-grade-history", + description: "Get historical TM Grade data for a token, including trader grade change, quant grade, signals, momentum, and 24-hour percentage changes for both TM Grade and Trader Grade over time", + filters: [ + "token_id", + "token_name", + "symbol", + "start_date", + "end_date", + ], + }, + FUNDAMENTAL_GRADES: { + path: "/fundamental-grade", + description: "Get the latest Fundamental Grade insights for a token, including grade class, community score, exchange score, VC score, tokenomics score, and DeFi scanner score", + filters: [ + "token_id", + "token_name", + "symbol", + ], + }, + FUNDAMENTAL_GRADES_HISTORICAL: { + path: "/fundamental-grade-history", + description: "Get historical Fundamental Grade insights for a token, including grade class, community score, exchange score, VC score, tokenomics score, and DeFi scanner score over time", + filters: [ + "token_id", + "token_name", + "symbol", + "start_date", + "end_date", + ], + }, + TECHNOLOGY_GRADES: { + path: "/technology-grade", + description: "Get Technology Grade insights for a token, including activity score, security score, repository score, collaboration score, and DeFi scanner score", + filters: [ + "token_id", + "token_name", + "symbol", + ], + }, + TECHNOLOGY_GRADES_HISTORICAL: { + path: "/technology-grade-history", + description: "Get historical Technology Grade data for a token, including activity score, security score, repository score, collaboration score, and DeFi scanner score over time", + filters: [ + "token_id", + "token_name", + "symbol", + "start_date", + "end_date", + ], + }, + MARKET_METRICS: { + path: "/market-metrics", + description: "Get the Market Analytics from Token Metrics. They provide insight into the full Crypto Market, including the Bullish/Bearish Market indicator", + filters: [ + "start_date", + "end_date", + ], + }, + AI_REPORTS: { + path: "/ai-reports", + description: "Retrieve AI-generated reports providing comprehensive analyses of cryptocurrency tokens, including deep dives, investment analyses, and code reviews", + filters: [ + "token_id", + "symbol", + ], + }, + CRYPTO_INVESTORS: { + path: "/crypto-investors", + description: "Get the latest list of crypto investors and their scores", + filters: [], + }, + TOP_MARKET_CAP_TOKENS: { + path: "/top-market-cap-tokens", + description: "Get the list of coins for top market cap", + filters: [ + "top_k", + ], + }, + RESISTANCE_SUPPORT: { + path: "/resistance-support", + description: "Get the historical levels of resistance and support for each token", + filters: [ + "token_id", + "symbol", + ], + }, + HOURLY_TRADING_SIGNALS: { + path: "/hourly-trading-signals", + description: "Get the hourly AI generated trading signals for long and short positions for all tokens", + filters: [ + "token_id", + ], + }, + QUANTMETRICS: { + path: "/quantmetrics", + description: "Get the latest quantitative metrics for tokens. Note that Token Metrics pricing data starts on 2019-01-01 for most tokens. More historical data will be available soon", + filters: [ + "token_id", + "symbol", + "category", + "exchange", + "market_cap", + "volume", + "fdv", + ], + }, + SCENARIO_ANALYSIS: { + path: "/scenario-analysis", + description: "Get the price prediction based on different Crypto Market scenario", + filters: [ + "token_id", + "symbol", + ], + }, + CORRELATION: { + path: "/correlation", + description: "Get the Top 10 and Bottom 10 correlation of tokens with the top 100 market cap tokens", + filters: [ + "token_id", + "symbol", + "category", + "exchange", + ], + }, + INDICES: { + path: "/indices", + description: "Get active and passive crypto indices with performance and market data", + filters: [ + "indices_type", + ], + }, + INDICES_HOLDINGS: { + path: "/indices-holdings", + description: "This endpoint returns the current holdings of the given Index, along with their respective weight in %", + filters: [ + "id", + ], + }, + INDICES_PERFORMANCE: { + path: "/indices-performance", + description: "The Indices Performance endpoint provides historical performance data for a given index, including cumulative return on investment (ROI) over time. This data is useful for analyzing index trends and evaluating investment performance", + filters: [ + "id", + "start_date", + "end_date", + ], + }, +}; + +// Common filter definitions that can be reused across endpoints +export const FILTER_DEFINITIONS = { + token_id: { + type: "string", + label: "Token ID", + description: "Comma Separated Token IDs. Example: 3375,3306", + optional: true, + }, + token_name: { + type: "string", + label: "Token Name", + description: "Comma Separated Crypto Asset Names (e.g., Bitcoin, Ethereum)", + optional: true, + }, + symbol: { + type: "string", + label: "Symbol", + description: "Comma Separated Token Symbols. Example: BTC,ETH", + optional: true, + }, + category: { + type: "string", + label: "Category", + description: "Comma Separated category name. Example: yield farming,defi", + optional: true, + }, + exchange: { + type: "string", + label: "Exchange", + description: "Comma Separated exchange name. Example: binance,gate", + optional: true, + }, + blockchain_address: { + type: "string", + label: "Blockchain Address", + description: "Token addresses separated by colon. Example: binance-smart-chain:0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3", + optional: true, + }, + start_date: { + type: "string", + label: "Start Date", + description: "Start Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-01", + optional: true, + }, + end_date: { + type: "string", + label: "End Date", + description: "End Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-10", + optional: true, + }, + market_cap: { + type: "string", + label: "Market Cap", + description: "Minimum Market cap in $. Example: 100000000", + optional: true, + }, + volume: { + type: "string", + label: "Volume", + description: "Minimum 24h trading volume in $. Example: 100000000", + optional: true, + }, + fdv: { + type: "string", + label: "FDV", + description: "Minimum fully diluted valuation in $. Example: 100000000", + optional: true, + }, + signal: { + type: "string", + label: "Signal", + description: "The current signal value of the strategy. Between bullish (1), bearish (-1) or no signal (0)", + optional: true, + options: [ + { + label: "Bullish (1)", + value: "1", + }, + { + label: "No Signal (0)", + value: "0", + }, + { + label: "Bearish (-1)", + value: "-1", + }, + ], + }, + type: { + type: "string", + label: "Type", + description: "Accepts 'active' or 'past' to fetch respective moonshots. Defaults to 'active' if not provided", + optional: true, + options: [ + { + label: "Active", + value: "active", + }, + { + label: "Past", + value: "past", + }, + ], + default: "active", + }, + top_k: { + type: "integer", + label: "Top K", + description: "Specifies the number of top cryptocurrencies to retrieve, based on their market capitalization. Example: 100", + optional: true, + }, + indices_type: { + type: "string", + label: "Indices Type", + description: "Filter to return indices by type: 'active' for actively managed, 'passive' for passively managed", + optional: true, + options: [ + { + label: "Active", + value: "active", + }, + { + label: "Passive", + value: "passive", + }, + ], + }, + id: { + type: "integer", + label: "ID", + description: "ID of the index. Example: 1", + optional: false, + }, +}; + +// Common error messages +export const ERROR_MESSAGES = { + AUTHENTICATION_FAILED: "Authentication failed. Please check your API key.", + ACCESS_FORBIDDEN: "Access forbidden. Please check your API key permissions.", + RATE_LIMIT_EXCEEDED: "Rate limit exceeded. Please try again later.", + SERVER_ERROR: "Token Metrics API server error. Please try again later.", + GENERIC_ERROR: "An error occurred while making the API request", +}; diff --git a/components/token_metrics/common/utils.mjs b/components/token_metrics/common/utils.mjs new file mode 100644 index 0000000000000..a7ac023a1221d --- /dev/null +++ b/components/token_metrics/common/utils.mjs @@ -0,0 +1,60 @@ +// Build parameters object from props, filtering out undefined values +export function buildParams(props, filterKeys) { + const params = {}; + + // Add filter parameters + filterKeys.forEach((key) => { + const propKey = toCamelCase(key); + if (props[propKey]) { + // Handle arrays by joining them with commas for the API + if (Array.isArray(props[propKey])) { + params[key] = props[propKey].join(","); + } else { + params[key] = props[propKey]; + } + } + }); + + // Add pagination parameters + if (props.limit !== undefined) { + params.limit = props.limit; + } + if (props.page !== undefined) { + params.page = props.page; + } + + return params; +} + +// Convert snake_case to camelCase for prop names +export function toCamelCase(str) { + return str.replace(/_([a-z])/g, (match, letter) => letter.toUpperCase()); +} + +// Convert camelCase to snake_case for API parameters +export function toSnakeCase(str) { + return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`); +} + +// Generate filter summary for execution summary +export function generateFilterSummary(props, filterKeys) { + const appliedFilters = []; + + filterKeys.forEach((key) => { + const propKey = toCamelCase(key); + const value = props[propKey]; + if (value) { + const label = key.replace(/_/g, " ").replace(/\b\w/g, (l) => l.toUpperCase()); + // Handle arrays by joining them for display + const displayValue = Array.isArray(value) + ? value.join(", ") + : value; + appliedFilters.push(`${label}: ${displayValue}`); + } + }); + + return appliedFilters.length > 0 + ? ` with filters: ${appliedFilters.join(", ")}` + : ""; +} + diff --git a/components/token_metrics/package.json b/components/token_metrics/package.json index d4419aefe9e6f..60b8d4eb1a663 100644 --- a/components/token_metrics/package.json +++ b/components/token_metrics/package.json @@ -1,11 +1,14 @@ { "name": "@pipedream/token_metrics", - "version": "0.1.0", + "version": "0.0.2", "description": "Pipedream Token Metrics Components", "main": "token_metrics.app.mjs", "keywords": [ "pipedream", - "token_metrics" + "token_metrics", + "cryptocurrency", + "blockchain", + "analytics" ], "homepage": "https://pipedream.com/apps/token_metrics", "author": "Pipedream (https://pipedream.com/)", @@ -13,6 +16,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.6.0" + "@pipedream/platform": "^3.0.3" } } diff --git a/components/token_metrics/token_metrics.app.mjs b/components/token_metrics/token_metrics.app.mjs index 7874dc5308a47..4509e8e65a4b1 100644 --- a/components/token_metrics/token_metrics.app.mjs +++ b/components/token_metrics/token_metrics.app.mjs @@ -4,64 +4,427 @@ export default { type: "app", app: "token_metrics", propDefinitions: { + limit: { + type: "integer", + label: "Limit", + description: "Limit the number of items in response", + optional: true, + default: 50, + }, + page: { + type: "integer", + label: "Page", + description: "Enables pagination and data retrieval control by skipping a specified number of items before fetching data", + optional: true, + default: 1, + }, tokenId: { - type: "string", - label: "Token ID", - description: "The ID of the token", + type: "string[]", + label: "Token IDs", + description: "Select one or more Token IDs to filter results. Example: `3375,3306`", + optional: true, + }, + symbol: { + type: "string[]", + label: "Token Symbols", + description: "Select one or more token symbols to filter results. Example: `BTC,ETH`", + optional: true, + }, + tokenName: { + type: "string[]", + label: "Token Names", + description: "Select one or more crypto asset names to filter results. Example: `Bitcoin,Ethereum`", + optional: true, + }, + category: { + type: "string[]", + label: "Categories", + description: "Select one or more categories to filter results. Example: `defi,layer-1`", + optional: true, + }, + exchange: { + type: "string[]", + label: "Exchanges", + description: "Select one or more exchanges to filter results. Example: `binance,gate`", + optional: true, }, startDate: { type: "string", label: "Start Date", - description: "Start date in the format YYYY-MM-DD", + description: "Start date in `YYYY-MM-DD` format. Example: `2023-10-01`", + optional: true, }, endDate: { type: "string", label: "End Date", - description: "End date in the format YYYY-MM-DD", + description: "End date in `YYYY-MM-DD` format. Example: `2023-10-10`", + optional: true, }, - limit: { + marketCap: { type: "string", - label: "Limit", - description: "Limit the number of items in response", + label: "Minimum Market Cap", + description: "Minimum market cap in USD. Example: `100000000`", + optional: true, + }, + volume: { + type: "string", + label: "Minimum Volume", + description: "Minimum 24h trading volume in USD. Example: `100000000`", + optional: true, + }, + fdv: { + type: "string", + label: "Minimum FDV", + description: "Minimum fully diluted valuation in USD. Example: `100000000`", + optional: true, + }, + signal: { + type: "string", + label: "Signal Type", + description: "Filter by trading signal type", + optional: true, + options: [ + { + label: "Bullish (1)", + value: "1", + }, + { + label: "No Signal (0)", + value: "0", + }, + { + label: "Bearish (-1)", + value: "-1", + }, + ], + }, + blockchainAddress: { + type: "string[]", + label: "Blockchain Addresses", + description: "Select one or more blockchain addresses to filter results. Example: `binance-smart-chain:0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3`", + optional: true, + }, + topK: { + type: "integer", + label: "Top K", + description: "Number of top cryptocurrencies to retrieve based on market capitalization. Example: `100`", + optional: true, + }, + type: { + type: "string", + label: "Type", + description: "Filter by type", optional: true, + options: [ + { + label: "Active", + value: "active", + }, + { + label: "Past", + value: "past", + }, + ], + default: "active", + }, + indicesType: { + type: "string", + label: "Indices Type", + description: "Filter indices by type: 'active' for actively managed, 'passive' for passively managed", + optional: true, + options: [ + { + label: "Active", + value: "active", + }, + { + label: "Passive", + value: "passive", + }, + ], + }, + id: { + type: "integer", + label: "ID", + description: "ID of the index. Example: `1`", + optional: false, }, }, methods: { _baseUrl() { return "https://api.tokenmetrics.com/v2"; }, - async _makeRequest(opts = {}) { - const { - $ = this, - path, - headers, - ...otherOpts - } = opts; - return axios($, { - ...otherOpts, - url: this._baseUrl() + path, - headers: { - ...headers, - "api_key": this.$auth.api_key, - }, - }); + _headers() { + return { + "x-api-key": this.$auth.api_key, + "Content-Type": "application/json", + }; }, - async getTokens(args = {}) { - return this._makeRequest({ - path: "/tokens", + async _makeRequest({ + $ = this, + path, + ...args + }) { + const config = { + url: `${this._baseUrl()}${path}`, + headers: this._headers(), ...args, - }); + }; + + return await axios($, config); }, - async getTraderGrades(args = {}) { + // Generic method for any endpoint + async makeApiCall({ + $ = this, + endpoint, + params = {}, + }) { return this._makeRequest({ - path: "/trader-grades", - ...args, + $, + path: endpoint, + method: "GET", + params, }); }, - async getMarketMetrics(args = {}) { - return this._makeRequest({ - path: "/market-metrics", - ...args, + // Specific endpoint methods (can be generated automatically) + async getTokens({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/tokens", + params, + }); + }, + async getTradingSignals({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/trading-signals", + params, + }); + }, + async getPrice({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/price", + params, + }); + }, + async getHourlyOhlcv({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/hourly-ohlcv", + params, + }); + }, + async getDailyOhlcv({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/daily-ohlcv", + params, + }); + }, + async getMoonshotTokens({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/moonshot-tokens", + params, + }); + }, + async getTmGrades({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/tm-grade", + params, + }); + }, + async getTmGradesHistorical({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/tm-grade-history", + params, + }); + }, + async getFundamentalGrades({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/fundamental-grade", + params, + }); + }, + async getFundamentalGradesHistorical({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/fundamental-grade-history", + params, + }); + }, + async getTechnologyGrades({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/technology-grade", + params, + }); + }, + async getTechnologyGradesHistorical({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/technology-grade-history", + params, + }); + }, + async getMarketMetrics({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/market-metrics", + params, + }); + }, + async getAiReports({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/ai-reports", + params, + }); + }, + async getCryptoInvestors({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/crypto-investors", + params, + }); + }, + async getTopMarketCapTokens({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/top-market-cap-tokens", + params, + }); + }, + async getResistanceSupport({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/resistance-support", + params, + }); + }, + async getHourlyTradingSignals({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/hourly-trading-signals", + params, + }); + }, + async getQuantmetrics({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/quantmetrics", + params, + }); + }, + async getScenarioAnalysis({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/scenario-analysis", + params, + }); + }, + async getCorrelation({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/correlation", + params, + }); + }, + async getIndices({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/indices", + params, + }); + }, + async getIndicesHoldings({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/indices-holdings", + params, + }); + }, + async getIndicesPerformance({ + $ = this, + params = {}, + }) { + return this.makeApiCall({ + $, + endpoint: "/indices-performance", + params, }); }, }, diff --git a/components/tolstoy/package.json b/components/tolstoy/package.json index 550ac2e5d5dcf..1d48a3882cbbc 100644 --- a/components/tolstoy/package.json +++ b/components/tolstoy/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/tolstoy", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Tolstoy Components", "main": "dist/app/tolstoy.app.mjs", "keywords": [ @@ -17,5 +17,8 @@ }, "dependencies": { "@pipedream/platform": "^1.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/tolstoy/tsconfig.json b/components/tolstoy/tsconfig.json index 335fa6f1cf6ec..3a9389484d040 100644 --- a/components/tolstoy/tsconfig.json +++ b/components/tolstoy/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/tomba/.gitignore b/components/tomba/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/tomba/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/tomba/app/tomba.app.ts b/components/tomba/app/tomba.app.ts deleted file mode 100644 index 81380ed70ed63..0000000000000 --- a/components/tomba/app/tomba.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "tomba", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/tomba/package.json b/components/tomba/package.json index 095f1d99a7ce4..de5ab18cd0e92 100644 --- a/components/tomba/package.json +++ b/components/tomba/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/tomba", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Tomba Components", - "main": "dist/app/tomba.app.mjs", + "main": "tomba.app.mjs", "keywords": [ "pipedream", "tomba" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/tomba", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/tomba/tomba.app.mjs b/components/tomba/tomba.app.mjs new file mode 100644 index 0000000000000..10a330dde8978 --- /dev/null +++ b/components/tomba/tomba.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "tomba", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/tookan/tsconfig.json b/components/tookan/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/tookan/tsconfig.json +++ b/components/tookan/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/topmessage/actions/send-message/send-message.mjs b/components/topmessage/actions/send-message/send-message.mjs new file mode 100644 index 0000000000000..4e19f8df06124 --- /dev/null +++ b/components/topmessage/actions/send-message/send-message.mjs @@ -0,0 +1,72 @@ +import app from "../../topmessage.app.mjs"; + +export default { + key: "topmessage-send-message", + name: "Send Message", + description: "Send messages via Whatsapp or SMS. [See the documentation](https://topmessage.com/documentation-api/send-message)", + version: "0.0.1", + type: "action", + props: { + app, + from: { + propDefinition: [ + app, + "from", + ], + }, + to: { + propDefinition: [ + app, + "to", + ], + }, + text: { + propDefinition: [ + app, + "text", + ], + }, + shortenURLs: { + propDefinition: [ + app, + "shortenURLs", + ], + }, + templateId: { + propDefinition: [ + app, + "templateId", + ], + }, + channel: { + propDefinition: [ + app, + "channel", + ], + }, + schedule: { + propDefinition: [ + app, + "schedule", + ], + }, + }, + async run({ $ }) { + const response = await this.app.sendMessage({ + $, + data: { + data: { + from: this.from, + to: this.to, + text: this.text, + shorten_URLs: this.shortenURLs, + template_id: this.templateId, + channel: this.channel, + schedule: this.schedule, + }, + }, + }); + $.export("$summary", "Successfully sent the message request"); + return response; + }, +}; diff --git a/components/topmessage/common/constants.mjs b/components/topmessage/common/constants.mjs new file mode 100644 index 0000000000000..edad139f5a7ee --- /dev/null +++ b/components/topmessage/common/constants.mjs @@ -0,0 +1,6 @@ +export default { + CHANNEL_OPTIONS: [ + "SMS", + "WHATSAPP", + ], +}; diff --git a/components/topmessage/package.json b/components/topmessage/package.json new file mode 100644 index 0000000000000..f9bba0bc2ac5c --- /dev/null +++ b/components/topmessage/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/topmessage", + "version": "0.1.0", + "description": "Pipedream TopMessage Components", + "main": "topmessage.app.mjs", + "keywords": [ + "pipedream", + "topmessage" + ], + "homepage": "https://pipedream.com/apps/topmessage", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + } +} diff --git a/components/topmessage/topmessage.app.mjs b/components/topmessage/topmessage.app.mjs new file mode 100644 index 0000000000000..3b3b7c56b24b2 --- /dev/null +++ b/components/topmessage/topmessage.app.mjs @@ -0,0 +1,78 @@ +import { axios } from "@pipedream/platform"; +import constants from "./common/constants.mjs"; + +export default { + type: "app", + app: "topmessage", + propDefinitions: { + from: { + type: "string", + label: "From", + description: "The name your message will appear to be sent from. You can customize it with your company name (up to 11 characters) or use a virtual number", + }, + to: { + type: "string[]", + label: "To", + description: "The recipient's mobile phone number(s) in international format", + }, + text: { + type: "string", + label: "Text", + description: "Your message text to be sent to the recipient(s)", + }, + shortenURLs: { + type: "boolean", + label: "Shorten URLs", + description: "Indicates whether HTTPS URLs in the text should be replaced with shortened URLs", + optional: true, + }, + templateId: { + type: "string", + label: "Template ID", + description: "Unique identifier of your sent template. You can check the available templates or create a new one from your account in the templates page", + optional: true, + }, + channel: { + type: "string", + label: "Channel", + description: "The communication channel your message will be sent through", + options: constants.CHANNEL_OPTIONS, + optional: true, + }, + schedule: { + type: "string", + label: "Schedule", + description: "Specifies the time when the message should be sent, i.e.: `2024-12-01T18:00:00Z`. The scheduled time cannot be set for more than 1 year in the future", + optional: true, + }, + }, + methods: { + _baseUrl() { + return "https://api.topmessage.com/v1"; + }, + async _makeRequest(opts = {}) { + const { + $ = this, + path, + headers, + ...otherOpts + } = opts; + return axios($, { + ...otherOpts, + url: this._baseUrl() + path, + headers: { + "x-topmessage-key": `${this.$auth.api_key}`, + ...headers, + }, + }); + }, + + async sendMessage(args = {}) { + return this._makeRequest({ + path: "/messages", + method: "POST", + ...args, + }); + }, + }, +}; diff --git a/components/trainual/.gitignore b/components/trainual/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/trainual/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/trainual/app/trainual.app.ts b/components/trainual/app/trainual.app.ts deleted file mode 100644 index f781c972815a6..0000000000000 --- a/components/trainual/app/trainual.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "trainual", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/trainual/package.json b/components/trainual/package.json index 6ab27b69f9e0f..0e7a15dbb86df 100644 --- a/components/trainual/package.json +++ b/components/trainual/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/trainual", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Trainual Components", - "main": "dist/app/trainual.app.mjs", + "main": "trainual.app.mjs", "keywords": [ "pipedream", "trainual" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/trainual", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/trainual/trainual.app.mjs b/components/trainual/trainual.app.mjs new file mode 100644 index 0000000000000..f9930f68b064f --- /dev/null +++ b/components/trainual/trainual.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "trainual", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/trakt/package.json b/components/trakt/package.json index 42f0ab6db8d32..8ffa1b74e5823 100644 --- a/components/trakt/package.json +++ b/components/trakt/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/trakt", - "version": "0.1.1", + "version": "0.1.2", "description": "Pipedream Trakt Components", "main": "trakt.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/translate_com/package.json b/components/translate_com/package.json index a39a86c143fc5..04d2c78712e41 100644 --- a/components/translate_com/package.json +++ b/components/translate_com/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/translate_com", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Translate.com Components", "main": "translate_com.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/trello/actions/add-attachment-to-card/add-attachment-to-card.mjs b/components/trello/actions/add-attachment-to-card/add-attachment-to-card.mjs index b701e4f5cf203..58c961420c846 100644 --- a/components/trello/actions/add-attachment-to-card/add-attachment-to-card.mjs +++ b/components/trello/actions/add-attachment-to-card/add-attachment-to-card.mjs @@ -6,7 +6,7 @@ export default { key: "trello-add-attachment-to-card", name: "Add Attachment To Card", description: "Adds a file attachment on a card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-attachments-post)", - version: "1.0.2", + version: "1.0.3", type: "action", props: { app, diff --git a/components/trello/actions/add-checklist/add-checklist.mjs b/components/trello/actions/add-checklist/add-checklist.mjs index 0717e27558b93..36544285197e4 100644 --- a/components/trello/actions/add-checklist/add-checklist.mjs +++ b/components/trello/actions/add-checklist/add-checklist.mjs @@ -4,7 +4,7 @@ export default { key: "trello-add-checklist", name: "Add Checklist", description: "Adds a new checklist to a card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-checklists-post).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/actions/add-comment/add-comment.mjs b/components/trello/actions/add-comment/add-comment.mjs index ef02b9b19aca0..597c1956d8dcb 100644 --- a/components/trello/actions/add-comment/add-comment.mjs +++ b/components/trello/actions/add-comment/add-comment.mjs @@ -4,7 +4,7 @@ export default { key: "trello-add-comment", name: "Add Comment", description: "Create a new comment on a specific card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-actions-comments-post).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/actions/add-existing-label-to-card/add-existing-label-to-card.mjs b/components/trello/actions/add-existing-label-to-card/add-existing-label-to-card.mjs index 5db6e36ca2ee7..1dbd38647415a 100644 --- a/components/trello/actions/add-existing-label-to-card/add-existing-label-to-card.mjs +++ b/components/trello/actions/add-existing-label-to-card/add-existing-label-to-card.mjs @@ -4,7 +4,7 @@ export default { key: "trello-add-existing-label-to-card", name: "Add Existing Label to Card", description: "Adds an existing label to the specified card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-idlabels-post).", - version: "0.1.2", + version: "0.1.3", type: "action", props: { app, diff --git a/components/trello/actions/add-member-to-card/add-member-to-card.mjs b/components/trello/actions/add-member-to-card/add-member-to-card.mjs index c07a36bc4cca8..ee39f93dc58cb 100644 --- a/components/trello/actions/add-member-to-card/add-member-to-card.mjs +++ b/components/trello/actions/add-member-to-card/add-member-to-card.mjs @@ -4,7 +4,7 @@ export default { key: "trello-add-member-to-card", name: "Add Member to Card", description: "Adds a member to the specified card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-idmembers-post).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/actions/archive-card/archive-card.mjs b/components/trello/actions/archive-card/archive-card.mjs index 92ab878c61353..568d375b1d397 100644 --- a/components/trello/actions/archive-card/archive-card.mjs +++ b/components/trello/actions/archive-card/archive-card.mjs @@ -4,7 +4,7 @@ export default { key: "trello-archive-card", name: "Archive Card", description: "Archives a card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-put).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/actions/complete-checklist-item/complete-checklist-item.mjs b/components/trello/actions/complete-checklist-item/complete-checklist-item.mjs index fc29f3c8f1e66..0517a37bc31e4 100644 --- a/components/trello/actions/complete-checklist-item/complete-checklist-item.mjs +++ b/components/trello/actions/complete-checklist-item/complete-checklist-item.mjs @@ -4,7 +4,7 @@ export default { key: "trello-complete-checklist-item", name: "Complete a Checklist Item", description: "Completes an existing checklist item in a card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-checkitem-idcheckitem-put).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/actions/create-board/create-board.mjs b/components/trello/actions/create-board/create-board.mjs index ab7c5c21c15ef..ea03fb80d5af6 100644 --- a/components/trello/actions/create-board/create-board.mjs +++ b/components/trello/actions/create-board/create-board.mjs @@ -5,7 +5,7 @@ export default { key: "trello-create-board", name: "Create a Board", description: "Create a new Trello board or copy from an existing one. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-post).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/actions/create-card/create-card.mjs b/components/trello/actions/create-card/create-card.mjs index 7958055a9cdfc..5a85d7644ef25 100644 --- a/components/trello/actions/create-card/create-card.mjs +++ b/components/trello/actions/create-card/create-card.mjs @@ -7,7 +7,7 @@ export default { key: "trello-create-card", name: "Create Card", description: "Creates a new card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-post).", - version: "1.0.2", + version: "1.0.3", type: "action", props: { app, diff --git a/components/trello/actions/create-checklist-item/create-checklist-item.mjs b/components/trello/actions/create-checklist-item/create-checklist-item.mjs index ec41de4091a22..aa2b0102fafdf 100644 --- a/components/trello/actions/create-checklist-item/create-checklist-item.mjs +++ b/components/trello/actions/create-checklist-item/create-checklist-item.mjs @@ -5,7 +5,7 @@ export default { key: "trello-create-checklist-item", name: "Create a Checklist Item", description: "Creates a new checklist item in a card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-checklists/#api-checklists-id-checkitems-post).", - version: "0.3.0", + version: "0.3.1", type: "action", props: { app, diff --git a/components/trello/actions/create-label/create-label.mjs b/components/trello/actions/create-label/create-label.mjs index 3cbec94bad26d..b19b80da65918 100644 --- a/components/trello/actions/create-label/create-label.mjs +++ b/components/trello/actions/create-label/create-label.mjs @@ -5,7 +5,7 @@ export default { key: "trello-create-label", name: "Create Label", description: "Creates a new label on the specified board. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-labels/#api-labels-post).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/actions/create-list/create-list.mjs b/components/trello/actions/create-list/create-list.mjs index cd8326fabbeaa..40494000162f0 100644 --- a/components/trello/actions/create-list/create-list.mjs +++ b/components/trello/actions/create-list/create-list.mjs @@ -4,7 +4,7 @@ export default { key: "trello-create-list", name: "Create a List", description: "Creates a new list. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-lists/#api-lists-post).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/actions/delete-checklist/delete-checklist.mjs b/components/trello/actions/delete-checklist/delete-checklist.mjs index c305fa21516fa..5bcd34c1dbd2f 100644 --- a/components/trello/actions/delete-checklist/delete-checklist.mjs +++ b/components/trello/actions/delete-checklist/delete-checklist.mjs @@ -4,7 +4,7 @@ export default { key: "trello-delete-checklist", name: "Delete Checklist", description: "Deletes the specified checklist. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-checklists/#api-checklists-id-delete).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/actions/find-labels/find-labels.mjs b/components/trello/actions/find-labels/find-labels.mjs index a14f3e9353c65..23f0cb19e6c55 100644 --- a/components/trello/actions/find-labels/find-labels.mjs +++ b/components/trello/actions/find-labels/find-labels.mjs @@ -5,7 +5,7 @@ export default { key: "trello-find-labels", name: "Find a Label", description: "Finds a label on a specific board by name. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-id-labels-get)", - version: "0.2.2", + version: "0.2.3", type: "action", props: { ...common.props, diff --git a/components/trello/actions/find-list/find-list.mjs b/components/trello/actions/find-list/find-list.mjs index 6fc3b1c883682..59e00ad544349 100644 --- a/components/trello/actions/find-list/find-list.mjs +++ b/components/trello/actions/find-list/find-list.mjs @@ -5,7 +5,7 @@ export default { key: "trello-find-list", name: "Find a List", description: "Finds a list on a specific board by name. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-id-lists-get).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { ...common.props, diff --git a/components/trello/actions/get-board/get-board.mjs b/components/trello/actions/get-board/get-board.mjs new file mode 100644 index 0000000000000..d8483c3c34afe --- /dev/null +++ b/components/trello/actions/get-board/get-board.mjs @@ -0,0 +1,173 @@ +import common from "../common/common.mjs"; +import fields from "../../common/fields.mjs"; + +export default { + ...common, + key: "trello-get-board", + name: "Get Board", + description: "Request a single board. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-id-get).", + version: "0.0.1", + type: "action", + props: { + ...common.props, + boardId: { + propDefinition: [ + common.props.app, + "board", + ], + label: "Board ID", + description: "The ID of the board to retrieve", + }, + actions: { + propDefinition: [ + common.props.app, + "actions", + ], + }, + boardStars: { + type: "string", + label: "Board Stars", + description: "Valid values are one of: `mine` or `none`. Default is `none`.", + options: [ + "mine", + "none", + ], + optional: true, + }, + cardPluginData: { + type: "boolean", + label: "Card Plugin Data", + description: "Use with the cards param to include card pluginData with the response. Default is `none`.", + optional: true, + }, + customFields: { + type: "boolean", + label: "Custom Fields", + description: "This is a nested resource. Include custom fields in the response.", + default: false, + optional: true, + }, + fields: { + type: "string[]", + label: "Fields", + description: "The fields of the board to be included in the response. Valid values: all or a comma-separated list of specific fields.", + options: fields.board, + optional: true, + }, + labels: { + type: "string", + label: "Labels", + description: "This is a nested resource. Specify what labels to include in the response. One of: `all` or `none`", + optional: true, + options: [ + "all", + "none", + ], + }, + lists: { + type: "string", + label: "Lists", + description: "This is a nested resource. Specify what lists to include in the response.", + optional: true, + options: [ + "all", + "closed", + "none", + "open", + ], + }, + members: { + type: "string", + label: "Members", + description: "This is a nested resource. Specify what members to include in the response.", + optional: true, + options: [ + "none", + "normal", + "admins", + "owners", + "all", + ], + }, + pluginData: { + type: "boolean", + label: "Plugin Data", + description: "Determines whether the pluginData for this board should be returned.", + optional: true, + }, + organization: { + type: "boolean", + label: "Organization", + description: "This is a nested resource. Include organization information in the response.", + optional: true, + }, + organizationPluginData: { + type: "boolean", + label: "Organization Plugin Data", + description: "Use with the organization param to include organization pluginData with the response", + optional: true, + }, + myPrefs: { + type: "boolean", + label: "My Preferences", + description: "Include the user's preferences for this board in the response.", + optional: true, + }, + tags: { + type: "boolean", + label: "Tags", + description: "Also known as collections, tags, refer to the collection(s) that a Board belongs to.", + optional: true, + }, + }, + methods: { + getCommaSeparatedString(array) { + return Array.isArray(array) + ? array.join(",") + : array; + }, + }, + async run({ $ }) { + const { + app, + getCommaSeparatedString, + boardId, + actions, + boardStars, + cardPluginData, + customFields, + fields, + labels, + lists, + members, + pluginData, + organization, + organizationPluginData, + myPrefs, + tags, + } = this; + + const response = await app.getBoard({ + $, + boardId, + params: { + actions: getCommaSeparatedString(actions), + boardStars, + card_pluginData: cardPluginData, + customFields, + fields: getCommaSeparatedString(fields), + labels: getCommaSeparatedString(labels), + lists, + members, + pluginData, + organization, + organizationPluginData, + myPrefs, + tags, + }, + }); + + $.export("$summary", `Successfully retrieved board with ID \`${response.id}\``); + return response; + }, +}; diff --git a/components/trello/actions/get-card/get-card.mjs b/components/trello/actions/get-card/get-card.mjs index e45ed15db7405..4eb0798d341e0 100644 --- a/components/trello/actions/get-card/get-card.mjs +++ b/components/trello/actions/get-card/get-card.mjs @@ -5,7 +5,7 @@ export default { key: "trello-get-card", name: "Get Card", description: "Gets a card by its ID. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-get).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { ...common.props, diff --git a/components/trello/actions/get-cards-in-list/get-cards-in-list.mjs b/components/trello/actions/get-cards-in-list/get-cards-in-list.mjs new file mode 100644 index 0000000000000..5a0e650b5025a --- /dev/null +++ b/components/trello/actions/get-cards-in-list/get-cards-in-list.mjs @@ -0,0 +1,47 @@ +import app from "../../trello.app.mjs"; + +export default { + key: "trello-get-cards-in-list", + name: "Get Cards In A List", + description: "List the cards in a list. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-lists/#api-lists-id-cards-get).", + version: "0.0.1", + type: "action", + props: { + app, + board: { + propDefinition: [ + app, + "board", + ], + label: "Board ID", + description: "The ID of the board containing the list", + }, + listId: { + propDefinition: [ + app, + "lists", + ({ board }) => ({ + board, + }), + ], + type: "string", + label: "List ID", + description: "The ID of the list to get cards from", + optional: false, + }, + }, + async run({ $ }) { + const { + app, + listId, + } = this; + + const response = await app.getCardsInList({ + $, + listId, + }); + + $.export("$summary", `Successfully retrieved \`${response.length}\` card(s) from list`); + return response; + }, +}; diff --git a/components/trello/actions/get-cards-on-board/get-cards-on-board.mjs b/components/trello/actions/get-cards-on-board/get-cards-on-board.mjs new file mode 100644 index 0000000000000..90c1eeb14ca84 --- /dev/null +++ b/components/trello/actions/get-cards-on-board/get-cards-on-board.mjs @@ -0,0 +1,34 @@ +import app from "../../trello.app.mjs"; + +export default { + key: "trello-get-cards-on-board", + name: "Get Cards On A Board", + description: "Get all of the open Cards on a Board. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-id-cards-get).", + version: "0.0.1", + type: "action", + props: { + app, + boardId: { + propDefinition: [ + app, + "board", + ], + label: "Board ID", + description: "The ID of the board to get cards from", + }, + }, + async run({ $ }) { + const { + app, + boardId, + } = this; + + const response = await app.getCards({ + $, + boardId, + }); + + $.export("$summary", `Successfully retrieved \`${response.length}\` card(s) from board`); + return response; + }, +}; diff --git a/components/trello/actions/get-list/get-list.mjs b/components/trello/actions/get-list/get-list.mjs index ea1baa8427955..e032dd85aba10 100644 --- a/components/trello/actions/get-list/get-list.mjs +++ b/components/trello/actions/get-list/get-list.mjs @@ -4,7 +4,7 @@ export default { key: "trello-get-list", name: "Get List", description: "Get information about a List. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-lists/#api-lists-id-get).", - version: "0.1.2", + version: "0.1.3", type: "action", props: { app, diff --git a/components/trello/actions/move-card-to-list/move-card-to-list.mjs b/components/trello/actions/move-card-to-list/move-card-to-list.mjs index e596f220fe5ff..c7f761551e3d6 100644 --- a/components/trello/actions/move-card-to-list/move-card-to-list.mjs +++ b/components/trello/actions/move-card-to-list/move-card-to-list.mjs @@ -5,7 +5,7 @@ export default { key: "trello-move-card-to-list", name: "Move Card to List", description: "Moves a card to the specified board/list pair. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-put).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { ...common.props, diff --git a/components/trello/actions/remove-label-from-card/remove-label-from-card.mjs b/components/trello/actions/remove-label-from-card/remove-label-from-card.mjs index 58382a5e828b3..c6c12af318877 100644 --- a/components/trello/actions/remove-label-from-card/remove-label-from-card.mjs +++ b/components/trello/actions/remove-label-from-card/remove-label-from-card.mjs @@ -4,7 +4,7 @@ export default { key: "trello-remove-label-from-card", name: "Remove Card Label", description: "Removes label from card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-idlabels-idlabel-delete).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/actions/rename-list/rename-list.mjs b/components/trello/actions/rename-list/rename-list.mjs index 438ad497b0e63..19df65a4e6b65 100644 --- a/components/trello/actions/rename-list/rename-list.mjs +++ b/components/trello/actions/rename-list/rename-list.mjs @@ -5,7 +5,7 @@ export default { key: "trello-rename-list", name: "Rename List", description: "Renames an existing list. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-lists/#api-lists-id-put).", - version: "0.1.2", + version: "0.1.3", type: "action", props: { ...common.props, diff --git a/components/trello/actions/search-boards/search-boards.mjs b/components/trello/actions/search-boards/search-boards.mjs index ceec3ad352122..07f6d4efafee1 100644 --- a/components/trello/actions/search-boards/search-boards.mjs +++ b/components/trello/actions/search-boards/search-boards.mjs @@ -4,7 +4,7 @@ export default { key: "trello-search-boards", name: "Search Boards", description: "Searches for boards matching the specified query. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-search/#api-search-get).", - version: "0.3.2", + version: "0.3.3", type: "action", props: { app, diff --git a/components/trello/actions/search-cards/search-cards.mjs b/components/trello/actions/search-cards/search-cards.mjs index 52ff70d3c8a4e..260c96e4e15de 100644 --- a/components/trello/actions/search-cards/search-cards.mjs +++ b/components/trello/actions/search-cards/search-cards.mjs @@ -4,7 +4,7 @@ export default { key: "trello-search-cards", name: "Search Cards", description: "Searches for cards matching the specified query. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-search/#api-search-get).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/actions/search-checklists/search-checklists.mjs b/components/trello/actions/search-checklists/search-checklists.mjs index 300c34f8bf488..e77e4dc8ab700 100644 --- a/components/trello/actions/search-checklists/search-checklists.mjs +++ b/components/trello/actions/search-checklists/search-checklists.mjs @@ -4,7 +4,7 @@ export default { key: "trello-search-checklists", name: "Search Checklists", description: "Find a checklist on a particular board or card by name. [See the documentation here](https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-id-checklists-get) and [here](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-checklists-get).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/actions/search-members/search-members.mjs b/components/trello/actions/search-members/search-members.mjs index 0f04c1c56bd32..615ec47025949 100644 --- a/components/trello/actions/search-members/search-members.mjs +++ b/components/trello/actions/search-members/search-members.mjs @@ -4,7 +4,7 @@ export default { key: "trello-search-members", name: "Search Members", description: "Search for Trello members. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-search/#api-search-members-get).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/actions/update-card/update-card.mjs b/components/trello/actions/update-card/update-card.mjs index abb537e911612..8c88f1f4aa0b4 100644 --- a/components/trello/actions/update-card/update-card.mjs +++ b/components/trello/actions/update-card/update-card.mjs @@ -6,7 +6,7 @@ export default { key: "trello-update-card", name: "Update Card", description: "Updates a card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-put).", - version: "0.2.2", + version: "0.2.3", type: "action", props: { app, diff --git a/components/trello/package.json b/components/trello/package.json index 95c302d7923a9..fde3077cb1123 100644 --- a/components/trello/package.json +++ b/components/trello/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/trello", - "version": "1.1.0", + "version": "1.3.0", "description": "Pipedream Trello Components", "main": "trello.app.mjs", "keywords": [ diff --git a/components/trello/sources/card-archived/card-archived.mjs b/components/trello/sources/card-archived/card-archived.mjs index 2eff193d7b4d6..567bba6d7d0a6 100644 --- a/components/trello/sources/card-archived/card-archived.mjs +++ b/components/trello/sources/card-archived/card-archived.mjs @@ -6,7 +6,7 @@ export default { key: "trello-card-archived", name: "Card Archived (Instant)", /* eslint-disable-line pipedream/source-name */ description: "Emit new event for each card archived.", - version: "0.1.2", + version: "0.1.3", type: "source", props: { ...common.props, diff --git a/components/trello/sources/card-due-date-reminder/card-due-date-reminder.mjs b/components/trello/sources/card-due-date-reminder/card-due-date-reminder.mjs index e49e6e1820e2d..9ae18d681c801 100644 --- a/components/trello/sources/card-due-date-reminder/card-due-date-reminder.mjs +++ b/components/trello/sources/card-due-date-reminder/card-due-date-reminder.mjs @@ -8,7 +8,7 @@ export default { key: "trello-card-due-date-reminder", name: "Card Due Date Reminder", /* eslint-disable-line pipedream/source-name */ description: "Emit new event at a specified time before a card is due.", - version: "0.1.2", + version: "0.1.3", type: "source", dedupe: "unique", props: { diff --git a/components/trello/sources/card-moved/card-moved.mjs b/components/trello/sources/card-moved/card-moved.mjs index 5a4edf4c8929a..78a281f23f721 100644 --- a/components/trello/sources/card-moved/card-moved.mjs +++ b/components/trello/sources/card-moved/card-moved.mjs @@ -6,7 +6,7 @@ export default { key: "trello-card-moved", name: "Card Moved (Instant)", /* eslint-disable-line pipedream/source-name */ description: "Emit new event each time a card is moved to a list.", - version: "0.1.2", + version: "0.1.3", type: "source", props: { ...common.props, diff --git a/components/trello/sources/card-updates/card-updates.mjs b/components/trello/sources/card-updates/card-updates.mjs index bb053d4f2088f..cda0612e91514 100644 --- a/components/trello/sources/card-updates/card-updates.mjs +++ b/components/trello/sources/card-updates/card-updates.mjs @@ -6,7 +6,7 @@ export default { key: "trello-card-updates", name: "Card Updated (Instant)", /* eslint-disable-line pipedream/source-name */ description: "Emit new event for each update to a Trello card.", - version: "0.1.2", + version: "0.1.3", type: "source", props: { ...common.props, diff --git a/components/trello/sources/custom-webhook-events/custom-webhook-events.mjs b/components/trello/sources/custom-webhook-events/custom-webhook-events.mjs index 6a61795381deb..4e8f5459918fc 100644 --- a/components/trello/sources/custom-webhook-events/custom-webhook-events.mjs +++ b/components/trello/sources/custom-webhook-events/custom-webhook-events.mjs @@ -6,7 +6,7 @@ export default { key: "trello-custom-webhook-events", name: "Custom Webhook Events (Instant)", /* eslint-disable-line pipedream/source-name */ description: "Emit new events for activity matching a board, event types, lists and/or cards.", - version: "0.1.2", + version: "0.1.3", type: "source", props: { ...common.props, diff --git a/components/trello/sources/new-activity/new-activity.mjs b/components/trello/sources/new-activity/new-activity.mjs index 8b30535d66b1f..ab876b9a60c7b 100644 --- a/components/trello/sources/new-activity/new-activity.mjs +++ b/components/trello/sources/new-activity/new-activity.mjs @@ -6,7 +6,7 @@ export default { key: "trello-new-activity", name: "New Board Activity (Instant)", description: "Emit new event for new activity on a board.", - version: "0.1.2", + version: "0.1.3", type: "source", props: { ...common.props, diff --git a/components/trello/sources/new-attachment/new-attachment.mjs b/components/trello/sources/new-attachment/new-attachment.mjs index 52a57a64cf60f..3c4aaae3b89eb 100644 --- a/components/trello/sources/new-attachment/new-attachment.mjs +++ b/components/trello/sources/new-attachment/new-attachment.mjs @@ -6,7 +6,7 @@ export default { key: "trello-new-attachment", name: "New Attachment (Instant)", description: "Emit new event when a new attachment is added on a board.", - version: "0.1.2", + version: "0.1.3", type: "source", props: { ...common.props, diff --git a/components/trello/sources/new-board/new-board.mjs b/components/trello/sources/new-board/new-board.mjs index 497c0a4a6b108..ec863ad6ed12e 100644 --- a/components/trello/sources/new-board/new-board.mjs +++ b/components/trello/sources/new-board/new-board.mjs @@ -6,7 +6,7 @@ export default { key: "trello-new-board", name: "New Board (Instant)", description: "Emit new event for each new board added.", - version: "0.1.2", + version: "0.1.3", type: "source", dedupe: "unique", methods: { diff --git a/components/trello/sources/new-card/new-card.mjs b/components/trello/sources/new-card/new-card.mjs index ec86190a1c7c8..3be6c2fb8da68 100644 --- a/components/trello/sources/new-card/new-card.mjs +++ b/components/trello/sources/new-card/new-card.mjs @@ -6,7 +6,7 @@ export default { key: "trello-new-card", name: "New Card (Instant)", description: "Emit new event for each new Trello card on a board.", - version: "0.1.2", + version: "0.1.3", type: "source", dedupe: "unique", props: { diff --git a/components/trello/sources/new-checklist/new-checklist.mjs b/components/trello/sources/new-checklist/new-checklist.mjs index d6c5ae95cc079..ea8ede9e3c3db 100644 --- a/components/trello/sources/new-checklist/new-checklist.mjs +++ b/components/trello/sources/new-checklist/new-checklist.mjs @@ -6,7 +6,7 @@ export default { key: "trello-new-checklist", name: "New Checklist (Instant)", description: "Emit new event for each new checklist added to a board.", - version: "0.1.2", + version: "0.1.3", type: "source", dedupe: "unique", props: { diff --git a/components/trello/sources/new-comment-added-to-card/new-comment-added-to-card.mjs b/components/trello/sources/new-comment-added-to-card/new-comment-added-to-card.mjs index 0f143a62d3575..49192170a0c9a 100644 --- a/components/trello/sources/new-comment-added-to-card/new-comment-added-to-card.mjs +++ b/components/trello/sources/new-comment-added-to-card/new-comment-added-to-card.mjs @@ -6,7 +6,7 @@ export default { key: "trello-new-comment-added-to-card", name: "New Comment Added to Card (Instant)", description: "Emit new event for each new comment added to a card.", - version: "0.2.2", + version: "0.2.3", type: "source", dedupe: "unique", props: { diff --git a/components/trello/sources/new-label-added-to-card/new-label-added-to-card.mjs b/components/trello/sources/new-label-added-to-card/new-label-added-to-card.mjs index 01a287b96bb94..a7002b25b5087 100644 --- a/components/trello/sources/new-label-added-to-card/new-label-added-to-card.mjs +++ b/components/trello/sources/new-label-added-to-card/new-label-added-to-card.mjs @@ -6,7 +6,7 @@ export default { key: "trello-new-label-added-to-card", name: "New Label Added To Card (Instant)", description: "Emit new event for each label added to a card.", - version: "0.1.2", + version: "0.1.3", type: "source", props: { ...common.props, diff --git a/components/trello/sources/new-label/new-label.mjs b/components/trello/sources/new-label/new-label.mjs index 751bc111b13d1..657ab037fba45 100644 --- a/components/trello/sources/new-label/new-label.mjs +++ b/components/trello/sources/new-label/new-label.mjs @@ -6,7 +6,7 @@ export default { key: "trello-new-label", name: "New Label Created (Instant)", description: "Emit new event for each new label added to a board.", - version: "0.1.2", + version: "0.1.3", type: "source", dedupe: "unique", methods: { diff --git a/components/trello/sources/new-member-on-card/new-member-on-card.mjs b/components/trello/sources/new-member-on-card/new-member-on-card.mjs index 7fec4ab41ae3e..be26326cf0749 100644 --- a/components/trello/sources/new-member-on-card/new-member-on-card.mjs +++ b/components/trello/sources/new-member-on-card/new-member-on-card.mjs @@ -6,7 +6,7 @@ export default { key: "trello-new-member-on-card", name: "New Member on Card (Instant)", description: "Emit new event for each member that join in a card.", - version: "0.1.2", + version: "0.1.3", type: "source", dedupe: "unique", methods: { diff --git a/components/trello/sources/new-notification/new-notification.mjs b/components/trello/sources/new-notification/new-notification.mjs index 9b4987faa31b7..20367e6d11d9b 100644 --- a/components/trello/sources/new-notification/new-notification.mjs +++ b/components/trello/sources/new-notification/new-notification.mjs @@ -5,7 +5,7 @@ export default { key: "trello-new-notification", name: "New Notification", description: "Emit new event for each new Trello notification for the authenticated user.", - version: "0.1.2", + version: "0.1.3", type: "source", dedupe: "unique", methods: { diff --git a/components/trello/trello.app.mjs b/components/trello/trello.app.mjs index 5be4e8d1edf2e..b9627633fc826 100644 --- a/components/trello/trello.app.mjs +++ b/components/trello/trello.app.mjs @@ -2,6 +2,7 @@ import { axios } from "@pipedream/platform"; import fields from "./common/fields.mjs"; import constants from "./common/constants.mjs"; import mime from "mime/types/standard.js"; +import actions from "./sources/common/actions.mjs"; export default { type: "app", @@ -338,6 +339,28 @@ export default { "url", ], }, + actions: { + type: "string[]", + label: "Actions", + description: "This is a nested resource. Specify what actions to include in the response. Default is `all`.", + optional: true, + options: actions, + }, + labels: { + type: "string[]", + label: "Labels", + description: "This is a nested resource. Specify what labels to include in the response.", + optional: true, + async options({ boardId }) { + if (!boardId) { + return []; + } + const labels = await this.findLabel({ + boardId, + }); + return labels.map(({ name }) => name); + }, + }, }, methods: { getSignerUri() { diff --git a/components/trengo/actions/create-contact/create-contact.mjs b/components/trengo/actions/create-contact/create-contact.mjs index a4f713cd29bdf..c09e721040204 100644 --- a/components/trengo/actions/create-contact/create-contact.mjs +++ b/components/trengo/actions/create-contact/create-contact.mjs @@ -3,7 +3,7 @@ import app from "../../trengo.app.mjs"; export default { type: "action", key: "trengo-create-contact", - version: "0.0.2", + version: "0.0.3", name: "Create Contact", description: "Creates a contact. If a contact with given identifier already exists, returns it. [See the docs](https://developers.trengo.com/reference/create-update-a-user)", props: { diff --git a/components/trengo/actions/find-contacts/find-contacts.mjs b/components/trengo/actions/find-contacts/find-contacts.mjs index fca3ebb6dd6ea..682b9c55b1551 100644 --- a/components/trengo/actions/find-contacts/find-contacts.mjs +++ b/components/trengo/actions/find-contacts/find-contacts.mjs @@ -4,7 +4,7 @@ import app from "../../trengo.app.mjs"; export default { type: "action", key: "trengo-find-contacts", - version: "0.0.2", + version: "0.0.3", name: "Find Contacts", description: "Finds contacts with the given term. [See the docs](https://developers.trengo.com/reference/as)", props: { diff --git a/components/trengo/actions/list-articles/list-articles.mjs b/components/trengo/actions/list-articles/list-articles.mjs new file mode 100644 index 0000000000000..588acca07fe4e --- /dev/null +++ b/components/trengo/actions/list-articles/list-articles.mjs @@ -0,0 +1,74 @@ +import utils from "../../common/utils.mjs"; +import app from "../../trengo.app.mjs"; + +export default { + type: "action", + key: "trengo-list-articles", + version: "0.0.1", + name: "List Articles", + description: "List articles from a help center according to the specified criteria. [See the docs](https://developers.trengo.com/reference/list-all-articles)", + props: { + app, + helpCenterId: { + propDefinition: [ + app, + "helpCenterId", + ], + }, + localeCode: { + type: "string", + label: "Locale Code", + description: "The article's locale code", + optional: true, + default: "en", + }, + filter: { + type: "string", + label: "Filter", + description: "The article's filter. You can choose one of the available options, specify `untranslated_` for other language codes, or leave empty for all articles", + optional: true, + options: [ + "draft", + "published", + "untranslated_en", + ], + }, + term: { + type: "string", + label: "Search Term", + description: "The article's search term (if not specified, all articles will be returned)", + optional: true, + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "Maximum number of articles to return (if not specified, all results will be returned)", + optional: true, + }, + }, + async run({ $ }) { + const articles = []; + const resourcesStream = utils.getResourcesStream({ + resourceFn: this.app.getArticles, + resourceFnArgs: { + helpCenterId: this.helpCenterId, + params: { + localeCode: this.localeCode, + filter: this.filter, + term: this.term, + }, + }, + }); + for await (const item of resourcesStream) { + articles.push(item); + if (this.maxResults && articles.length >= this.maxResults) { + break; + } + } + const length = articles.length; + $.export("$summary", `Successfully retrieved ${length} article${length === 1 + ? "" + : "s"}`); + return articles; + }, +}; diff --git a/components/trengo/actions/log-a-voice-call/log-a-voice-call.mjs b/components/trengo/actions/log-a-voice-call/log-a-voice-call.mjs index d20c39aca8bdb..cf684f71d6fb9 100644 --- a/components/trengo/actions/log-a-voice-call/log-a-voice-call.mjs +++ b/components/trengo/actions/log-a-voice-call/log-a-voice-call.mjs @@ -3,7 +3,7 @@ import app from "../../trengo.app.mjs"; export default { type: "action", key: "trengo-log-a-voice-call", - version: "0.0.2", + version: "0.0.3", name: "Log A Voice Call", description: "Logs a phone call from external VOIP applications, [See the docs](https://developers.trengo.com/reference/log-a-phone-call)", props: { diff --git a/components/trengo/actions/send-a-message/send-a-message.mjs b/components/trengo/actions/send-a-message/send-a-message.mjs index f91922ad67cbc..0506170781b37 100644 --- a/components/trengo/actions/send-a-message/send-a-message.mjs +++ b/components/trengo/actions/send-a-message/send-a-message.mjs @@ -3,7 +3,7 @@ import app from "../../trengo.app.mjs"; export default { type: "action", key: "trengo-send-a-message", - version: "0.0.2", + version: "0.0.3", name: "Send A Message", description: "This action can be used to easily send a message or an email without having to think about contacts or tickets, [See the docs](https://developers.trengo.com/reference/send-a-message-1)", props: { diff --git a/components/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs b/components/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs index d940c98c51f24..a4a00520c2c7c 100644 --- a/components/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs +++ b/components/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs @@ -4,7 +4,7 @@ import app from "../../trengo.app.mjs"; export default { type: "action", key: "trengo-send-a-team-chat-message", - version: "0.0.2", + version: "0.0.3", name: "Send A Team Chat Message", description: "Send a message as a bot in the Team Chat, [See the docs](https://developers.trengo.com/reference/sending-a-bot-message)", props: { diff --git a/components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs b/components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs index 9d06f4b7a0bc3..daf120398aac3 100644 --- a/components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs +++ b/components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs @@ -4,7 +4,7 @@ import app from "../../trengo.app.mjs"; export default { type: "action", key: "trengo-send-a-whatsapp-message-template", - version: "0.0.2", + version: "0.0.3", name: "Send A WhatsApp Message Template", description: "Sends a WhatsApp message template, [See the docs](https://developers.trengo.com/reference/start-a-conversation)", props: { @@ -45,7 +45,7 @@ export default { }, async run ({ $ }) { if (!this.recepientPhoneNumber && !this.ticketId) { - throw new ConfigurationError("Either `Receipent Phone Number` or `Ticket ID` should be set!"); + throw new ConfigurationError("Either `Recipient Phone Number` or `Ticket ID` should be set!"); } const params = []; if (this.whatsappTemplateParamsKeys && this.whatsappTemplateParamsValues) { @@ -65,7 +65,8 @@ export default { data: { recipient_phone_number: this.recepientPhoneNumber, hsm_id: this.hsmId, - ticket_id: this.ticketId, + // the docs specify this as string for some reason + ticket_id: this.ticketId?.toString?.() || this.ticketId, params, }, }); diff --git a/components/trengo/package.json b/components/trengo/package.json index f5c320c6d33ab..b3e33e32bbe30 100644 --- a/components/trengo/package.json +++ b/components/trengo/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/trengo", - "version": "0.1.0", + "version": "0.2.0", "description": "Pipedream Trengo Components", "main": "trengo.app.mjs", "keywords": [ diff --git a/components/trengo/sources/new-inbound-message/new-inbound-message.mjs b/components/trengo/sources/new-inbound-message/new-inbound-message.mjs index ad69b07d7a180..d62e08ad53fe2 100644 --- a/components/trengo/sources/new-inbound-message/new-inbound-message.mjs +++ b/components/trengo/sources/new-inbound-message/new-inbound-message.mjs @@ -4,7 +4,7 @@ export default { key: "trengo-new-inbound-message", name: "New Inbound Message Event (Instant)", description: "Emit new events when an inbound message received. [See the docs here](https://developers.trengo.com/docs/webhooks)", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", ...common, diff --git a/components/trengo/sources/new-internal-note/new-internal-note.mjs b/components/trengo/sources/new-internal-note/new-internal-note.mjs index 2d24d257a07cf..5bd8e296682c3 100644 --- a/components/trengo/sources/new-internal-note/new-internal-note.mjs +++ b/components/trengo/sources/new-internal-note/new-internal-note.mjs @@ -4,7 +4,7 @@ export default { key: "trengo-new-internal-note", name: "New Internal Note Event (Instant)", description: "Emit new events when a internal note added. [See the docs here](https://developers.trengo.com/docs/webhooks)", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", ...common, diff --git a/components/trengo/sources/new-outbound-message/new-outbound-message.mjs b/components/trengo/sources/new-outbound-message/new-outbound-message.mjs index ea32eed86f23c..2f858d5265b26 100644 --- a/components/trengo/sources/new-outbound-message/new-outbound-message.mjs +++ b/components/trengo/sources/new-outbound-message/new-outbound-message.mjs @@ -4,7 +4,7 @@ export default { key: "trengo-new-outbound-message", name: "New Outbound Message Event (Instant)", description: "Emit new events when an outbound message sent. [See the docs here](https://developers.trengo.com/docs/webhooks)", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", ...common, diff --git a/components/trengo/sources/phone-call-ended/phone-call-ended.mjs b/components/trengo/sources/phone-call-ended/phone-call-ended.mjs index 5237f0ff0788a..bbc3e5698595b 100644 --- a/components/trengo/sources/phone-call-ended/phone-call-ended.mjs +++ b/components/trengo/sources/phone-call-ended/phone-call-ended.mjs @@ -4,7 +4,7 @@ export default { key: "trengo-phone-call-ended", name: "New Phone Call Ended Event (Instant)", description: "Emit new events when an phone call ended. [See the docs here](https://developers.trengo.com/docs/webhooks)", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", ...common, diff --git a/components/trengo/sources/phone-call-missed/phone-call-missed.mjs b/components/trengo/sources/phone-call-missed/phone-call-missed.mjs index 963a25d01815c..f4ba6ec69ffd3 100644 --- a/components/trengo/sources/phone-call-missed/phone-call-missed.mjs +++ b/components/trengo/sources/phone-call-missed/phone-call-missed.mjs @@ -4,7 +4,7 @@ export default { key: "trengo-phone-call-missed", name: "New Phone Call Missed Event (Instant)", description: "Emit new events when an phone call missed. [See the docs here](https://developers.trengo.com/docs/webhooks)", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", ...common, diff --git a/components/trengo/sources/phone-call-started/phone-call-started.mjs b/components/trengo/sources/phone-call-started/phone-call-started.mjs index f7def7a1b42f8..98ec31e967431 100644 --- a/components/trengo/sources/phone-call-started/phone-call-started.mjs +++ b/components/trengo/sources/phone-call-started/phone-call-started.mjs @@ -4,7 +4,7 @@ export default { key: "trengo-phone-call-started", name: "New Phone Call Started Event (Instant)", description: "Emit new events when an phone call started. [See the docs here](https://developers.trengo.com/docs/webhooks)", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", ...common, diff --git a/components/trengo/sources/ticket-closed/ticket-closed.mjs b/components/trengo/sources/ticket-closed/ticket-closed.mjs new file mode 100644 index 0000000000000..2f006f9d6ff09 --- /dev/null +++ b/components/trengo/sources/ticket-closed/ticket-closed.mjs @@ -0,0 +1,29 @@ +import common from "../common/common.mjs"; + +export default { + key: "trengo-ticket-closed", + name: "Ticket Closed (Instant)", + description: "Emit new event when a ticket is closed. [See the documentation](https://developers.trengo.com/docs/webhooks)", + version: "0.0.1", + type: "source", + dedupe: "unique", + ...common, + methods: { + ...common.methods, + getMeta(event) { + const ts = Date.now(); + const id = event?.body?.ticket_id ? + parseInt(event.body.ticket_id) : + ts; + const summary = `Ticket closed: #${id} (Status: ${event?.body?.status})`; + return { + id, + ts, + summary, + }; + }, + getEvent() { + return "TICKET_CLOSED"; + }, + }, +}; diff --git a/components/trengo/sources/ticket-label-added/ticket-label-added.mjs b/components/trengo/sources/ticket-label-added/ticket-label-added.mjs index 225af3fe5ad50..20c67ee00ccbf 100644 --- a/components/trengo/sources/ticket-label-added/ticket-label-added.mjs +++ b/components/trengo/sources/ticket-label-added/ticket-label-added.mjs @@ -4,7 +4,7 @@ export default { key: "trengo-ticket-label-added", name: "New Ticket Label Added Event (Instant)", description: "Emit new events when a ticket label added. [See the docs here](https://developers.trengo.com/docs/webhooks)", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", ...common, diff --git a/components/trengo/sources/ticket-reopened/ticket-reopened.mjs b/components/trengo/sources/ticket-reopened/ticket-reopened.mjs new file mode 100644 index 0000000000000..3a9acef8317b3 --- /dev/null +++ b/components/trengo/sources/ticket-reopened/ticket-reopened.mjs @@ -0,0 +1,29 @@ +import common from "../common/common.mjs"; + +export default { + key: "trengo-ticket-reopened", + name: "Ticket Reopened (Instant)", + description: "Emit new event when a ticket is reopened. [See the documentation](https://developers.trengo.com/docs/webhooks)", + version: "0.0.1", + type: "source", + dedupe: "unique", + ...common, + methods: { + ...common.methods, + getMeta(event) { + const ts = Date.now(); + const id = event?.body?.ticket_id ? + parseInt(event.body.ticket_id) : + ts; + const summary = `Ticket reopened: #${id} (Status: ${event?.body?.status})`; + return { + id, + ts, + summary, + }; + }, + getEvent() { + return "TICKET_REOPENED"; + }, + }, +}; diff --git a/components/trengo/sources/voice-call-recorded/voice-call-recorded.mjs b/components/trengo/sources/voice-call-recorded/voice-call-recorded.mjs index 8033d408bb519..d8c527551322a 100644 --- a/components/trengo/sources/voice-call-recorded/voice-call-recorded.mjs +++ b/components/trengo/sources/voice-call-recorded/voice-call-recorded.mjs @@ -4,7 +4,7 @@ export default { key: "trengo-voice-call-recorded", name: "New Voice Call Recorded Event (Instant)", description: "Emit new events when a voice call is recorded. [See the docs here](https://developers.trengo.com/docs/webhooks)", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", ...common, diff --git a/components/trengo/trengo.app.mjs b/components/trengo/trengo.app.mjs index d7f4019a1e73b..b674cc5b15743 100644 --- a/components/trengo/trengo.app.mjs +++ b/components/trengo/trengo.app.mjs @@ -68,9 +68,20 @@ export default { description: "The WhatsApp template ID.", }, ticketId: { - type: "string", + type: "integer", label: "Ticket ID", - description: "The ticket ID. Only required if `Recipient Phone Number` is not set.", + description: "Select a ticket or provide an ID", + async options({ page = 0 }) { + const response = await this.getTickets({ + params: { + page: page + 1, + }, + }); + return response.data.map((ticket) => ({ + label: `#${ticket.ticket_id} - ${ticket.subject || "No subject"}`, + value: ticket.ticket_id, + })); + }, }, whatsappTemplateParamsKeys: { type: "string[]", @@ -146,6 +157,22 @@ export default { description: "Search term to find a contact. If not given, all contacts will be returned.", optional: true, }, + helpCenterId: { + type: "integer", + label: "Help Center ID", + description: "Select a help center or provide an ID", + async options({ page = 0 }) { + const response = await this.getHelpCenters({ + params: { + page: page + 1, + }, + }); + return response.data.map((helpCenter) => ({ + label: helpCenter.name || helpCenter.slug, + value: helpCenter.id, + })); + }, + }, }, methods: { _getUrl(path) { @@ -241,5 +268,25 @@ export default { ...args, }); }, + async getHelpCenters(args = {}) { + return this._makeRequest({ + path: "/help_center", + ...args, + }); + }, + async getArticles({ + helpCenterId, ...args + } = {}) { + return this._makeRequest({ + path: `/help_center/${helpCenterId}/articles`, + ...args, + }); + }, + async getTickets(args = {}) { + return this._makeRequest({ + path: "/tickets", + ...args, + }); + }, }, }; diff --git a/components/trestle/package.json b/components/trestle/package.json index 68261a280e2f8..9d2501d16c4c8 100644 --- a/components/trestle/package.json +++ b/components/trestle/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/trestle", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Trestle Components", "main": "trestle.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/triggercmd/app/triggercmd.app.ts b/components/triggercmd/app/triggercmd.app.ts deleted file mode 100644 index 5aee310986af2..0000000000000 --- a/components/triggercmd/app/triggercmd.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "triggercmd", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/triggercmd/package.json b/components/triggercmd/package.json index 8c0960c526fe3..b24e600a48d94 100644 --- a/components/triggercmd/package.json +++ b/components/triggercmd/package.json @@ -1,18 +1,18 @@ { "name": "@pipedream/triggercmd", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream TRIGGERcmd Components", - "main": "dist/app/triggercmd.app.mjs", + "main": "triggercmd.app.mjs", "keywords": [ "pipedream", "triggercmd" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/triggercmd", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/trint/.gitignore b/components/trint/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/trint/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/trint/app/trint.app.ts b/components/trint/app/trint.app.ts deleted file mode 100644 index 73fc7b7e372f5..0000000000000 --- a/components/trint/app/trint.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "trint", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/trint/package.json b/components/trint/package.json index a1c2e86ea1c96..1c80cd7e4db41 100644 --- a/components/trint/package.json +++ b/components/trint/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/trint", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Trint Components", - "main": "dist/app/trint.app.mjs", + "main": "trint.app.mjs", "keywords": [ "pipedream", "trint" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/trint", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/trint/trint.app.mjs b/components/trint/trint.app.mjs new file mode 100644 index 0000000000000..d38ed0a29a4ed --- /dev/null +++ b/components/trint/trint.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "trint", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/trunkrs/actions/cancel-shipment/cancel-shipment.mjs b/components/trunkrs/actions/cancel-shipment/cancel-shipment.mjs new file mode 100644 index 0000000000000..8621b7830ed05 --- /dev/null +++ b/components/trunkrs/actions/cancel-shipment/cancel-shipment.mjs @@ -0,0 +1,26 @@ +import trunkrs from "../../trunkrs.app.mjs"; + +export default { + key: "trunkrs-cancel-shipment", + name: "Cancel Shipment", + description: "Cancel a shipment. [See the documentation](https://docs.trunkrs.nl/docs/v2-api-documentation/29cfeecfd2273-cancel-shipment)", + version: "0.0.1", + type: "action", + props: { + trunkrs, + trunkrsNr: { + propDefinition: [ + trunkrs, + "trunkrsNr", + ], + }, + }, + async run({ $ }) { + const { data } = await this.trunkrs.cancelShipment({ + $, + trunkrsNr: this.trunkrsNr, + }); + $.export("$summary", `Successfully cancelled shipment ${this.trunkrsNr}.`); + return data; + }, +}; diff --git a/components/trunkrs/actions/create-shipment/create-shipment.mjs b/components/trunkrs/actions/create-shipment/create-shipment.mjs new file mode 100644 index 0000000000000..48bc2ec7c4012 --- /dev/null +++ b/components/trunkrs/actions/create-shipment/create-shipment.mjs @@ -0,0 +1,148 @@ +import trunkrs from "../../trunkrs.app.mjs"; + +export default { + key: "trunkrs-create-shipment", + name: "Create Shipment", + description: "Create a new shipment. [See the documentation](https://docs.trunkrs.nl/docs/v2-api-documentation/85ba39933b755-create-shipment)", + version: "0.0.1", + type: "action", + props: { + trunkrs, + orderReference: { + type: "string", + label: "Order Reference", + description: "Internal order reference provided by customer, this must be unique", + }, + senderName: { + type: "string", + label: "Sender Name", + description: "The name of the sender", + }, + senderEmailAddress: { + type: "string", + label: "Sender Email Address", + description: "The email address of the sender", + }, + senderStreetAddress: { + type: "string", + label: "Sender Street Address", + description: "The street address of the sender", + }, + senderPostalCode: { + type: "string", + label: "Sender Postal Code", + description: "The postal code of the sender", + }, + senderCity: { + type: "string", + label: "Sender City", + description: "The city of the sender", + }, + senderCountry: { + propDefinition: [ + trunkrs, + "country", + ], + description: "The country of the sender", + }, + recipientName: { + type: "string", + label: "Recipient Name", + description: "The name of the recipient", + }, + recipientEmailAddress: { + type: "string", + label: "Recipient Email Address", + description: "The email address of the recipient", + }, + recipientStreetAddress: { + type: "string", + label: "Recipient Street Address", + description: "The street address of the recipient", + }, + recipientPostalCode: { + type: "string", + label: "Recipient Postal Code", + description: "The postal code of the recipient", + }, + recipientCity: { + type: "string", + label: "Recipient City", + description: "The city of the recipient", + }, + recipientCountry: { + propDefinition: [ + trunkrs, + "country", + ], + }, + parcelWeightUnit: { + type: "string", + label: "Parcel Weight Unit", + description: "The unit of weight for the parcels", + options: [ + "g", + "kg", + ], + }, + parcelWeights: { + type: "string[]", + label: "Parcel Weights", + description: "An array of weights for the parcels in the unit provided by the parcelWeightUnit prop", + }, + timeSlotId: { + propDefinition: [ + trunkrs, + "timeSlotId", + (c) => ({ + country: c.recipientCountry, + postalCode: c.recipientPostalCode, + }), + ], + }, + service: { + type: "string", + label: "Service", + description: "Specifies the service level of this parcel. To use the freezer service, set the value to SAME_DAY_FROZEN_FOOD.", + options: [ + "SAME_DAY", + "SAME_DAY_FROZEN_FOOD", + ], + optional: true, + }, + }, + async run({ $ }) { + const { data } = await this.trunkrs.createShipment({ + $, + data: { + orderReference: this.orderReference, + sender: { + name: this.senderName, + emailAddress: this.senderEmailAddress, + address: this.senderStreetAddress, + postalCode: this.senderPostalCode, + city: this.senderCity, + country: this.senderCountry, + }, + recipient: { + name: this.recipientName, + emailAddress: this.recipientEmailAddress, + address: this.recipientStreetAddress, + postalCode: this.recipientPostalCode, + city: this.recipientCity, + country: this.recipientCountry, + }, + parcel: this.parcelWeights.map((weight) => ({ + weight: { + unit: this.parcelWeightUnit, + value: +weight, + }, + })), + timeSlotId: this.timeSlotId, + service: this.service, + }, + }); + $.export("$summary", "Successfully created shipment."); + return data; + }, +}; diff --git a/components/trunkrs/actions/get-shipment-state/get-shipment-state.mjs b/components/trunkrs/actions/get-shipment-state/get-shipment-state.mjs new file mode 100644 index 0000000000000..b020cb14cdda9 --- /dev/null +++ b/components/trunkrs/actions/get-shipment-state/get-shipment-state.mjs @@ -0,0 +1,26 @@ +import trunkrs from "../../trunkrs.app.mjs"; + +export default { + key: "trunkrs-get-shipment-state", + name: "Get Shipment State", + description: "Get the state of a shipment. [See the documentation](https://docs.trunkrs.nl/docs/v2-api-documentation/47b5b585da6c9-get-status-for-specific-shipment)", + version: "0.0.1", + type: "action", + props: { + trunkrs, + trunkrsNr: { + propDefinition: [ + trunkrs, + "trunkrsNr", + ], + }, + }, + async run({ $ }) { + const { data } = await this.trunkrs.getShipmentState({ + $, + trunkrsNr: this.trunkrsNr, + }); + $.export("$summary", `Successfully fetched shipment state for ${this.trunkrsNr}.`); + return data; + }, +}; diff --git a/components/trunkrs/actions/get-shipment/get-shipment.mjs b/components/trunkrs/actions/get-shipment/get-shipment.mjs new file mode 100644 index 0000000000000..4fd087e2d6948 --- /dev/null +++ b/components/trunkrs/actions/get-shipment/get-shipment.mjs @@ -0,0 +1,26 @@ +import trunkrs from "../../trunkrs.app.mjs"; + +export default { + key: "trunkrs-get-shipment", + name: "Get Shipment", + description: "Get a shipment by its Trunkrs number. [See the documentation](https://docs.trunkrs.nl/docs/v2-api-documentation/34c6f57bded33-get-a-specific-shipment)", + version: "0.0.1", + type: "action", + props: { + trunkrs, + trunkrsNr: { + propDefinition: [ + trunkrs, + "trunkrsNr", + ], + }, + }, + async run({ $ }) { + const { data } = await this.trunkrs.getShipment({ + $, + trunkrsNr: this.trunkrsNr, + }); + $.export("$summary", `Successfully fetched shipment ${this.trunkrsNr}.`); + return data; + }, +}; diff --git a/components/trunkrs/actions/list-shipments/list-shipments.mjs b/components/trunkrs/actions/list-shipments/list-shipments.mjs new file mode 100644 index 0000000000000..8b069b7868ed9 --- /dev/null +++ b/components/trunkrs/actions/list-shipments/list-shipments.mjs @@ -0,0 +1,52 @@ +import trunkrs from "../../trunkrs.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "trunkrs-list-shipments", + name: "List Shipments", + description: "List all shipments. [See the documentation](https://docs.trunkrs.nl/docs/v2-api-documentation/b425314ab6c67-list-shipments)", + version: "0.0.1", + type: "action", + props: { + trunkrs, + sort: { + type: "string", + label: "Sort", + description: "The field to sort by. Fields prepended with a dash (-) are sorted in descending order.", + options: constants.SHIPMENT_SORT_FIELDS, + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of shipments to return. Default: 100", + default: 100, + optional: true, + }, + offset: { + type: "integer", + label: "Offset", + description: "The offset to start from. Default: 0", + optional: true, + }, + }, + async run({ $ }) { + const results = this.trunkrs.paginate({ + fn: this.trunkrs.listShipments, + args: { + $, + params: { + sort: this.sort, + offset: this.offset, + }, + }, + max: this.maxResults, + }); + + const shipments = []; + for await (const shipment of results) { + shipments.push(shipment); + } + $.export("$summary", `Successfully fetched ${shipments.length} shipments.`); + return shipments; + }, +}; diff --git a/components/trunkrs/actions/list-time-slots/list-time-slots.mjs b/components/trunkrs/actions/list-time-slots/list-time-slots.mjs new file mode 100644 index 0000000000000..71b58f189a11d --- /dev/null +++ b/components/trunkrs/actions/list-time-slots/list-time-slots.mjs @@ -0,0 +1,35 @@ +import trunkrs from "../../trunkrs.app.mjs"; + +export default { + key: "trunkrs-list-time-slots", + name: "List Time Slots", + description: "List time slots. [See the documentation](https://docs.trunkrs.nl/docs/v2-api-documentation/5f27080ea3314-list-time-slots)", + version: "0.0.1", + type: "action", + props: { + trunkrs, + country: { + propDefinition: [ + trunkrs, + "country", + ], + }, + postalCode: { + type: "string", + label: "Postal Code", + description: "The postal code of the recipient", + optional: true, + }, + }, + async run({ $ }) { + const { data } = await this.trunkrs.listTimeSlots({ + $, + params: { + country: this.country, + postalCode: this.postalCode, + }, + }); + $.export("$summary", `Successfully fetched ${data.length} time slots.`); + return data; + }, +}; diff --git a/components/trunkrs/common/constants.mjs b/components/trunkrs/common/constants.mjs new file mode 100644 index 0000000000000..3bb01e6a84496 --- /dev/null +++ b/components/trunkrs/common/constants.mjs @@ -0,0 +1,48 @@ +const COUNTRIES = [ + { + value: "NL", + label: "Netherlands", + }, + { + value: "BE", + label: "Belgium", + }, +]; + +const WEBHOOK_EVENTS = [ + "onStateUpdate", + "onCreation", + "onCancellation", + "onReview", +]; + +const SHIPMENT_SORT_FIELDS = [ + "trunkrsNr", + "-trunkrsNr", + "recipient.name", + "-recipient.name", + "orderReference", + "-orderReference", + "sender.companyName", + "-sender.companyName", + "sender.name", + "-sender.name", + "timeSlot.id", + "-timeSlot.id", + "timeSlot.cutOffTime", + "-timeSlot.cutOffTime", + "state.code", + "-state.code", + "state.reasonCode", + "-state.reasonCode", + "state.timeStamp", + "-state.timeStamp", + "service", + "-service", +]; + +export default { + COUNTRIES, + WEBHOOK_EVENTS, + SHIPMENT_SORT_FIELDS, +}; diff --git a/components/trunkrs/package.json b/components/trunkrs/package.json new file mode 100644 index 0000000000000..f609bc95a9fe5 --- /dev/null +++ b/components/trunkrs/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/trunkrs", + "version": "0.1.0", + "description": "Pipedream Trunkrs Components", + "main": "trunkrs.app.mjs", + "keywords": [ + "pipedream", + "trunkrs" + ], + "homepage": "https://pipedream.com/apps/trunkrs", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + } +} diff --git a/components/trunkrs/sources/common/base-webhook.mjs b/components/trunkrs/sources/common/base-webhook.mjs new file mode 100644 index 0000000000000..774056ec96e4b --- /dev/null +++ b/components/trunkrs/sources/common/base-webhook.mjs @@ -0,0 +1,56 @@ +import trunkrs from "../../trunkrs.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + props: { + trunkrs, + db: "$.service.db", + http: "$.interface.http", + }, + hooks: { + async activate() { + const { data } = await this.trunkrs.createWebhook({ + data: { + url: this.http.endpoint, + header: {}, + event: this.getEvent(), + }, + }); + this._setHookId(data.id); + }, + async deactivate() { + const hookId = this._getHookId(); + if (hookId) { + await this.trunkrs.deleteWebhook({ + webhookId: hookId, + }); + } + }, + }, + methods: { + _getHookId() { + return this.db.get("hookId"); + }, + _setHookId(hookId) { + this.db.set("hookId", hookId); + }, + generateMeta(event) { + return { + id: event.state.timestamp, + summary: `New ${this.getEvent()} event received`, + ts: Date.parse(event.state.timestamp), + }; + }, + getEvent() { + throw new ConfigurationError("getEvent is not implemented"); + }, + }, + async run(event) { + const { body } = event; + if (!body) { + return; + } + const meta = this.generateMeta(body); + this.$emit(body, meta); + }, +}; diff --git a/components/trunkrs/sources/new-shipment-created/new-shipment-created.mjs b/components/trunkrs/sources/new-shipment-created/new-shipment-created.mjs new file mode 100644 index 0000000000000..459396cf0cd7a --- /dev/null +++ b/components/trunkrs/sources/new-shipment-created/new-shipment-created.mjs @@ -0,0 +1,18 @@ +import common from "../common/base-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "trunkrs-new-shipment-created", + name: "New Shipment Created (Instant)", + description: "Emit new event when a new shipment is created. [See the documentation](https://docs.trunkrs.nl/docs/v2-api-documentation/05ac4fa1b9ade-create-webhook-subscription)", + version: "0.0.1", + type: "source", + methods: { + ...common.methods, + getEvent() { + return "onCreation"; + }, + }, + sampleEmit, +}; diff --git a/components/trunkrs/sources/new-shipment-created/test-event.mjs b/components/trunkrs/sources/new-shipment-created/test-event.mjs new file mode 100644 index 0000000000000..69d0245af10f5 --- /dev/null +++ b/components/trunkrs/sources/new-shipment-created/test-event.mjs @@ -0,0 +1,10 @@ +export default { + trunkrsNr: 3256906, + orderReference: '36273459471', + link: 'https://staging-api.trunkrs.nl/api/v2/shipments/3256906', + state: { + code: 'DATA_PROCESSED', + timestamp: '2025-08-22T19:43:27.414Z', + currentOwner: { type: 'MERCHANT', name: "Satterfield, Stehr and O'Keefe" } + } +} \ No newline at end of file diff --git a/components/trunkrs/sources/shipment-cancelled/shipment-cancelled.mjs b/components/trunkrs/sources/shipment-cancelled/shipment-cancelled.mjs new file mode 100644 index 0000000000000..73be743d76b17 --- /dev/null +++ b/components/trunkrs/sources/shipment-cancelled/shipment-cancelled.mjs @@ -0,0 +1,18 @@ +import common from "../common/base-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "trunkrs-shipment-cancelled", + name: "Shipment Cancelled (Instant)", + description: "Emit new event when a shipment is cancelled. [See the documentation](https://docs.trunkrs.nl/docs/v2-api-documentation/05ac4fa1b9ade-create-webhook-subscription)", + version: "0.0.1", + type: "source", + methods: { + ...common.methods, + getEvent() { + return "onCancellation"; + }, + }, + sampleEmit, +}; diff --git a/components/trunkrs/sources/shipment-cancelled/test-event.mjs b/components/trunkrs/sources/shipment-cancelled/test-event.mjs new file mode 100644 index 0000000000000..3920ea3ebdd9f --- /dev/null +++ b/components/trunkrs/sources/shipment-cancelled/test-event.mjs @@ -0,0 +1,10 @@ +export default { + trunkrsNr: 3299275, + orderReference: '30261842310', + link: 'https://staging-api.trunkrs.nl/api/v2/shipments/3299275', + state: { + code: 'DATA_PROCESSED', + timestamp: '2025-08-22T19:44:27.224Z', + currentOwner: { type: 'MERCHANT', name: 'Harris Group' } + } +} \ No newline at end of file diff --git a/components/trunkrs/sources/shipment-reviewed/shipment-reviewed.mjs b/components/trunkrs/sources/shipment-reviewed/shipment-reviewed.mjs new file mode 100644 index 0000000000000..30cbf63b559f8 --- /dev/null +++ b/components/trunkrs/sources/shipment-reviewed/shipment-reviewed.mjs @@ -0,0 +1,18 @@ +import common from "../common/base-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "trunkrs-shipment-reviewed", + name: "Shipment Reviewed (Instant)", + description: "Emit new event when a shipment is reviewed. [See the documentation](https://docs.trunkrs.nl/docs/v2-api-documentation/05ac4fa1b9ade-create-webhook-subscription)", + version: "0.0.1", + type: "source", + methods: { + ...common.methods, + getEvent() { + return "onReview"; + }, + }, + sampleEmit, +}; diff --git a/components/trunkrs/sources/shipment-reviewed/test-event.mjs b/components/trunkrs/sources/shipment-reviewed/test-event.mjs new file mode 100644 index 0000000000000..ab29c9c6fac68 --- /dev/null +++ b/components/trunkrs/sources/shipment-reviewed/test-event.mjs @@ -0,0 +1,10 @@ +export default { + trunkrsNr: 3618093, + orderReference: '34857013133', + link: 'https://staging-api.trunkrs.nl/api/v2/shipments/3618093', + state: { + code: 'DATA_PROCESSED', + timestamp: '2025-08-22T19:41:05.213Z', + currentOwner: { type: 'MERCHANT', name: 'Zboncak, Kautzer and Gottlieb' } + } +} \ No newline at end of file diff --git a/components/trunkrs/sources/shipment-state-updated/shipment-state-updated.mjs b/components/trunkrs/sources/shipment-state-updated/shipment-state-updated.mjs new file mode 100644 index 0000000000000..df5f415638ce2 --- /dev/null +++ b/components/trunkrs/sources/shipment-state-updated/shipment-state-updated.mjs @@ -0,0 +1,18 @@ +import common from "../common/base-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "trunkrs-shipment-state-updated", + name: "Shipment State Updated (Instant)", + description: "Emit new event when a shipment state is updated. [See the documentation](https://docs.trunkrs.nl/docs/v2-api-documentation/05ac4fa1b9ade-create-webhook-subscription)", + version: "0.0.1", + type: "source", + methods: { + ...common.methods, + getEvent() { + return "onStateUpdate"; + }, + }, + sampleEmit, +}; diff --git a/components/trunkrs/sources/shipment-state-updated/test-event.mjs b/components/trunkrs/sources/shipment-state-updated/test-event.mjs new file mode 100644 index 0000000000000..79f25ecd9c4b0 --- /dev/null +++ b/components/trunkrs/sources/shipment-state-updated/test-event.mjs @@ -0,0 +1,10 @@ +export default { + trunkrsNr: 3859236, + orderReference: '30260933596', + link: 'https://staging-api.trunkrs.nl/api/v2/shipments/3859236', + state: { + code: 'DATA_PROCESSED', + timestamp: '2025-08-22T19:42:18.334Z', + currentOwner: { type: 'MERCHANT', name: 'Turcotte, Stamm and Purdy' } + } +} \ No newline at end of file diff --git a/components/trunkrs/trunkrs.app.mjs b/components/trunkrs/trunkrs.app.mjs new file mode 100644 index 0000000000000..be3a8f17c80cd --- /dev/null +++ b/components/trunkrs/trunkrs.app.mjs @@ -0,0 +1,157 @@ +import { axios } from "@pipedream/platform"; +import constants from "./common/constants.mjs"; +const DEFAULT_LIMIT = 100; + +export default { + type: "app", + app: "trunkrs", + propDefinitions: { + trunkrsNr: { + type: "string", + label: "Trunkrs Number", + description: "The Trunkrs number of the shipment", + async options({ page }) { + const { data } = await this.listShipments({ + params: { + limit: DEFAULT_LIMIT, + offset: page * DEFAULT_LIMIT, + }, + }); + return data?.map((shipment) => ({ + label: shipment.orderReference, + value: shipment.trunkrsNr, + })) || []; + }, + }, + timeSlotId: { + type: "string", + label: "Time Slot ID", + description: "The ID of the time slot to use for the shipment", + optional: true, + async options({ + country, postalCode, + }) { + const { data } = await this.listTimeSlots({ + params: { + country, + postalCode, + }, + }); + return data.map(({ + id, merchant, deliveryWindow, + }) => ({ + label: `${merchant.name} - ${deliveryWindow.start} - ${deliveryWindow.end}`, + value: id, + }) ); + }, + }, + country: { + type: "string", + label: "Country", + description: "The country of the sender", + options: constants.COUNTRIES, + }, + }, + methods: { + _baseUrl() { + return `${this.$auth.environment}/api/v2`; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: { + "x-api-key": `${this.$auth.api_key}`, + }, + ...opts, + }); + }, + createWebhook(opts = {}) { + return this._makeRequest({ + path: "/webhooks", + method: "POST", + ...opts, + }); + }, + deleteWebhook({ + webhookId, ...opts + }) { + return this._makeRequest({ + path: `/webhooks/${webhookId}`, + method: "DELETE", + ...opts, + }); + }, + getShipment({ + trunkrsNr, ...opts + }) { + return this._makeRequest({ + path: `/shipments/${trunkrsNr}`, + ...opts, + }); + }, + getShipmentState({ + trunkrsNr, ...opts + }) { + return this._makeRequest({ + path: `/shipments/${trunkrsNr}/status`, + ...opts, + }); + }, + listShipments(opts = {}) { + return this._makeRequest({ + path: "/shipments", + ...opts, + }); + }, + listTimeSlots(opts = {}) { + return this._makeRequest({ + path: "/timeslots", + ...opts, + }); + }, + createShipment(opts = {}) { + return this._makeRequest({ + path: "/shipments", + method: "POST", + ...opts, + }); + }, + cancelShipment({ + trunkrsNr, ...opts + }) { + return this._makeRequest({ + path: `/shipments/${trunkrsNr}`, + method: "DELETE", + ...opts, + }); + }, + async *paginate({ + fn, args, max, + }) { + args = { + ...args, + params: { + ...args?.params, + limit: DEFAULT_LIMIT, + }, + }; + let total, count = 0; + do { + const { data } = await fn(args); + total = data?.length; + if (!data?.length) { + return; + } + for (const item of data) { + yield item; + if (max && ++count >= max) { + return; + } + } + args.params.offset += args.params.limit; + } while (total === args.params.limit); + }, + }, +}; diff --git a/components/trustpilot/.gitignore b/components/trustpilot/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/trustpilot/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/trustpilot/actions/fetch-product-review-by-id/fetch-product-review-by-id.mjs b/components/trustpilot/actions/fetch-product-review-by-id/fetch-product-review-by-id.mjs new file mode 100644 index 0000000000000..8360d522e88b1 --- /dev/null +++ b/components/trustpilot/actions/fetch-product-review-by-id/fetch-product-review-by-id.mjs @@ -0,0 +1,39 @@ +import trustpilot from "../../trustpilot.app.mjs"; + +export default { + key: "trustpilot-fetch-product-review-by-id", + name: "Fetch Product Review by ID", + description: "Retrieves detailed information about a specific product review on Trustpilot. Use this action to get comprehensive data about a single product review, including customer feedback, star rating, review text, and metadata. Perfect for analyzing individual customer experiences, responding to specific feedback, or integrating review data into your customer service workflows. [See the documentation](https://developers.trustpilot.com/product-reviews-api#get-private-product-review)", + version: "0.0.3", + type: "action", + props: { + trustpilot, + reviewId: { + propDefinition: [ + trustpilot, + "reviewId", + ], + }, + }, + async run({ $ }) { + const { reviewId } = this; + + try { + const review = await this.trustpilot.getProductReviewById({ + reviewId, + }); + + $.export("$summary", `Successfully fetched product review ${reviewId}`); + + return { + review, + metadata: { + reviewId, + requestTime: new Date().toISOString(), + }, + }; + } catch (error) { + throw new Error(`Failed to fetch product review: ${error.message}`); + } + }, +}; diff --git a/components/trustpilot/actions/fetch-product-reviews/fetch-product-reviews.mjs b/components/trustpilot/actions/fetch-product-reviews/fetch-product-reviews.mjs new file mode 100644 index 0000000000000..5a19583331584 --- /dev/null +++ b/components/trustpilot/actions/fetch-product-reviews/fetch-product-reviews.mjs @@ -0,0 +1,111 @@ +import trustpilot from "../../trustpilot.app.mjs"; + +export default { + key: "trustpilot-fetch-product-reviews", + name: "Fetch Product Reviews", + description: "Retrieves a list of product reviews for a specific business unit on Trustpilot. This action enables you to fetch multiple product reviews with powerful filtering options including star ratings, language, tags, and sorting preferences. Ideal for monitoring product feedback trends, generating reports, analyzing customer sentiment across your product catalog, or building review dashboards. Supports pagination for handling large review volumes. [See the documentation](https://developers.trustpilot.com/product-reviews-api#get-private-product-reviews)", + version: "0.0.3", + type: "action", + props: { + trustpilot, + businessUnitId: { + propDefinition: [ + trustpilot, + "businessUnitId", + ], + }, + stars: { + propDefinition: [ + trustpilot, + "stars", + ], + }, + sortBy: { + propDefinition: [ + trustpilot, + "sortBy", + ], + }, + limit: { + propDefinition: [ + trustpilot, + "limit", + ], + }, + includeReportedReviews: { + propDefinition: [ + trustpilot, + "includeReportedReviews", + ], + }, + tags: { + propDefinition: [ + trustpilot, + "tags", + ], + }, + language: { + propDefinition: [ + trustpilot, + "language", + ], + }, + offset: { + type: "integer", + label: "Offset", + description: "Number of results to skip (for pagination)", + min: 0, + default: 0, + optional: true, + }, + }, + async run({ $ }) { + const { + businessUnitId, + stars, + sortBy, + limit, + includeReportedReviews, + tags, + language, + offset, + } = this; + + try { + const result = await this.trustpilot.getProductReviews({ + businessUnitId, + stars, + sortBy, + limit, + includeReportedReviews, + tags, + language, + offset, + }); + + const { + reviews, pagination, + } = result; + + $.export("$summary", `Successfully fetched ${reviews.length} product review(s) for business unit ${businessUnitId}`); + + return { + reviews, + pagination, + metadata: { + businessUnitId, + filters: { + stars, + sortBy, + includeReportedReviews, + tags, + language, + }, + requestTime: new Date().toISOString(), + }, + }; + } catch (error) { + throw new Error(`Failed to fetch product reviews: ${error.message}`); + } + }, +}; diff --git a/components/trustpilot/actions/fetch-service-review-by-id/fetch-service-review-by-id.mjs b/components/trustpilot/actions/fetch-service-review-by-id/fetch-service-review-by-id.mjs new file mode 100644 index 0000000000000..539ec50372681 --- /dev/null +++ b/components/trustpilot/actions/fetch-service-review-by-id/fetch-service-review-by-id.mjs @@ -0,0 +1,50 @@ +import trustpilot from "../../trustpilot.app.mjs"; + +export default { + key: "trustpilot-fetch-service-review-by-id", + name: "Fetch Service Review by ID", + description: "Retrieves detailed information about a specific service review for your business on Trustpilot. Use this action to access comprehensive data about an individual service review, including the customer's rating, review content, date, and any responses. Essential for customer service teams to analyze specific feedback, track review history, or integrate individual review data into CRM systems and support tickets. [See the documentation](https://developers.trustpilot.com/business-units-api#get-business-unit-review)", + version: "0.0.3", + type: "action", + props: { + trustpilot, + businessUnitId: { + propDefinition: [ + trustpilot, + "businessUnitId", + ], + }, + reviewId: { + propDefinition: [ + trustpilot, + "reviewId", + ], + }, + }, + async run({ $ }) { + const { + businessUnitId, + reviewId, + } = this; + + try { + const review = await this.trustpilot.getServiceReviewById({ + businessUnitId, + reviewId, + }); + + $.export("$summary", `Successfully fetched service review ${reviewId} for business unit ${businessUnitId}`); + + return { + review, + metadata: { + businessUnitId, + reviewId, + requestTime: new Date().toISOString(), + }, + }; + } catch (error) { + throw new Error(`Failed to fetch service review: ${error.message}`); + } + }, +}; diff --git a/components/trustpilot/actions/fetch-service-reviews/fetch-service-reviews.mjs b/components/trustpilot/actions/fetch-service-reviews/fetch-service-reviews.mjs new file mode 100644 index 0000000000000..8408483dc736a --- /dev/null +++ b/components/trustpilot/actions/fetch-service-reviews/fetch-service-reviews.mjs @@ -0,0 +1,111 @@ +import trustpilot from "../../trustpilot.app.mjs"; + +export default { + key: "trustpilot-fetch-service-reviews", + name: "Fetch Service Reviews", + description: "Fetches service reviews for a specific business unit from Trustpilot with support for filtering by star rating, tags, language, and more. [See the documentation](https://developers.trustpilot.com/business-units-api#get-business-unit-reviews)", + version: "0.0.3", + type: "action", + props: { + trustpilot, + businessUnitId: { + propDefinition: [ + trustpilot, + "businessUnitId", + ], + }, + stars: { + propDefinition: [ + trustpilot, + "stars", + ], + }, + sortBy: { + propDefinition: [ + trustpilot, + "sortBy", + ], + }, + limit: { + propDefinition: [ + trustpilot, + "limit", + ], + }, + includeReportedReviews: { + propDefinition: [ + trustpilot, + "includeReportedReviews", + ], + }, + tags: { + propDefinition: [ + trustpilot, + "tags", + ], + }, + language: { + propDefinition: [ + trustpilot, + "language", + ], + }, + offset: { + type: "integer", + label: "Offset", + description: "Number of results to skip (for pagination)", + min: 0, + default: 0, + optional: true, + }, + }, + async run({ $ }) { + const { + businessUnitId, + stars, + sortBy, + limit, + includeReportedReviews, + tags, + language, + offset, + } = this; + + try { + const result = await this.trustpilot.getServiceReviews({ + businessUnitId, + stars, + sortBy, + limit, + includeReportedReviews, + tags, + language, + offset, + }); + + const { + reviews, pagination, + } = result; + + $.export("$summary", `Successfully fetched ${reviews.length} service review(s) for business unit ${businessUnitId}`); + + return { + reviews, + pagination, + metadata: { + businessUnitId, + filters: { + stars, + sortBy, + includeReportedReviews, + tags, + language, + }, + requestTime: new Date().toISOString(), + }, + }; + } catch (error) { + throw new Error(`Failed to fetch service reviews: ${error.message}`); + } + }, +}; diff --git a/components/trustpilot/actions/reply-to-product-review/reply-to-product-review.mjs b/components/trustpilot/actions/reply-to-product-review/reply-to-product-review.mjs new file mode 100644 index 0000000000000..527c9d6af84b3 --- /dev/null +++ b/components/trustpilot/actions/reply-to-product-review/reply-to-product-review.mjs @@ -0,0 +1,51 @@ +import { ConfigurationError } from "@pipedream/platform"; +import trustpilot from "../../trustpilot.app.mjs"; + +export default { + key: "trustpilot-reply-to-product-review", + name: "Reply to Product Review", + description: "Posts a public reply to a product review on Trustpilot on behalf of your business. This action allows you to respond to customer feedback, address concerns, thank customers for positive reviews, or provide additional information about products. Replies help demonstrate your commitment to customer satisfaction and can improve your overall reputation. Note that replies are publicly visible and cannot be edited once posted. [See the documentation](https://developers.trustpilot.com/product-reviews-api#reply-to-product-review)", + version: "0.0.3", + type: "action", + props: { + trustpilot, + reviewId: { + propDefinition: [ + trustpilot, + "reviewId", + ], + }, + message: { + type: "string", + label: "Reply Message", + description: "The message to reply to the review with", + }, + }, + async run({ $ }) { + const { + reviewId, + message, + } = this; + + if (!message || message.trim().length === 0) { + throw new ConfigurationError("Reply message cannot be empty"); + } + + const result = await this.trustpilot.replyToProductReview({ + reviewId, + message: message.trim(), + }); + + $.export("$summary", `Successfully replied to product review ${reviewId}`); + + return { + success: true, + reply: result, + metadata: { + reviewId, + messageLength: message.trim().length, + requestTime: new Date().toISOString(), + }, + }; + }, +}; diff --git a/components/trustpilot/actions/reply-to-service-review/reply-to-service-review.mjs b/components/trustpilot/actions/reply-to-service-review/reply-to-service-review.mjs new file mode 100644 index 0000000000000..fdc8b71e01360 --- /dev/null +++ b/components/trustpilot/actions/reply-to-service-review/reply-to-service-review.mjs @@ -0,0 +1,60 @@ +import { ConfigurationError } from "@pipedream/platform"; +import trustpilot from "../../trustpilot.app.mjs"; + +export default { + key: "trustpilot-reply-to-service-review", + name: "Reply to Service Review", + description: "Posts a public reply to a service review on Trustpilot on behalf of your business. This action enables you to engage with customers who have reviewed your services, allowing you to address complaints, clarify misunderstandings, express gratitude for positive feedback, or provide updates on how you're improving based on their input. Professional responses to reviews can significantly impact your business reputation and show potential customers that you value feedback. Remember that all replies are permanent and publicly visible. [See the documentation](https://developers.trustpilot.com/business-units-api#reply-to-review)", + version: "0.0.3", + type: "action", + props: { + trustpilot, + businessUnitId: { + propDefinition: [ + trustpilot, + "businessUnitId", + ], + }, + reviewId: { + propDefinition: [ + trustpilot, + "reviewId", + ], + }, + message: { + type: "string", + label: "Reply Message", + description: "The message to reply to the review with", + }, + }, + async run({ $ }) { + const { + businessUnitId, + reviewId, + message, + } = this; + + if (!message || message.trim().length === 0) { + throw new ConfigurationError("Reply message cannot be empty"); + } + + const result = await this.trustpilot.replyToServiceReview({ + businessUnitId, + reviewId, + message: message.trim(), + }); + + $.export("$summary", `Successfully replied to service review ${reviewId}`); + + return { + success: true, + reply: result, + metadata: { + businessUnitId, + reviewId, + messageLength: message.trim().length, + requestTime: new Date().toISOString(), + }, + }; + }, +}; diff --git a/components/trustpilot/app/trustpilot.app.ts b/components/trustpilot/app/trustpilot.app.ts deleted file mode 100644 index 3f00f2e9d4a85..0000000000000 --- a/components/trustpilot/app/trustpilot.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "trustpilot", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/trustpilot/common/constants.mjs b/components/trustpilot/common/constants.mjs new file mode 100644 index 0000000000000..d993e6bb5b0b9 --- /dev/null +++ b/components/trustpilot/common/constants.mjs @@ -0,0 +1,112 @@ +export const BASE_URL = "https://api.trustpilot.com/v1"; + +export const WEBHOOK_EVENTS = { + REVIEW_CREATED: "review.created", + REVIEW_REVISED: "review.revised", + REVIEW_DELETED: "review.deleted", + REPLY_CREATED: "reply.created", + INVITATION_SENT: "invitation.sent", + INVITATION_FAILED: "invitation.failed", +}; + +export const ENDPOINTS = { + // Business Units + BUSINESS_UNITS: "/business-units", + BUSINESS_UNIT_BY_ID: "/business-units/{businessUnitId}", + + // Public Reviews + PUBLIC_REVIEWS: "/business-units/{businessUnitId}/reviews", + PUBLIC_REVIEW_BY_ID: "/business-units/{businessUnitId}/reviews/{reviewId}", + + // Private Reviews (Service) + PRIVATE_SERVICE_REVIEWS: "/private/business-units/{businessUnitId}/reviews", + PRIVATE_SERVICE_REVIEW_BY_ID: "/private/business-units/{businessUnitId}/reviews/{reviewId}", + REPLY_TO_SERVICE_REVIEW: "/private/business-units/{businessUnitId}/reviews/{reviewId}/reply", + + // Public Reviews (Product) + PUBLIC_PRODUCT_REVIEWS: "/product-reviews/business-units/{businessUnitId}/reviews", + PUBLIC_PRODUCT_REVIEW_BY_ID: "/product-reviews/{reviewId}", + + // Private Reviews (Product) + PRIVATE_PRODUCT_REVIEWS: "/private/product-reviews/business-units/{businessUnitId}/reviews", + PRIVATE_PRODUCT_REVIEW_BY_ID: "/private/product-reviews/{reviewId}", + REPLY_TO_PRODUCT_REVIEW: "/private/product-reviews/{reviewId}/reply", + + // Conversations + CONVERSATIONS: "/private/conversations", + CONVERSATION_BY_ID: "/private/conversations/{conversationId}", + REPLY_TO_CONVERSATION: "/private/conversations/{conversationId}/reply", + + // Invitations + EMAIL_INVITATIONS: "/private/business-units/{businessUnitId}/email-invitations", + + // Webhooks + // Note: This integration uses polling sources instead of webhooks for better reliability + // and simpler implementation. Webhook signature validation is implemented in the app + // using HMAC-SHA256 with the x-trustpilot-signature header for future webhook sources. + // These endpoints and validation methods are ready for webhook implementation if needed. + WEBHOOKS: "/private/webhooks", + WEBHOOK_BY_ID: "/private/webhooks/{webhookId}", +}; + +export const REVIEW_TYPES = { + SERVICE: "service", + PRODUCT: "product", +}; + +export const INVITATION_TYPES = { + REVIEW: "review", + PRODUCT_REVIEW: "product-review", +}; + +export const SORT_OPTIONS = { + CREATED_AT_ASC: "createdat.asc", + CREATED_AT_DESC: "createdat.desc", + STARS_ASC: "stars.asc", + STARS_DESC: "stars.desc", + UPDATED_AT_ASC: "updatedat.asc", + UPDATED_AT_DESC: "updatedat.desc", +}; + +export const RATING_SCALE = [ + 1, + 2, + 3, + 4, + 5, +]; + +export const DEFAULT_LIMIT = 20; +export const MAX_LIMIT = 100; + +export const HTTP_STATUS = { + OK: 200, + CREATED: 201, + NO_CONTENT: 204, + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + FORBIDDEN: 403, + NOT_FOUND: 404, + TOO_MANY_REQUESTS: 429, + INTERNAL_SERVER_ERROR: 500, +}; + +export const RETRY_CONFIG = { + MAX_RETRIES: 3, + INITIAL_DELAY: 1000, + MAX_DELAY: 10000, +}; + +export const POLLING_CONFIG = { + DEFAULT_TIMER_INTERVAL_SECONDS: 15 * 60, // 15 minutes + MAX_ITEMS_PER_POLL: 100, + LOOKBACK_HOURS: 24, // How far back to look on first run +}; + +export const SOURCE_TYPES = { + NEW_REVIEWS: "new_reviews", + UPDATED_REVIEWS: "updated_reviews", + NEW_REPLIES: "new_replies", + NEW_CONVERSATIONS: "new_conversations", + UPDATED_CONVERSATIONS: "updated_conversations", +}; diff --git a/components/trustpilot/common/utils.mjs b/components/trustpilot/common/utils.mjs new file mode 100644 index 0000000000000..20677e7cac566 --- /dev/null +++ b/components/trustpilot/common/utils.mjs @@ -0,0 +1,225 @@ +/** + * Escape HTML special characters to prevent XSS + * @param {string} text - Text to escape + * @returns {string} - Escaped text + */ +export function escapeHtml(text) { + if (!text) return text; + const map = { + "&": "&", + "<": "<", + ">": ">", + "\"": """, + "'": "'", + "/": "/", + }; + const reg = /[&<>"'/]/g; + return text.toString().replace(reg, (match) => map[match]); +} + +/** + * Sanitize input text by removing potentially harmful content + * @param {string} text - Text to sanitize + * @param {number} maxLength - Maximum allowed length + * @returns {string} - Sanitized text + */ +export function sanitizeInput(text, maxLength = 5000) { + if (!text) return ""; + + // Convert to string and trim + let sanitized = String(text).trim(); + + // Remove control characters except newlines and tabs + // Using Unicode property escapes for safer regex + // eslint-disable-next-line no-control-regex + sanitized = sanitized.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g, ""); + + // Limit length + if (sanitized.length > maxLength) { + sanitized = sanitized.substring(0, maxLength); + } + + return sanitized; +} + +/** + * Build URL from endpoint template and parameters + * @param {string} endpoint - Endpoint template with placeholders + * @param {object} params - Parameters to replace in the endpoint + * @returns {string} - Complete URL with parameters replaced + */ +export function buildUrl(endpoint, params = {}) { + let url = endpoint; + + // Replace path parameters with proper escaping + Object.entries(params).forEach(([ + key, + value, + ]) => { + const placeholder = `{${key}}`; + // Use split/join to avoid regex issues and encode the value + url = url.split(placeholder).join(encodeURIComponent(String(value))); + }); + + return url; +} + +/** + * Parse Trustpilot review data + * @param {object} review - Raw review data from API + * @returns {object} - Parsed review data + */ +export function parseReview(review) { + return { + id: review.id, + stars: review.stars, + title: escapeHtml(review.title), + text: escapeHtml(review.text), + language: review.language, + location: escapeHtml(review.location), + tags: review.tags || [], + createdAt: review.createdAt, + updatedAt: review.updatedAt, + consumer: { + id: review.consumer?.id, + displayName: escapeHtml(review.consumer?.displayName), + numberOfReviews: review.consumer?.numberOfReviews, + }, + company: { + reply: review.companyReply + ? { + text: escapeHtml(review.companyReply.text), + createdAt: review.companyReply.createdAt, + } + : null, + }, + imported: review.imported || false, + verified: review.verified || false, + url: review.url, + }; +} + +/** + * Parse Trustpilot business unit data + * @param {object} businessUnit - Raw business unit data from API + * @returns {object} - Parsed business unit data + */ +export function parseBusinessUnit(businessUnit) { + return { + id: businessUnit.id, + displayName: businessUnit.displayName, + identifyingName: businessUnit.identifyingName, + trustScore: businessUnit.trustScore, + stars: businessUnit.stars, + numberOfReviews: businessUnit.numberOfReviews, + profileUrl: businessUnit.profileUrl, + websiteUrl: businessUnit.websiteUrl, + country: businessUnit.country, + status: businessUnit.status, + createdAt: businessUnit.createdAt, + categories: businessUnit.categories || [], + images: businessUnit.images || [], + }; +} + +/** + * Parse webhook payload + * @param {object} payload - Raw webhook payload + * @returns {object} - Parsed webhook data + */ +export function parseWebhookPayload(payload) { + const { + event, data, + } = payload; + + return { + event: event?.type || payload.eventType, + timestamp: event?.timestamp || payload.timestamp, + businessUnitId: data?.businessUnit?.id || payload.businessUnitId, + reviewId: data?.review?.id || payload.reviewId, + consumerId: data?.consumer?.id || payload.consumerId, + data: data || payload.data, + raw: payload, + }; +} + +/** + * Validate business unit ID format + * @param {string} businessUnitId - Business unit ID to validate + * @returns {boolean} - Whether the ID is valid + */ +export function validateBusinessUnitId(businessUnitId) { + // Trustpilot Business Unit IDs are 24-character hexadecimal strings (MongoDB ObjectID format) + return ( + typeof businessUnitId === "string" && + /^[a-f0-9]{24}$/.test(businessUnitId) + ); +} + +/** + * Validate review ID format + * @param {string} reviewId - Review ID to validate + * @returns {boolean} - Whether the ID is valid + */ +export function validateReviewId(reviewId) { + // Trustpilot Review IDs are 24-character hexadecimal strings (MongoDB ObjectID format) + return ( + typeof reviewId === "string" && + /^[a-f0-9]{24}$/.test(reviewId) + ); +} + +/** + * Format query parameters for API requests + * @param {object} params - Query parameters + * @returns {object} - Formatted parameters + */ +export function formatQueryParams(params) { + const formatted = {}; + + Object.entries(params).forEach(([ + key, + value, + ]) => { + if (value !== null && value !== undefined && value !== "") { + formatted[key] = value; + } + }); + + return formatted; +} + +/** + * Parse error response from Trustpilot API + * @param {object} error - Error object from API + * @returns {object} - Parsed error + */ +export function parseApiError(error) { + if (error.response) { + const { + status, data, + } = error.response; + return { + status, + message: data?.message || data?.error || "API Error", + details: data?.details || data?.errors || [], + code: data?.code || `HTTP_${status}`, + }; + } + + return { + status: 0, + message: error.message || "Unknown error", + details: [], + code: "UNKNOWN_ERROR", + }; +} + +/** + * Sleep function for retry logic + * @param {number} ms - Milliseconds to sleep + * @returns {Promise} - Promise that resolves after delay + */ +export function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} diff --git a/components/trustpilot/package.json b/components/trustpilot/package.json index 4f83c4cbf38e1..7e03ac2b66435 100644 --- a/components/trustpilot/package.json +++ b/components/trustpilot/package.json @@ -1,16 +1,18 @@ { "name": "@pipedream/trustpilot", - "version": "0.0.1", + "version": "0.1.3", "description": "Pipedream Trustpilot Components", - "main": "dist/app/trustpilot.app.mjs", + "main": "trustpilot.app.mjs", "keywords": [ "pipedream", "trustpilot" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/trustpilot", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/trustpilot/sources/common/polling.mjs b/components/trustpilot/sources/common/polling.mjs new file mode 100644 index 0000000000000..2af5b59d4c30a --- /dev/null +++ b/components/trustpilot/sources/common/polling.mjs @@ -0,0 +1,188 @@ +import trustpilot from "../../trustpilot.app.mjs"; +import { + POLLING_CONFIG, SOURCE_TYPES, +} from "../../common/constants.mjs"; + +/** + * Base polling source for Trustpilot integration + * + * This integration uses polling instead of webhooks for the following reasons: + * 1. Better reliability - polling ensures no events are missed + * 2. Simpler implementation - no need for webhook endpoint management + * 3. Consistent data retrieval - can backfill historical data if needed + * 4. Works with all authentication methods (API key and OAuth) + * + * All sources poll every 15 minutes by default and maintain deduplication + * to ensure events are only emitted once. + */ +export default { + props: { + trustpilot, + db: "$.service.db", + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: POLLING_CONFIG.DEFAULT_TIMER_INTERVAL_SECONDS, + }, + }, + businessUnitId: { + propDefinition: [ + trustpilot, + "businessUnitId", + ], + optional: true, + description: "Business Unit ID to filter events for. If not provided, will receive events for all business units.", + }, + }, + methods: { + _getLastPolled() { + return this.db.get("lastPolled"); + }, + _setLastPolled(timestamp) { + this.db.set("lastPolled", timestamp); + }, + _getSeenItems() { + return this.db.get("seenItems") || {}; + }, + _setSeenItems(seenItems) { + this.db.set("seenItems", seenItems); + }, + _cleanupSeenItems(seenItems, hoursToKeep = 72) { + const cutoff = Date.now() - (hoursToKeep * 60 * 60 * 1000); + const cleaned = {}; + + Object.entries(seenItems).forEach(([ + key, + timestamp, + ]) => { + if (timestamp > cutoff) { + cleaned[key] = timestamp; + } + }); + + return cleaned; + }, + getSourceType() { + // Override in child classes + return SOURCE_TYPES.NEW_REVIEWS; + }, + getPollingMethod() { + // Override in child classes to return the app method to call + throw new Error("getPollingMethod must be implemented in child class"); + }, + getPollingParams() { + // Override in child classes to return method-specific parameters + return { + businessUnitId: this.businessUnitId, + limit: POLLING_CONFIG.MAX_ITEMS_PER_POLL, + sortBy: "createdat.desc", // Most recent first + }; + }, + isNewItem(item, sourceType) { + // For "new" sources, check creation date + // For "updated" sources, check update date + const itemDate = sourceType.includes("updated") + ? new Date(item.updatedAt) + : new Date(item.createdAt || item.updatedAt); + + const lastPolled = this._getLastPolled(); + return !lastPolled || itemDate > new Date(lastPolled); + }, + generateDedupeKey(item, sourceType) { + // Create unique key: itemId + relevant timestamp + const timestamp = sourceType.includes("updated") + ? item.updatedAt + : (item.createdAt || item.updatedAt); + + return `${item.id}_${timestamp}`; + }, + generateMeta(item, sourceType) { + const dedupeKey = this.generateDedupeKey(item, sourceType); + const summary = this.generateSummary(item); + const timestamp = sourceType.includes("updated") + ? item.updatedAt + : (item.createdAt || item.updatedAt); + + return { + id: dedupeKey, + summary, + ts: new Date(timestamp).getTime(), + }; + }, + generateSummary(item) { + // Override in child classes for specific summaries + return `${this.getSourceType()} - ${item.id}`; + }, + async fetchItems() { + const method = this.getPollingMethod(); + const params = this.getPollingParams(); + + try { + const result = await this.trustpilot[method](params); + + // Handle different response formats + if (result.reviews) { + return result.reviews; + } else if (result.conversations) { + return result.conversations; + } else if (Array.isArray(result)) { + return result; + } else { + return []; + } + } catch (error) { + console.error(`Error fetching items with ${method}:`, error); + throw error; + } + }, + async pollForItems() { + const sourceType = this.getSourceType(); + const lastPolled = this._getLastPolled(); + const seenItems = this._getSeenItems(); + + // If first run, look back 24 hours + const lookbackMs = POLLING_CONFIG.LOOKBACK_HOURS * 60 * 60 * 1000; + const since = lastPolled || new Date(Date.now() - lookbackMs).toISOString(); + + console.log(`Polling for ${sourceType} since ${since}`); + + try { + const items = await this.fetchItems(since); + const newItems = []; + const currentTime = Date.now(); + + for (const item of items) { + // Check if item is new based on source type + if (this.isNewItem(item, sourceType)) { + const dedupeKey = this.generateDedupeKey(item, sourceType); + + // Check if we've already seen this exact item+timestamp + if (!seenItems[dedupeKey]) { + seenItems[dedupeKey] = currentTime; + newItems.push(item); + } + } + } + + // Emit new items + for (const item of newItems.reverse()) { // Oldest first + const meta = this.generateMeta(item, sourceType); + this.$emit(item, meta); + } + + // Update state + this._setLastPolled(new Date().toISOString()); + this._setSeenItems(this._cleanupSeenItems(seenItems)); + + console.log(`Found ${newItems.length} new items of type ${sourceType}`); + + } catch (error) { + console.error(`Polling failed for ${sourceType}:`, error); + throw error; + } + }, + }, + async run() { + await this.pollForItems(); + }, +}; diff --git a/components/trustpilot/sources/new-conversations/new-conversations.mjs b/components/trustpilot/sources/new-conversations/new-conversations.mjs new file mode 100644 index 0000000000000..d9671f964605e --- /dev/null +++ b/components/trustpilot/sources/new-conversations/new-conversations.mjs @@ -0,0 +1,41 @@ +import { + SORT_OPTIONS, + SOURCE_TYPES, +} from "../../common/constants.mjs"; +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "trustpilot-new-conversations", + name: "New Conversations", + description: "Emit new event when a new conversation is started on Trustpilot. This source periodically polls the Trustpilot API to detect new customer-business conversations. Each event contains conversation details including participants, subject, business unit, and creation timestamp. Useful for tracking customer inquiries, support requests, and maintaining real-time communication with customers.", + version: "0.0.3", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getSourceType() { + return SOURCE_TYPES.NEW_CONVERSATIONS; + }, + getPollingMethod() { + return "getConversations"; + }, + getPollingParams() { + return { + businessUnitId: this.businessUnitId, + limit: 100, + sortBy: SORT_OPTIONS.CREATED_AT_DESC, + offset: 0, + }; + }, + generateSummary(item) { + const participantName = item.participants?.[0]?.displayName || + item.consumer?.displayName || + "Anonymous"; + const subject = item.subject || item.title || "New conversation"; + const businessUnit = item.businessUnit?.displayName || this.businessUnitId || "Unknown"; + + return `New conversation "${subject}" started by ${participantName} (${businessUnit})`; + }, + }, +}; diff --git a/components/trustpilot/sources/new-product-review-replies/new-product-review-replies.mjs b/components/trustpilot/sources/new-product-review-replies/new-product-review-replies.mjs new file mode 100644 index 0000000000000..faeb1b447d0e2 --- /dev/null +++ b/components/trustpilot/sources/new-product-review-replies/new-product-review-replies.mjs @@ -0,0 +1,72 @@ +import { + SORT_OPTIONS, + SOURCE_TYPES, +} from "../../common/constants.mjs"; +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "trustpilot-new-product-review-replies", + name: "New Product Review Replies", + description: "Emit new event when a business replies to a product review on Trustpilot. This source periodically polls the Trustpilot API to detect new replies to product reviews. Each event includes the reply text, creation timestamp, and associated review details (product name, star rating, consumer info). Ideal for monitoring business responses to customer feedback, tracking customer service performance, and ensuring timely engagement with product reviews.", + version: "0.0.3", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getSourceType() { + return SOURCE_TYPES.NEW_REPLIES; + }, + getPollingMethod() { + return "getProductReviews"; + }, + getPollingParams() { + return { + businessUnitId: this.businessUnitId, + limit: 100, + sortBy: SORT_OPTIONS.UPDATED_AT_DESC, // Use updated to catch new replies + offset: 0, + }; + }, + async fetchItems() { + const result = await this.trustpilot.getProductReviews(this.getPollingParams()); + + // Filter for reviews that have replies and extract the replies + const repliesWithReviews = []; + + if (result.reviews) { + for (const review of result.reviews) { + if (review.company?.reply) { + // Create a pseudo-reply object that includes review context + repliesWithReviews.push({ + id: `reply_${review.id}`, + reviewId: review.id, + text: review.company.reply.text, + createdAt: review.company.reply.createdAt, + updatedAt: review.company.reply.createdAt, // Replies don't get updated + review: { + id: review.id, + title: review.title, + stars: review.stars, + consumer: review.consumer, + product: review.product, + }, + }); + } + } + } + + return repliesWithReviews; + }, + generateSummary(item) { + const productName = item.review?.product?.title || "Unknown Product"; + const consumerName = item.review?.consumer?.displayName || "Anonymous"; + const replyPreview = item.text?.substring(0, 50) || ""; + const preview = replyPreview.length > 50 + ? `${replyPreview}...` + : replyPreview; + + return `New reply to product "${productName}" review by ${consumerName}: "${preview}"`; + }, + }, +}; diff --git a/components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs b/components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs new file mode 100644 index 0000000000000..8a68b21f553a1 --- /dev/null +++ b/components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs @@ -0,0 +1,40 @@ +import { + SORT_OPTIONS, + SOURCE_TYPES, +} from "../../common/constants.mjs"; +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "trustpilot-new-product-reviews", + name: "New Product Reviews", + description: "Emit new event when a customer posts a new product review on Trustpilot. This source periodically polls the Trustpilot API to detect new product reviews. Each event contains the complete review data including star rating, review text, product information, consumer details, and timestamps. Perfect for monitoring product feedback, analyzing customer satisfaction trends, and triggering automated responses or alerts for specific products.", + version: "0.0.3", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getSourceType() { + return SOURCE_TYPES.NEW_REVIEWS; + }, + getPollingMethod() { + return "getProductReviews"; + }, + getPollingParams() { + return { + businessUnitId: this.businessUnitId, + limit: 100, + sortBy: SORT_OPTIONS.CREATED_AT_DESC, + offset: 0, + }; + }, + generateSummary(item) { + const stars = item.stars || "N/A"; + const consumerName = item.consumer?.displayName || "Anonymous"; + const productName = item.product?.title || "Unknown Product"; + const businessUnit = item.businessUnit?.displayName || this.businessUnitId || "Unknown"; + + return `New ${stars}-star product review by ${consumerName} for "${productName}" (${businessUnit})`; + }, + }, +}; diff --git a/components/trustpilot/sources/new-service-review-replies/new-service-review-replies.mjs b/components/trustpilot/sources/new-service-review-replies/new-service-review-replies.mjs new file mode 100644 index 0000000000000..98e65170cccdf --- /dev/null +++ b/components/trustpilot/sources/new-service-review-replies/new-service-review-replies.mjs @@ -0,0 +1,71 @@ +import { + SORT_OPTIONS, + SOURCE_TYPES, +} from "../../common/constants.mjs"; +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "trustpilot-new-service-review-replies", + name: "New Service Review Replies", + description: "Emit new event when a business replies to a service review on Trustpilot. This source periodically polls the Trustpilot API to detect new replies to service reviews. Each event includes the reply text, creation timestamp, and associated review details (star rating, review title, consumer info). Essential for tracking business engagement with customer feedback, monitoring response times, and ensuring all service reviews receive appropriate attention.", + version: "0.0.3", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getSourceType() { + return SOURCE_TYPES.NEW_REPLIES; + }, + getPollingMethod() { + return "getServiceReviews"; + }, + getPollingParams() { + return { + businessUnitId: this.businessUnitId, + limit: 100, + sortBy: SORT_OPTIONS.UPDATED_AT_DESC, // Use updated to catch new replies + offset: 0, + }; + }, + async fetchItems() { + const result = await this.trustpilot.getServiceReviews(this.getPollingParams()); + + // Filter for reviews that have replies and extract the replies + const repliesWithReviews = []; + + if (result.reviews) { + for (const review of result.reviews) { + if (review.company?.reply) { + // Create a pseudo-reply object that includes review context + repliesWithReviews.push({ + id: `reply_${review.id}`, + reviewId: review.id, + text: review.company.reply.text, + createdAt: review.company.reply.createdAt, + updatedAt: review.company.reply.createdAt, // Replies don't get updated + review: { + id: review.id, + title: review.title, + stars: review.stars, + consumer: review.consumer, + }, + }); + } + } + } + + return repliesWithReviews; + }, + generateSummary(item) { + const reviewTitle = item.review?.title || "Review"; + const consumerName = item.review?.consumer?.displayName || "Anonymous"; + const replyPreview = item.text?.substring(0, 50) || ""; + const preview = replyPreview.length > 50 + ? `${replyPreview}...` + : replyPreview; + + return `New reply to "${reviewTitle}" by ${consumerName}: "${preview}"`; + }, + }, +}; diff --git a/components/trustpilot/sources/new-service-reviews/new-service-reviews.mjs b/components/trustpilot/sources/new-service-reviews/new-service-reviews.mjs new file mode 100644 index 0000000000000..22c2787be72a8 --- /dev/null +++ b/components/trustpilot/sources/new-service-reviews/new-service-reviews.mjs @@ -0,0 +1,40 @@ +import { + SORT_OPTIONS, + SOURCE_TYPES, +} from "../../common/constants.mjs"; +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "trustpilot-new-service-reviews", + name: "New Service Reviews", + description: "Emit new event when a customer posts a new service review on Trustpilot. This source periodically polls the Trustpilot API to detect new service reviews, combining both public and private reviews for comprehensive coverage. Each event contains the complete review data including star rating, review text, consumer details, business unit info, and timestamps. Ideal for monitoring overall business reputation, tracking customer satisfaction metrics, and triggering workflows based on review ratings or content.", + version: "0.0.3", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getSourceType() { + return SOURCE_TYPES.NEW_REVIEWS; + }, + getPollingMethod() { + // Use private endpoint first as it has more data, fallback to public if needed + return "getServiceReviews"; + }, + getPollingParams() { + return { + businessUnitId: this.businessUnitId, + limit: 100, + sortBy: SORT_OPTIONS.CREATED_AT_DESC, + offset: 0, + }; + }, + generateSummary(item) { + const stars = item.stars || "N/A"; + const consumerName = item.consumer?.displayName || "Anonymous"; + const businessUnit = item.businessUnit?.displayName || this.businessUnitId || "Unknown"; + + return `New ${stars}-star service review by ${consumerName} for ${businessUnit}`; + }, + }, +}; diff --git a/components/trustpilot/sources/updated-conversations/updated-conversations.mjs b/components/trustpilot/sources/updated-conversations/updated-conversations.mjs new file mode 100644 index 0000000000000..fe839cb905253 --- /dev/null +++ b/components/trustpilot/sources/updated-conversations/updated-conversations.mjs @@ -0,0 +1,42 @@ +import { + SORT_OPTIONS, + SOURCE_TYPES, +} from "../../common/constants.mjs"; +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "trustpilot-updated-conversations", + name: "New Updated Conversations", + description: "Emit new event when an existing conversation is updated with new messages on Trustpilot. This source periodically polls the Trustpilot API to detect conversations that have received new messages. Each event contains updated conversation details including participants, subject, message count, and latest update timestamp. Useful for tracking ongoing customer interactions, ensuring timely responses to follow-up messages, and maintaining conversation continuity.", + version: "0.0.3", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getSourceType() { + return SOURCE_TYPES.UPDATED_CONVERSATIONS; + }, + getPollingMethod() { + return "getConversations"; + }, + getPollingParams() { + return { + businessUnitId: this.businessUnitId, + limit: 100, + sortBy: SORT_OPTIONS.UPDATED_AT_DESC, + offset: 0, + }; + }, + generateSummary(item) { + const participantName = item.participants?.[0]?.displayName || + item.consumer?.displayName || + "Anonymous"; + const subject = item.subject || item.title || "Conversation"; + const businessUnit = item.businessUnit?.displayName || this.businessUnitId || "Unknown"; + const messageCount = item.messageCount || item.messages?.length || "Unknown"; + + return `Conversation "${subject}" updated by ${participantName} (${messageCount} messages) - ${businessUnit}`; + }, + }, +}; diff --git a/components/trustpilot/sources/updated-product-reviews/updated-product-reviews.mjs b/components/trustpilot/sources/updated-product-reviews/updated-product-reviews.mjs new file mode 100644 index 0000000000000..1d2cec1ae341a --- /dev/null +++ b/components/trustpilot/sources/updated-product-reviews/updated-product-reviews.mjs @@ -0,0 +1,40 @@ +import { + SORT_OPTIONS, + SOURCE_TYPES, +} from "../../common/constants.mjs"; +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "trustpilot-updated-product-reviews", + name: "New Updated Product Reviews", + description: "Emit new event when an existing product review is updated or revised on Trustpilot. This source periodically polls the Trustpilot API to detect product reviews that have been modified. Each event contains the updated review data including any changes to star rating, review text, or other review attributes. Perfect for tracking review modifications, monitoring changes in customer sentiment, and ensuring product feedback accuracy over time.", + version: "0.0.3", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getSourceType() { + return SOURCE_TYPES.UPDATED_REVIEWS; + }, + getPollingMethod() { + return "getProductReviews"; + }, + getPollingParams() { + return { + businessUnitId: this.businessUnitId, + limit: 100, + sortBy: SORT_OPTIONS.UPDATED_AT_DESC, + offset: 0, + }; + }, + generateSummary(item) { + const stars = item.stars || "N/A"; + const consumerName = item.consumer?.displayName || "Anonymous"; + const productName = item.product?.title || "Unknown Product"; + const businessUnit = item.businessUnit?.displayName || this.businessUnitId || "Unknown"; + + return `Product review updated by ${consumerName} (${stars} stars) for "${productName}" (${businessUnit})`; + }, + }, +}; diff --git a/components/trustpilot/sources/updated-service-reviews/updated-service-reviews.mjs b/components/trustpilot/sources/updated-service-reviews/updated-service-reviews.mjs new file mode 100644 index 0000000000000..13f9721b634a8 --- /dev/null +++ b/components/trustpilot/sources/updated-service-reviews/updated-service-reviews.mjs @@ -0,0 +1,39 @@ +import { + SORT_OPTIONS, + SOURCE_TYPES, +} from "../../common/constants.mjs"; +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "trustpilot-updated-service-reviews", + name: "New Updated Service Reviews", + description: "Emit new event when an existing service review is updated or revised on Trustpilot. This source periodically polls the Trustpilot API to detect service reviews that have been modified. Each event contains the updated review data including any changes to star rating, review text, or other review attributes. Essential for tracking review modifications, monitoring evolving customer feedback, and identifying patterns in review updates.", + version: "0.0.3", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getSourceType() { + return SOURCE_TYPES.UPDATED_REVIEWS; + }, + getPollingMethod() { + return "getServiceReviews"; + }, + getPollingParams() { + return { + businessUnitId: this.businessUnitId, + limit: 100, + sortBy: SORT_OPTIONS.UPDATED_AT_DESC, + offset: 0, + }; + }, + generateSummary(item) { + const stars = item.stars || "N/A"; + const consumerName = item.consumer?.displayName || "Anonymous"; + const businessUnit = item.businessUnit?.displayName || this.businessUnitId || "Unknown"; + + return `Service review updated by ${consumerName} (${stars} stars) for ${businessUnit}`; + }, + }, +}; diff --git a/components/trustpilot/trustpilot.app.mjs b/components/trustpilot/trustpilot.app.mjs new file mode 100644 index 0000000000000..2f6be2e4e5e3b --- /dev/null +++ b/components/trustpilot/trustpilot.app.mjs @@ -0,0 +1,580 @@ +import { axios } from "@pipedream/platform"; +import * as crypto from "crypto"; +import { + BASE_URL, + DEFAULT_LIMIT, + ENDPOINTS, + HTTP_STATUS, + MAX_LIMIT, + RATING_SCALE, + RETRY_CONFIG, + SORT_OPTIONS, +} from "./common/constants.mjs"; +import { + buildUrl, + formatQueryParams, + parseBusinessUnit, + parseReview, + parseWebhookPayload, + sanitizeInput, + sleep, + validateBusinessUnitId, + validateReviewId, +} from "./common/utils.mjs"; + +export default { + type: "app", + app: "trustpilot", + propDefinitions: { + businessUnitId: { + type: "string", + label: "Business Unit ID", + description: "The unique identifier for your business unit on Trustpilot", + async options() { + try { + const businessUnits = await this.searchBusinessUnits({ + query: "", + limit: 20, + }); + return businessUnits.map(({ + id, displayName, name: { identifying }, + }) => ({ + label: `${identifying || displayName}`, + value: id, + })); + } catch (error) { + console.error("Error fetching business units:", error); + return []; + } + }, + }, + reviewId: { + type: "string", + label: "Review ID", + description: "The unique identifier for a review", + }, + stars: { + type: "integer", + label: "Star Rating", + description: "Filter by star rating (1-5)", + options: RATING_SCALE, + optional: true, + }, + sortBy: { + type: "string", + label: "Sort By", + description: "How to sort the results", + options: Object.entries(SORT_OPTIONS).map(([ + key, + value, + ]) => ({ + label: key.replace(/_/g, " ").toLowerCase(), + value, + })), + optional: true, + default: SORT_OPTIONS.CREATED_AT_DESC, + }, + limit: { + type: "integer", + label: "Limit", + description: "Maximum number of results to return", + min: 1, + max: MAX_LIMIT, + default: DEFAULT_LIMIT, + optional: true, + }, + includeReportedReviews: { + type: "boolean", + label: "Include Reported Reviews", + description: "Whether to include reviews that have been reported", + default: false, + optional: true, + }, + tags: { + type: "string[]", + label: "Tags", + description: "Filter reviews by tags", + optional: true, + }, + language: { + type: "string", + label: "Language", + description: "Filter reviews by language (ISO 639-1 code)", + optional: true, + }, + }, + methods: { + // Authentication and base request methods + _getAuthHeaders() { + const headers = { + "Content-Type": "application/json", + "User-Agent": "Pipedream/1.0", + }; + + if (!this.$auth?.api_key && !this.$auth?.oauth_access_token) { + throw new Error("Authentication required: Configure either API key or OAuth token"); + } + + if (this.$auth?.api_key) { + headers["apikey"] = this.$auth.api_key; + } + + if (this.$auth?.oauth_access_token) { + headers["Authorization"] = `Bearer ${this.$auth.oauth_access_token}`; + } + + return headers; + }, + + async _makeRequest({ + endpoint, method = "GET", params = {}, data = null, ...args + }) { + const url = `${BASE_URL}${endpoint}`; + const headers = this._getAuthHeaders(); + + const config = { + method, + url, + headers, + params: formatQueryParams(params), + timeout: 30000, + ...args, + }; + + if (data) { + config.data = data; + } + + const response = await axios(this, config); + return response.data || response; + }, + + async _makeRequestWithRetry(config, retries = RETRY_CONFIG.MAX_RETRIES) { + try { + return await this._makeRequest(config); + } catch (error) { + if (retries > 0 && error.response?.status === HTTP_STATUS.TOO_MANY_REQUESTS) { + const delay = Math.min( + RETRY_CONFIG.INITIAL_DELAY * (RETRY_CONFIG.MAX_RETRIES - retries + 1), + RETRY_CONFIG.MAX_DELAY, + ); + await sleep(delay); + return this._makeRequestWithRetry(config, retries - 1); + } + throw error; + } + }, + + // Business Unit methods + async getBusinessUnit(businessUnitId) { + if (!validateBusinessUnitId(businessUnitId)) { + throw new Error("Invalid business unit ID"); + } + + const endpoint = buildUrl(ENDPOINTS.BUSINESS_UNIT_BY_ID, { + businessUnitId, + }); + const response = await this._makeRequest({ + endpoint, + }); + return parseBusinessUnit(response); + }, + + async searchBusinessUnits({ + query = "", limit = DEFAULT_LIMIT, offset = 0, + } = {}) { + const response = await this._makeRequest({ + endpoint: ENDPOINTS.BUSINESS_UNITS, + params: { + query, + limit, + offset, + }, + }); + + return response.businessUnits?.map(parseBusinessUnit) || []; + }, + + // Public Review methods (no auth required for basic info) + async getPublicServiceReviews({ + businessUnitId, + stars = null, + sortBy = SORT_OPTIONS.CREATED_AT_DESC, + limit = DEFAULT_LIMIT, + offset = 0, + tags = [], + language = null, + }) { + if (!validateBusinessUnitId(businessUnitId)) { + throw new Error("Invalid business unit ID"); + } + + const endpoint = buildUrl(ENDPOINTS.PUBLIC_REVIEWS, { + businessUnitId, + }); + const params = { + stars, + orderBy: sortBy, + perPage: limit, + page: Math.floor(offset / limit) + 1, + language, + }; + + if (tags.length > 0) { + params.tags = tags.join(","); + } + + const response = await this._makeRequestWithRetry({ + endpoint, + params, + }); + + return { + reviews: response.reviews?.map(parseReview) || [], + pagination: { + total: response.pagination?.total || 0, + page: response.pagination?.page || 1, + perPage: response.pagination?.perPage || limit, + hasMore: response.pagination?.hasMore || false, + }, + }; + }, + + async getPublicServiceReviewById({ + businessUnitId, reviewId, + }) { + if (!validateBusinessUnitId(businessUnitId)) { + throw new Error("Invalid business unit ID"); + } + if (!validateReviewId(reviewId)) { + throw new Error("Invalid review ID"); + } + + const endpoint = buildUrl(ENDPOINTS.PUBLIC_REVIEW_BY_ID, { + businessUnitId, + reviewId, + }); + const response = await this._makeRequest({ + endpoint, + }); + return parseReview(response); + }, + + // Private helper for fetching reviews + async _getReviews({ + endpoint, + businessUnitId, + stars = null, + sortBy = SORT_OPTIONS.CREATED_AT_DESC, + limit = DEFAULT_LIMIT, + offset = 0, + includeReportedReviews = false, + tags = [], + language = null, + }) { + if (businessUnitId && !validateBusinessUnitId(businessUnitId)) { + throw new Error("Invalid business unit ID"); + } + + const params = { + stars, + orderBy: sortBy, + perPage: limit, + page: Math.floor(offset / limit) + 1, + includeReportedReviews, + language, + }; + + if (tags.length > 0) { + params.tags = tags.join(","); + } + + const response = await this._makeRequestWithRetry({ + endpoint: endpoint || ENDPOINTS.PRIVATE_SERVICE_REVIEWS, + params, + }); + + return { + reviews: response.reviews?.map(parseReview) || [], + pagination: { + total: response.pagination?.total || 0, + page: response.pagination?.page || 1, + perPage: response.pagination?.perPage || limit, + hasMore: response.pagination?.hasMore || false, + }, + }; + }, + + // Private Service Review methods + async getServiceReviews(options = {}) { + const endpoint = buildUrl(ENDPOINTS.PUBLIC_REVIEWS, { + businessUnitId: options.businessUnitId, + }); + return this._getReviews({ + endpoint, + ...options, + }); + }, + + async getServiceReviewById({ + businessUnitId, reviewId, + }) { + if (!validateBusinessUnitId(businessUnitId)) { + throw new Error("Invalid business unit ID"); + } + if (!validateReviewId(reviewId)) { + throw new Error("Invalid review ID"); + } + + const endpoint = buildUrl(ENDPOINTS.PRIVATE_SERVICE_REVIEW_BY_ID, { + businessUnitId, + reviewId, + }); + const response = await this._makeRequest({ + endpoint, + }); + return parseReview(response); + }, + + async replyToServiceReview({ + businessUnitId, reviewId, message, + }) { + if (!validateBusinessUnitId(businessUnitId)) { + throw new Error("Invalid business unit ID"); + } + if (!validateReviewId(reviewId)) { + throw new Error("Invalid review ID"); + } + if (!message || typeof message !== "string") { + throw new Error("Reply message is required"); + } + + // Sanitize and validate message length (Trustpilot limit is 5000 characters) + const sanitizedMessage = sanitizeInput(message, 5000); + if (sanitizedMessage.length === 0) { + throw new Error("Reply message cannot be empty after sanitization"); + } + + const endpoint = buildUrl(ENDPOINTS.REPLY_TO_SERVICE_REVIEW, { + businessUnitId, + reviewId, + }); + const response = await this._makeRequest({ + endpoint, + method: "POST", + data: { + message: sanitizedMessage, + }, + }); + return response; + }, + + // Product Review methods + async getProductReviews(options = {}) { + const endpoint = buildUrl(ENDPOINTS.PUBLIC_PRODUCT_REVIEWS, { + businessUnitId: options.businessUnitId, + }); + return this._getReviews({ + endpoint, + ...options, + }); + }, + + async getProductReviewById({ reviewId }) { + if (!validateReviewId(reviewId)) { + throw new Error("Invalid review ID"); + } + + const endpoint = buildUrl(ENDPOINTS.PRIVATE_PRODUCT_REVIEW_BY_ID, { + reviewId, + }); + const response = await this._makeRequest({ + endpoint, + }); + return parseReview(response); + }, + + async replyToProductReview({ + reviewId, message, + }) { + if (!validateReviewId(reviewId)) { + throw new Error("Invalid review ID"); + } + if (!message || typeof message !== "string") { + throw new Error("Reply message is required"); + } + + // Sanitize and validate message length (Trustpilot limit is 5000 characters) + const sanitizedMessage = sanitizeInput(message, 5000); + if (sanitizedMessage.length === 0) { + throw new Error("Reply message cannot be empty after sanitization"); + } + + const endpoint = buildUrl(ENDPOINTS.REPLY_TO_PRODUCT_REVIEW, { + reviewId, + }); + const response = await this._makeRequest({ + endpoint, + method: "POST", + data: { + message: sanitizedMessage, + }, + }); + return response; + }, + + // Conversation methods + async getConversations({ + limit = DEFAULT_LIMIT, + offset = 0, + sortBy = SORT_OPTIONS.CREATED_AT_DESC, + businessUnitId = null, + } = {}) { + const params = { + perPage: limit, + page: Math.floor(offset / limit) + 1, + orderBy: sortBy, + }; + + if (businessUnitId) { + params.businessUnitId = businessUnitId; + } + + const response = await this._makeRequestWithRetry({ + endpoint: ENDPOINTS.CONVERSATIONS, + params, + }); + + return { + conversations: response.conversations || [], + pagination: { + total: response.pagination?.total || 0, + page: response.pagination?.page || 1, + perPage: response.pagination?.perPage || limit, + hasMore: response.pagination?.hasMore || false, + }, + }; + }, + + async getConversationById({ conversationId }) { + if (!conversationId) { + throw new Error("Invalid conversation ID"); + } + + const endpoint = buildUrl(ENDPOINTS.CONVERSATION_BY_ID, { + conversationId, + }); + const response = await this._makeRequest({ + endpoint, + }); + return response; + }, + + async replyToConversation({ + conversationId, message, + }) { + if (!conversationId) { + throw new Error("Invalid conversation ID"); + } + if (!message || typeof message !== "string") { + throw new Error("Reply message is required"); + } + + // Sanitize and validate message length (Trustpilot limit is 5000 characters) + const sanitizedMessage = sanitizeInput(message, 5000); + if (sanitizedMessage.length === 0) { + throw new Error("Reply message cannot be empty after sanitization"); + } + + const endpoint = buildUrl(ENDPOINTS.REPLY_TO_CONVERSATION, { + conversationId, + }); + const response = await this._makeRequest({ + endpoint, + method: "POST", + data: { + message: sanitizedMessage, + }, + }); + return response; + }, + + // Webhook methods + async createWebhook({ + url, events = [], businessUnitId = null, + }) { + if (!url) { + throw new Error("Webhook URL is required"); + } + if (!Array.isArray(events) || events.length === 0) { + throw new Error("At least one event must be specified"); + } + + const data = { + url, + events, + }; + + if (businessUnitId) { + data.businessUnitId = businessUnitId; + } + + const response = await this._makeRequest({ + endpoint: ENDPOINTS.WEBHOOKS, + method: "POST", + data, + }); + return response; + }, + + async deleteWebhook(webhookId) { + if (!webhookId) { + throw new Error("Webhook ID is required"); + } + + const endpoint = buildUrl(ENDPOINTS.WEBHOOK_BY_ID, { + webhookId, + }); + await this._makeRequest({ + endpoint, + method: "DELETE", + }); + }, + + async listWebhooks() { + const response = await this._makeRequest({ + endpoint: ENDPOINTS.WEBHOOKS, + }); + return response.webhooks || []; + }, + + // Utility methods + parseWebhookPayload(payload) { + return parseWebhookPayload(payload); + }, + + validateWebhookSignature(payload, signature, secret) { + // Trustpilot uses HMAC-SHA256 for webhook signature validation + // The signature is sent in the x-trustpilot-signature header + if (!signature || !secret) { + return false; + } + + const payloadString = typeof payload === "string" + ? payload + : JSON.stringify(payload); + + const expectedSignature = crypto + .createHmac("sha256", secret) + .update(payloadString) + .digest("hex"); + + // Constant time comparison to prevent timing attacks + return crypto.timingSafeEqual( + Buffer.from(signature), + Buffer.from(expectedSignature), + ); + }, + + }, +}; diff --git a/components/turbohire/.gitignore b/components/turbohire/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/turbohire/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/turbohire/app/turbohire.app.ts b/components/turbohire/app/turbohire.app.ts deleted file mode 100644 index b994de3d82777..0000000000000 --- a/components/turbohire/app/turbohire.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "turbohire", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/turbohire/package.json b/components/turbohire/package.json index 9447841d47b24..c8b9eb1bb73aa 100644 --- a/components/turbohire/package.json +++ b/components/turbohire/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/turbohire", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream TurboHire Components", - "main": "dist/app/turbohire.app.mjs", + "main": "turbohire.app.mjs", "keywords": [ "pipedream", "turbohire" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/turbohire", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/turbohire/turbohire.app.mjs b/components/turbohire/turbohire.app.mjs new file mode 100644 index 0000000000000..bfc619df69de7 --- /dev/null +++ b/components/turbohire/turbohire.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "turbohire", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/tutor_lms/.gitignore b/components/tutor_lms/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/tutor_lms/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/tutor_lms/app/tutor_lms.app.ts b/components/tutor_lms/app/tutor_lms.app.ts deleted file mode 100644 index b233d50be6ab0..0000000000000 --- a/components/tutor_lms/app/tutor_lms.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "tutor_lms", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/tutor_lms/package.json b/components/tutor_lms/package.json index 424e573a2887b..bba07a14c1ac9 100644 --- a/components/tutor_lms/package.json +++ b/components/tutor_lms/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/tutor_lms", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Tutor LMS Components", - "main": "dist/app/tutor_lms.app.mjs", + "main": "tutor_lms.app.mjs", "keywords": [ "pipedream", "tutor_lms" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/tutor_lms", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/tutor_lms/tutor_lms.app.mjs b/components/tutor_lms/tutor_lms.app.mjs new file mode 100644 index 0000000000000..22640114302e3 --- /dev/null +++ b/components/tutor_lms/tutor_lms.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "tutor_lms", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/twelve_data/.gitignore b/components/twelve_data/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/twelve_data/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/twelve_data/app/twelve_data.app.ts b/components/twelve_data/app/twelve_data.app.ts deleted file mode 100644 index 4d5cb133e84e5..0000000000000 --- a/components/twelve_data/app/twelve_data.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "twelve_data", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/twelve_data/package.json b/components/twelve_data/package.json index cf74242e7fde0..8b9c1bb7b4e62 100644 --- a/components/twelve_data/package.json +++ b/components/twelve_data/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/twelve_data", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Twelve Data Components", - "main": "dist/app/twelve_data.app.mjs", + "main": "twelve_data.app.mjs", "keywords": [ "pipedream", "twelve_data" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/twelve_data", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/twelve_data/twelve_data.app.mjs b/components/twelve_data/twelve_data.app.mjs new file mode 100644 index 0000000000000..c636bf84c755e --- /dev/null +++ b/components/twelve_data/twelve_data.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "twelve_data", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/twitch_developer_app/tsconfig.json b/components/twitch_developer_app/tsconfig.json index e8a6848654582..3a9389484d040 100644 --- a/components/twitch_developer_app/tsconfig.json +++ b/components/twitch_developer_app/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/twitter/package.json b/components/twitter/package.json index 59a160300b6e2..b1754b0e331f7 100644 --- a/components/twitter/package.json +++ b/components/twitter/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/twitter", - "version": "2.3.1", + "version": "2.3.2", "description": "Pipedream Twitter Components", "main": "dist/app/twitter.app.mjs", "keywords": [ @@ -17,8 +17,10 @@ }, "dependencies": { "@pipedream/platform": "^3.1.0", - "@pipedream/types": "^0.1.4", "form-data": "^4.0.0", "oauth-1.0a": "^2.2.6" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/twitter/tsconfig.json b/components/twitter/tsconfig.json index a5c999fd0863f..3a9389484d040 100644 --- a/components/twitter/tsconfig.json +++ b/components/twitter/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" -, "common/app-validation.mjs" ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/typebot/package.json b/components/typebot/package.json index bed0a4076f88c..18eede708867f 100644 --- a/components/typebot/package.json +++ b/components/typebot/package.json @@ -1,18 +1,18 @@ { "name": "@pipedream/typebot", - "version": "0.0.5", + "version": "0.0.6", "description": "Pipedream Typebot Components", "main": "typebot.app.mjs", "keywords": [ "pipedream", "typebot" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/typebot", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/typeflo/actions/create-post/create-post.mjs b/components/typeflo/actions/create-post/create-post.mjs new file mode 100644 index 0000000000000..0e6a2ed0eb053 --- /dev/null +++ b/components/typeflo/actions/create-post/create-post.mjs @@ -0,0 +1,93 @@ +import app from "../../typeflo.app.mjs"; + +export default { + key: "typeflo-create-post", + name: "Create Post", + description: "Creates and publish posts in yout blog. [See the documentation](https://typeflo.io/knowledge-base/headless-cms-admin-api-documentation#1-posts)", + version: "0.0.1", + type: "action", + props: { + app, + title: { + propDefinition: [ + app, + "title", + ], + }, + content: { + propDefinition: [ + app, + "content", + ], + }, + slug: { + propDefinition: [ + app, + "slug", + ], + }, + excerpt: { + propDefinition: [ + app, + "excerpt", + ], + }, + metatitle: { + propDefinition: [ + app, + "metatitle", + ], + }, + metadescription: { + propDefinition: [ + app, + "metadescription", + ], + }, + tocStatus: { + propDefinition: [ + app, + "tocStatus", + ], + }, + scheduled: { + propDefinition: [ + app, + "scheduled", + ], + }, + publishDate: { + propDefinition: [ + app, + "publishDate", + ], + }, + isDraft: { + propDefinition: [ + app, + "isDraft", + ], + }, + }, + async run({ $ }) { + const response = await this.app.createPost({ + $, + data: { + postData: { + title: this.title, + content: this.content, + slug: this.slug, + excerpt: this.excerpt, + metatitle: this.metatitle, + metadescription: this.metadescription, + toc_status: this.tocStatus, + scheduled: this.scheduled, + publish_date: this.publishDate, + is_draft: this.isDraft, + }, + }, + }); + $.export("$summary", "Successfully sent the request to create a post"); + return response; + }, +}; diff --git a/components/typeflo/package.json b/components/typeflo/package.json new file mode 100644 index 0000000000000..ec8ecd1a5d105 --- /dev/null +++ b/components/typeflo/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/typeflo", + "version": "0.1.1", + "description": "Pipedream Typeflo Components", + "main": "typeflo.app.mjs", + "keywords": [ + "pipedream", + "typeflo" + ], + "homepage": "https://pipedream.com/apps/typeflo", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + } +} diff --git a/components/typeflo/typeflo.app.mjs b/components/typeflo/typeflo.app.mjs new file mode 100644 index 0000000000000..3b385371a9013 --- /dev/null +++ b/components/typeflo/typeflo.app.mjs @@ -0,0 +1,97 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "typeflo", + propDefinitions: { + title: { + type: "string", + label: "Title", + description: "Post title", + }, + content: { + type: "string", + label: "Content", + description: "Main body content of the post", + }, + slug: { + type: "string", + label: "Slug", + description: "URL-friendly title for the post", + optional: true, + }, + excerpt: { + type: "string", + label: "Excerpt", + description: "Short summary of the post", + optional: true, + }, + metatitle: { + type: "string", + label: "Meta Title", + description: "SEO title of the post", + optional: true, + }, + metadescription: { + type: "string", + label: "Meta Description", + description: "SEO description of the post", + optional: true, + }, + tocStatus: { + type: "boolean", + label: "TOC Status", + description: "Enable or disable table of contents", + optional: true, + }, + scheduled: { + type: "string", + label: "Scheduled", + description: "Scheduled publish date and time, i.e.: `28/08/2025 09:35 AM`", + optional: true, + }, + publishDate: { + type: "string", + label: "Publish Date", + description: "Date when the post is published, i.e.: `01/01/2025`", + optional: true, + }, + isDraft: { + type: "boolean", + label: "Is Draft", + description: "Whether the post is saved as draft", + optional: true, + }, + }, + methods: { + _baseUrl() { + return `${this.$auth.api_url}`; + }, + async _makeRequest(opts = {}) { + const { + $ = this, + path, + headers, + ...otherOpts + } = opts; + return axios($, { + ...otherOpts, + url: this._baseUrl() + path, + headers: { + ...headers, + }, + }); + }, + + async createPost(args = {}) { + return this._makeRequest({ + path: "/api/headless/admin/posts", + method: "POST", + headers: { + Authorization: `Bearer ${this.$auth.admin_api_key}`, + }, + ...args, + }); + }, + }, +}; diff --git a/components/typless/.gitignore b/components/typless/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/typless/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/typless/app/typless.app.ts b/components/typless/app/typless.app.ts deleted file mode 100644 index 31bd44aa76ed3..0000000000000 --- a/components/typless/app/typless.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "typless", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/typless/package.json b/components/typless/package.json index d343c109de9d3..69089f23ad877 100644 --- a/components/typless/package.json +++ b/components/typless/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/typless", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Typless Components", - "main": "dist/app/typless.app.mjs", + "main": "typless.app.mjs", "keywords": [ "pipedream", "typless" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/typless", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/typless/typless.app.mjs b/components/typless/typless.app.mjs new file mode 100644 index 0000000000000..882cb5cd66e6a --- /dev/null +++ b/components/typless/typless.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "typless", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/uchat/.gitignore b/components/uchat/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/uchat/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/uchat/app/uchat.app.ts b/components/uchat/app/uchat.app.ts deleted file mode 100644 index dacc08f4868e6..0000000000000 --- a/components/uchat/app/uchat.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "uchat", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/uchat/package.json b/components/uchat/package.json index 62f7c41076da7..8be31fe297452 100644 --- a/components/uchat/package.json +++ b/components/uchat/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/uchat", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Uchat Components", - "main": "dist/app/uchat.app.mjs", + "main": "uchat.app.mjs", "keywords": [ "pipedream", "uchat" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/uchat", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/uchat/uchat.app.mjs b/components/uchat/uchat.app.mjs new file mode 100644 index 0000000000000..d7889301f659f --- /dev/null +++ b/components/uchat/uchat.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "uchat", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/uipath_automation_hub/package.json b/components/uipath_automation_hub/package.json index 87ab2fd21943e..483b425c0bcdb 100644 --- a/components/uipath_automation_hub/package.json +++ b/components/uipath_automation_hub/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/uipath_automation_hub", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream UiPath Automation Hub Components", "main": "uipath_automation_hub.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/uk_gov_vehecle_enquiry_api/.gitignore b/components/uk_gov_vehecle_enquiry_api/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/uk_gov_vehecle_enquiry_api/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/uk_gov_vehecle_enquiry_api/app/uk_gov_vehecle_enquiry_api.app.ts b/components/uk_gov_vehecle_enquiry_api/app/uk_gov_vehecle_enquiry_api.app.ts deleted file mode 100644 index 8c081969914fa..0000000000000 --- a/components/uk_gov_vehecle_enquiry_api/app/uk_gov_vehecle_enquiry_api.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "uk_gov_vehecle_enquiry_api", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/uk_gov_vehecle_enquiry_api/package.json b/components/uk_gov_vehecle_enquiry_api/package.json index 295d9197fccc3..2141357c8c25e 100644 --- a/components/uk_gov_vehecle_enquiry_api/package.json +++ b/components/uk_gov_vehecle_enquiry_api/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/uk_gov_vehecle_enquiry_api", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream UK gov Vehicle Enquiry API Components", - "main": "dist/app/uk_gov_vehecle_enquiry_api.app.mjs", + "main": "uk_gov_vehecle_enquiry_api.app.mjs", "keywords": [ "pipedream", "uk_gov_vehecle_enquiry_api" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/uk_gov_vehecle_enquiry_api", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/uk_gov_vehecle_enquiry_api/uk_gov_vehecle_enquiry_api.app.mjs b/components/uk_gov_vehecle_enquiry_api/uk_gov_vehecle_enquiry_api.app.mjs new file mode 100644 index 0000000000000..a6542ba273793 --- /dev/null +++ b/components/uk_gov_vehecle_enquiry_api/uk_gov_vehecle_enquiry_api.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "uk_gov_vehecle_enquiry_api", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/universal_summarizer_by_kagi/package.json b/components/universal_summarizer_by_kagi/package.json index a8e38879028f7..14f61c1cdd9f7 100644 --- a/components/universal_summarizer_by_kagi/package.json +++ b/components/universal_summarizer_by_kagi/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/universal_summarizer_by_kagi", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Universal Summarizer by Kagi Components", "main": "universal_summarizer_by_kagi.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/upgrade_chat/package.json b/components/upgrade_chat/package.json new file mode 100644 index 0000000000000..c9aedaca06736 --- /dev/null +++ b/components/upgrade_chat/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/upgrade_chat", + "version": "0.0.1", + "description": "Pipedream Upgrade.chat Components", + "main": "upgrade_chat.app.mjs", + "keywords": [ + "pipedream", + "upgrade_chat" + ], + "homepage": "https://pipedream.com/apps/upgrade_chat", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/upgrade_chat/upgrade_chat.app.mjs b/components/upgrade_chat/upgrade_chat.app.mjs new file mode 100644 index 0000000000000..9cc36a339f7ab --- /dev/null +++ b/components/upgrade_chat/upgrade_chat.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "upgrade_chat", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/uproc/package.json b/components/uproc/package.json new file mode 100644 index 0000000000000..341b8eaba2b9a --- /dev/null +++ b/components/uproc/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/uproc", + "version": "0.0.1", + "description": "Pipedream uProc Components", + "main": "uproc.app.mjs", + "keywords": [ + "pipedream", + "uproc" + ], + "homepage": "https://pipedream.com/apps/uproc", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/uproc/uproc.app.mjs b/components/uproc/uproc.app.mjs new file mode 100644 index 0000000000000..4eb948745147a --- /dev/null +++ b/components/uproc/uproc.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "uproc", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/uptimerobot/package.json b/components/uptimerobot/package.json index 5fbe385d85d28..d0fc9bb99c225 100644 --- a/components/uptimerobot/package.json +++ b/components/uptimerobot/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/uptimerobot", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream UptimeRobot Components", - "main": "dist/app/uptimerobot.app.mjs", + "main": "uptimerobot.app.mjs", "keywords": [ "pipedream", "uptimerobot" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/uptimerobot", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/upwave/package.json b/components/upwave/package.json index b5a63abfda954..f481b4bbdc0cd 100644 --- a/components/upwave/package.json +++ b/components/upwave/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/upwave", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Upwave Components", "main": "upwave.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/user_com/.gitignore b/components/user_com/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/user_com/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/user_com/app/user_com.app.ts b/components/user_com/app/user_com.app.ts deleted file mode 100644 index 63f6f6d1b0287..0000000000000 --- a/components/user_com/app/user_com.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "user_com", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/user_com/package.json b/components/user_com/package.json index fa86b0552755e..9b4962920fbc0 100644 --- a/components/user_com/package.json +++ b/components/user_com/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/user_com", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream User.com Components", - "main": "dist/app/user_com.app.mjs", + "main": "user_com.app.mjs", "keywords": [ "pipedream", "user_com" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/user_com", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/user_com/user_com.app.mjs b/components/user_com/user_com.app.mjs new file mode 100644 index 0000000000000..3e9b624c7e605 --- /dev/null +++ b/components/user_com/user_com.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "user_com", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/userflow/package.json b/components/userflow/package.json index 9d541bc814d45..d54e94d230645 100644 --- a/components/userflow/package.json +++ b/components/userflow/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/userflow", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Userflow Components", "main": "userflow.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/utradea/.gitignore b/components/utradea/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/utradea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/utradea/app/utradea.app.ts b/components/utradea/app/utradea.app.ts deleted file mode 100644 index 600e7a5233484..0000000000000 --- a/components/utradea/app/utradea.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "utradea", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/utradea/package.json b/components/utradea/package.json index ec043f5ceb74b..525198912ffce 100644 --- a/components/utradea/package.json +++ b/components/utradea/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/utradea", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Utradea Components", - "main": "dist/app/utradea.app.mjs", + "main": "utradea.app.mjs", "keywords": [ "pipedream", "utradea" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/utradea", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/utradea/utradea.app.mjs b/components/utradea/utradea.app.mjs new file mode 100644 index 0000000000000..61828d196881d --- /dev/null +++ b/components/utradea/utradea.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "utradea", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/vectera/.gitignore b/components/vectera/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/vectera/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/vectera/app/vectera.app.ts b/components/vectera/app/vectera.app.ts deleted file mode 100644 index 54bd7728fb725..0000000000000 --- a/components/vectera/app/vectera.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "vectera", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/vectera/package.json b/components/vectera/package.json index ef099bf97f91b..448af1ae48c4c 100644 --- a/components/vectera/package.json +++ b/components/vectera/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/vectera", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Vectera Components", - "main": "dist/app/vectera.app.mjs", + "main": "vectera.app.mjs", "keywords": [ "pipedream", "vectera" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/vectera", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/vectera/vectera.app.mjs b/components/vectera/vectera.app.mjs new file mode 100644 index 0000000000000..5005c169a3068 --- /dev/null +++ b/components/vectera/vectera.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "vectera", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/verdict_as_a_service/tsconfig.json b/components/verdict_as_a_service/tsconfig.json index 335fa6f1cf6ec..3a9389484d040 100644 --- a/components/verdict_as_a_service/tsconfig.json +++ b/components/verdict_as_a_service/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/verifiedemail/verifiedemail.app.mjs b/components/verifiedemail/verifiedemail.app.mjs index 759ae30fb15b6..f68acba2700a8 100644 --- a/components/verifiedemail/verifiedemail.app.mjs +++ b/components/verifiedemail/verifiedemail.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/verifybee/.gitignore b/components/verifybee/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/verifybee/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/verifybee/app/verifybee.app.ts b/components/verifybee/app/verifybee.app.ts deleted file mode 100644 index 6c642c1264a4d..0000000000000 --- a/components/verifybee/app/verifybee.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "verifybee", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/verifybee/package.json b/components/verifybee/package.json index 3c4f89f7c8b87..09dcb7422dc35 100644 --- a/components/verifybee/package.json +++ b/components/verifybee/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/verifybee", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream VerifyBee Components", - "main": "dist/app/verifybee.app.mjs", + "main": "verifybee.app.mjs", "keywords": [ "pipedream", "verifybee" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/verifybee", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/verifybee/verifybee.app.mjs b/components/verifybee/verifybee.app.mjs new file mode 100644 index 0000000000000..d2ddbecc87da1 --- /dev/null +++ b/components/verifybee/verifybee.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "verifybee", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/vero/package.json b/components/vero/package.json index c9eab31bdf727..7508ccc41ed36 100644 --- a/components/vero/package.json +++ b/components/vero/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/vero", - "version": "0.1.1", + "version": "0.1.2", "description": "Pipedream Vero Components", - "main": "dist/app/vero.app.mjs", + "main": "vero.app.mjs", "keywords": [ "pipedream", "vero" @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/viewdns_info/actions/dns-record-lookup/dns-record-lookup.mjs b/components/viewdns_info/actions/dns-record-lookup/dns-record-lookup.mjs new file mode 100644 index 0000000000000..bdff660c6f50e --- /dev/null +++ b/components/viewdns_info/actions/dns-record-lookup/dns-record-lookup.mjs @@ -0,0 +1,36 @@ +import viewdnsInfo from "../../viewdns_info.app.mjs"; + +export default { + key: "viewdns_info-dns-record-lookup", + name: "DNS Record Lookup", + description: "Performs a DNS record lookup to retrieve various DNS record types for a domain. [See the documentation](https://viewdns.info/api/dns-record-lookup/)", + version: "0.0.1", + type: "action", + props: { + viewdnsInfo, + domain: { + type: "string", + label: "Domain", + description: "The hostname to retrieve DNS records for (e.g., example.com).", + }, + recordType: { + type: "string", + label: "Record Type", + description: "The type of DNS record to retrieve (e.g., A,AAAA,MX,TXT,ANY).", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.viewdnsInfo.dnsLookup({ + $, + params: { + domain: this.domain, + recordtype: this.recordType, + }, + }); + + $.export("$summary", `Retrieved DNS records for ${this.domain}.`); + + return response; + }, +}; diff --git a/components/viewdns_info/actions/ip-history/ip-history.mjs b/components/viewdns_info/actions/ip-history/ip-history.mjs new file mode 100644 index 0000000000000..257fb0ad978cb --- /dev/null +++ b/components/viewdns_info/actions/ip-history/ip-history.mjs @@ -0,0 +1,29 @@ +import viewdnsInfo from "../../viewdns_info.app.mjs"; + +export default { + key: "viewdns_info-ip-history", + name: "IP History", + description: "Retrieves the IP address history for a domain. [See the documentation](https://viewdns.info/api/ip-history/)", + version: "0.0.1", + type: "action", + props: { + viewdnsInfo, + domain: { + type: "string", + label: "Domain", + description: "The domain name to retrieve the historical IP addresses for (e.g., example.com).", + }, + }, + async run({ $ }) { + const response = await this.viewdnsInfo.ipHistory({ + $, + params: { + domain: this.domain, + }, + }); + + $.export("$summary", `Retrieved IP history for ${this.domain}.`); + + return response; + }, +}; diff --git a/components/viewdns_info/actions/reverse-ip-lookup/reverse-ip-lookup.mjs b/components/viewdns_info/actions/reverse-ip-lookup/reverse-ip-lookup.mjs new file mode 100644 index 0000000000000..3fdc4d3ea07ad --- /dev/null +++ b/components/viewdns_info/actions/reverse-ip-lookup/reverse-ip-lookup.mjs @@ -0,0 +1,35 @@ +import viewdnsInfo from "../../viewdns_info.app.mjs"; + +export default { + key: "viewdns_info-reverse-ip-lookup", + name: "Reverse IP Lookup", + description: "Performs a reverse IP lookup to find domains hosted on the same IP address. [See the documentation](https://viewdns.info/api/reverse-ip-lookup/)", + version: "0.0.1", + type: "action", + props: { + viewdnsInfo, + host: { + type: "string", + label: "Host", + description: "The domain or IP to perform the reverse IP lookup on (e.g., example.com)", + }, + }, + async run({ $ }) { + const results = await this.viewdnsInfo.getPaginatedResources({ + fn: this.viewdnsInfo.reverseIpLookup, + args: { + $, + params: { + host: this.host, + }, + }, + resourceKey: "domains", + }); + + $.export("$summary", `Found ${results.length} domain${results.length === 1 + ? "" + : "s"} hosted on the IP address.`); + + return results; + }, +}; diff --git a/components/viewdns_info/actions/reverse-whois-lookup/reverse-whois-lookup.mjs b/components/viewdns_info/actions/reverse-whois-lookup/reverse-whois-lookup.mjs new file mode 100644 index 0000000000000..74bbd544c0809 --- /dev/null +++ b/components/viewdns_info/actions/reverse-whois-lookup/reverse-whois-lookup.mjs @@ -0,0 +1,35 @@ +import viewdnsInfo from "../../viewdns_info.app.mjs"; + +export default { + key: "viewdns_info-reverse-whois-lookup", + name: "Reverse Whois Lookup", + description: "Performs a reverse WHOIS search to find domains registered by the same person or organization. [See the documentation](https://viewdns.info/api/reverse-whois-lookup/)", + version: "0.0.1", + type: "action", + props: { + viewdnsInfo, + q: { + type: "string", + label: "Query", + description: "The registrant name or email address to search for (e.g., domain@example.com).", + }, + }, + async run({ $ }) { + const results = await this.viewdnsInfo.getPaginatedResources({ + fn: this.viewdnsInfo.reverseWhoisLookup, + args: { + $, + params: { + q: this.q, + }, + }, + resourceKey: "matches", + }); + + $.export("$summary", `Found ${results.length} domain${results.length === 1 + ? "" + : "s"} matching the query.`); + + return results; + }, +}; diff --git a/components/viewdns_info/actions/subdomain-discovery/subdomain-discovery.mjs b/components/viewdns_info/actions/subdomain-discovery/subdomain-discovery.mjs new file mode 100644 index 0000000000000..43bc73afad03a --- /dev/null +++ b/components/viewdns_info/actions/subdomain-discovery/subdomain-discovery.mjs @@ -0,0 +1,35 @@ +import viewdnsInfo from "../../viewdns_info.app.mjs"; + +export default { + key: "viewdns_info-subdomain-discovery", + name: "Subdomain Discovery", + description: "Discovers subdomains associated with a given domain. [See the documentation](https://viewdns.info/api/subdomain-discovery/)", + version: "0.0.1", + type: "action", + props: { + viewdnsInfo, + domain: { + type: "string", + label: "Domain", + description: "The domain name to retrieve subdomains for (e.g., example.com).", + }, + }, + async run({ $ }) { + const results = await this.viewdnsInfo.getPaginatedResources({ + fn: this.viewdnsInfo.subdomainDiscovery, + args: { + $, + params: { + domain: this.domain, + }, + }, + resourceKey: "subdomains", + }); + + $.export("$summary", `Found ${results.length} subdomain${results.length === 1 + ? "" + : "s"} for ${this.domain}.`); + + return results; + }, +}; diff --git a/components/viewdns_info/actions/whois-lookup/whois-lookup.mjs b/components/viewdns_info/actions/whois-lookup/whois-lookup.mjs new file mode 100644 index 0000000000000..4d2cae4d7064a --- /dev/null +++ b/components/viewdns_info/actions/whois-lookup/whois-lookup.mjs @@ -0,0 +1,29 @@ +import viewdnsInfo from "../../viewdns_info.app.mjs"; + +export default { + key: "viewdns_info-whois-lookup", + name: "Whois Lookup", + description: "Performs a WHOIS lookup to retrieve domain registration information. [See the documentation](https://viewdns.info/api/whois/)", + version: "0.0.1", + type: "action", + props: { + viewdnsInfo, + domain: { + type: "string", + label: "Domain", + description: "The domain or IP to perform a whois lookup on (e.g., example.com)", + }, + }, + async run({ $ }) { + const response = await this.viewdnsInfo.whoisLookup({ + $, + params: { + domain: this.domain, + }, + }); + + $.export("$summary", `Successfully retrieved WHOIS information for ${this.domain}`); + + return response; + }, +}; diff --git a/components/viewdns_info/package.json b/components/viewdns_info/package.json index 9445adfe52941..8230b91f9e7bc 100644 --- a/components/viewdns_info/package.json +++ b/components/viewdns_info/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/viewdns_info", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream ViewDNS.info Components", "main": "viewdns_info.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } -} \ No newline at end of file +} diff --git a/components/viewdns_info/viewdns_info.app.mjs b/components/viewdns_info/viewdns_info.app.mjs index 24b2cb770b1e3..6162f4764374a 100644 --- a/components/viewdns_info/viewdns_info.app.mjs +++ b/components/viewdns_info/viewdns_info.app.mjs @@ -1,11 +1,95 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "viewdns_info", propDefinitions: {}, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://api.viewdns.info"; + }, + _makeRequest({ + $ = this, path, params = {}, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + params: { + ...params, + apikey: `${this.$auth.api_key}`, + output: "json", + }, + ...opts, + }); + }, + whoisLookup(opts = {}) { + return this._makeRequest({ + path: "/whois/v2", + ...opts, + }); + }, + reverseWhoisLookup(opts = {}) { + return this._makeRequest({ + path: "/reversewhois/", + ...opts, + }); + }, + subdomainDiscovery(opts = {}) { + return this._makeRequest({ + path: "/subdomains/", + ...opts, + }); + }, + reverseIpLookup(opts = {}) { + return this._makeRequest({ + path: "/reverseip/", + ...opts, + }); + }, + ipHistory(opts = {}) { + return this._makeRequest({ + path: "/iphistory/", + ...opts, + }); + }, + dnsLookup(opts = {}) { + return this._makeRequest({ + path: "/dnsrecord/", + ...opts, + }); + }, + async *paginate({ + fn, args, resourceKey, max, + }) { + args = { + ...args, + params: { + ...args?.params, + page: 1, + }, + }; + let totalPages, count = 0; + do { + const { response } = await fn(args); + const items = response[resourceKey]; + if (!items?.length) { + return; + } + for (const item of items) { + yield item; + if (max && ++count >= max) { + return; + } + } + totalPages = +response.total_pages; + args.params.page++; + } while (totalPages > args.params.page); + }, + async getPaginatedResources(opts) { + const results = []; + for await (const item of this.paginate(opts)) { + results.push(item); + } + return results; }, }, }; diff --git a/components/virustotal/.gitignore b/components/virustotal/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/virustotal/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/virustotal/app/virustotal.app.ts b/components/virustotal/app/virustotal.app.ts deleted file mode 100644 index 431be0cb8b206..0000000000000 --- a/components/virustotal/app/virustotal.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "virustotal", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/virustotal/package.json b/components/virustotal/package.json index 2cf45691e6ba0..18499d7d88583 100644 --- a/components/virustotal/package.json +++ b/components/virustotal/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/virustotal", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream VirusTotal Components", - "main": "dist/app/virustotal.app.mjs", + "main": "virustotal.app.mjs", "keywords": [ "pipedream", "virustotal" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/virustotal", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/virustotal/virustotal.app.mjs b/components/virustotal/virustotal.app.mjs new file mode 100644 index 0000000000000..cec4475aa1870 --- /dev/null +++ b/components/virustotal/virustotal.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "virustotal", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/visibot/package.json b/components/visibot/package.json new file mode 100644 index 0000000000000..afda588d7bb5b --- /dev/null +++ b/components/visibot/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/visibot", + "version": "0.0.1", + "description": "Pipedream Visibot Components", + "main": "visibot.app.mjs", + "keywords": [ + "pipedream", + "visibot" + ], + "homepage": "https://pipedream.com/apps/visibot", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/visibot/visibot.app.mjs b/components/visibot/visibot.app.mjs new file mode 100644 index 0000000000000..bc412a19f03db --- /dev/null +++ b/components/visibot/visibot.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "visibot", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/visualping/package.json b/components/visualping/package.json index 29f5f6956b20f..d2da879b159bc 100644 --- a/components/visualping/package.json +++ b/components/visualping/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/visualping", - "version": "0.1.2", + "version": "0.1.3", "description": "Pipedream VisualPing Components", "main": "app/visualping.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/vivifyscrum/.gitignore b/components/vivifyscrum/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/vivifyscrum/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/vivifyscrum/app/vivifyscrum.app.ts b/components/vivifyscrum/app/vivifyscrum.app.ts deleted file mode 100644 index 34d15fa59d352..0000000000000 --- a/components/vivifyscrum/app/vivifyscrum.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "vivifyscrum", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/vivifyscrum/package.json b/components/vivifyscrum/package.json index 82d7851c65ec1..79bc3917d0a9e 100644 --- a/components/vivifyscrum/package.json +++ b/components/vivifyscrum/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/vivifyscrum", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream VivifyScrum Components", - "main": "dist/app/vivifyscrum.app.mjs", + "main": "vivifyscrum.app.mjs", "keywords": [ "pipedream", "vivifyscrum" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/vivifyscrum", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/vivifyscrum/vivifyscrum.app.mjs b/components/vivifyscrum/vivifyscrum.app.mjs new file mode 100644 index 0000000000000..7337486379c49 --- /dev/null +++ b/components/vivifyscrum/vivifyscrum.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "vivifyscrum", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/vk/.gitignore b/components/vk/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/vk/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/vk/app/vk.app.ts b/components/vk/app/vk.app.ts deleted file mode 100644 index f1d6c9546f5a5..0000000000000 --- a/components/vk/app/vk.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "vk", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/vk/package.json b/components/vk/package.json index 3e46aebdcc089..1cbf8d11b86aa 100644 --- a/components/vk/package.json +++ b/components/vk/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/vk", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream vk Components", - "main": "dist/app/vk.app.mjs", + "main": "vk.app.mjs", "keywords": [ "pipedream", "vk" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/vk", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/vk/vk.app.mjs b/components/vk/vk.app.mjs new file mode 100644 index 0000000000000..8255afe28d6b3 --- /dev/null +++ b/components/vk/vk.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "vk", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/vlm_run/vlm_run.app.mjs b/components/vlm_run/vlm_run.app.mjs index 9a0b7f1082eda..a59c279946218 100644 --- a/components/vlm_run/vlm_run.app.mjs +++ b/components/vlm_run/vlm_run.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/voice/.gitignore b/components/voice/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/voice/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/voice/app/voice.app.ts b/components/voice/app/voice.app.ts deleted file mode 100644 index d5f1a0676bfb0..0000000000000 --- a/components/voice/app/voice.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "voice", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/voice/package.json b/components/voice/package.json index 786654ed2dfb0..905cfc3fbf6e6 100644 --- a/components/voice/package.json +++ b/components/voice/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/voice", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Voiceflow Components", - "main": "dist/app/voice.app.mjs", + "main": "voice.app.mjs", "keywords": [ "pipedream", "voice" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/voice", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/voice/voice.app.mjs b/components/voice/voice.app.mjs index 97fd6f5ebd420..adb39807b06ba 100644 --- a/components/voice/voice.app.mjs +++ b/components/voice/voice.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/voice_monkey/package.json b/components/voice_monkey/package.json index 9623bd43b4a83..15e04c1cfbf23 100644 --- a/components/voice_monkey/package.json +++ b/components/voice_monkey/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/voice_monkey", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Voice Monkey Components", "main": "voice_monkey.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/vosfactures/.gitignore b/components/vosfactures/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/vosfactures/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/vosfactures/app/vosfactures.app.ts b/components/vosfactures/app/vosfactures.app.ts deleted file mode 100644 index 27b7958810ba1..0000000000000 --- a/components/vosfactures/app/vosfactures.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "vosfactures", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/vosfactures/package.json b/components/vosfactures/package.json index 15a56053950e5..06dca7a444fee 100644 --- a/components/vosfactures/package.json +++ b/components/vosfactures/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/vosfactures", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Vosfactures Components", - "main": "dist/app/vosfactures.app.mjs", + "main": "vosfactures.app.mjs", "keywords": [ "pipedream", "vosfactures" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/vosfactures", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/vosfactures/vosfactures.app.mjs b/components/vosfactures/vosfactures.app.mjs new file mode 100644 index 0000000000000..3abd093b40892 --- /dev/null +++ b/components/vosfactures/vosfactures.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "vosfactures", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/wafrow/wafrow.app.mjs b/components/wafrow/wafrow.app.mjs index 160f980b7c7df..e2047b3521f5e 100644 --- a/components/wafrow/wafrow.app.mjs +++ b/components/wafrow/wafrow.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/waitwhile/tsconfig.json b/components/waitwhile/tsconfig.json index 0792c9f19ca2c..3a9389484d040 100644 --- a/components/waitwhile/tsconfig.json +++ b/components/waitwhile/tsconfig.json @@ -1,24 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common", - - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/warpcast/.gitignore b/components/warpcast/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/warpcast/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/warpcast/app/warpcast.app.ts b/components/warpcast/app/warpcast.app.ts deleted file mode 100644 index ce66316866c10..0000000000000 --- a/components/warpcast/app/warpcast.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "warpcast", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/warpcast/package.json b/components/warpcast/package.json index e66dcee6afcaa..14e20452108a3 100644 --- a/components/warpcast/package.json +++ b/components/warpcast/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/warpcast", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Warpcast Components", - "main": "dist/app/warpcast.app.mjs", + "main": "warpcast.app.mjs", "keywords": [ "pipedream", "warpcast" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/warpcast", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/warpcast/warpcast.app.mjs b/components/warpcast/warpcast.app.mjs new file mode 100644 index 0000000000000..0ceec21c4a45f --- /dev/null +++ b/components/warpcast/warpcast.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "warpcast", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/watchsignals/.gitignore b/components/watchsignals/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/watchsignals/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/watchsignals/app/watchsignals.app.ts b/components/watchsignals/app/watchsignals.app.ts deleted file mode 100644 index 6f5abb61f91d7..0000000000000 --- a/components/watchsignals/app/watchsignals.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "watchsignals", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/watchsignals/package.json b/components/watchsignals/package.json index 91a93403cba5f..a9125b1b243e9 100644 --- a/components/watchsignals/package.json +++ b/components/watchsignals/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/watchsignals", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream WatchSignals Components", - "main": "dist/app/watchsignals.app.mjs", + "main": "watchsignals.app.mjs", "keywords": [ "pipedream", "watchsignals" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/watchsignals", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/watchsignals/watchsignals.app.mjs b/components/watchsignals/watchsignals.app.mjs new file mode 100644 index 0000000000000..ed905523e3a24 --- /dev/null +++ b/components/watchsignals/watchsignals.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "watchsignals", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/wave/package.json b/components/wave/package.json index 9b55165a46080..b2a6736d25274 100644 --- a/components/wave/package.json +++ b/components/wave/package.json @@ -1,8 +1,8 @@ { "name": "@pipedream/wave", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Wave Components", - "main": "dist/app/wave.app.mjs", + "main": "wave.app.mjs", "keywords": [ "pipedream", "wave" @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/wbiztool/package.json b/components/wbiztool/package.json new file mode 100644 index 0000000000000..ee4d66d1d280e --- /dev/null +++ b/components/wbiztool/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/wbiztool", + "version": "0.0.1", + "description": "Pipedream WbizTool Components", + "main": "wbiztool.app.mjs", + "keywords": [ + "pipedream", + "wbiztool" + ], + "homepage": "https://pipedream.com/apps/wbiztool", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/wbiztool/wbiztool.app.mjs b/components/wbiztool/wbiztool.app.mjs new file mode 100644 index 0000000000000..950a7475cc6d8 --- /dev/null +++ b/components/wbiztool/wbiztool.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "wbiztool", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/wekan/package.json b/components/wekan/package.json new file mode 100644 index 0000000000000..3495a44bb631a --- /dev/null +++ b/components/wekan/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/wekan", + "version": "0.0.1", + "description": "Pipedream WeKan Components", + "main": "wekan.app.mjs", + "keywords": [ + "pipedream", + "wekan" + ], + "homepage": "https://pipedream.com/apps/wekan", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/wekan/wekan.app.mjs b/components/wekan/wekan.app.mjs new file mode 100644 index 0000000000000..f54d1ae159465 --- /dev/null +++ b/components/wekan/wekan.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "wekan", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/wesupply/package.json b/components/wesupply/package.json index a6309d1b716c5..fbfcb215b65c7 100644 --- a/components/wesupply/package.json +++ b/components/wesupply/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/wesupply", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream WeSupply Components", "main": "wesupply.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/whosonlocation/.gitignore b/components/whosonlocation/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/whosonlocation/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/whosonlocation/app/whosonlocation.app.ts b/components/whosonlocation/app/whosonlocation.app.ts deleted file mode 100644 index 5d14f6aa7917d..0000000000000 --- a/components/whosonlocation/app/whosonlocation.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "whosonlocation", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/whosonlocation/package.json b/components/whosonlocation/package.json index 39778c02c2182..f888aa212851c 100644 --- a/components/whosonlocation/package.json +++ b/components/whosonlocation/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/whosonlocation", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream WhosOnLocation Components", - "main": "dist/app/whosonlocation.app.mjs", + "main": "whosonlocation.app.mjs", "keywords": [ "pipedream", "whosonlocation" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/whosonlocation", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/whosonlocation/whosonlocation.app.mjs b/components/whosonlocation/whosonlocation.app.mjs new file mode 100644 index 0000000000000..83e3dc56d3a1c --- /dev/null +++ b/components/whosonlocation/whosonlocation.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "whosonlocation", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/wicked_reports/.gitignore b/components/wicked_reports/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/wicked_reports/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/wicked_reports/app/wicked_reports.app.ts b/components/wicked_reports/app/wicked_reports.app.ts deleted file mode 100644 index 0e0262be0eb38..0000000000000 --- a/components/wicked_reports/app/wicked_reports.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "wicked_reports", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/wicked_reports/package.json b/components/wicked_reports/package.json index 442ce3d655d12..edfae93eeb75b 100644 --- a/components/wicked_reports/package.json +++ b/components/wicked_reports/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/wicked_reports", - "version": "0.0.1", + "version": "0.0.2", "description": "Pipedream Wicked Reports Components", - "main": "dist/app/wicked_reports.app.mjs", + "main": "wicked_reports.app.mjs", "keywords": [ "pipedream", "wicked_reports" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/wicked_reports", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/wicked_reports/wicked_reports.app.mjs b/components/wicked_reports/wicked_reports.app.mjs new file mode 100644 index 0000000000000..24e62623d0902 --- /dev/null +++ b/components/wicked_reports/wicked_reports.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "wicked_reports", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/wildberries/package.json b/components/wildberries/package.json index 02471b552b6d0..5e7af8cb39809 100644 --- a/components/wildberries/package.json +++ b/components/wildberries/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/wildberries", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Wildberries Components", "main": "dist/app/wildberries.app.mjs", "keywords": [ @@ -17,5 +17,8 @@ }, "dependencies": { "@pipedream/platform": "^1.1.1" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/wildberries/tsconfig.json b/components/wildberries/tsconfig.json index 335fa6f1cf6ec..3a9389484d040 100644 --- a/components/wildberries/tsconfig.json +++ b/components/wildberries/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/wire2air/.gitignore b/components/wire2air/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/wire2air/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/wire2air/app/wire2air.app.ts b/components/wire2air/app/wire2air.app.ts deleted file mode 100644 index d94bc0ba7efb1..0000000000000 --- a/components/wire2air/app/wire2air.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "wire2air", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/wire2air/package.json b/components/wire2air/package.json index 34268d5dce8b2..397d72fa62acb 100644 --- a/components/wire2air/package.json +++ b/components/wire2air/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/wire2air", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Wire2Air Components", - "main": "dist/app/wire2air.app.mjs", + "main": "wire2air.app.mjs", "keywords": [ "pipedream", "wire2air" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/wire2air", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/wire2air/wire2air.app.mjs b/components/wire2air/wire2air.app.mjs new file mode 100644 index 0000000000000..d1ab9c435ab7e --- /dev/null +++ b/components/wire2air/wire2air.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "wire2air", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/wishpond/.gitignore b/components/wishpond/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/wishpond/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/wishpond/app/wishpond.app.ts b/components/wishpond/app/wishpond.app.ts deleted file mode 100644 index 368f13ce2b421..0000000000000 --- a/components/wishpond/app/wishpond.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "wishpond", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/wishpond/package.json b/components/wishpond/package.json index 910a7444b3a0f..be23d60f1d04d 100644 --- a/components/wishpond/package.json +++ b/components/wishpond/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/wishpond", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Wishpond Components", - "main": "dist/app/wishpond.app.mjs", + "main": "wishpond.app.mjs", "keywords": [ "pipedream", "wishpond" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/wishpond", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/wishpond/wishpond.app.mjs b/components/wishpond/wishpond.app.mjs new file mode 100644 index 0000000000000..ecbcdd17b299c --- /dev/null +++ b/components/wishpond/wishpond.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "wishpond", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/wix/.gitignore b/components/wix/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/wix/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/wix/app/wix.app.ts b/components/wix/app/wix.app.ts deleted file mode 100644 index a203797989912..0000000000000 --- a/components/wix/app/wix.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "wix", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/wix/package.json b/components/wix/package.json index a61c8dafd89f1..7212804a827f0 100644 --- a/components/wix/package.json +++ b/components/wix/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/wix", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Wix Components", - "main": "dist/app/wix.app.mjs", + "main": "wix.app.mjs", "keywords": [ "pipedream", "wix" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/wix", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/wix/wix.app.mjs b/components/wix/wix.app.mjs new file mode 100644 index 0000000000000..442eb0dc870df --- /dev/null +++ b/components/wix/wix.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "wix", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/woodelivery/woodelivery.app.mjs b/components/woodelivery/woodelivery.app.mjs index c4d2186f020d7..633c661351002 100644 --- a/components/woodelivery/woodelivery.app.mjs +++ b/components/woodelivery/woodelivery.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/woopra/.gitignore b/components/woopra/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/woopra/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/woopra/app/woopra.app.ts b/components/woopra/app/woopra.app.ts deleted file mode 100644 index 7d92589b1b61d..0000000000000 --- a/components/woopra/app/woopra.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "woopra", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/woopra/package.json b/components/woopra/package.json index 168bbc45e96b6..74ae3945df9eb 100644 --- a/components/woopra/package.json +++ b/components/woopra/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/woopra", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Woopra Components", - "main": "dist/app/woopra.app.mjs", + "main": "woopra.app.mjs", "keywords": [ "pipedream", "woopra" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/woopra", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/woopra/woopra.app.mjs b/components/woopra/woopra.app.mjs new file mode 100644 index 0000000000000..6a017dc52ec60 --- /dev/null +++ b/components/woopra/woopra.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "woopra", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/workast/package.json b/components/workast/package.json index 56afe32cd0318..0806509110940 100644 --- a/components/workast/package.json +++ b/components/workast/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/workast", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Workast Components", "main": "dist/app/workast.app.mjs", "keywords": [ @@ -16,7 +16,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.0", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/workast/tsconfig.json b/components/workast/tsconfig.json index 335fa6f1cf6ec..3a9389484d040 100644 --- a/components/workast/tsconfig.json +++ b/components/workast/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/workday/actions/change-business-title/change-business-title.mjs b/components/workday/actions/change-business-title/change-business-title.mjs new file mode 100644 index 0000000000000..669f616c20540 --- /dev/null +++ b/components/workday/actions/change-business-title/change-business-title.mjs @@ -0,0 +1,34 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-change-business-title", + name: "Change Business Title", + description: "Change the business title of a worker. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/post-/workers/-ID-/businessTitleChanges)", + version: "0.0.1", + type: "action", + props: { + workday, + workerId: { + propDefinition: [ + workday, + "workerId", + ], + }, + proposedBusinessTitle: { + type: "string", + label: "Proposed Business Title", + description: "The new business title for the worker", + }, + }, + async run({ $ }) { + const response = await this.workday.changeBusinessTitle({ + $, + workerId: this.workerId, + data: { + proposedBusinessTitle: this.proposedBusinessTitle, + }, + }); + $.export("$summary", `Successfully changed business title for worker ${this.workerId}`); + return response; + }, +}; diff --git a/components/workday/actions/create-job-change/create-job-change.mjs b/components/workday/actions/create-job-change/create-job-change.mjs new file mode 100644 index 0000000000000..722cdfe6fa87b --- /dev/null +++ b/components/workday/actions/create-job-change/create-job-change.mjs @@ -0,0 +1,60 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-create-job-change", + name: "Create Job Change", + description: "Create a job change for a worker. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/post-/workers/-ID-/jobChanges)", + version: "0.0.1", + type: "action", + props: { + workday, + workerId: { + propDefinition: [ + workday, + "workerId", + ], + }, + supervisoryOrganizationId: { + propDefinition: [ + workday, + "supervisoryOrganizationId", + ], + }, + jobChangeReasonId: { + propDefinition: [ + workday, + "jobChangeReasonId", + ], + }, + moveManagersTeam: { + type: "boolean", + label: "Move Managers Team", + description: "Indicates whether teams reporting to the ~Manager~ moved with them during the Change Job Event", + optional: true, + }, + effective: { + type: "string", + label: "Effective", + description: "The date this business process takes effect. Example: `2025-08-09T07:00:00.000Z`", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.workday.createJobChange({ + $, + workerId: this.workerId, + data: { + supervisoryOrganization: { + id: this.supervisoryOrganizationId, + }, + jobChangeReason: { + id: this.jobChangeReasonId, + }, + moveManagersTeam: this.moveManagersTeam, + effective: this.effective, + }, + }); + $.export("$summary", `Successfully created job change for worker ${this.workerId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-worker/get-worker.mjs b/components/workday/actions/get-worker/get-worker.mjs new file mode 100644 index 0000000000000..6cd06617f6c71 --- /dev/null +++ b/components/workday/actions/get-worker/get-worker.mjs @@ -0,0 +1,26 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-worker", + name: "Get Worker", + description: "Get a worker. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/get-/workers/-ID-)", + version: "0.0.1", + type: "action", + props: { + workday, + workerId: { + propDefinition: [ + workday, + "workerId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getWorker({ + $, + workerId: this.workerId, + }); + $.export("$summary", `Successfully fetched worker ${this.workerId}`); + return response; + }, +}; diff --git a/components/workday/actions/list-organization-types/list-organization-types.mjs b/components/workday/actions/list-organization-types/list-organization-types.mjs new file mode 100644 index 0000000000000..e3bb86024a1ed --- /dev/null +++ b/components/workday/actions/list-organization-types/list-organization-types.mjs @@ -0,0 +1,35 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-organization-types", + name: "List Organization Types", + description: "List organization types. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/organizationTypes)", + version: "0.0.1", + type: "action", + props: { + workday, + maxResults: { + propDefinition: [ + workday, + "maxResults", + ], + }, + }, + async run({ $ }) { + const results = this.workday.paginate({ + fn: this.workday.listOrganizationTypes, + args: { + $, + }, + max: this.maxResults, + }); + + const data = []; + for await (const result of results) { + data.push(result); + } + + $.export("$summary", `Successfully fetched ${data.length} organization types`); + return data; + }, +}; diff --git a/components/workday/actions/list-supervisory-organizations/list-supervisory-organizations.mjs b/components/workday/actions/list-supervisory-organizations/list-supervisory-organizations.mjs new file mode 100644 index 0000000000000..7577b9d46ca47 --- /dev/null +++ b/components/workday/actions/list-supervisory-organizations/list-supervisory-organizations.mjs @@ -0,0 +1,35 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-supervisory-organizations", + name: "List Supervisory Organizations", + description: "List supervisory organizations. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/get-/supervisoryOrganizations)", + version: "0.0.1", + type: "action", + props: { + workday, + maxResults: { + propDefinition: [ + workday, + "maxResults", + ], + }, + }, + async run({ $ }) { + const results = this.workday.paginate({ + fn: this.workday.listSupervisoryOrganizations, + args: { + $, + }, + max: this.maxResults, + }); + + const data = []; + for await (const result of results) { + data.push(result); + } + + $.export("$summary", `Successfully fetched ${data.length} supervisory organizations`); + return data; + }, +}; diff --git a/components/workday/actions/list-worker-payslips/list-worker-payslips.mjs b/components/workday/actions/list-worker-payslips/list-worker-payslips.mjs new file mode 100644 index 0000000000000..9624646507ac3 --- /dev/null +++ b/components/workday/actions/list-worker-payslips/list-worker-payslips.mjs @@ -0,0 +1,42 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-worker-payslips", + name: "List Worker Payslips", + description: "List the payslips for a worker. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/get-/workers/-ID-/paySlips)", + version: "0.0.1", + type: "action", + props: { + workday, + workerId: { + propDefinition: [ + workday, + "workerId", + ], + }, + maxResults: { + propDefinition: [ + workday, + "maxResults", + ], + }, + }, + async run({ $ }) { + const results = this.workday.paginate({ + fn: this.workday.listWorkerPayslips, + args: { + $, + workerId: this.workerId, + }, + max: this.maxResults, + }); + + const data = []; + for await (const result of results) { + data.push(result); + } + + $.export("$summary", `Successfully fetched ${data.length} payslips for worker ${this.workerId}`); + return data; + }, +}; diff --git a/components/workday/actions/search-workers/search-workers.mjs b/components/workday/actions/search-workers/search-workers.mjs new file mode 100644 index 0000000000000..b54db20999b4b --- /dev/null +++ b/components/workday/actions/search-workers/search-workers.mjs @@ -0,0 +1,44 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-search-workers", + name: "Search Workers", + description: "Retrieve a list of workers based on a search query. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/get-/workers)", + version: "0.0.1", + type: "action", + props: { + workday, + search: { + type: "string", + label: "Search", + description: "The search query to use to filter workers", + optional: true, + }, + maxResults: { + propDefinition: [ + workday, + "maxResults", + ], + }, + }, + async run({ $ }) { + const results = this.workday.paginate({ + fn: this.workday.listWorkers, + args: { + $, + params: { + search: this.search, + }, + }, + max: this.maxResults, + }); + + const data = []; + for await (const result of results) { + data.push(result); + } + + $.export("$summary", `Successfully fetched ${data.length} workers`); + return data; + }, +}; diff --git a/components/workday/package.json b/components/workday/package.json new file mode 100644 index 0000000000000..77854e2d2875b --- /dev/null +++ b/components/workday/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/workday", + "version": "0.1.0", + "description": "Pipedream Workday Components", + "main": "workday.app.mjs", + "keywords": [ + "pipedream", + "workday" + ], + "homepage": "https://pipedream.com/apps/workday", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" + } +} diff --git a/components/workday/sources/common/base-polling.mjs b/components/workday/sources/common/base-polling.mjs new file mode 100644 index 0000000000000..d70e12b8ac29d --- /dev/null +++ b/components/workday/sources/common/base-polling.mjs @@ -0,0 +1,16 @@ +import workday from "../../workday.app.mjs"; +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; + +export default { + props: { + workday, + db: "$.service.db", + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + methods: {}, +}; diff --git a/components/workday/sources/new-worker-created/new-worker-created.mjs b/components/workday/sources/new-worker-created/new-worker-created.mjs new file mode 100644 index 0000000000000..e5dcec74b4455 --- /dev/null +++ b/components/workday/sources/new-worker-created/new-worker-created.mjs @@ -0,0 +1,68 @@ +import common from "../common/base-polling.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "workday-new-worker-created", + name: "New Worker Created", + description: "Emit new event for each new worker created in Workday. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/get-/workers)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + _getPreviousIds() { + return this.db.get("previousIds") || {}; + }, + _setPreviousIds(ids) { + this.db.set("previousIds", ids); + }, + generateMeta(worker) { + return { + id: worker.id, + summary: `New worker created: ${worker.descriptor}`, + ts: Date.now(), + }; + }, + async processEvent(limit) { + const results = this.workday.paginate({ + fn: this.workday.listWorkers, + }); + + const previousIds = this._getPreviousIds(); + let workers = []; + + for await (const worker of results) { + if (previousIds[worker.id]) { + continue; + } + workers.push(worker); + previousIds[worker.id] = true; + } + + this._setPreviousIds(previousIds); + + if (!workers?.length) { + return; + } + + if (limit) { + workers = workers.slice(0, limit); + } + + for (const worker of workers) { + const meta = this.generateMeta(worker); + this.$emit(worker, meta); + } + }, + }, + hooks: { + async deploy() { + await this.processEvent(25); + }, + }, + async run() { + await this.processEvent(); + }, + sampleEmit, +}; diff --git a/components/workday/sources/new-worker-created/test-event.mjs b/components/workday/sources/new-worker-created/test-event.mjs new file mode 100644 index 0000000000000..32acd72d2399a --- /dev/null +++ b/components/workday/sources/new-worker-created/test-event.mjs @@ -0,0 +1,14 @@ +export default { + "id": "dd7b18bd75894bd7995a50d42d484956", + "descriptor": "Amelia Casias", + "href": "https://i-09598dd57ca10acdb.workdayeducation.com/api/api/v1/unified01/workers/dd7b18bd75894bd7995a50d42d484956", + "isManager": true, + "primaryWorkPhone": "+1 (773) 721-0897", + "primaryWorkEmail": "acasias@workday.net", + "primarySupervisoryOrganization": { + "descriptor": "Global Support - North America Group", + "id": "2b9dd606a65442768420d425f580a1c6", + "href": "https://i-09598dd57ca10acdb.workdayeducation.com/api/api/v1/unified01/supervisoryOrganizations/2b9dd606a65442768420d425f580a1c6" + }, + "businessTitle": "Manager, Global Support" +} \ No newline at end of file diff --git a/components/workday/workday.app.mjs b/components/workday/workday.app.mjs new file mode 100644 index 0000000000000..2ac130224eaad --- /dev/null +++ b/components/workday/workday.app.mjs @@ -0,0 +1,171 @@ +import { axios } from "@pipedream/platform"; +const DEFAULT_LIMIT = 100; + +export default { + type: "app", + app: "workday", + propDefinitions: { + workerId: { + type: "string", + label: "Worker ID", + description: "The ID of a worker", + async options({ page }) { + const { data } = await this.listWorkers({ + params: { + limit: DEFAULT_LIMIT, + offset: page * DEFAULT_LIMIT, + }, + }); + return data?.map((worker) => ({ + label: worker.descriptor, + value: worker.id, + })) || []; + }, + }, + supervisoryOrganizationId: { + type: "string", + label: "Supervisory Organization ID", + description: "The ID of a supervisory organization", + async options({ page }) { + const { data } = await this.listSupervisoryOrganizations({ + params: { + limit: DEFAULT_LIMIT, + offset: page * DEFAULT_LIMIT, + }, + }); + return data?.map((organization) => ({ + label: organization.descriptor, + value: organization.id, + })) || []; + }, + }, + jobChangeReasonId: { + type: "string", + label: "Job Change Reason ID", + description: "The ID of a job change reason", + async options({ page }) { + const { data } = await this.listJobChangeReasons({ + params: { + limit: DEFAULT_LIMIT, + offset: page * DEFAULT_LIMIT, + }, + }); + return data?.map((reason) => ({ + label: reason.descriptor, + value: reason.id, + })) || []; + }, + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of results to return", + optional: true, + default: 100, + }, + }, + methods: { + _baseUrl() { + return `https://${this.$auth.domain}/ccx/api/v1/${this.$auth.tenant_id}`; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: { + Authorization: `Bearer ${this.$auth.oauth_access_token}`, + }, + ...opts, + }); + }, + getWorker({ + workerId, ...opts + }) { + return this._makeRequest({ + path: `/workers/${workerId}`, + ...opts, + }); + }, + listWorkers(opts = {}) { + return this._makeRequest({ + path: "/workers", + ...opts, + }); + }, + listOrganizationTypes(opts = {}) { + return this._makeRequest({ + path: "/organizationTypes", + ...opts, + }); + }, + listSupervisoryOrganizations(opts = {}) { + return this._makeRequest({ + path: "/supervisoryOrganizations", + ...opts, + }); + }, + listJobChangeReasons(opts = {}) { + return this._makeRequest({ + path: "/jobChangeReasons", + ...opts, + }); + }, + listWorkerPayslips({ + workerId, ...opts + }) { + return this._makeRequest({ + path: `/workers/${workerId}/paySlips`, + ...opts, + }); + }, + createJobChange({ + workerId, ...opts + }) { + return this._makeRequest({ + path: `/workers/${workerId}/jobChanges`, + method: "POST", + ...opts, + }); + }, + changeBusinessTitle({ + workerId, ...opts + }) { + return this._makeRequest({ + path: `/workers/${workerId}/businessTitleChanges`, + method: "POST", + ...opts, + }); + }, + async *paginate({ + fn, args = {}, max, + }) { + args = { + ...args, + params: { + ...args?.params, + limit: DEFAULT_LIMIT, + offset: 0, + }, + }; + let hasMore, count = 0; + do { + const { + data, total, + } = await fn(args); + if (!data?.length) { + return; + } + for (const item of data) { + yield item; + count++; + if (max && count >= max) { + return; + } + } + hasMore = count < total; + args.params.offset += args.params.limit; + } while (hasMore); + }, + }, +}; diff --git a/components/workflow_max/package.json b/components/workflow_max/package.json index 1cd3055edf414..87159379c7234 100644 --- a/components/workflow_max/package.json +++ b/components/workflow_max/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/workflow_max", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Workflow Max Components", "main": "workflow_max.app.mjs", "keywords": [ @@ -13,6 +13,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.1.0" + "@pipedream/platform": "^3.1.0", + "xml2js": "^0.6.2" } } diff --git a/components/workiom/.gitignore b/components/workiom/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/workiom/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/workiom/app/workiom.app.ts b/components/workiom/app/workiom.app.ts deleted file mode 100644 index 9f0a861202903..0000000000000 --- a/components/workiom/app/workiom.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "workiom", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/workiom/package.json b/components/workiom/package.json index 6805d78dea7f1..398e71a0dce4a 100644 --- a/components/workiom/package.json +++ b/components/workiom/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/workiom", - "version": "0.0.4", + "version": "0.0.5", "description": "Pipedream Workiom Components", - "main": "dist/app/workiom.app.mjs", + "main": "workiom.app.mjs", "keywords": [ "pipedream", "workiom" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/workiom", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/workiom/workiom.app.mjs b/components/workiom/workiom.app.mjs new file mode 100644 index 0000000000000..490d7fa0b89ca --- /dev/null +++ b/components/workiom/workiom.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "workiom", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/worksnaps/.gitignore b/components/worksnaps/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/worksnaps/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/worksnaps/app/worksnaps.app.ts b/components/worksnaps/app/worksnaps.app.ts deleted file mode 100644 index f0ff26fc8cc2a..0000000000000 --- a/components/worksnaps/app/worksnaps.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "worksnaps", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/worksnaps/package.json b/components/worksnaps/package.json index 66ec32a1f1ff1..db48d2bfdcd9c 100644 --- a/components/worksnaps/package.json +++ b/components/worksnaps/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/worksnaps", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Worksnaps Components", - "main": "dist/app/worksnaps.app.mjs", + "main": "worksnaps.app.mjs", "keywords": [ "pipedream", "worksnaps" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/worksnaps", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/worksnaps/worksnaps.app.mjs b/components/worksnaps/worksnaps.app.mjs new file mode 100644 index 0000000000000..2bf024125cd1c --- /dev/null +++ b/components/worksnaps/worksnaps.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "worksnaps", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/writesonic/.gitignore b/components/writesonic/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/writesonic/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/writesonic/app/writesonic.app.ts b/components/writesonic/app/writesonic.app.ts deleted file mode 100644 index 5fd3de698ffd9..0000000000000 --- a/components/writesonic/app/writesonic.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "writesonic", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/writesonic/package.json b/components/writesonic/package.json index 2088e6edad861..fbe9e984a6184 100644 --- a/components/writesonic/package.json +++ b/components/writesonic/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/writesonic", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Writesonic Components", - "main": "dist/app/writesonic.app.mjs", + "main": "writesonic.app.mjs", "keywords": [ "pipedream", "writesonic" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/writesonic", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/writesonic/writesonic.app.mjs b/components/writesonic/writesonic.app.mjs new file mode 100644 index 0000000000000..d4c8f3eca3d48 --- /dev/null +++ b/components/writesonic/writesonic.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "writesonic", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/xero_accounting_api/actions/add-line-item-to-invoice/add-line-item-to-invoice.mjs b/components/xero_accounting_api/actions/add-line-item-to-invoice/add-line-item-to-invoice.mjs index 75c07ef702c54..4fd218b35e693 100644 --- a/components/xero_accounting_api/actions/add-line-item-to-invoice/add-line-item-to-invoice.mjs +++ b/components/xero_accounting_api/actions/add-line-item-to-invoice/add-line-item-to-invoice.mjs @@ -1,14 +1,14 @@ -import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; import { - removeNullEntries, formatLineItems, + removeNullEntries, } from "../../common/util.mjs"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-add-line-item-to-invoice", name: "Add Items to Existing Sales Invoice", description: "Adds line items to an existing sales invoice. [See the docs here](https://developer.xero.com/documentation/api/accounting/invoices#post-invoices)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { xeroAccountingApi, @@ -35,16 +35,15 @@ export default { }, }, async run({ $ }) { - const { - tenantId, - invoiceId, - lineItems, - } = this; - const data = removeNullEntries({ - InvoiceID: invoiceId, - LineItems: formatLineItems(lineItems), + const response = await this.xeroAccountingApi.createInvoice({ + $, + tenantId: this.tenantId, + data: removeNullEntries({ + InvoiceID: this.invoiceId, + LineItems: formatLineItems(this.lineItems), + }), }); - const response = await this.xeroAccountingApi.createInvoice($, tenantId, data); + response && $.export("$summary", "Line item created successfully"); return response; }, diff --git a/components/xero_accounting_api/actions/create-bank-transaction/create-bank-transaction.mjs b/components/xero_accounting_api/actions/create-bank-transaction/create-bank-transaction.mjs index a5fabb42198ca..12d8835819b1a 100644 --- a/components/xero_accounting_api/actions/create-bank-transaction/create-bank-transaction.mjs +++ b/components/xero_accounting_api/actions/create-bank-transaction/create-bank-transaction.mjs @@ -1,42 +1,47 @@ -// legacy_hash_id: a_WYiwz2 -import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-create-bank-transaction", name: "Create Bank Transaction", - version: "0.1.1", + description: "Create a new bank transaction [See the documentation](https://developer.xero.com/documentation/api/accounting/banktransactions#put-banktransactions)", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - bank_account_code: { + bankAccountCode: { type: "string", + label: "Bank account code", description: "The Account Code of the Bank Account of the transaction. If Code is not included then AccountID is required.", optional: true, }, - bank_account_id: { + bankAccountId: { type: "string", + label: "Bank account ID", description: "The ID of the Bank Account transaction. If AccountID is not included then Code is required.", optional: true, }, - contact_id: { + contactId: { type: "string", + label: "Contact ID", description: "Id of the contact associated to the bank transaction.", optional: true, }, - contact_name: { + contactName: { type: "string", + label: "Contact name", description: "Name of the contact associated to the bank transaction. If there is no contact matching this name, a new contact is created.", optional: true, }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, type: { type: "string", + label: "Type", description: "See [Bank Transaction Types](https://developer.xero.com/documentation/api/types#BankTransactionTypes)", options: [ "RECEIVE", @@ -47,42 +52,50 @@ export default { "SPEND-PREPAYMENT", ], }, - line_items: { + lineItems: { type: "object", + label: "Line items", description: "See [LineItems](https://developer.xero.com/documentation/api/banktransactions#LineItemsPOST). The LineItems element can contain any number of individual LineItem sub-elements. At least **one** is required to create a bank transaction.", }, - is_reonciled: { + isReconciled: { type: "boolean", + label: "Is reconciled", description: "Boolean to show if transaction is reconciled. Conversion related apps can set the IsReconciled flag in scenarios when a matching bank statement line is not available. [Learn more](http://help.xero.com/#Q_BankRecNoImport)", optional: true, }, date: { type: "string", + label: "Date", description: "Date of transaction - YYYY-MM-DD", optional: true, }, reference: { type: "string", + label: "Reference", description: "Reference for the transaction. Only supported for SPEND and RECEIVE transactions.", optional: true, }, - currency_code: { + currencyCode: { type: "string", + label: "Currency code", description: "The currency that bank transaction has been raised in (see [Currencies](https://developer.xero.com/documentation/api/currencies)). Setting currency is only supported on overpayments.", optional: true, }, - currency_rate: { + currencyRate: { type: "string", + label: "Currency rate", description: "Exchange rate to base currency when money is spent or received. e.g. 0.7500 Only used for bank transactions in non base currency. If this isn't specified for non base currency accounts then either the user-defined rate (preference) or the [XE.com day rate](http://help.xero.com/#CurrencySettings$Rates) will be used. Setting currency is only supported on overpayments.", optional: true, }, url: { type: "string", + label: "URL", description: "URL link to a source document - shown as \"Go to App Name\"", optional: true, }, status: { type: "string", + label: "Status", description: "See [Bank Transaction Status Codes](https://developer.xero.com/documentation/api/types#BankTransactionStatuses)", optional: true, options: [ @@ -90,8 +103,9 @@ export default { "DELETED", ], }, - line_amount_types: { + lineAmountTypes: { type: "string", + label: "Line amount types", description: "Line amounts are exclusive of tax by default if you don't specify this element. See [Line Amount Types](https://developer.xero.com/documentation/api/types#LineAmountTypes)", optional: true, options: [ @@ -102,41 +116,39 @@ export default { }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/banktransactions#PUT - - if ((!this.bank_account_code && !this.bank_account_id) - || (!this.contact_id && !this.contact_name) - || !this.tenant_id || !this.type || !this.line_items) { - throw new Error("Must provide one of bank_account_code or bank_account_id, contact_id or contact_name, tenant_id, type, and line_items parameters."); + if (!this.bankAccountCode && !this.bankAccountId) { + throw new ConfigurationError("Must provide one of **Bank Account Code** or **Bank Account ID** parameters."); + } + if (!this.contactId && !this.contactName) { + throw new ConfigurationError("Must provide one of **Contact ID** or **Contact Name** parameters."); } - return await axios($, { - method: "put", - url: "https://api.xero.com/api.xro/2.0/BankTransactions", - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, + const response = await this.xeroAccountingApi.createBankTransaction({ + $, + tenantId: this.tenantId, data: { Type: this.type, BankAccount: { - Code: this.bank_account_code, - AccountID: this.bank_account_id, + Code: this.bankAccountCode, + AccountID: this.bankAccountId, }, Contact: { - ContactID: this.contact_id, - Name: this.contact_name, + ContactID: this.contactId, + Name: this.contactName, }, - IsReconciled: this.is_reonciled, + IsReconciled: this.isReconciled, Date: this.date, Reference: this.reference, - CurrencyCode: this.currency_code, - CurrencyRate: this.currency_rate, + CurrencyCode: this.currencyCode, + CurrencyRate: this.currencyRate, Url: this.url, Status: this.status, - Lineitems: this.line_items, - LineAmountTypes: this.line_amount_types, + Lineitems: this.lineItems, + LineAmountTypes: this.lineAmountTypes, }, }); + + $.export("$summary", `Successfully created bank transaction with ID: ${response.BankTransactions[0].BankTransactionID}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/create-bill/create-bill.mjs b/components/xero_accounting_api/actions/create-bill/create-bill.mjs index d53535bf84072..2199f33b23e4b 100644 --- a/components/xero_accounting_api/actions/create-bill/create-bill.mjs +++ b/components/xero_accounting_api/actions/create-bill/create-bill.mjs @@ -1,8 +1,8 @@ import { - removeNullEntries, deleteKeys, - isValidDate, formatLineItems, + isValidDate, + removeNullEntries, } from "../../common/util.mjs"; import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; @@ -10,7 +10,7 @@ export default { key: "xero_accounting_api-create-bill", name: "Create Bill", description: "Creates a new bill (Accounts Payable)[See the docs here](https://developer.xero.com/documentation/api/accounting/invoices)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { xeroAccountingApi, @@ -73,34 +73,27 @@ export default { }, }, async run({ $ }) { - const { - tenantId, - contact, - invoiceNumber, - reference, - lineItems, - date, - dueDate, - currencyCode, - } = this; - const data = removeNullEntries({ - Type: "ACCPAY", - Contact: contact?.ContactID - ? deleteKeys(contact, [ - "Name", - "FirstName", - "LastName", - "EmailAddress", - ]) - : contact, - LineItems: formatLineItems(lineItems), - Date: isValidDate(date, "Date") && date, - DueDate: isValidDate(dueDate, "DueDate") && dueDate, - CurrencyCode: currencyCode, - InvoiceNumber: invoiceNumber, - Reference: reference, + const response = await this.xeroAccountingApi.createInvoice({ + $, + tenantId: this.tenantId, + data: removeNullEntries({ + Type: "ACCPAY", + Contact: this.contact?.ContactID + ? deleteKeys(this.contact, [ + "Name", + "FirstName", + "LastName", + "EmailAddress", + ]) + : this.contact, + LineItems: formatLineItems(this.lineItems), + Date: isValidDate(this.date, "Date") && this.date, + DueDate: isValidDate(this.dueDate, "DueDate") && this.dueDate, + CurrencyCode: this.currencyCode, + InvoiceNumber: this.invoiceNumber, + Reference: this.reference, + }), }); - const response = await this.xeroAccountingApi.createInvoice($, tenantId, data); response && $.export("$summary", "Bill successfully created"); return response; }, diff --git a/components/xero_accounting_api/actions/create-credit-note/create-credit-note.mjs b/components/xero_accounting_api/actions/create-credit-note/create-credit-note.mjs index eccdd0f2522e5..a26e8bd2bec40 100644 --- a/components/xero_accounting_api/actions/create-credit-note/create-credit-note.mjs +++ b/components/xero_accounting_api/actions/create-credit-note/create-credit-note.mjs @@ -1,37 +1,41 @@ -// legacy_hash_id: a_3Lieoo -import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; +import { formatLineItems } from "../../common/util.mjs"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-create-credit-note", name: "Create Credit Note", description: "Creates a new credit note.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - contact_id: { + contactId: { + label: "Contact ID", type: "string", description: "Id of the contact associated to the credit note.", optional: true, }, - contact_name: { + contactName: { type: "string", + label: "Contact Name", description: "Name of the contact associated to the credit note. If there is no contact matching this name, a new contact is created.", optional: true, }, - contact_number: { + contactNumber: { type: "string", + label: "Contact Number", description: "Number of the contact associated to the credit note. If there is no contact matching this name, a new contact is created.", optional: true, }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, type: { + label: "Type", type: "string", description: "See [Credit Note Types](https://developer.xero.com/documentation/api/types#CreditNoteTypes)", options: [ @@ -41,11 +45,13 @@ export default { }, date: { type: "string", + label: "Date", description: "The date the credit note is issued YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation", optional: true, }, status: { type: "string", + label: "Status", description: "See [Credit Note Status Codes](https://developer.xero.com/documentation/api/types#CreditNoteStatuses)", optional: true, options: [ @@ -57,7 +63,8 @@ export default { "VOIDED", ], }, - line_amount_types: { + lineAmountTypes: { + label: "Line amount types", type: "string", description: "See [Invoice Line Amount Types](https://developer.xero.com/documentation/api/Types#LineAmountTypes)", optional: true, @@ -67,74 +74,83 @@ export default { "NoTax", ], }, - line_items: { + lineItems: { + label: "Line items", type: "object", description: "See [Invoice Line Items](https://developer.xero.com/documentation/api/Invoices#LineItems)", optional: true, }, - currency_code: { + currencyCode: { + label: "Currency code", type: "string", description: "Currency used for the Credit Note", optional: true, }, - credit_note_number: { + creditNoteNumber: { + label: "Credit note number", type: "string", description: "[ACCRECCREDIT](https://developer.xero.com/documentation/api/types#CreditNoteTypes) - Unique alpha numeric code identifying credit note ( *when missing will auto-generate from your Organisation Invoice Settings*)\n[ACCPAYCREDIT](https://developer.xero.com/documentation/api/types#CreditNoteTypes) - non-unique alpha numeric code identifying credit note. This value will also display as Reference in the UI.", optional: true, }, reference: { + label: "Reference", type: "string", description: "ACCRECCREDIT only - additional reference number", optional: true, }, - sent_to_contact: { + sentToContact: { + label: "Sent to contact", type: "boolean", description: "Boolean to indicate if a credit note has been sent to a contact via the Xero app (currently read only)", optional: true, }, - currency_rate: { + currencyRate: { + label: "Currency rate", type: "string", description: "The currency rate for a multicurrency invoice. If no rate is specified, the [XE.com day rate](http://help.xero.com/#CurrencySettings$Rates) is used", optional: true, }, - branding_theme_id: { + brandingThemeId: { + label: "Branding theme ID", type: "string", description: "See [BrandingThemes](https://developer.xero.com/documentation/api/branding-themes)", optional: true, }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/credit-notes#POST - - if ((!this.contact_id && !this.contact_name && !this.contact_number) || !this.tenant_id || !this.type) { - throw new Error("Must provide one of contact_id or contact_name or contact_number, and tenant_id, type parameters."); + if (( + !this.contactId && + !this.contactName && + !this.contactNumber) || + !this.tenantId || + !this.type) { + throw new ConfigurationError("Must provide one of **Contact ID** or **Contact Name** or **Contact Number**, **Tenant ID**, and **Type** parameters."); } - return await axios($, { - method: "post", - url: "https://api.xero.com/api.xro/2.0/CreditNotes", - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, + const response = await this.xeroAccountingApi.createCreditNote({ + $, + tenantId: this.tenantId, data: { Type: this.type, Contact: { - ContactID: this.contact_id, - ContactNumber: this.contact_number, - Name: this.contact_name, + ContactID: this.contactId, + ContactNumber: this.contactNumber, + Name: this.contactName, }, Date: this.date, Status: this.status, - LineAmountTypes: this.line_amount_types, - LineItems: this.line_items, - CurrencyCode: this.currency_code, - CreditNoteNumber: this.credit_note_number, + LineAmountTypes: this.lineAmountTypes, + LineItems: formatLineItems(this.lineItems), + CurrencyCode: this.currencyCode, + CreditNoteNumber: this.creditNoteNumber, Reference: this.reference, - SentToContact: this.sent_to_contact, - CurrencyRate: this.currency_rate, - BrandingThemeID: this.branding_theme_id, + SentToContact: this.sentToContact, + CurrencyRate: this.currencyRate, + BrandingThemeID: this.brandingThemeId, }, }); + + $.export("$summary", `Successfully created credit note with ID: ${response.CreditNotes[0].CreditNoteID}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/create-history-note/create-history-note.mjs b/components/xero_accounting_api/actions/create-history-note/create-history-note.mjs index 66ec427f37505..1de0b9fc29653 100644 --- a/components/xero_accounting_api/actions/create-history-note/create-history-note.mjs +++ b/components/xero_accounting_api/actions/create-history-note/create-history-note.mjs @@ -1,22 +1,22 @@ -// legacy_hash_id: a_eliYe6 -import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-create-history-note", name: "Create History Note", description: "Creates a new note adding it to a document.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", - }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, endpoint: { + label: "Endpoint", type: "string", description: "The URL component, endpoint of the document type to add the history note. See [supported document types](https://developer.xero.com/documentation/api/history-and-notes#SupportedDocs)", options: [ @@ -36,28 +36,26 @@ export default { ], }, guid: { + label: "GUID", type: "string", description: "Xero identifier of the document to add a history note to.", }, details: { type: "string", + label: "Details", description: "The note to be recorded against a single document. Max Length 250 characters.", }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/history-and-notes#PUT - - if (!this.tenant_id || !this.endpoint || !this.guid || !this.details) { - throw new Error("Must provide tenant_id, endpoint, guid, and details parameters."); + if (!this.tenantId || !this.endpoint || !this.guid || !this.details) { + throw new ConfigurationError("Must provide **Tenant ID**, **Endpoint**, **GUID**, and **Details** parameters."); } - return await axios($, { - method: "put", - url: `https://api.xero.com/api.xro/2.0/${this.endpoint}/${this.guid}/history`, - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, + const response = await this.xeroAccountingApi.createHistoryNote({ + $, + tenantId: this.tenantId, + endpoint: this.endpoint, + guid: this.guid, data: { HistoryRecords: [ { @@ -66,5 +64,8 @@ export default { ], }, }); + + $.export("$summary", `Successfully created history note for ${this.endpoint} with ID: ${this.guid}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/create-item/create-item.mjs b/components/xero_accounting_api/actions/create-item/create-item.mjs index 172300de29524..ad431e58e32be 100644 --- a/components/xero_accounting_api/actions/create-item/create-item.mjs +++ b/components/xero_accounting_api/actions/create-item/create-item.mjs @@ -1,67 +1,76 @@ -// legacy_hash_id: a_a4ivOG -import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-create-item", name: "Create Item", description: "Creates a new item.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", - }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, code: { type: "string", + label: "Code", description: "User defined item code (max length = 30)", }, - inventory_asset_account_code: { + inventoryAssetAccountCode: { type: "string", + label: "Inventory Asset Account Code", description: "The inventory asset [account](https://developer.xero.com/documentation/api/accounts/) for the item. The account must be of type INVENTORY. The COGSAccountCode in PurchaseDetails is also required to create a tracked item", optional: true, }, name: { type: "string", + label: "Name", description: "The name of the item (max length = 50)", optional: true, }, - is_sold: { + isSold: { type: "boolean", + label: "Is Sold", description: "Boolean value, defaults to true. When IsSold is true the item will be available on sales transactions in the Xero UI. If IsSold is updated to false then Description and SalesDetails values will be nulled.", optional: true, }, - is_purchased: { + isPurchased: { type: "boolean", + label: "Is Purchased", description: "Boolean value, defaults to true. When IsPurchased is true the item is available for purchase transactions in the Xero UI. If IsPurchased is updated to false then PurchaseDescription and PurchaseDetails values will be nulled.", optional: true, }, description: { type: "string", + label: "Description", description: "The sales description of the item (max length = 4000)", optional: true, }, - purchase_description: { + purchaseDescription: { type: "string", + label: "Purchase Description", description: "The purchase description of the item (max length = 4000)", optional: true, }, - purchase_details: { + purchaseDetails: { type: "string", + label: "Purchase Details", description: "See Purchases & Sales. The [PurchaseDetails](https://developer.xero.com/documentation/api/items#PurchasesSales) element can contain a number of individual sub-elements.", optional: true, }, - sales_details: { + salesDetails: { type: "string", + label: "Sales Details", description: "See Purchases & Sales. The [SalesDetails](https://developer.xero.com/documentation/api/items#PurchasesSales) element can contain a number of individual sub-elements.", optional: true, }, unitdp: { type: "string", + label: "Unitdp", description: "By default UnitPrice is returned to two decimal places.", optional: true, options: [ @@ -71,34 +80,30 @@ export default { }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/items#POST - - if (!this.tenant_id || !this.code) { - throw new Error("Must provide tenant_id, and code parameters."); + if (!this.tenantId || !this.code) { + throw new ConfigurationError("Must provide **Tenant ID**, and **Code** parameters."); } - return await axios($, { - method: "put", - url: "https://api.xero.com/api.xro/2.0/Items", - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "Accept": "application/json", - "xero-tenant-id": this.tenant_id, - }, + const response = await this.xeroAccountingApi.createItem({ + $, + tenantId: this.tenantId, data: { Code: this.code, - InventoryAssetAccountCode: this.inventory_asset_account_code, + InventoryAssetAccountCode: this.inventoryAssetAccountCode, Name: this.name, - IsSold: this.is_sold, - IsPurchased: this.is_purchased, + IsSold: this.isSold, + IsPurchased: this.isPurchased, Description: this.description, - PurchaseDescription: this.purchase_description, - PurchaseDetails: this.purchase_details, - SalesDetails: this.sales_details, + PurchaseDescription: this.purchaseDescription, + PurchaseDetails: this.purchaseDetails, + SalesDetails: this.salesDetails, }, params: { unitdp: this.unitdp, }, }); + + $.export("$summary", `Successfully created item with code: ${this.code}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/create-payment/create-payment.mjs b/components/xero_accounting_api/actions/create-payment/create-payment.mjs index 347ce3e33a5b3..7e63a0e2ed331 100644 --- a/components/xero_accounting_api/actions/create-payment/create-payment.mjs +++ b/components/xero_accounting_api/actions/create-payment/create-payment.mjs @@ -1,115 +1,129 @@ -// legacy_hash_id: a_k6irV0 -import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-create-payment", name: "Create Payment", description: "Creates a new payment", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", - }, - account_id: { + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], + }, + accountId: { + label: "Account ID", type: "string", description: "ID of account you are using to make the payment e.g. 294b1dc5-cc47-2afc-7ec8-64990b8761b8. This account needs to be either an account of type BANK or have enable payments to this accounts switched on (see [GET Accounts](https://developer.xero.com/documentation/api/Accounts)) . See the edit account screen of your Chart of Accounts in Xero if you wish to enable payments for an account other than a bank account", optional: true, }, - account_code: { + accountCode: { + label: "Account Code", type: "string", description: "Code of account you are using to make the payment e.g. 001 ( note: *not all accounts have a code value*)", optional: true, }, - invoice_id: { + invoiceId: { + label: "Invoice ID", type: "string", description: "ID of the invoice you are applying payment to e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9", optional: true, }, - credit_note_id: { + creditNoteId: { + label: "Credit Note ID", type: "string", description: "ID of the credit note you are applying payment to e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9", optional: true, }, - prepayment_id: { + prepaymentId: { + label: "Prepayment ID", type: "string", description: "ID of the prepayment you are applying payment to e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9", optional: true, }, - overpayment_id: { + overpaymentId: { + label: "Overpayment ID", type: "string", description: "ID of the overpayment you are applying payment to e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9", optional: true, }, - invoice_number: { + invoiceNumber: { + label: "Invoice Number", type: "string", description: "Number of invoice you are applying payment to e.g. INV-4003", optional: true, }, - credit_note_number: { + creditNoteNumber: { + label: "Credit Note Number", type: "string", description: "Number of credit note you are applying payment to e.g. INV-4003", optional: true, }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, date: { + label: "Date", type: "string", description: "Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06", optional: true, }, - currency_rate: { + currencyRate: { + label: "Currency Rate", type: "string", description: "Exchange rate when payment is received. Only used for non base currency invoices and credit notes e.g. 0.7500", optional: true, }, amount: { + label: "Amount", type: "string", description: "The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice e.g. 200.00", optional: true, }, reference: { + label: "Reference", type: "string", description: "An optional description for the payment e.g. Direct Debit", optional: true, }, - is_reconciled: { + isReconciled: { + label: "Is Reconciled", type: "boolean", description: "A boolean indicating whether the payment has been reconciled.", optional: true, }, status: { + label: "Status", type: "string", description: "The [status](https://developer.xero.com/documentation/api/types#PaymentStatusCodes) of the payment.", optional: true, }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/payments#PUT - - if ((!this.account_id && !this.account_code) - || (!this.invoice_id && !this.credit_note_id && !this.prepayment_id && !this.overpayment_id && !this.invoice_number && !this.credit_note_number) - || !this.tenant_id) { - throw new Error("Must provide account_id or account_code, and", "\n", "invoice_id or credit_note_id or prepayment_id or overpayment_id or invoice_number or credit_note_number,\nand tenant_id parameters."); + if ((!this.accountId && !this.accountCode) || + (!this.invoiceId && + !this.creditNoteId && + !this.prepaymentId && + !this.overpaymentId && + !this.invoiceNumber && + !this.creditNoteNumber) || + !this.tenantId) { + throw new ConfigurationError("Must provide **Account ID** or **Account Code**, and", "\n", "**Invoice ID** or **Credit Note ID** or **Prepayment ID** or **Overpayment ID** or **Invoice Number** or **Credit Note Number**,\nand **Tenant ID** parameters."); } - //Adds parameters to the requests body - var data = { + const data = { Date: this.date, - CurrencyRate: this.currency_rate, + CurrencyRate: this.currencyRate, Amount: this.amount, Reference: this.reference, - IsReconciled: this.is_reconciled, + IsReconciled: this.isReconciled, Status: this.status, }; - //Adds the account paramter to the request body - if (this.account_id) { + if (this.accountId) { data["Account"] = { - AccountID: this.account_id, + AccountID: this.accountId, }; } else { data["Account"] = { @@ -117,42 +131,39 @@ export default { }; } - //Adds the related document object where payment is applied to the request body - if (this.invoice_id) { + if (this.invoiceId) { data["Invoice"] = { - InvoiceID: this.invoice_id, + InvoiceID: this.invoiceId, }; - } else if (this.credit_note_id) { + } else if (this.creditNoteId) { data["CreditNote"] = { - CreditNoteID: this.credit_note_id, + CreditNoteID: this.creditNoteId, }; - } else if (this.prepayment_id) { + } else if (this.prepaymentId) { data["Prepayment"] = { - PrepaymentID: this.prepayment_id, + PrepaymentID: this.prepaymentId, }; - } else if (this.overpayment_id) { + } else if (this.overpaymentId) { data["Overpayment"] = { - OverpaymentID: this.overpayment_id, + OverpaymentID: this.overpaymentId, }; - } else if (this.invoice_number) { + } else if (this.invoiceNumber) { data["Invoice"] = { - InvoiceNumber: this.invoice_number, + InvoiceNumber: this.invoiceNumber, }; - } else if (this.credit_note_number) { + } else if (this.creditNoteNumber) { data["CreditNote"] = { - CreditNoteNumber: this.credit_note_number, + CreditNoteNumber: this.creditNoteNumber, }; } - //Sends the request against Xero Accounting API - return await axios($, { - method: "put", - url: "https://api.xero.com/api.xro/2.0/Payments", - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, + const response = await this.xeroAccountingApi.createPayment({ + $, + tenantId: this.tenantId, data, }); + + $.export("$summary", `Successfully created payment with reference: ${this.reference}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/create-tracking-category/create-tracking-category.mjs b/components/xero_accounting_api/actions/create-tracking-category/create-tracking-category.mjs new file mode 100644 index 0000000000000..720ff6460d2da --- /dev/null +++ b/components/xero_accounting_api/actions/create-tracking-category/create-tracking-category.mjs @@ -0,0 +1,64 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { parseObject } from "../../common/util.mjs"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; + +export default { + key: "xero_accounting_api-create-tracking-category", + name: "Create tracking category", + description: "Create a new tracking category [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories#put-trackingcategories).", + version: "0.0.1", + type: "action", + props: { + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], + }, + name: { + type: "string", + label: "Name", + description: "The name of the tracking category", + }, + options: { + type: "string[]", + label: "Options", + description: "Options for the tracking category", + optional: true, + }, + }, + async run({ $ }) { + try { + const response = await this.xeroAccountingApi.createTrackingCategory({ + $, + tenantId: this.tenantId, + data: { + Name: this.name, + }, + }); + + if (this.options) { + const parsedOptions = parseObject(this.options); + + for (const option of parsedOptions) { + const optionResponse = await this.xeroAccountingApi.createTrackingOption({ + $, + tenantId: this.tenantId, + trackingCategoryId: response.TrackingCategories[0].TrackingCategoryID, + data: { + Name: option, + }, + }); + response.TrackingCategories[0].Options.push(optionResponse.Options[0]); + } + } + + $.export("$summary", `Successfully created tracking category with ID: ${response.TrackingCategories[0].TrackingCategoryID}`); + return response; + } catch (err) { + console.log(err); + throw new ConfigurationError(err.response.data.Elements[0].ValidationErrors[0].Message); + } + }, +}; diff --git a/components/xero_accounting_api/actions/create-update-contact/create-update-contact.mjs b/components/xero_accounting_api/actions/create-update-contact/create-update-contact.mjs index 4e54fa75486a4..f530632203522 100644 --- a/components/xero_accounting_api/actions/create-update-contact/create-update-contact.mjs +++ b/components/xero_accounting_api/actions/create-update-contact/create-update-contact.mjs @@ -1,3 +1,4 @@ +import { ConfigurationError } from "@pipedream/platform"; import { removeNullEntries } from "../../common/util.mjs"; import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; @@ -5,7 +6,7 @@ export default { key: "xero_accounting_api-create-update-contact", name: "Create or update contact ", description: "Creates a new contact or updates a contact if a contact already exists. [See the docs here](https://developer.xero.com/documentation/api/accounting/contacts)", - version: "0.0.2", + version: "0.1.0", type: "action", props: { xeroAccountingApi, @@ -15,15 +16,11 @@ export default { "tenantId", ], }, - actionType: { - label: "Type of action", - description: "This triggers an update if UPDATE is selected", + contactID: { type: "string", - options: [ - "NEW", - "UPDATE", - ], - reloadProps: true, + label: "Contact ID", + description: "ID of the contact that requires update.", + optional: true, }, name: { type: "string", @@ -68,18 +65,10 @@ export default { default: "ACTIVE", }, }, - async additionalProps() { - const props = {}; - if (this.actionType === "UPDATE") { - props.contactID = { - type: "string", - label: "Contact ID", - description: "ID of the contact that requires update.", - }; - } - return props; - }, async run({ $ }) { + if (!this.contactID && !this.name) { + throw new ConfigurationError("Must provide **Contact ID** or **Contact Name** parameter."); + } const { contactID, tenantId, @@ -99,7 +88,11 @@ export default { ContactStatus: contactStatus, }); contactID && (data.ContactID = contactID); - const response = await this.xeroAccountingApi.createContact($, tenantId, data); + const response = await this.xeroAccountingApi.createOrUpdateContact({ + $, + tenantId, + data, + }); response && $.export("$summary", "Contact created successfully"); return response; }, diff --git a/components/xero_accounting_api/actions/delete-tracking-category-option/delete-tracking-category-option.mjs b/components/xero_accounting_api/actions/delete-tracking-category-option/delete-tracking-category-option.mjs new file mode 100644 index 0000000000000..8c9b6e260b3e1 --- /dev/null +++ b/components/xero_accounting_api/actions/delete-tracking-category-option/delete-tracking-category-option.mjs @@ -0,0 +1,55 @@ +import { ConfigurationError } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; + +export default { + key: "xero_accounting_api-delete-tracking-category-option", + name: "Delete tracking category option", + description: "Delete a tracking category option by ID [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories#delete-trackingcategories).", + version: "0.0.1", + type: "action", + props: { + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], + }, + trackingCategoryId: { + propDefinition: [ + xeroAccountingApi, + "trackingCategoryId", + ({ tenantId }) => ({ + tenantId, + }), + ], + }, + trackingOptionId: { + propDefinition: [ + xeroAccountingApi, + "trackingOptionId", + ({ + tenantId, trackingCategoryId, + }) => ({ + tenantId, + trackingCategoryId, + }), + ], + }, + }, + async run({ $ }) { + try { + const response = await this.xeroAccountingApi.deleteTrackingOption({ + $, + tenantId: this.tenantId, + trackingCategoryId: this.trackingCategoryId, + trackingOptionId: this.trackingOptionId, + }); + + $.export("$summary", `Successfully deleted tracking category option with ID: ${this.trackingOptionId}`); + return response; + } catch ({ response: { data } }) { + throw new ConfigurationError(data.Elements[0].ValidationErrors[0].Message); + } + }, +}; diff --git a/components/xero_accounting_api/actions/delete-tracking-category/delete-tracking-category.mjs b/components/xero_accounting_api/actions/delete-tracking-category/delete-tracking-category.mjs new file mode 100644 index 0000000000000..df2610632fb71 --- /dev/null +++ b/components/xero_accounting_api/actions/delete-tracking-category/delete-tracking-category.mjs @@ -0,0 +1,42 @@ +import { ConfigurationError } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; + +export default { + key: "xero_accounting_api-delete-tracking-category", + name: "Delete tracking category", + description: "Delete a tracking category by ID [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories#delete-trackingcategories).", + version: "0.0.1", + type: "action", + props: { + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], + }, + trackingCategoryId: { + propDefinition: [ + xeroAccountingApi, + "trackingCategoryId", + ({ tenantId }) => ({ + tenantId, + }), + ], + }, + }, + async run({ $ }) { + try { + const response = await this.xeroAccountingApi.deleteTrackingCategory({ + $, + tenantId: this.tenantId, + trackingCategoryId: this.trackingCategoryId, + }); + + $.export("$summary", `Successfully deleted tracking category with ID: ${this.trackingCategoryId}`); + return response; + } catch ({ response: { data } }) { + throw new ConfigurationError(data.Elements?.[0]?.ValidationErrors?.[0]?.Message || data); + } + }, +}; diff --git a/components/xero_accounting_api/actions/download-invoice/download-invoice.mjs b/components/xero_accounting_api/actions/download-invoice/download-invoice.mjs index c8557cfc127c9..4d372ad791023 100644 --- a/components/xero_accounting_api/actions/download-invoice/download-invoice.mjs +++ b/components/xero_accounting_api/actions/download-invoice/download-invoice.mjs @@ -1,23 +1,23 @@ -// legacy_hash_id: a_k6irBN +import { ConfigurationError } from "@pipedream/platform"; import fs from "fs"; -import { axios } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-download-invoice", name: "Download Invoice", description: "Downloads an invoice as pdf file. File will be placed at the action's associated workflow temporary folder.", - version: "0.2.1", + version: "0.2.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, - invoice_id: { + invoiceId: { + label: "Invoice ID", type: "string", description: "Xero generated unique identifier for the invoice to download.", }, @@ -28,27 +28,24 @@ export default { }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/invoices#get and https://developer.xero.com/documentation/api/requests-and-responses#get-individual - //For an example of this action in an workflow, see: https://pipedream.com/@sergio/xero-accounting-api-download-invoice-p_vQCgy3o/edit - - if (!this.tenant_id || !this.invoice_id) { - throw new Error("Must provide tenant_id, invoice_id parameters."); + if (!this.tenantId || !this.invoiceId) { + throw new ConfigurationError("Must provide **Tenant ID**, and **Invoice ID** parameters."); } - const data = await axios($, { - url: `https://api.xero.com/api.xro/2.0/Invoices/${this.invoice_id}`, + const data = await this.xeroAccountingApi.downloadInvoice({ + $, + tenantId: this.tenantId, + invoiceId: this.invoiceId, + responseType: "arraybuffer", headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "Accept": "application/pdf", - "xero-tenant-id": this.tenant_id, + Accept: "application/pdf", }, - responseType: "arraybuffer", }); const invoicePdf = data.toString("base64"); const buffer = Buffer.from(invoicePdf, "base64"); const tmpDir = "/tmp"; - const invoicePath = `${tmpDir}/${this.invoice_id}.pdf`; + const invoicePath = `${tmpDir}/${this.invoiceId}.pdf`; $.export("invoice_path", invoicePath); //This is where the invoice is saved at the workflow's temporary files. fs.writeFileSync(invoicePath, buffer); console.log(`Invoice saved at: ${invoicePath}`); diff --git a/components/xero_accounting_api/actions/email-an-invoice/email-an-invoice.mjs b/components/xero_accounting_api/actions/email-an-invoice/email-an-invoice.mjs index de26d7f9cbe9c..0afd0a93457cd 100644 --- a/components/xero_accounting_api/actions/email-an-invoice/email-an-invoice.mjs +++ b/components/xero_accounting_api/actions/email-an-invoice/email-an-invoice.mjs @@ -1,40 +1,38 @@ -// legacy_hash_id: a_q1i3Aj -import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-email-an-invoice", name: "Email an Invoice", description: "Triggers the email of a sales invoice out of Xero.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, - invoice_id: { + invoiceId: { + label: "Invoice ID", type: "string", description: "Xero generated unique identifier for the invoice to send by email out of Xero. The invoice must be of Type ACCREC and a valid Status for sending (SUMBITTED,AUTHORISED or PAID).", }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/invoices#email - - if (!this.tenant_id || !this.invoice_id) { - throw new Error("Must provide tenant_id, invoice_id parameters."); + if (!this.tenantId || !this.invoiceId) { + throw new ConfigurationError("Must provide **Tenant ID**, and **Invoice ID** parameters."); } - return await axios($, { - method: "post", - url: `https://api.xero.com/api.xro/2.0/Invoices/${this.invoice_id}/Email`, - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, + const response = await this.xeroAccountingApi.emailInvoice({ + $, + tenantId: this.tenantId, + invoiceId: this.invoiceId, }); + + $.export("$summary", `Invoice emailed successfully: ${this.invoiceId}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/find-contact/find-contact.mjs b/components/xero_accounting_api/actions/find-contact/find-contact.mjs deleted file mode 100644 index ed9f749a2f132..0000000000000 --- a/components/xero_accounting_api/actions/find-contact/find-contact.mjs +++ /dev/null @@ -1,142 +0,0 @@ -import { ConfigurationError } from "@pipedream/platform"; -import { - removeNullEntries, formatQueryString, -} from "../../common/util.mjs"; -import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; - -export default { - key: "xero_accounting_api-find-contact", - name: "Find contact. Optionally, create one if none are found", - description: "Finds a contact by name or account number. Optionally, create one if none are found. [See the docs here](https://developer.xero.com/documentation/api/accounting/contacts/#get-contacts)", - version: "0.0.2", - type: "action", - props: { - xeroAccountingApi, - tenantId: { - propDefinition: [ - xeroAccountingApi, - "tenantId", - ], - }, - name: { - type: "string", - label: "Contact name", - description: "Full name of contact/organization ", - optional: true, - }, - accountNumber: { - type: "string", - label: "Account number", - description: "Account number of Contact.", - optional: true, - }, - createContactIfNotFound: { - description: "Create a new contact if not found?.", - label: "Create a new contact if not found", - type: "string", - options: [ - "Yes", - "No", - ], - reloadProps: true, - }, - }, - additionalProps() { - const props = {}; - if (this.createContactIfNotFound === "Yes") { - props.name = { - type: "string", - label: "Contact name", - description: "Full name of contact/organization.", - }; - props.firstName = { - type: "string", - label: "First name", - description: "First name of contact person .", - optional: true, - }; - props.lastName = { - type: "string", - label: "Last name", - description: "Last name of contact person.", - optional: true, - }; - props.emailAddress = { - type: "string", - label: "Email address", - description: "Email address of contact person.", - optional: true, - }; - props.contactStatus = { - type: "string", - label: "Contact status", - description: - "See [contact status reference](https://developer.xero.com/documentation/api/accounting/types#contacts)", - options: [ - "ACTIVE", - "ARCHIVED", - "GDPRREQUEST", - ], - optional: true, - default: "ACTIVE", - }; - } - return props; - }, - async run({ $ }) { - let contactDetail; - const { - tenantId, - name, - firstName, - lastName, - emailAddress, - accountNumber, - contactStatus, - createContactIfNotFound, - } = this; - if (createContactIfNotFound === "No" && accountNumber && name) { - throw new ConfigurationError( - "Choose exclusively between Account Number or Name to find a contact.", - ); - } - const findPayload = removeNullEntries({ - Name: name, - AccountNumber: accountNumber, - }); - const createPayload = removeNullEntries({ - Name: name, - FirstName: firstName, - LastName: lastName, - EmailAddress: emailAddress, - AccountNumber: accountNumber, - ContactStatus: contactStatus, - }); - const queryString = formatQueryString(findPayload, true); - try { - contactDetail = await this.xeroAccountingApi.getContact( - $, - tenantId, - queryString, - ); - } catch (error) { - if (createContactIfNotFound === "Yes") { - $.export("$summary", "Contact not found. Creating new contact"); - } else { - throw new ConfigurationError("Contact not found"); - } - } - - if ( - (!contactDetail || !contactDetail?.Contacts?.length) && - createContactIfNotFound === "Yes" - ) { - return await this.xeroAccountingApi.createContact( - $, - tenantId, - createPayload, - ); - } - return contactDetail; - }, -}; diff --git a/components/xero_accounting_api/actions/find-invoice/find-invoice.mjs b/components/xero_accounting_api/actions/find-invoice/find-invoice.mjs index 6b68bfa07808a..84fc8619e42bd 100644 --- a/components/xero_accounting_api/actions/find-invoice/find-invoice.mjs +++ b/components/xero_accounting_api/actions/find-invoice/find-invoice.mjs @@ -8,7 +8,7 @@ export default { key: "xero_accounting_api-find-invoice", name: "Find Invoice", description: "Finds an invoice by number or reference.[See the docs here](https://developer.xero.com/documentation/api/accounting/invoices/#get-invoices)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { xeroAccountingApi, @@ -38,14 +38,18 @@ export default { tenantId, } = this; if ((invoiceNumber && reference) || (!invoiceNumber && !reference)) { - throw new ConfigurationError("Choose exclusively between Invoice Number or Reference to find an invoice."); + throw new ConfigurationError("Choose exclusively between **Invoice Number** or **Reference** to find an invoice."); } const payload = removeNullEntries({ InvoiceNumber: invoiceNumber, Reference: reference, }); const queryString = formatQueryString(payload, true); - const response = await this.xeroAccountingApi.getInvoice($, tenantId, queryString); + const response = await this.xeroAccountingApi.getInvoice({ + $, + tenantId, + queryParam: queryString, + }); response && $.export("$summary", "Invoice loaded successfully"); return response; }, diff --git a/components/xero_accounting_api/actions/find-or-create-contact/find-or-create-contact.mjs b/components/xero_accounting_api/actions/find-or-create-contact/find-or-create-contact.mjs index 74410ee1134f5..cd99a60b0cdf0 100644 --- a/components/xero_accounting_api/actions/find-or-create-contact/find-or-create-contact.mjs +++ b/components/xero_accounting_api/actions/find-or-create-contact/find-or-create-contact.mjs @@ -1,14 +1,15 @@ -import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; import { ConfigurationError } from "@pipedream/platform"; import { - removeNullEntries, formatQueryString, + formatQueryString, + removeNullEntries, } from "../../common/util.mjs"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-find-or-create-contact", name: "Find or Create Contact", - description: "Finds a contact by email address. Optionally, create one if none are found. [See the documentation](https://developer.xero.com/documentation/api/accounting/contacts/#get-contacts)", - version: "0.0.1", + description: "Finds a contact by name or email address. Optionally, create one if none are found. [See the docs here](https://developer.xero.com/documentation/api/accounting/contacts/#get-contacts)", + version: "0.1.0", type: "action", props: { xeroAccountingApi, @@ -18,42 +19,49 @@ export default { "tenantId", ], }, + name: { + type: "string", + label: "Contact name", + description: "Full name of contact/organization ", + optional: true, + }, emailAddress: { type: "string", label: "Email address", - description: "Email address of contact.", + description: "Email address of contact/organization.", + optional: true, }, createContactIfNotFound: { - type: "boolean", + description: "Create a new contact if not found?.", label: "Create a new contact if not found", - description: "Set to `true` to create a new contact if not found.", + type: "string", + options: [ + "Yes", + "No", + ], reloadProps: true, }, }, additionalProps() { const props = {}; - if (this.createContactIfNotFound) { - props.name = { - type: "string", - label: "Contact name", - description: "Full name of contact/organization.", - }; + if (this.createContactIfNotFound === "Yes") { props.firstName = { type: "string", label: "First name", - description: "First name of contact.", + description: "First name of contact person .", optional: true, }; props.lastName = { type: "string", label: "Last name", - description: "Last name of contact.", + description: "Last name of contact person.", optional: true, }; props.contactStatus = { type: "string", label: "Contact status", - description: "See [contact status reference](https://developer.xero.com/documentation/api/accounting/types#contacts)", + description: + "See [contact status reference](https://developer.xero.com/documentation/api/accounting/types#contacts)", options: [ "ACTIVE", "ARCHIVED", @@ -62,130 +70,61 @@ export default { optional: true, default: "ACTIVE", }; - props.companyNumber = { - type: "string", - label: "Company Number", - description: "Company registration number. Max 50 char.", - optional: true, - }; - props.addressType = { - type: "string", - label: "Address Type", - description: "The type of mailing address. Required if entering address information", - options: [ - "POBOX", - "STREET", - "DELIVERY", - ], - optional: true, - }; - props.addressLine1 = { - type: "string", - label: "Address Line 1", - description: "Street address of contact", - optional: true, - }; - props.addressLine2 = { - type: "string", - label: "Address Line 2", - description: "Line 2 of the street address of contact", - optional: true, - }; - props.city = { - type: "string", - label: "City", - description: "City address of contact", - optional: true, - }; - props.region = { - type: "string", - label: "Region", - description: "Region/State address of contact", - optional: true, - }; - props.postalCode = { - type: "string", - label: "Postal Code", - description: "Postal Code address of contact", - optional: true, - }; - props.country = { - type: "string", - label: "Country", - description: "Country of contact", - optional: true, - }; - props.phoneNumber = { - type: "string", - label: "Phone Number", - description: "Phone number of contact", - optional: true, - }; } return props; }, async run({ $ }) { - const queryString = formatQueryString({ - EmailAddress: this.emailAddress, - }, true); - const contactDetail = await this.xeroAccountingApi.getContact($, this.tenantId, queryString); - const found = contactDetail?.Contacts?.length; - - if (!this.createContactIfNotFound && !found) { - throw new ConfigurationError("Contact not found"); - } - - if (found) { - $.export("$summary", `Successfully found contact with email \`${this.emailAddress}\`.`); - return contactDetail; + let contactDetail; + const { + tenantId, + name, + firstName, + lastName, + emailAddress, + contactStatus, + createContactIfNotFound, + } = this; + if (createContactIfNotFound === "No" && emailAddress && name) { + throw new ConfigurationError( + "Choose exclusively between Email Address or Name to find a contact.", + ); } - - const addressEntered = this.addressLine1 - || this.addressLine1 - || this.city - || this.region - || this.postalCode - || this.country; - if (addressEntered && !this.addressType) { - throw new ConfigurationError("Address Type is required when entering address information."); - } else if (!addressEntered && this.addressType) { - throw new ConfigurationError("Must enter address information along with Address Type."); - } - + const findPayload = removeNullEntries({ + Name: name, + EmailAddress: emailAddress, + }); const createPayload = removeNullEntries({ - Name: this.name, - FirstName: this.firstName, - LastName: this.lastName, - EmailAddress: this.emailAddress, - ContactStatus: this.contactStatus, - CompanyNumber: this.companyNumber, - Addresses: addressEntered - ? [ - { - AddressType: this.addressType, - AddressLine1: this.addressLine1, - AddressLine2: this.addressLine1, - City: this.city, - Region: this.region, - PostalCode: this.postalCode, - Country: this.country, - }, - ] - : undefined, - Phones: this.phoneNumber - ? [ - { - PhoneType: "DEFAULT", - PhoneNumber: this.phoneNumber, - }, - ] - : undefined, + Name: name, + FirstName: firstName, + LastName: lastName, + EmailAddress: emailAddress, + ContactStatus: contactStatus, }); + try { + contactDetail = await this.xeroAccountingApi.getContact({ + $, + tenantId, + queryParam: formatQueryString(findPayload, true), + }); + } catch (error) { + if (createContactIfNotFound === "Yes") { + $.export("$summary", "Contact not found. Creating new contact"); + } else { + $.export("$summary", "No contact found."); + return {}; + } + } - const response = await this.xeroAccountingApi.createContact($, this.tenantId, createPayload); - if (response?.Contacts?.length) { - $.export("$summary", `Successfully created new contact with ID ${response.Contacts[0].ContactID}.`); + if ( + (!contactDetail || !contactDetail?.Contacts?.length) && + createContactIfNotFound === "Yes" + ) { + return await this.xeroAccountingApi.createOrUpdateContact({ + $, + tenantId, + data: createPayload, + }); } - return response; + return contactDetail; }, }; diff --git a/components/xero_accounting_api/actions/get-bank-statements-report/get-bank-statements-report.mjs b/components/xero_accounting_api/actions/get-bank-statements-report/get-bank-statements-report.mjs index 7e8a0f66b85d1..ab541d6a3ccf7 100644 --- a/components/xero_accounting_api/actions/get-bank-statements-report/get-bank-statements-report.mjs +++ b/components/xero_accounting_api/actions/get-bank-statements-report/get-bank-statements-report.mjs @@ -1,54 +1,54 @@ -// legacy_hash_id: a_zNiJzL -import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-get-bank-statements-report", name: "Bank Statements Report", description: "Gets bank statements for the specified bank account.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, - bank_account_id: { + bankAccountId: { + label: "Bank Account ID", type: "string", description: "Xero identifier of the bank account to get bank statements of", }, - from_date: { + fromDate: { + label: "From Date", type: "string", description: "Get the bank statements of the specified bank account from this date", optional: true, }, - to_date: { + toDate: { + label: "To Date", type: "string", description: "Get the bank statements of the specified bank account to this date", optional: true, }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/api-overview - - if (!this.tenant_id || !this.bank_account_id) { - throw new Error("Must provide tenant_id, bank_account_id parameters."); + if (!this.tenantId || !this.bankAccountId) { + throw new ConfigurationError("Must provide **Tenant ID**, and **Bank Account ID** parameters."); } - return await axios($, { - url: "https://api.xero.com/api.xro/2.0/Reports/BankStatement", - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, + const response = await this.xeroAccountingApi.getBankStatementsReport({ + $, + tenantId: this.tenantId, params: { - fromDate: this.from_date, - toDate: this.to_date, - bankAccountID: this.bank_account_id, + bankAccountId: this.bankAccountId, + fromDate: this.fromDate, + toDate: this.toDate, }, }); + + $.export("$summary", `Bank statements report retrieved successfully: ${this.bankAccountId}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/get-bank-summary/get-bank-summary.mjs b/components/xero_accounting_api/actions/get-bank-summary/get-bank-summary.mjs index ec77bc96ebd03..11480eb69e9d6 100644 --- a/components/xero_accounting_api/actions/get-bank-summary/get-bank-summary.mjs +++ b/components/xero_accounting_api/actions/get-bank-summary/get-bank-summary.mjs @@ -1,49 +1,54 @@ -// legacy_hash_id: a_K5i5rd -import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-get-bank-summary", name: "Get Bank Summary", description: "Gets the balances and cash movements for each bank account.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - tenant_id: { + bankAccountId: { + label: "Bank Account ID", type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", + description: "Id of the bank account to get the summary for.", }, - form_date: { + fromDate: { + label: "From Date", type: "string", - description: "Get the balances and cash movements for each bank account from this date", + description: "Get the balances and cash movements for the specified bank account from this date", optional: true, }, - to_date: { + toDate: { + label: "To Date", type: "string", - description: "Get the balances and cash movements for each bank account to this date", + description: "Get the balances and cash movements for the specified bank account to this date", optional: true, }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/reports#BankSummary - - if (!this.tenant_id) { - throw new Error("Must provide tenant_id parameter."); + if (!this.tenantId || !this.bankAccountId) { + throw new ConfigurationError("Must provide **Tenant ID**, and **Bank Account ID** parameters."); } - return await axios($, { - url: "https://api.xero.com/api.xro/2.0/Reports/BankSummary", - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, + const response = await this.xeroAccountingApi.getBankSummary({ + $, + tenantId: this.tenantId, + bankAccountId: this.bankAccountId, params: { - fromDate: this.form_date, - toDate: this.to_date, + fromDate: this.fromDate, + toDate: this.toDate, }, }); + + $.export("$summary", `Bank summary retrieved successfully: ${this.bankAccountId}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/get-contact/get-contact.mjs b/components/xero_accounting_api/actions/get-contact/get-contact.mjs index 92c3e12de689a..5eb2032679f15 100644 --- a/components/xero_accounting_api/actions/get-contact/get-contact.mjs +++ b/components/xero_accounting_api/actions/get-contact/get-contact.mjs @@ -1,39 +1,38 @@ -// legacy_hash_id: a_67iL6R -import { axios } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-get-contact", name: "Get Contact", description: "Gets details of a contact.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, - contact_identifier: { + contactIdentifier: { type: "string", description: "Xero identifier of the contact to get. Possible values: \n* **ContactID** - The Xero identifier for a contact e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9\n* **ContactNumber** - A custom identifier specified from another system e.g. a CRM system has a contact number of CUST100", + label: "Contact Identifier", }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/contacts + try { + const response = await this.xeroAccountingApi.getContactById({ + $, + tenantId: this.tenantId, + contactIdentifier: this.contactIdentifier, + }); - if (!this.tenant_id || !this.contact_identifier) { - throw new Error("Must provide tenant_id, contact_identifier parameters."); + $.export("$summary", `Contact retrieved successfully: ${this.contactIdentifier}`); + return response; + } catch (e) { + $.export("$summary", `No contact found with identifier: ${this.contactIdentifier}`); + return {}; } - - return await axios($, { - url: `https://api.xero.com/api.xro/2.0/Contacts/${this.contact_identifier}`, - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, - }); }, }; diff --git a/components/xero_accounting_api/actions/get-history-of-changes/get-history-of-changes.mjs b/components/xero_accounting_api/actions/get-history-of-changes/get-history-of-changes.mjs index 4a037d7e379b0..74038cf9da424 100644 --- a/components/xero_accounting_api/actions/get-history-of-changes/get-history-of-changes.mjs +++ b/components/xero_accounting_api/actions/get-history-of-changes/get-history-of-changes.mjs @@ -1,22 +1,22 @@ -// legacy_hash_id: a_a4ivAG -import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-get-history-of-changes", name: "Get History of Changes", description: "Gets the history of changes to a single existing document.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", - }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, endpoint: { + label: "Endpoint", type: "string", description: "The URL component, endpoint of the document type to get history changes. See [supported document types](https://developer.xero.com/documentation/api/history-and-notes#SupportedDocs)", options: [ @@ -36,23 +36,23 @@ export default { ], }, guid: { + label: "GUID", type: "string", description: "Xero identifier of the document to get history changes of.", }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/history-and-notes#GET - - if (!this.tenant_id || !this.endpoint || !this.guid) { - throw new Error("Must provide tenant_id, endpoint, and guid parameters."); + if (!this.tenantId || !this.endpoint || !this.guid) { + throw new ConfigurationError("Must provide **Tenant ID**, **Endpoint**, and **GUID** parameters."); } - return await axios($, { - url: `https://api.xero.com/api.xro/2.0/${this.endpoint}/${this.guid}/history`, - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, + const response = await this.xeroAccountingApi.getHistoryOfChanges({ + $, + endpoint: this.endpoint, + guid: this.guid, }); + + $.export("$summary", `History of changes retrieved successfully: ${this.guid}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/get-invoice-online-url/get-invoice-online-url.mjs b/components/xero_accounting_api/actions/get-invoice-online-url/get-invoice-online-url.mjs index 3a430d75b5735..b6805ebfcb0dd 100644 --- a/components/xero_accounting_api/actions/get-invoice-online-url/get-invoice-online-url.mjs +++ b/components/xero_accounting_api/actions/get-invoice-online-url/get-invoice-online-url.mjs @@ -1,39 +1,38 @@ -// legacy_hash_id: a_gniWnr -import { axios } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-get-invoice-online-url", name: "Get Sales Invoice Online URL", description: "Retrieves the online sales invoice URL.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, - invoice_id: { + invoiceId: { + label: "Invoice ID", type: "string", description: "Xero generated unique identifier for the invoice to retrieve its online url.", }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/invoices#onlineinvoice + try { + const response = await this.xeroAccountingApi.getInvoiceOnlineUrl({ + $, + tenantId: this.tenantId, + invoiceId: this.invoiceId, + }); - if (!this.tenant_id || !this.invoice_id) { - throw new Error("Must provide tenant_id, invoice_id parameters."); + $.export("$summary", `Invoice online URL retrieved successfully: ${this.invoiceId}`); + return response; + } catch (e) { + $.export("$summary", `No invoice found with identifier: ${this.invoiceId}`); + return {}; } - - return await axios($, { - url: `https://api.xero.com/api.xro/2.0/Invoices/${this.invoice_id}/OnlineInvoice`, - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, - }); }, }; diff --git a/components/xero_accounting_api/actions/get-invoice/get-invoice.mjs b/components/xero_accounting_api/actions/get-invoice/get-invoice.mjs index 1df0d55be1405..f92a494e589bc 100644 --- a/components/xero_accounting_api/actions/get-invoice/get-invoice.mjs +++ b/components/xero_accounting_api/actions/get-invoice/get-invoice.mjs @@ -1,37 +1,38 @@ -// legacy_hash_id: a_52ieOd -import { axios } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-get-invoice", name: "Get Invoice", description: "Gets details of an invoice.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - tenant_id: { - type: "string", - }, - invoice_id: { + invoiceId: { + label: "Invoice ID", + description: "The ID of the invoice to get.", type: "string", }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/invoices#get + try { + const response = await this.xeroAccountingApi.getInvoiceById({ + $, + tenantId: this.tenantId, + invoiceId: this.invoiceId, + }); - if (!this.tenant_id || !this.invoice_id) { - throw new Error("Must provide tenant_id, invoice_id parameters."); + $.export("$summary", `Invoice retrieved successfully: ${this.invoiceId}`); + return response; + } catch (e) { + $.export("$summary", `No invoice found with identifier: ${this.invoiceId}`); + return {}; } - - return await axios($, { - url: `https://api.xero.com/api.xro/2.0/Invoices/${this.invoice_id}`, - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, - }); }, }; diff --git a/components/xero_accounting_api/actions/get-item/get-item.mjs b/components/xero_accounting_api/actions/get-item/get-item.mjs index b6e307af0d742..1269dfc600124 100644 --- a/components/xero_accounting_api/actions/get-item/get-item.mjs +++ b/components/xero_accounting_api/actions/get-item/get-item.mjs @@ -1,39 +1,38 @@ -// legacy_hash_id: a_8Ki04R -import { axios } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-get-item", name: "Get Item", description: "Gets details of an item.", - version: "0.2.1", + version: "0.2.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - tenant_id: { + itemId: { + label: "Item ID", type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, - item_id: { - type: "string", - description: "You can specify an individual record by appending the value to the endpoint, i.e.\n**GET https://.../Items/{identifier}**. Possible values:\n* **ItemID** - The Xero identifier for an Item e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9\n* **Code**- The user defined code of an item e.g. ITEM-001", + description: "Possible values:\n* **ItemID** - The Xero identifier for an Item e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9\n* **Code**- The user defined code of an item e.g. ITEM-001", }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/items#GET + try { + const response = await this.xeroAccountingApi.getItemById({ + $, + tenantId: this.tenantId, + itemId: this.itemId, + }); - if (!this.tenant_id || !this.item_id) { - throw new Error("Must provide tenant_id, item_id parameters."); + $.export("$summary", `Item retrieved successfully: ${this.itemId}`); + return response; + } catch (e) { + $.export("$summary", `No item found with identifier: ${this.itemId}`); + return {}; } - - return await axios($, { - url: `https://api.xero.com/api.xro/2.0/Items/${this.item_id}`, - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, - }); }, }; diff --git a/components/xero_accounting_api/actions/get-tenant-connections/get-tenant-connections.mjs b/components/xero_accounting_api/actions/get-tenant-connections/get-tenant-connections.mjs index c2f7699fab83c..1e81d3993c7b2 100644 --- a/components/xero_accounting_api/actions/get-tenant-connections/get-tenant-connections.mjs +++ b/components/xero_accounting_api/actions/get-tenant-connections/get-tenant-connections.mjs @@ -1,27 +1,20 @@ -// legacy_hash_id: a_vgidpp -import { axios } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-get-tenant-connections", name: "Get Tenant Connections", description: "Gets the tenants connections the user is authorized to access", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", - }, + xeroAccountingApi, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/oauth2/auth-flow - //Step 5. Check the tenants you're authorized to access - - return await axios($, { - url: "https://api.xero.com/connections", - headers: { - Authorization: `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - }, + const response = await this.xeroAccountingApi.getTenantConnections({ + $, }); + + $.export("$summary", "Successfully fetched tenant connections"); + return response; }, }; diff --git a/components/xero_accounting_api/actions/get-tracking-category/get-tracking-category.mjs b/components/xero_accounting_api/actions/get-tracking-category/get-tracking-category.mjs new file mode 100644 index 0000000000000..1e7e27860215e --- /dev/null +++ b/components/xero_accounting_api/actions/get-tracking-category/get-tracking-category.mjs @@ -0,0 +1,42 @@ +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; + +export default { + key: "xero_accounting_api-get-tracking-category", + name: "Get tracking category", + description: "Get information from a tracking category by ID [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories#get-trackingcategories).", + version: "0.0.1", + type: "action", + props: { + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], + }, + trackingCategoryId: { + propDefinition: [ + xeroAccountingApi, + "trackingCategoryId", + ({ tenantId }) => ({ + tenantId, + }), + ], + }, + }, + async run({ $ }) { + try { + const response = await this.xeroAccountingApi.getTrackingCategory({ + $, + tenantId: this.tenantId, + trackingCategoryId: this.trackingCategoryId, + }); + + $.export("$summary", `Successfully fetched tracking category with ID: ${this.trackingCategoryId}`); + return response; + } catch (e) { + $.export("$summary", `No tracking category found with identifier: ${this.trackingCategoryId}`); + return {}; + } + }, +}; diff --git a/components/xero_accounting_api/actions/list-contacts/list-contacts.mjs b/components/xero_accounting_api/actions/list-contacts/list-contacts.mjs index 0246a8471c6e1..e7613163a1210 100644 --- a/components/xero_accounting_api/actions/list-contacts/list-contacts.mjs +++ b/components/xero_accounting_api/actions/list-contacts/list-contacts.mjs @@ -1,84 +1,76 @@ -// legacy_hash_id: a_Q3ixRN -import { axios } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-list-contacts", name: "List Contacts", description: "Lists information from contacts in the given tenant id as per filter parameters.", - version: "0.1.1", + version: "0.2.0", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, - contact_identifier: { - type: "string", - description: "A contact identifier. Possible values: \n* **ContactID** - The Xero identifier for a contact e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9\n* **ContactNumber** - A custom identifier specified from another system e.g. a CRM system has a contact number of CUST100", - optional: true, - }, - modified_after: { + modifiedAfter: { + label: "Modified After", + description: "Filter by a date. Only contacts modified since this date will be returned. Format: YYYY-MM-DD", type: "string", optional: true, }, ids: { + label: "IDs", type: "string", description: "Filter by a comma-separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call. See [details.](https://developer.xero.com/documentation/api/contacts#optimised-queryparameters)", optional: true, }, where: { + label: "Where", type: "string", description: "Filter using the where parameter. We recommend you limit filtering to the [optimised elements](https://developer.xero.com/documentation/api/contacts#optimised-parameters) only.", optional: true, }, order: { + label: "Order", type: "string", description: "Order by any element returned ([*see Order By.*](https://developer.xero.com/documentation/api/requests-and-responses#ordering))", optional: true, }, page: { + label: "Page", type: "string", description: "Up to 100 contacts will be returned per call when the page parameter is used e.g. page=1.", optional: true, }, includeArchived: { + label: "Include Archived", type: "boolean", description: "e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response.", optional: true, }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/contacts + try { + const response = await this.xeroAccountingApi.listContacts({ + $, + tenantId: this.tenantId, + modifiedSince: this.modifiedAfter, + params: { + IDs: this.ids, + Where: this.where, + order: this.order, + page: this.page, + includeArchived: this.includeArchived, + }, + }); - if (!this.tenant_id) { - throw new Error("Must provide tenant_id parameter."); + $.export("$summary", `Successfully fetched ${response.Contacts.length} contacts`); + return response; + } catch (e) { + $.export("$summary", "No contacts found"); + return {}; } - - const contactIdentifier = this.contact_identifier || ""; - - var headers = { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }; - - if (this.modified_after) { - headers["If-Modified-Since"] = this.modified_after; - } - - return await axios($, { - url: `https://api.xero.com/api.xro/2.0/Contacts/${contactIdentifier}`, - headers, - params: { - IDs: this.ids, - Where: this.where, - order: this.order, - page: this.page, - includeArchived: this.includeArchived, - }, - }); }, }; diff --git a/components/xero_accounting_api/actions/list-credit-notes/list-credit-notes.mjs b/components/xero_accounting_api/actions/list-credit-notes/list-credit-notes.mjs index 33e4b692bd119..5dbb142e520f2 100644 --- a/components/xero_accounting_api/actions/list-credit-notes/list-credit-notes.mjs +++ b/components/xero_accounting_api/actions/list-credit-notes/list-credit-notes.mjs @@ -1,73 +1,62 @@ -// legacy_hash_id: a_a4ivba -import { axios } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-list-credit-notes", name: "List Credit Notes", description: "Lists information from credit notes in the given tenant id as per filter parameters.", - version: "0.1.1", + version: "0.2.0", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, - credit_note_identifier: { - type: "string", - description: "Credit note identifier of the contact to get. Possible values: \n* **CreditNoteID** - The Xero identifier for a contact note e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9\n* **CreditNoteNumber** - Identifier for Credit Note CN-8743802", - optional: true, - }, - modified_after: { + modifiedAfter: { + label: "Modified After", type: "string", description: "The ModifiedAfter filter is actually an HTTP header: **'If-Modified-Since'.**\nA UTC timestamp (yyyy-mm-ddThh:mm:ss). Only credit notes or modified since this timestamp will be returned e.g. 2009-11-12T00:00:00", optional: true, }, where: { + label: "Where", type: "string", description: "Filter by an any element ( see [Filters](https://developer.xero.com/documentation/api/requests-and-responses#get-modified) )", optional: true, }, order: { + label: "Order", type: "string", description: "Order by any element returned ( see [Order By](https://developer.xero.com/documentation/api/requests-and-responses#ordering) )", optional: true, }, page: { + label: "Page", type: "string", description: "Up to 100 credit notes will be returned per call, with line items shown for each, when the page parameter is used e.g. page=1", optional: true, }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/credit-notes#GET + try { + const response = await this.xeroAccountingApi.listCreditNotes({ + $, + tenantId: this.tenantId, + modifiedSince: this.modifiedAfter, + params: { + Where: this.where, + order: this.order, + page: this.page, + }, + }); - if (!this.tenant_id) { - throw new Error("Must provide tenant_id parameter."); + $.export("$summary", `Successfully fetched ${response.CreditNotes.length} credit notes`); + return response; + } catch (e) { + $.export("$summary", "No credit notes found"); + return {}; } - - const creditNoteIdentifier = this.credit_note_identifier || ""; - - var headers = { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }; - - if (this.modified_after) { - headers["If-Modified-Since"] = this.modified_after; - } - - return await axios($, { - url: `https://api.xero.com/api.xro/2.0/CreditNotes/${creditNoteIdentifier}`, - headers, - params: { - Where: this.where, - order: this.order, - page: this.page, - }, - }); }, }; diff --git a/components/xero_accounting_api/actions/list-invoices/list-invoices.mjs b/components/xero_accounting_api/actions/list-invoices/list-invoices.mjs index 55c1928e24d5a..ba66202347c7b 100644 --- a/components/xero_accounting_api/actions/list-invoices/list-invoices.mjs +++ b/components/xero_accounting_api/actions/list-invoices/list-invoices.mjs @@ -1,103 +1,97 @@ -// legacy_hash_id: a_3Liezo -import { axios } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-list-invoices", name: "List Invoices", description: "Lists information from invoices in the given tenant id as per filter parameters.", - version: "0.2.1", + version: "0.3.0", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, - invoice_identifier: { - type: "string", - description: "An invoice identifier. Possible values:\n\n* **InvoiceID** - The Xero identifier for an Invoice e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9\n* **InvoiceNumber** - The InvoiceNumber e.g. INV-01514", - optional: true, - }, - modified_after: { + modifiedAfter: { + label: "Modified After", type: "string", description: "The ModifiedAfter filter is actually an HTTP header: **'If-Modified-Since'.**\nA UTC timestamp (yyyy-mm-ddThh:mm:ss). Only invoices created or modified since this timestamp will be returned e.g. 2009-11-12T00:00:00", optional: true, }, ids: { + label: "IDs", type: "string", description: "Filter by a comma-separated list of InvoicesIDs. See [details](https://developer.xero.com/documentation/api/invoices#optimised-queryparameters).", optional: true, }, - invoice_numbers: { + invoiceNumbers: { + label: "Invoice Numbers", type: "string", description: "Filter by a comma-separated list of InvoiceNumbers. See [details](https://developer.xero.com/documentation/api/invoices#optimised-queryparameters).", optional: true, }, - contact_ids: { + contactIds: { + label: "Contact IDs", type: "string", description: "Filter by a comma-separated list of ContactIDs. See [details](https://developer.xero.com/documentation/api/invoices#optimised-queryparameters).", optional: true, }, statuses: { + label: "Statuses", type: "string", description: "Filter by a comma-separated list of Statuses. See [details](https://developer.xero.com/documentation/api/invoices#optimised-queryparameters).", optional: true, }, where: { + label: "Where", type: "string", description: "Filter using the *where* parameter. We recommend you limit filtering to the [optimised elements](https://developer.xero.com/documentation/api/invoices#optimised-parameters) only.", optional: true, }, - created_by_my_app: { + createdByMyApp: { + label: "Created By My App", type: "boolean", description: "When set to true you'll only retrieve Invoices created by your app.", optional: true, }, order: { + label: "Order", type: "string", description: "Order by any element returned ( see [Order By](https://developer.xero.com/documentation/api/requests-and-responses#ordering) ).", optional: true, }, page: { + label: "Page", type: "string", description: "Up to 100 invoices will be returned per call, with line items shown for each, when the page parameter is used e.g. page=1", optional: true, }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/invoices#get + try { + const response = await this.xeroAccountingApi.listInvoices({ + $, + tenantId: this.tenantId, + modifiedSince: this.modifiedAfter, + params: { + IDs: this.ids, + InvoiceNumbers: this.invoiceNumbers, + ContactIDs: this.contactIds, + Statuses: this.statuses, + Where: this.where, + createdByMyApp: this.createdByMyApp, + order: this.order, + page: this.page, + }, + }); - if (!this.tenant_id) { - throw new Error("Must provide tenant_id parameter."); + $.export("$summary", `Successfully fetched ${response.Invoices.length} invoices`); + return response; + } catch (e) { + $.export("$summary", "No invoices found"); + return {}; } - - const invoiceIdentifier = this.invoice_identifier || ""; - - var headers = { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }; - - if (this.modified_after) { - headers["If-Modified-Since"] = this.modified_after; - } - - return await axios($, { - url: `https://api.xero.com/api.xro/2.0/Invoices/${invoiceIdentifier}`, - headers, - params: { - IDs: this.ids, - InvoiceNumbers: this.invoice_numbers, - ContactIDs: this.contact_ids, - Statuses: this.statuses, - Where: this.where, - createdByMyApp: this.created_by_my_app, - order: this.order, - page: this.page, - }, - }); }, }; diff --git a/components/xero_accounting_api/actions/list-manual-journals/list-manual-journals.mjs b/components/xero_accounting_api/actions/list-manual-journals/list-manual-journals.mjs index 75190cb8efde4..3d4e5cca8c493 100644 --- a/components/xero_accounting_api/actions/list-manual-journals/list-manual-journals.mjs +++ b/components/xero_accounting_api/actions/list-manual-journals/list-manual-journals.mjs @@ -1,73 +1,62 @@ -// legacy_hash_id: a_rJid1r -import { axios } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-list-manual-journals", name: "List Manual Journals", description: "Lists information from manual journals in the given tenant id as per filter parameters.", - version: "0.1.1", + version: "0.2.0", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, - manual_journal_id: { - type: "string", - description: "You can specify an individual record by appending the ManualJournalID to the endpoint, i.e. **GET https://.../ManualJournals/{identifier}**", - optional: true, - }, - modified_after: { + modifiedAfter: { + label: "Modified After", type: "string", description: "The ModifiedAfter filter is actually an HTTP header: **'If-Modified-Since'**. A UTC timestamp (yyyy-mm-ddThh:mm:ss) . Only manual journals created or modified since this timestamp will be returned e.g. 2009-11-12T00:00:00", optional: true, }, where: { + label: "Where", type: "string", description: "Filter by an any element (*see [Filters](https://developer.xero.com/documentation/api/requests-and-responses#get-modified)*)", optional: true, }, order: { + label: "Order", type: "string", description: "Order by any element returned (*see [Order By](https://developer.xero.com/documentation/api/requests-and-responses#ordering)*)", optional: true, }, page: { + label: "Page", type: "string", description: "Up to 100 manual journals will be returned per call, with journal lines shown for each, when the page parameter is used e.g. page=1", optional: true, }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/manual-journals#GET + try { + const response = await this.xeroAccountingApi.listManualJournals({ + $, + tenantId: this.tenantId, + modifiedSince: this.modifiedAfter, + params: { + Where: this.where, + order: this.order, + page: this.page, + }, + }); - if (!this.tenant_id) { - throw new Error("Must provide tenant_id parameter."); + $.export("$summary", `Successfully fetched ${response.ManualJournals.length} manual journals`); + return response; + } catch (e) { + $.export("$summary", "No manual journals found"); + return {}; } - - const manualJournalId = this.manual_journal_id || ""; - - var headers = { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }; - - if (this.modified_after) { - headers["If-Modified-Since"] = this.modified_after; - } - - return await axios($, { - url: `https://api.xero.com/api.xro/2.0/ManualJournals/${manualJournalId}`, - headers, - params: { - Where: this.where, - order: this.order, - page: this.page, - }, - }); }, }; diff --git a/components/xero_accounting_api/actions/list-tracking-categories/list-tracking-categories.mjs b/components/xero_accounting_api/actions/list-tracking-categories/list-tracking-categories.mjs new file mode 100644 index 0000000000000..2bcd2e466e76c --- /dev/null +++ b/components/xero_accounting_api/actions/list-tracking-categories/list-tracking-categories.mjs @@ -0,0 +1,32 @@ +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; + +export default { + key: "xero_accounting_api-list-tracking-categories", + name: "List tracking categories", + description: "Lists information from tracking categories [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories).", + version: "0.0.1", + type: "action", + props: { + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], + }, + }, + async run({ $ }) { + try { + const response = await this.xeroAccountingApi.getTrackingCategories({ + $, + tenantId: this.tenantId, + }); + + $.export("$summary", `Successfully fetched ${response.TrackingCategories.length} tracking categories`); + return response; + } catch (e) { + $.export("$summary", "No tracking categories found"); + return {}; + } + }, +}; diff --git a/components/xero_accounting_api/actions/make-an-api-call/make-an-api-call.mjs b/components/xero_accounting_api/actions/make-an-api-call/make-an-api-call.mjs index a9bb90271ccf7..03a57899c0768 100644 --- a/components/xero_accounting_api/actions/make-an-api-call/make-an-api-call.mjs +++ b/components/xero_accounting_api/actions/make-an-api-call/make-an-api-call.mjs @@ -1,18 +1,23 @@ -// legacy_hash_id: a_YEi2rp -import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; +import { parseObject } from "../../common/util.mjs"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-make-an-api-call", name: "Make API Call", description: "Makes an aribitrary call to Xero Accounting API.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - request_method: { + requestMethod: { + label: "Request Method", type: "string", description: "Http method to use in the request.", options: [ @@ -23,39 +28,39 @@ export default { "delete", ], }, - relative_url: { + relativeUrl: { + label: "Relative URL", type: "string", description: "A path relative to Xero Accounting API to send the request against.", }, - query_string: { + queryString: { + label: "Query String", type: "string", description: "Query string of the request.", optional: true, }, - headers: { - type: "object", - description: "Headers to send in the request. Must include header `xero-tenant-id` with Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, - request_body: { + requestBody: { + label: "Request Body", type: "object", description: "Body of the request.", optional: true, }, }, async run({ $ }) { - // See Xero's Rest Accounting API docs at: https://developer.xero.com/documentation/api/api-overview - - if (!this.request_method || !this.relative_url) { - throw new Error("Must provide request_method, and relative_url parameters."); + if (!this.tenantId || !this.requestMethod || !this.relativeUrl) { + throw new ConfigurationError("Must provide **Tenant ID**, **Request Method**, and **Relative URL** parameters."); } - this.query_string = this.query_string || ""; - - return await axios($, { - method: this.request_method, - url: `https://api.xero.com/${this.relative_url}${this.query_string}`, - headers: this.headers, - data: this.request_body, + const response = await this.xeroAccountingApi._makeRequest({ + $, + method: this.requestMethod, + path: this.relativeUrl, + params: this.queryString, + tenantId: this.tenantId, + data: parseObject(this.requestBody), }); + + $.export("$summary", `Successfully made API call to ${this.relativeUrl}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/update-tracking-category-option/update-tracking-category-option.mjs b/components/xero_accounting_api/actions/update-tracking-category-option/update-tracking-category-option.mjs new file mode 100644 index 0000000000000..7697e80404f52 --- /dev/null +++ b/components/xero_accounting_api/actions/update-tracking-category-option/update-tracking-category-option.mjs @@ -0,0 +1,74 @@ +import { ConfigurationError } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; + +export default { + key: "xero_accounting_api-update-tracking-category-option", + name: "Update tracking category option", + description: "Update a tracking category by ID [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories#post-trackingcategories).", + version: "0.0.1", + type: "action", + props: { + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], + }, + trackingCategoryId: { + propDefinition: [ + xeroAccountingApi, + "trackingCategoryId", + ({ tenantId }) => ({ + tenantId, + }), + ], + }, + trackingOptionId: { + propDefinition: [ + xeroAccountingApi, + "trackingOptionId", + ({ + tenantId, trackingCategoryId, + }) => ({ + tenantId, + trackingCategoryId, + }), + ], + }, + optionName: { + type: "string", + label: "Option name", + description: "The name of the tracking category option", + }, + status: { + type: "string", + label: "Status", + description: "The status of the tracking category option", + options: [ + "ACTIVE", + "ARCHIVED", + ], + optional: true, + }, + }, + async run({ $ }) { + try { + const response = await this.xeroAccountingApi.updateTrackingOption({ + $, + tenantId: this.tenantId, + trackingCategoryId: this.trackingCategoryId, + trackingOptionId: this.trackingOptionId, + data: { + Name: this.optionName, + Status: this.status, + }, + }); + + $.export("$summary", `Successfully updated tracking category option with ID: ${this.trackingOptionId}`); + return response; + } catch ({ response: { data } }) { + throw new ConfigurationError(data.Elements[0].ValidationErrors[0].Message); + } + }, +}; diff --git a/components/xero_accounting_api/actions/update-tracking-category/update-tracking-category.mjs b/components/xero_accounting_api/actions/update-tracking-category/update-tracking-category.mjs new file mode 100644 index 0000000000000..4032663751ec1 --- /dev/null +++ b/components/xero_accounting_api/actions/update-tracking-category/update-tracking-category.mjs @@ -0,0 +1,62 @@ +import { ConfigurationError } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; + +export default { + key: "xero_accounting_api-update-tracking-category", + name: "Update tracking category", + description: "Update a tracking category by ID [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories#post-trackingcategories).", + version: "0.0.1", + type: "action", + props: { + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], + }, + trackingCategoryId: { + propDefinition: [ + xeroAccountingApi, + "trackingCategoryId", + ({ tenantId }) => ({ + tenantId, + }), + ], + }, + name: { + type: "string", + label: "Name", + description: "The name of the tracking category", + optional: true, + }, + status: { + type: "string", + label: "Status", + description: "The status of the tracking category", + options: [ + "ACTIVE", + "ARCHIVED", + ], + optional: true, + }, + }, + async run({ $ }) { + try { + const response = await this.xeroAccountingApi.updateTrackingCategory({ + $, + tenantId: this.tenantId, + trackingCategoryId: this.trackingCategoryId, + data: { + Name: this.name, + Status: this.status, + }, + }); + + $.export("$summary", `Successfully updated tracking category with ID: ${this.trackingCategoryId}`); + return response; + } catch ({ response: { data } }) { + throw new ConfigurationError(data.Elements[0].ValidationErrors[0].Message); + } + }, +}; diff --git a/components/xero_accounting_api/actions/upload-file/upload-file.mjs b/components/xero_accounting_api/actions/upload-file/upload-file.mjs index aec51dc7b0b54..72f53dedd5bcf 100644 --- a/components/xero_accounting_api/actions/upload-file/upload-file.mjs +++ b/components/xero_accounting_api/actions/upload-file/upload-file.mjs @@ -1,15 +1,11 @@ -// legacy_hash_id: a_B0i8rE -import FormData from "form-data"; -import { - axios, getFileStreamAndMetadata, -} from "@pipedream/platform"; +import { getFileStreamAndMetadata } from "@pipedream/platform"; import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-upload-file", name: "Upload File", description: "Uploads a file to the specified document. [See the documentation](https://developer.xero.com/documentation/api/accounting/invoices#upload-attachment)", - version: "1.0.1", + version: "1.0.2", type: "action", props: { xeroAccountingApi, @@ -52,27 +48,37 @@ export default { optional: true, }, }, + methods: { + streamToBuffer(stream) { + return new Promise((resolve, reject) => { + const chunks = []; + stream.on("data", (chunk) => chunks.push(chunk)); + stream.on("end", () => resolve(Buffer.concat(chunks))); + stream.on("error", reject); + }); + }, + }, async run({ $ }) { const { stream, metadata, } = await getFileStreamAndMetadata(this.filePathOrUrl); - const data = new FormData(); - data.append("file", stream, { - contentType: metadata.contentType, - knownLength: metadata.size, - filename: metadata.name, - }); + const fileBinary = await this.streamToBuffer(stream); - //Sends the request against Xero Accounting API - return await axios($, { - method: "post", - url: `https://api.xero.com/api.xro/2.0/${this.documentType}/${this.documentId}/Attachments/${metadata.name}`, + const response = await this.xeroAccountingApi.uploadFile({ + $, + tenantId: this.tenantId, + documentType: this.documentType, + documentId: this.documentId, + fileName: metadata.name, headers: { - "Authorization": `Bearer ${this.xeroAccountingApi.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenantId, - ...data.getHeaders(), + "Content-Type": metadata.contentType, + "Content-Length": metadata.size, + "Accept": "application/json", }, - data, + data: Buffer.from(fileBinary, "binary"), }); + + $.export("$summary", `Successfully uploaded file to ${this.documentType} with ID: ${this.documentId}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/xero-accounting-create-employee/xero-accounting-create-employee.mjs b/components/xero_accounting_api/actions/xero-accounting-create-employee/xero-accounting-create-employee.mjs index a633fa6264d42..47eaac8ed33c5 100644 --- a/components/xero_accounting_api/actions/xero-accounting-create-employee/xero-accounting-create-employee.mjs +++ b/components/xero_accounting_api/actions/xero-accounting-create-employee/xero-accounting-create-employee.mjs @@ -1,30 +1,33 @@ -// legacy_hash_id: a_q1i3W6 -import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; +import { parseObject } from "../../common/util.mjs"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-xero-accounting-create-employee", name: "Create Employee", description: "Creates a new employee.", - version: "0.3.1", + version: "0.3.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", - }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - first_name: { + firstName: { + label: "First Name", type: "string", description: "First name of an employee (max length = 255). If an existing employee matches your `FirstName` and `LastName` then you will receive an error.", }, - last_name: { + lastName: { + label: "Last Name", type: "string", description: "Last name of an employee (max length = 255). If an existing employee matches your `FirstName` and `LastName` then you will receive an error.", }, status: { + label: "Status", type: "string", description: "Current status of an employee - see contact status [types](https://developer.xero.com/documentation/api/types#ContactStatuses)", optional: true, @@ -34,33 +37,30 @@ export default { "GDPRREQUEST", ], }, - external_link: { + externalLink: { + label: "External Link", type: "object", description: "Link to an external resource, for example, an employee record in an external system. You can specify the URL element.\nThe description of the link is auto-generated in the form \"Go to \". refers to the [Xero application](https://api.xero.com/Application) name that is making the API call.", optional: true, }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/employees - //on section PUT Employees - - if (!this.tenant_id || !this.first_name || !this.last_name) { - throw new Error("Must provide tenant_id, first_name, and last_name parameters."); + if (!this.tenantId || !this.firstName || !this.lastName) { + throw new ConfigurationError("Must provide **Tenant ID**, **First Name**, and **Last Name** parameters."); } - return await axios($, { - method: "put", - url: "https://api.xero.com/api.xro/2.0/Employees", - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, + const response = await this.xeroAccountingApi.createEmployee({ + $, + tenantId: this.tenantId, data: { Status: this.status, - FirstName: this.first_name, - LastName: this.last_name, - ExternalLink: this.external_link, + FirstName: this.firstName, + LastName: this.lastName, + ExternalLink: parseObject(this.externalLink), }, }); + + $.export("$summary", `Successfully created employee with ID: ${response.EmployeeID}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/xero-accounting-create-or-update-contact/xero-accounting-create-or-update-contact.mjs b/components/xero_accounting_api/actions/xero-accounting-create-or-update-contact/xero-accounting-create-or-update-contact.mjs index 39775484f972e..0425c3afdc040 100644 --- a/components/xero_accounting_api/actions/xero-accounting-create-or-update-contact/xero-accounting-create-or-update-contact.mjs +++ b/components/xero_accounting_api/actions/xero-accounting-create-or-update-contact/xero-accounting-create-or-update-contact.mjs @@ -1,42 +1,46 @@ -// legacy_hash_id: a_0Mi723 -import { axios } from "@pipedream/platform"; +import { parseObject } from "../../common/util.mjs"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-xero-accounting-create-or-update-contact", name: "Create or Update Contact", description: "Creates a new contact or updates if the contact exists.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", - }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, name: { + label: "Name", type: "string", description: "Full name of contact/organisation (max length = 255). The following is required to create a contact.", optional: true, }, - contact_id: { + contactId: { + label: "Contact ID", type: "string", description: "Xero identifier.", optional: true, }, - contact_number: { + contactNumber: { + label: "Contact Number", type: "string", description: "This can be updated via the API only i.e. This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). If the Contact Number is used, this is displayed as Contact Code in the Contacts UI in Xero.", optional: true, }, - account_number: { + accountNumber: { + label: "Account Number", type: "string", description: "A user defined account number. This can be updated via the API and the [Xero UI](https://help.xero.com/ContactsAccountNumber) (max length = 50).", optional: true, }, - contact_status: { + contactStatus: { + label: "Contact Status", type: "string", description: "Current status of a contact - see contact status [types](https://developer.xero.com/documentation/api/types#ContactStatuses)", optional: true, @@ -46,167 +50,204 @@ export default { "GDPRREQUEST", ], }, - first_name: { + firstName: { + label: "First Name", type: "string", description: "First name of contact person (max length = 255).", optional: true, }, - last_name: { + lastName: { + label: "Last Name", type: "string", description: "Last name of contact person (max length = 255)", optional: true, }, - email_address: { + emailAddress: { + label: "Email Address", type: "string", description: "Email address of contact person (umlauts not supported) (max length = 255)", optional: true, }, - skype_user_name: { + skypeUserName: { + label: "Skype User Name", type: "string", description: "Skype user name of contact.", optional: true, }, - contact_persons: { + contactPersons: { + label: "Contact Persons", type: "any", description: "See [contact persons](https://developer.xero.com/documentation/api/contacts#contact-persons).", optional: true, }, - bank_account_details: { + bankAccountDetails: { + label: "Bank Account Details", type: "string", description: "Bank account number of contact", optional: true, }, - tax_number: { + taxNumber: { + label: "Tax Number", type: "string", description: "Tax number of contact - this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50)", optional: true, }, - account_receivable_tax_type: { + accountReceivableTaxType: { + label: "Account Receivable Tax Type", type: "string", description: "Default tax type used for contact on AP invoices", optional: true, }, - account_payable_type: { + accountPayableType: { + label: "Account Payable Type", type: "string", description: "Store certain address types for a contact - see address types", optional: true, }, addresses: { + label: "Addresses", type: "any", description: "Store certain address types for a contact - see address types", optional: true, }, phones: { + label: "Phones", type: "any", description: "Store certain phone types for a contact - see phone types.", optional: true, }, - is_supplier: { + isSupplier: { + label: "Is Supplier", type: "boolean", description: "true or false ย– Boolean that describes if a contact that has any AP invoices entered against them. Cannot be set via PUT or POST - it is automatically set when an accounts payable invoice is generated against this contact.", optional: true, }, - is_customer: { + isCustomer: { + label: "Is Customer", type: "boolean", description: "true or false ย– Boolean that describes if a contact has any AR invoices entered against them. Cannot be set via PUT or POST - it is automatically set when an accounts receivable invoice is generated against this contact.", optional: true, }, - default_currency: { + defaultCurrency: { + label: "Default Currency", type: "string", description: "Default currency for raising invoices against contact", optional: true, }, - xero_network_key: { + xeroNetworkKey: { + label: "Xero Network Key", type: "string", description: "Store XeroNetworkKey for contacts.", optional: true, }, - sales_default_account_code: { + salesDefaultAccountCode: { + label: "Sales Default Account Code", type: "string", description: "The default sales [account code](https://developer.xero.com/documentation/api/accounts) for contacts", optional: true, }, - puchases_default_account_code: { + puchasesDefaultAccountCode: { + label: "Purchases Default Account Code", type: "string", description: "The default purchases [account code](https://developer.xero.com/documentation/api/accounts) for contacts", optional: true, }, - sales_tracking_categories: { + salesTrackingCategories: { + label: "Sales Tracking Categories", type: "string", description: "The default sales [tracking categories](https://developer.xero.com/documentation/api/tracking-categories/) for contacts", optional: true, }, - puechases_tracking_categories: { + puechasesTrackingCategories: { + label: "Purchases Tracking Categories", type: "string", description: "The default purchases [tracking categories](https://developer.xero.com/documentation/api/tracking-categories/) for contacts", optional: true, }, - tracking_category_name: { + trackingCategoryName: { + label: "Tracking Category Name", type: "string", description: "The name of the Tracking Category assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories", optional: true, }, - tracking_option_name: { + trackingOptionName: { + label: "Tracking Option Name", type: "string", description: "The name of the Tracking Option assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories", optional: true, }, - payment_terms: { + paymentTermsBillDay: { + label: "Payment Terms Bill Day", + type: "integer", + description: "The default payment terms bill day", + optional: true, + }, + paymentTermsBillType: { type: "string", - description: "The default payment terms for the contact - see Payment Terms", + label: "Payment Terms Bill Type", + description: "The default payment terms bill type", optional: true, options: [ - "DAYSAFTERBILLDATE", - "DAYSAFTERBILLMONTH", - "OFCURRENTMONTH", - "OFFOLLOWINGMONTH", + { + "label": "day(s) after bill date", + "value": "DAYSAFTERBILLDATE", + }, + { + "label": "day(s) after bill month", + "value": "DAYSAFTERBILLMONTH", + }, + { + "label": "of the current month", + "value": "OFCURRENTMONTH", + }, + { + "label": "of the following month", + "value": "OFFOLLOWINGMONTH", + }, ], }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/contacts - //on section POST Contacts - - if (!this.tenant_id) { - throw new Error("Must provide tenant_id parameter."); - } - - return await axios($, { - method: "post", - url: "https://api.xero.com/api.xro/2.0/Contacts", - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, + const response = await this.xeroAccountingApi.createOrUpdateContact({ + $, + tenantId: this.tenantId, data: { Name: this.name, - ContactID: this.contact_id, - ContactNumber: this.contact_number, - AccountNumber: this.account_number, - ContactStatus: this.contact_status, - FirstName: this.first_name, - LastName: this.last_name, - EmailAddress: this.email_address, - SkypeUserName: this.skype_user_name, - ContactPersons: this.contact_persons, - BankAccountDetails: this.bank_account_details, - TaxNumber: this.tax_number, - AccountsReceivableTaxType: this.account_receivable_tax_type, - AccountsPayableTaxType: this.account_payable_type, - Addresses: this.addresses, - Phones: this.phones, - IsSupplier: this.is_supplier, - IsCustomer: this.is_customer, - DefaultCurrency: this.default_currency, - XeroNetworkKey: this.xero_network_key, - SalesDefaultAccountCode: this.sales_default_account_code, - PurchasesDefaultAccountCode: this.puchases_default_account_code, - SalesTrackingCategories: this.sales_tracking_categories, - PurchasesTrackingCategories: this.puechases_tracking_categories, - TrackingCategoryName: this.tracking_category_name, - TrackingOptionName: this.tracking_option_name, - PaymentTerms: this.payment_terms, + ContactID: this.contactId, + ContactNumber: this.contactNumber, + AccountNumber: this.accountNumber, + ContactStatus: this.contactStatus, + FirstName: this.firstName, + LastName: this.lastName, + EmailAddress: this.emailAddress, + SkypeUserName: this.skypeUserName, + ContactPersons: parseObject(this.contactPersons), + BankAccountDetails: this.bankAccountDetails, + TaxNumber: this.taxNumber, + AccountsReceivableTaxType: this.accountReceivableTaxType, + AccountsPayableTaxType: this.accountPayableType, + Addresses: parseObject(this.addresses), + Phones: parseObject(this.phones), + IsSupplier: this.isSupplier, + IsCustomer: this.isCustomer, + DefaultCurrency: this.defaultCurrency, + XeroNetworkKey: this.xeroNetworkKey, + SalesDefaultAccountCode: this.salesDefaultAccountCode, + PurchasesDefaultAccountCode: this.puchasesDefaultAccountCode, + SalesTrackingCategories: this.salesTrackingCategories, + PurchasesTrackingCategories: this.puechasesTrackingCategories, + TrackingCategoryName: this.trackingCategoryName, + TrackingOptionName: this.trackingOptionName, + PaymentTerms: { + Bills: { + Day: this.paymentTermsBillDay, + Type: this.paymentTermsBillType, + }, + }, }, }); + + $.export("$summary", `Successfully created or updated contact with ID: ${this.contactId}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/xero-accounting-update-contact/xero-accounting-update-contact.mjs b/components/xero_accounting_api/actions/xero-accounting-update-contact/xero-accounting-update-contact.mjs index d1292b37081cc..1289775e53273 100644 --- a/components/xero_accounting_api/actions/xero-accounting-update-contact/xero-accounting-update-contact.mjs +++ b/components/xero_accounting_api/actions/xero-accounting-update-contact/xero-accounting-update-contact.mjs @@ -1,41 +1,46 @@ -// legacy_hash_id: a_dvinrY -import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; +import { parseObject } from "../../common/util.mjs"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-xero-accounting-update-contact", name: "Update Contact", description: "Updates a contact given its identifier.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", - }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], }, - contact_id: { + contactId: { + label: "Contact ID", type: "string", description: "Contact identifier of the contact to update.", }, name: { + label: "Name", type: "string", description: "Full name of contact/organisation (max length = 255). The following is required to create a contact.", optional: true, }, - contact_number: { + contactNumber: { + label: "Contact Number", type: "string", description: "This can be updated via the API only i.e. This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). If the Contact Number is used, this is displayed as Contact Code in the Contacts UI in Xero.", optional: true, }, - account_number: { + accountNumber: { + label: "Account Number", type: "string", description: "A user defined account number. This can be updated via the API and the [Xero UI](https://help.xero.com/ContactsAccountNumber) (max length = 50).", optional: true, }, - contact_status: { + contactStatus: { + label: "Contact Status", type: "string", description: "Current status of a contact - see contact status [types](https://developer.xero.com/documentation/api/types#ContactStatuses)", optional: true, @@ -45,167 +50,209 @@ export default { "GDPRREQUEST", ], }, - first_name: { + firstName: { + label: "First Name", type: "string", description: "First name of contact person (max length = 255).", optional: true, }, - last_name: { + lastName: { + label: "Last Name", type: "string", description: "Last name of contact person (max length = 255)", optional: true, }, - email_address: { + emailAddress: { + label: "Email Address", type: "string", description: "Email address of contact person (umlauts not supported) (max length = 255)", optional: true, }, - skype_user_name: { + skypeUserName: { + label: "Skype User Name", type: "string", description: "Skype user name of contact.", optional: true, }, - contact_persons: { + contactPersons: { + label: "Contact Persons", type: "any", description: "See [contact persons](https://developer.xero.com/documentation/api/contacts#contact-persons).", optional: true, }, - bank_account_details: { + bankAccountDetails: { + label: "Bank Account Details", type: "string", description: "Bank account number of contact", optional: true, }, - tax_number: { + taxNumber: { + label: "Tax Number", type: "string", description: "Tax number of contact - this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50)", optional: true, }, - account_receivable_tax_type: { + accountReceivableTaxType: { + label: "Account Receivable Tax Type", type: "string", description: "Default tax type used for contact on AP invoices", optional: true, }, - account_payable_type: { + accountPayableType: { + label: "Account Payable Type", type: "string", description: "Store certain address types for a contact - see address types", optional: true, }, addresses: { + label: "Addresses", type: "any", description: "Store certain address types for a contact - see address types", optional: true, }, phones: { + label: "Phones", type: "any", description: "Store certain phone types for a contact - see phone types.", optional: true, }, - is_supplier: { + isSupplier: { + label: "Is Supplier", type: "boolean", description: "true or false ย– Boolean that describes if a contact that has any AP invoices entered against them. Cannot be set via PUT or POST - it is automatically set when an accounts payable invoice is generated against this contact.", optional: true, }, - is_customer: { + isCustomer: { + label: "Is Customer", type: "boolean", description: "true or false ย– Boolean that describes if a contact has any AR invoices entered against them. Cannot be set via PUT or POST - it is automatically set when an accounts receivable invoice is generated against this contact.", optional: true, }, - default_currency: { + defaultCurrency: { + label: "Default Currency", type: "string", description: "Default currency for raising invoices against contact", optional: true, }, - xero_network_key: { + xeroNetworkKey: { + label: "Xero Network Key", type: "string", description: "Store XeroNetworkKey for contacts.", optional: true, }, - sales_default_account_code: { + salesDefaultAccountCode: { + label: "Sales Default Account Code", type: "string", description: "The default sales [account code](https://developer.xero.com/documentation/api/accounts) for contacts", optional: true, }, - puchases_default_account_code: { + puchasesDefaultAccountCode: { + label: "Purchases Default Account Code", type: "string", description: "The default purchases [account code](https://developer.xero.com/documentation/api/accounts) for contacts", optional: true, }, - sales_tracking_categories: { + salesTrackingCategories: { + label: "Sales Tracking Categories", type: "string", description: "The default sales [tracking categories](https://developer.xero.com/documentation/api/tracking-categories/) for contacts", optional: true, }, - puechases_tracking_categories: { + puechasesTrackingCategories: { + label: "Purchases Tracking Categories", type: "string", description: "The default purchases [tracking categories](https://developer.xero.com/documentation/api/tracking-categories/) for contacts", optional: true, }, - tracking_category_name: { + trackingCategoryName: { + label: "Tracking Category Name", type: "string", description: "The name of the Tracking Category assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories", optional: true, }, - tracking_option_name: { + trackingOptionName: { + label: "Tracking Option Name", type: "string", description: "The name of the Tracking Option assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories", optional: true, }, - payment_terms: { + paymentTermsBillDay: { + label: "Payment Terms Bill Day", + type: "integer", + description: "The default payment terms bill day", + optional: true, + }, + paymentTermsBillType: { type: "string", - description: "The default payment terms for the contact - see Payment Terms", + label: "Payment Terms Bill Type", + description: "The default payment terms bill type", optional: true, options: [ - "DAYSAFTERBILLDATE", - "DAYSAFTERBILLMONTH", - "OFCURRENTMONTH", - "OFFOLLOWINGMONTH", + { + "label": "day(s) after bill date", + "value": "DAYSAFTERBILLDATE", + }, + { + "label": "day(s) after bill month", + "value": "DAYSAFTERBILLMONTH", + }, + { + "label": "of the current month", + "value": "OFCURRENTMONTH", + }, + { + "label": "of the following month", + "value": "OFFOLLOWINGMONTH", + }, ], }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/contacts - //on section POST Contacts - - if (!this.tenant_id || !this.contact_id) { - throw new Error("Must provide tenant_id, and contact_id parameters."); + if (!this.tenantId || !this.contactId) { + throw new ConfigurationError("Must provide **Tenant ID**, and **Contact ID** parameters."); } - return await axios($, { - method: "post", - url: `https://api.xero.com/api.xro/2.0/Contacts/${this.contact_id}`, - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, + const response = await this.xeroAccountingApi.updateContact({ + $, + tenantId: this.tenantId, + contactId: this.contactId, data: { Name: this.name, - ContactID: this.contact_id, - ContactNumber: this.contact_number, - AccountNumber: this.account_number, - ContactStatus: this.contact_status, - FirstName: this.first_name, - LastName: this.last_name, - EmailAddress: this.email_address, - SkypeUserName: this.skype_user_name, - ContactPersons: this.contact_persons, - BankAccountDetails: this.bank_account_details, - TaxNumber: this.tax_number, - AccountsReceivableTaxType: this.account_receivable_tax_type, - AccountsPayableTaxType: this.account_payable_type, - Addresses: this.addresses, - Phones: this.phones, - IsSupplier: this.is_supplier, - IsCustomer: this.is_customer, - DefaultCurrency: this.default_currency, - XeroNetworkKey: this.xero_network_key, - SalesDefaultAccountCode: this.sales_default_account_code, - PurchasesDefaultAccountCode: this.puchases_default_account_code, - SalesTrackingCategories: this.sales_tracking_categories, - PurchasesTrackingCategories: this.puechases_tracking_categories, - TrackingCategoryName: this.tracking_category_name, - TrackingOptionName: this.tracking_option_name, - PaymentTerms: this.payment_terms, + ContactID: this.contactId, + ContactNumber: this.contactNumber, + AccountNumber: this.accountNumber, + ContactStatus: this.contactStatus, + FirstName: this.firstName, + LastName: this.lastName, + EmailAddress: this.emailAddress, + SkypeUserName: this.skypeUserName, + ContactPersons: parseObject(this.contactPersons), + BankAccountDetails: this.bankAccountDetails, + TaxNumber: this.taxNumber, + AccountsReceivableTaxType: this.accountReceivableTaxType, + AccountsPayableTaxType: this.accountPayableType, + Addresses: parseObject(this.addresses), + Phones: parseObject(this.phones), + IsSupplier: this.isSupplier, + IsCustomer: this.isCustomer, + DefaultCurrency: this.defaultCurrency, + XeroNetworkKey: this.xeroNetworkKey, + SalesDefaultAccountCode: this.salesDefaultAccountCode, + PurchasesDefaultAccountCode: this.puchasesDefaultAccountCode, + SalesTrackingCategories: this.salesTrackingCategories, + PurchasesTrackingCategories: this.puechasesTrackingCategories, + TrackingCategoryName: this.trackingCategoryName, + TrackingOptionName: this.trackingOptionName, + PaymentTerms: { + Bills: { + Day: this.paymentTermsBillDay, + Type: this.paymentTermsBillType, + }, + }, }, }); + + $.export("$summary", `Successfully updated contact with ID: ${this.contactId}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs b/components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs index fccb79ca85895..b09875f2703d7 100644 --- a/components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs +++ b/components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs @@ -1,130 +1,142 @@ -// legacy_hash_id: a_xqigGY -import { axios } from "@pipedream/platform"; +import { ConfigurationError } from "@pipedream/platform"; +import { formatLineItems } from "../../common/util.mjs"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-xero-create-purchase-bill", name: "Create Purchase Bill", description: "Creates a new purchase bill.", - version: "0.1.1", + version: "0.1.2", type: "action", props: { - xero_accounting_api: { - type: "app", - app: "xero_accounting_api", - }, - contact_id: { + xeroAccountingApi, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], + }, + contactId: { + label: "Contact ID", type: "string", description: "Id of the contact associated to the invoice.", optional: true, }, - contact_name: { + contactName: { + label: "Contact Name", type: "string", description: "Name of the contact associated to the invoice. If there is no contact matching this name, a new contact is created.", optional: true, }, - tenant_id: { - type: "string", - description: "Id of the organization tenant to use on the Xero Accounting API. See [Get Tenant Connections](https://pipedream.com/@sergio/xero-accounting-api-get-tenant-connections-p_OKCzOgn/edit) for a workflow example on how to pull this data.", - }, - line_items: { + lineItems: { + label: "Line Items", type: "any", description: "See [LineItems](https://developer.xero.com/documentation/api/invoices#LineItemsPOST). The LineItems collection can contain any number of individual LineItem sub-elements. At least * **one** * is required to create a complete Invoice.", }, date: { + label: "Date", type: "string", description: "Date invoice was issued - YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation.", optional: true, }, - due_date: { + dueDate: { + label: "Due Date", type: "string", description: "Date invoice is due - YYYY-MM-DD.", optional: true, }, - line_amount_type: { + lineAmountType: { + label: "Line Amount Type", type: "string", description: "Line amounts are exclusive of tax by default if you don't specify this element. See [Line Amount Types](https://developer.xero.com/documentation/api/types#LineAmountTypes)", optional: true, }, - purchase_bill_number: { + purchaseBillNumber: { + label: "Purchase Bill Number", type: "string", description: "Non-unique alpha numeric code identifying purchase bill (printable ASCII characters only). This value will also display as Reference in the UI.", optional: true, }, reference: { + label: "Reference", type: "string", description: "Additional reference number (max length = 255)", optional: true, }, - branding_theme_id: { + brandingThemeId: { + label: "Branding Theme ID", type: "string", description: "See [BrandingThemes](https://developer.xero.com/documentation/api/branding-themes)", optional: true, }, url: { + label: "URL", type: "string", description: "URL link to a source document - shown as \"Go to [appName]\" in the Xero app", optional: true, }, - currency_code: { + currencyCode: { + label: "Currency Code", type: "string", description: "The currency that invoice has been raised in (see [Currencies](https://developer.xero.com/documentation/api/currencies))", optional: true, }, - currency_rate: { + currencyRate: { + label: "Currency Rate", type: "string", description: "The currency rate for a multicurrency invoice. If no rate is specified, the [XE.com day rate](http://help.xero.com/#CurrencySettings$Rates) is used. (max length = [18].[6])", optional: true, }, status: { + label: "Status", type: "string", description: "See [Invoice Status Codes](https://developer.xero.com/documentation/api/invoices#status-codes)", optional: true, }, - sent_to_contact: { + sentToContact: { + label: "Sent to Contact", type: "string", description: "Boolean to set whether the invoice in the Xero app should be marked as \"sent\". This can be set only on invoices that have been approved", optional: true, }, - planned_payment_date: { + plannedPaymentDate: { + label: "Planned Payment Date", type: "string", description: "Shown on purchase bills (Accounts Payable) when this has been set", optional: true, }, }, async run({ $ }) { - //See the API docs: https://developer.xero.com/documentation/api/invoices#post - - if ((!this.contact_id && !this.contact_name) || !this.tenant_id || !this.line_items) { - throw new Error("Must provide one of contact_id or contact_name, and tenant_id, type, line_items parameters."); + if ((!this.contactId && !this.contactName) || !this.tenantId || !this.lineItems) { + throw new ConfigurationError("Must provide one of **Contact ID** or **Contact Name**, **Tenant ID**, **Type**, and **Line Items** parameters."); } - return await axios($, { - method: "post", - url: "https://api.xero.com/api.xro/2.0/Invoices", - headers: { - "Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`, - "xero-tenant-id": this.tenant_id, - }, + const response = await this.xeroAccountingApi.createInvoice({ + $, + tenantId: this.tenantId, data: { Type: "ACCPAY", //ACCPAY = Purchase Bill Contact: { - ContactID: this.contact_id, - Name: this.contact_name, + ContactID: this.contactId, + Name: this.contactName, }, - LineItems: this.line_items, + LineItems: formatLineItems(this.lineItems), Date: this.date, - DueDate: this.due_date, - LineAmountTypes: this.line_amount_type, - InvoiceNumber: this.purchase_bill_number, + DueDate: this.dueDate, + LineAmountTypes: this.lineAmountType, + InvoiceNumber: this.purchaseBillNumber, Reference: this.reference, - BrandingThemeID: this.branding_theme_id, + BrandingThemeID: this.brandingThemeId, Url: this.url, - CurrencyCode: this.currency_code, - CurrencyRate: this.currency_rate, + CurrencyCode: this.currencyCode, + CurrencyRate: this.currencyRate, Status: this.status, - SentToContact: this.sent_to_contact, - PlannedPaymentDate: this.planned_payment_date, + SentToContact: this.sentToContact, + PlannedPaymentDate: this.plannedPaymentDate, }, }); + + $.export("$summary", `Successfully created purchase bill with ID: ${response.PurchaseBillID}`); + return response; }, }; diff --git a/components/xero_accounting_api/actions/xero-create-sales-invoice/xero-create-sales-invoice.mjs b/components/xero_accounting_api/actions/xero-create-sales-invoice/xero-create-sales-invoice.mjs index dbcfd1809b05c..52a39d3425398 100644 --- a/components/xero_accounting_api/actions/xero-create-sales-invoice/xero-create-sales-invoice.mjs +++ b/components/xero_accounting_api/actions/xero-create-sales-invoice/xero-create-sales-invoice.mjs @@ -1,11 +1,12 @@ -import xero from "../../xero_accounting_api.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; import { formatLineItems } from "../../common/util.mjs"; +import xero from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-xero-create-sales-invoice", name: "Create Sales Invoice", description: "Creates a new sales invoice. [See the documentation](https://developer.xero.com/documentation/api/invoices#post)", - version: "0.3.2", + version: "0.3.3", type: "action", props: { xero, @@ -23,7 +24,9 @@ export default { if (!this.tenantId) { return []; } - const { Contacts: contacts } = await this.xero.getContact(null, this.tenantId); + const { Contacts: contacts } = await this.xero.getContact({ + tenantId: this.tenantId, + }); return contacts?.map(({ ContactID: value, Name: label, }) => ({ @@ -120,28 +123,32 @@ export default { }, async run({ $ }) { if ((!this.contactId && !this.contactName) || !this.tenantId || !this.lineItems) { - throw new Error("Must provide one of `contactId` or `contactName`, and `tenantId`, `type`, `lineItems` parameters."); + throw new ConfigurationError("Must provide one of **Contact ID** or **Contact Name**, **Tenant ID**, **Type**, and **Line Items** parameters."); } - const response = await this.xero.createInvoice($, this.tenantId, { - Type: "ACCREC", //ACCREC = Sales Invoice - Contact: { - ContactID: this.contactId, - Name: this.contactName, + const response = await this.xero.createInvoice({ + $, + tenantId: this.tenantId, + data: { + Type: "ACCREC", //ACCREC = Sales Invoice + Contact: { + ContactID: this.contactId, + Name: this.contactName, + }, + LineItems: formatLineItems(this.lineItems), + Date: this.date, + DueDate: this.dueDate, + LineAmountTypes: this.lineAmountType, + InvoiceNumber: this.invoiceNumber, + Reference: this.reference, + BrandingThemeID: this.brandingThemeId, + Url: this.url, + CurrencyCode: this.currencyCode, + CurrencyRate: this.currencyRate, + Status: this.status, + SentToContact: this.sentToContact, + ExpectedPaymentDate: this.expectedPaymentData, }, - LineItems: formatLineItems(this.lineItems), - Date: this.date, - DueDate: this.dueDate, - LineAmountTypes: this.lineAmountType, - InvoiceNumber: this.invoiceNumber, - Reference: this.reference, - BrandingThemeID: this.brandingThemeId, - Url: this.url, - CurrencyCode: this.currencyCode, - CurrencyRate: this.currencyRate, - Status: this.status, - SentToContact: this.sentToContact, - ExpectedPaymentDate: this.expectedPaymentData, }); return response; diff --git a/components/xero_accounting_api/common/constants.mjs b/components/xero_accounting_api/common/constants.mjs index 15b181ab273b8..d675c75d887e7 100644 --- a/components/xero_accounting_api/common/constants.mjs +++ b/components/xero_accounting_api/common/constants.mjs @@ -1,11 +1,2 @@ -const BASE_URL = "https://api.xero.com"; -const VERSION_PATH = "/2.0"; -const DEFAULT_API_PATH = "/api.xro"; -const DB_LAST_DATE_CHECK = "DB_LAST_DATE_CHECK"; - -export default { - BASE_URL, - VERSION_PATH, - DEFAULT_API_PATH, - DB_LAST_DATE_CHECK, -}; +export const DB_LAST_DATE_CHECK = "DB_LAST_DATE_CHECK"; +export const BASE_URL = "https://api.xero.com"; diff --git a/components/xero_accounting_api/common/util.mjs b/components/xero_accounting_api/common/util.mjs index f7db6b265b378..5e261f7cb9ca5 100644 --- a/components/xero_accounting_api/common/util.mjs +++ b/components/xero_accounting_api/common/util.mjs @@ -108,12 +108,39 @@ const formatJsonDate = (date) => { const chainQueryString = (queryString) => queryString && queryString.split("&").join(" AND "); +const parseObject = (obj) => { + if (!obj) return undefined; + + if (Array.isArray(obj)) { + return obj.map((item) => { + if (typeof item === "string") { + try { + return JSON.parse(item); + } catch (e) { + return item; + } + } + return item; + }); + } + if (typeof obj === "string") { + try { + return JSON.parse(obj); + } catch (e) { + return obj; + } + } + return obj; +}; + export { - removeNullEntries, - formatLineItems, - deleteKeys, - isValidDate, - formatQueryString, chainQueryString, + deleteKeys, formatJsonDate, + formatLineItems, + formatQueryString, + isValidDate, + parseObject, + removeNullEntries, }; + diff --git a/components/xero_accounting_api/package.json b/components/xero_accounting_api/package.json index b07ae90495dec..0e2b3bffebb7c 100644 --- a/components/xero_accounting_api/package.json +++ b/components/xero_accounting_api/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/xero_accounting_api", - "version": "0.3.1", + "version": "0.4.0", "description": "Pipedream Xero Components", "main": "xero_accounting_api.app.mjs", "keywords": [ diff --git a/components/xero_accounting_api/sources/new-updated-contact/new-updated-contact.mjs b/components/xero_accounting_api/sources/new-updated-contact/new-updated-contact.mjs index bdf9373217dbc..8df1eb1677c6d 100644 --- a/components/xero_accounting_api/sources/new-updated-contact/new-updated-contact.mjs +++ b/components/xero_accounting_api/sources/new-updated-contact/new-updated-contact.mjs @@ -1,12 +1,12 @@ +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; import { formatJsonDate } from "../../common/util.mjs"; import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; export default { key: "xero_accounting_api-new-updated-contact", name: "New or updated contact", description: "Emit new notifications when you create a new or update existing contact", - version: "0.0.3", + version: "0.0.4", type: "source", props: { xeroAccountingApi, @@ -35,12 +35,10 @@ export default { this.xeroAccountingApi.setLastDateChecked(this.db, lastDateChecked); } const contacts = ( - await this.xeroAccountingApi.getContact( - null, - this.tenantId, - null, - lastDateChecked, - ) + await this.xeroAccountingApi.getContact({ + tenantId: this.tenantId, + modifiedSince: lastDateChecked, + }) )?.Contacts; contacts && contacts.reverse().forEach((contact) => { const formattedDate = formatJsonDate(contact.UpdatedDateUTC); diff --git a/components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs b/components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs index 9d81dfce12066..6352c5ff0ff11 100644 --- a/components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs +++ b/components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs @@ -1,12 +1,12 @@ +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; import { formatJsonDate } from "../../common/util.mjs"; import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; export default { key: "xero_accounting_api-new-updated-invoice", name: "New or updated invoice", description: "Emit new notifications when you create a new or update existing invoice", - version: "0.0.3", + version: "0.0.4", type: "source", props: { xeroAccountingApi, @@ -36,12 +36,10 @@ export default { } const invoices = ( - await this.xeroAccountingApi.getInvoice( - null, - this.tenantId, - null, - lastDateChecked, - ) + await this.xeroAccountingApi.getInvoice({ + tenantId: this.tenantId, + modifiedSince: lastDateChecked, + }) )?.Invoices; invoices && invoices.reverse().forEach((invoice) => { diff --git a/components/xero_accounting_api/sources/webhook-event-received/webhook-event-received.mjs b/components/xero_accounting_api/sources/webhook-event-received/webhook-event-received.mjs index 9110f3de83d2d..17975dd13471e 100644 --- a/components/xero_accounting_api/sources/webhook-event-received/webhook-event-received.mjs +++ b/components/xero_accounting_api/sources/webhook-event-received/webhook-event-received.mjs @@ -1,11 +1,11 @@ -import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; import crypto from "crypto"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { key: "xero_accounting_api-webhook-event-received", name: "Webhook Event Received (Instant)", description: "Emit new event for each incoming webhook notification. To create a Xero Webhook, please follow [the instructions here](https://developer.xero.com/documentation/guides/webhooks/creating-webhooks/).", - version: "0.0.1", + version: "0.0.2", type: "source", props: { xeroAccountingApi, diff --git a/components/xero_accounting_api/xero_accounting_api.app.mjs b/components/xero_accounting_api/xero_accounting_api.app.mjs index 075e897b86eba..a6e1dc32c1c9f 100644 --- a/components/xero_accounting_api/xero_accounting_api.app.mjs +++ b/components/xero_accounting_api/xero_accounting_api.app.mjs @@ -1,5 +1,7 @@ import { axios } from "@pipedream/platform"; -import constants from "./common/constants.mjs"; +import { + BASE_URL, DB_LAST_DATE_CHECK, +} from "./common/constants.mjs"; import { chainQueryString } from "./common/util.mjs"; export default { @@ -12,7 +14,52 @@ export default { description: "Select an organization tenant to use, or provide a tenant ID", async options() { - return this.getTenantsOpts(); + const tenants = await this.getTenantConnections(); + + return tenants.map(({ + tenantName: label, tenantId: value, + }) => ({ + label, + value, + })); + }, + }, + trackingCategoryId: { + type: "string", + label: "Tracking category ID", + description: "Unique identification of the tracking category", + async options({ tenantId }) { + const { TrackingCategories: trackingCategories } = await this.getTrackingCategories({ + tenantId, + }); + + return trackingCategories.map(({ + TrackingCategoryID: value, + Name: label, + }) => ({ + label, + value, + })); + }, + }, + trackingOptionId: { + type: "string", + label: "Tracking option ID", + description: "Unique identification of the tracking option", + async options({ + tenantId, trackingCategoryId, + }) { + const { TrackingCategories: trackingCategories } = await this.getTrackingCategory({ + tenantId, + trackingCategoryId, + }); + + return trackingCategories[0].Options.map(({ + TrackingOptionID, Name, + }) => ({ + label: Name, + value: TrackingOptionID, + })); }, }, invoiceId: { @@ -20,7 +67,9 @@ export default { label: "Invoice ID", description: "Unique identification of the invoice", async options({ tenantId }) { - return this.getInvoiceOpts(tenantId); + return this.getInvoiceOpts({ + tenantId, + }); }, }, lineItems: { @@ -31,106 +80,313 @@ export default { }, methods: { setLastDateChecked(db, value) { - db && db.set(constants.DB_LAST_DATE_CHECK, value); + db && db.set(DB_LAST_DATE_CHECK, value); }, getLastDateChecked(db) { - return db && db.get(constants.DB_LAST_DATE_CHECK); + return db && db.get(DB_LAST_DATE_CHECK); }, - getHeader(tenantId, modifiedSince = null) { + getHeader({ + tenantId, modifiedSince = null, headers = {}, + }) { const header = { "Authorization": `Bearer ${this.$auth.oauth_access_token}`, + ...headers, }; tenantId && (header["xero-tenant-id"] = tenantId); modifiedSince && (header["If-Modified-Since"] = modifiedSince); return header; }, - getUrl(path) { - const { - BASE_URL, - DEFAULT_API_PATH, - VERSION_PATH, - } = constants; - return `${BASE_URL}${DEFAULT_API_PATH}${VERSION_PATH}${path}`; - }, - async makeRequest(args = {}) { - const { - $, + _makeRequest({ + $ = this, + tenantId, + modifiedSince, + path, + headers, + ...opts + }) { + return axios($, { + url: `${BASE_URL}/api.xro/2.0${path}`, + headers: this.getHeader({ + tenantId, + modifiedSince, + headers, + }), + ...opts, + }); + }, + getTenantConnections() { + return this._makeRequest({ + url: BASE_URL + "/connections", + }); + }, + async getInvoiceOpts({ tenantId }) { + const invoices = await this.getInvoice({ tenantId, - modifiedSince, - method = "get", - path, - params, - data, - } = args; - const config = { - method, - url: this.getUrl(path), - headers: this.getHeader(tenantId, modifiedSince), - params, - data, - }; - return axios($ ?? this, config); - }, - async getTenantsOpts() { - const { BASE_URL } = constants; - const tenants = await axios(this, { - url: `${BASE_URL}/connections`, - headers: this.getHeader(), - }); - return tenants.map((tenant) => ({ - label: tenant.tenantName, - value: tenant.tenantId, - })); - }, - async getInvoiceOpts(tenantId) { - const invoices = await this.getInvoice(this, tenantId); - console.log(invoices); + }); return invoices?.Invoices?.map((invoice) => ({ label: invoice.InvoiceNumber, value: invoice.InvoiceID, })) || []; }, - async createContact($, tenantId, data) { - return this.makeRequest({ - $, - tenantId, - method: "post", - path: "/contacts", - data, + createBankTransaction(opts = {}) { + return this._makeRequest({ + method: "PUT", + path: "/BankTransactions", + ...opts, }); }, - async getContact($, tenantId, queryParam, modifiedSince = null) { + createCreditNote(opts = {}) { + return this._makeRequest({ + method: "PUT", + path: "/CreditNotes", + ...opts, + }); + }, + createHistoryNote({ + endpoint, guid, ...opts + }) { + return this._makeRequest({ + method: "PUT", + path: `/${endpoint}/${guid}/history`, + ...opts, + }); + }, + createItem(opts = {}) { + return this._makeRequest({ + method: "PUT", + path: "/Items", + ...opts, + }); + }, + createPayment(opts = {}) { + return this._makeRequest({ + method: "PUT", + path: "/Payments", + ...opts, + }); + }, + getContact({ + queryParam, ...opts + }) { const where = chainQueryString(queryParam); - return this.makeRequest({ - $, - tenantId, - modifiedSince, - path: "/contacts", + return this._makeRequest({ + path: "/Contacts", params: where && { Where: where, }, + ...opts, }); }, - async createInvoice($, tenantId, data) { - return this.makeRequest({ - $, - tenantId, - method: "post", - path: "/invoices", - data, + createInvoice(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/Invoices", + ...opts, }); }, - async getInvoice($, tenantId, queryParam, modifiedSince = null) { + downloadInvoice({ + invoiceId, ...opts + }) { + return this._makeRequest({ + method: "GET", + path: `/Invoices/${invoiceId}`, + ...opts, + }); + }, + emailInvoice({ + invoiceId, ...opts + }) { + return this._makeRequest({ + method: "POST", + path: `/Invoices/${invoiceId}/Email`, + ...opts, + }); + }, + getInvoice({ + queryParam, ...opts + }) { const where = chainQueryString(queryParam); - return this.makeRequest({ - $, - tenantId, - modifiedSince, - path: "/invoices", + return this._makeRequest({ + path: "/Invoices", + ...opts, params: where && { Where: where, }, }); }, + getInvoiceById({ + invoiceId, ...opts + }) { + return this._makeRequest({ + path: `/Invoices/${invoiceId}`, + ...opts, + }); + }, + getInvoiceOnlineUrl({ + invoiceId, ...opts + }) { + return this._makeRequest({ + path: `/Invoices/${invoiceId}/OnlineInvoice`, + ...opts, + }); + }, + getItemById({ + itemId, ...opts + }) { + return this._makeRequest({ + path: `/Items/${itemId}`, + ...opts, + }); + }, + getBankStatementsReport(opts = {}) { + return this._makeRequest({ + path: "/Reports/BankStatement", + ...opts, + }); + }, + getBankSummary(opts = {}) { + return this._makeRequest({ + path: "/Reports/BankSummary", + ...opts, + }); + }, + getContactById({ + contactIdentifier, ...opts + }) { + return this._makeRequest({ + path: `/Contacts/${contactIdentifier}`, + ...opts, + }); + }, + getHistoryOfChanges({ + endpoint, guid, ...opts + }) { + return this._makeRequest({ + path: `/${endpoint}/${guid}/history`, + ...opts, + }); + }, + getTrackingCategories(opts = {}) { + return this._makeRequest({ + path: "/TrackingCategories", + ...opts, + }); + }, + getTrackingCategory({ + trackingCategoryId, ...opts + }) { + return this._makeRequest({ + path: `/TrackingCategories/${trackingCategoryId}`, + ...opts, + }); + }, + createTrackingCategory(opts = {}) { + return this._makeRequest({ + method: "PUT", + path: "/TrackingCategories", + ...opts, + }); + }, + updateTrackingCategory({ + trackingCategoryId, ...opts + }) { + return this._makeRequest({ + method: "POST", + path: `/TrackingCategories/${trackingCategoryId}`, + ...opts, + }); + }, + deleteTrackingCategory({ + trackingCategoryId, ...opts + }) { + return this._makeRequest({ + method: "DELETE", + path: `/TrackingCategories/${trackingCategoryId}`, + ...opts, + }); + }, + createTrackingOption({ + trackingCategoryId, ...opts + }) { + return this._makeRequest({ + method: "PUT", + path: `/TrackingCategories/${trackingCategoryId}/Options`, + ...opts, + }); + }, + updateTrackingOption({ + trackingCategoryId, trackingOptionId, ...opts + }) { + return this._makeRequest({ + method: "POST", + path: `/TrackingCategories/${trackingCategoryId}/Options/${trackingOptionId}`, + ...opts, + }); + }, + deleteTrackingOption({ + trackingCategoryId, trackingOptionId, ...opts + }) { + return this._makeRequest({ + method: "DELETE", + path: `/TrackingCategories/${trackingCategoryId}/Options/${trackingOptionId}`, + ...opts, + }); + }, + listContacts(opts = {}) { + return this._makeRequest({ + path: "/Contacts", + ...opts, + }); + }, + listCreditNotes(opts = {}) { + return this._makeRequest({ + path: "/CreditNotes", + ...opts, + }); + }, + listInvoices(opts = {}) { + return this._makeRequest({ + path: "/Invoices", + ...opts, + }); + }, + listManualJournals(opts = {}) { + return this._makeRequest({ + path: "/ManualJournals", + ...opts, + }); + }, + uploadFile({ + documentType, documentId, fileName, ...opts + }) { + return this._makeRequest({ + method: "POST", + path: `/${documentType}/${documentId}/Attachments/${fileName}`, + ...opts, + }); + }, + createEmployee(opts = {}) { + return this._makeRequest({ + method: "PUT", + path: "/Employees", + ...opts, + }); + }, + createOrUpdateContact(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/Contacts", + ...opts, + }); + }, + updateContact({ + contactId, ...opts + }) { + return this._makeRequest({ + method: "POST", + path: `/Contacts/${contactId}`, + ...opts, + }); + }, }, }; diff --git a/components/xperiencify/package.json b/components/xperiencify/package.json index d790b75ff8539..76ecd6b6b832b 100644 --- a/components/xperiencify/package.json +++ b/components/xperiencify/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/xperiencify", - "version": "0.0.5", + "version": "0.0.6", "description": "Pipedream Xperiencify Components", "main": "dist/app/xperiencify.app.mjs", "keywords": [ @@ -17,5 +17,8 @@ }, "dependencies": { "@pipedream/platform": "^1.2.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/xperiencify/tsconfig.json b/components/xperiencify/tsconfig.json index 9a39aa83b2c27..3a9389484d040 100644 --- a/components/xperiencify/tsconfig.json +++ b/components/xperiencify/tsconfig.json @@ -1,23 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/yahoo_fantasy_sports/package.json b/components/yahoo_fantasy_sports/package.json index 3124cfdeb9428..f99fc4d08572d 100644 --- a/components/yahoo_fantasy_sports/package.json +++ b/components/yahoo_fantasy_sports/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/yahoo_fantasy_sports", - "version": "0.3.7", + "version": "0.4.0", "description": "Pipedream Yahoo_fantasy_sports Components", "main": "yahoo_fantasy_sports.app.mjs", "keywords": [ @@ -14,6 +14,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.0" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/yahoo_fantasy_sports/sources/new-baseball-league-transactions/new-baseball-league-transactions.mjs b/components/yahoo_fantasy_sports/sources/new-baseball-league-transactions/new-baseball-league-transactions.mjs new file mode 100644 index 0000000000000..18ae2ff60154c --- /dev/null +++ b/components/yahoo_fantasy_sports/sources/new-baseball-league-transactions/new-baseball-league-transactions.mjs @@ -0,0 +1,61 @@ +import yfs from "../../yahoo_fantasy_sports.app.mjs"; +import options from "../common/options.mjs"; +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; + +export default { + key: "yahoo_fantasy_sports-new-baseball-league-transactions", + name: "New Baseball League Transactions", + description: "Emit new event when a new baseball league transaction occurs", + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + yfs, + league: { + propDefinition: [ + yfs, + "league", + () => ({ + gameKey: "mlb", + }), + ], + }, + eventTypes: { + type: "string[]", + label: "Event Types", + description: "Select the types of events to watch for", + options: options.EVENT_TYPES, + optional: true, + default: [ + "*", + ], + }, + timer: { + label: "Polling interval", + description: "Pipedream will poll the API on this schedule", + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + async run() { + const eventTypes = this.eventTypes.includes("*") + ? options.ALL_EVENT_TYPES + : this.eventTypes; + + const transactions = await this.yfs.getLeagueTransactions(this.league, eventTypes); + if (Object.keys(transactions).length === 0) { + return; + } + + for (const txn of transactions) { + txn._summary = this.yfs.transactionSummary(txn); + this.$emit(txn, { + id: txn.transaction_key, + ts: (+txn.timestamp) * 1000, + summary: txn._summary, + }); + } + }, +}; diff --git a/components/yahoo_fantasy_sports/sources/new-football-league-transactions/new-football-league-transactions.mjs b/components/yahoo_fantasy_sports/sources/new-football-league-transactions/new-football-league-transactions.mjs index a8b132d8f4ff2..6b87b26067846 100644 --- a/components/yahoo_fantasy_sports/sources/new-football-league-transactions/new-football-league-transactions.mjs +++ b/components/yahoo_fantasy_sports/sources/new-football-league-transactions/new-football-league-transactions.mjs @@ -6,7 +6,7 @@ export default { key: "yahoo_fantasy_sports-new-football-league-transactions", name: "New Football League Transactions", description: "Emit new event when a new football league transaction occurs", - version: "0.0.3", + version: "0.0.4", type: "source", dedupe: "unique", props: { diff --git a/components/yahoo_fantasy_sports/yahoo_fantasy_sports.app.mjs b/components/yahoo_fantasy_sports/yahoo_fantasy_sports.app.mjs index c1af2acb4bdcb..7fd291148c7f4 100644 --- a/components/yahoo_fantasy_sports/yahoo_fantasy_sports.app.mjs +++ b/components/yahoo_fantasy_sports/yahoo_fantasy_sports.app.mjs @@ -10,8 +10,8 @@ export default { type: "string", label: "League", description: "Select a league", - async options() { - return this.getLeagueOptions(); + async options({ gameKey = "nfl" }) { + return this.getLeagueOptions(gameKey); }, }, }, @@ -59,9 +59,9 @@ export default { } return o; }, - async getLeagueOptions() { + async getLeagueOptions(gameKey = "nfl") { const resp = await this._makeRequest({ - path: "/users;use_login=1/games;game_keys=nfl/leagues/", + path: `/users;use_login=1/games;game_keys=${gameKey}/leagues/`, }); const users = this.unwrap(resp.fantasy_content.users); const ret = []; diff --git a/components/yelp/package.json b/components/yelp/package.json index 150718bb5fb6a..20a1f288d275a 100644 --- a/components/yelp/package.json +++ b/components/yelp/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/yelp", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Yelp Components", "main": "dist/app/yelp.app.mjs", "keywords": [ @@ -14,7 +14,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/yelp/tsconfig.json b/components/yelp/tsconfig.json index 910b87fc8266a..3a9389484d040 100644 --- a/components/yelp/tsconfig.json +++ b/components/yelp/tsconfig.json @@ -1,24 +1,3 @@ { - "compilerOptions": { - "lib": [ - "es2020" - ], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] + "extends": "../../tsconfig.components.json" } diff --git a/components/yepcode/yepcode.app.mjs b/components/yepcode/yepcode.app.mjs index 1e3bd797be975..91af1755a10a1 100644 --- a/components/yepcode/yepcode.app.mjs +++ b/components/yepcode/yepcode.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/yoast_seo/.gitignore b/components/yoast_seo/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/yoast_seo/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/yoast_seo/app/yoast_seo.app.ts b/components/yoast_seo/app/yoast_seo.app.ts deleted file mode 100644 index 82cd36e6c6993..0000000000000 --- a/components/yoast_seo/app/yoast_seo.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "yoast_seo", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/yoast_seo/package.json b/components/yoast_seo/package.json index e5ec7cf864f20..9f32ef235a292 100644 --- a/components/yoast_seo/package.json +++ b/components/yoast_seo/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/yoast_seo", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Yoast SEO Components", - "main": "dist/app/yoast_seo.app.mjs", + "main": "yoast_seo.app.mjs", "keywords": [ "pipedream", "yoast_seo" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/yoast_seo", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/yoast_seo/yoast_seo.app.mjs b/components/yoast_seo/yoast_seo.app.mjs new file mode 100644 index 0000000000000..b25bf507c554b --- /dev/null +++ b/components/yoast_seo/yoast_seo.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "yoast_seo", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/yotpo/package.json b/components/yotpo/package.json index feafacd2102d1..9160e4a6f7e23 100644 --- a/components/yotpo/package.json +++ b/components/yotpo/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/yotpo", - "version": "0.3.6", + "version": "0.3.7", "description": "Pipedream Yotpo Components", "main": "yotpo.app.mjs", "keywords": [ diff --git a/components/yotpo/yotpo.app.js b/components/yotpo/yotpo.app.mjs similarity index 100% rename from components/yotpo/yotpo.app.js rename to components/yotpo/yotpo.app.mjs diff --git a/components/you_can_book_me/.gitignore b/components/you_can_book_me/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/you_can_book_me/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/you_can_book_me/app/you_can_book_me.app.ts b/components/you_can_book_me/app/you_can_book_me.app.ts deleted file mode 100644 index 4681d15dbec62..0000000000000 --- a/components/you_can_book_me/app/you_can_book_me.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "you_can_book_me", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/you_can_book_me/package.json b/components/you_can_book_me/package.json index 32e753cf5e7e3..bcf456f777716 100644 --- a/components/you_can_book_me/package.json +++ b/components/you_can_book_me/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/you_can_book_me", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream You Can Book Me Components", - "main": "dist/app/you_can_book_me.app.mjs", + "main": "you_can_book_me.app.mjs", "keywords": [ "pipedream", "you_can_book_me" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/you_can_book_me", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/you_can_book_me/you_can_book_me.app.mjs b/components/you_can_book_me/you_can_book_me.app.mjs new file mode 100644 index 0000000000000..6d751f33531aa --- /dev/null +++ b/components/you_can_book_me/you_can_book_me.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "you_can_book_me", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/yourls/package.json b/components/yourls/package.json new file mode 100644 index 0000000000000..3c1e94c95bd1f --- /dev/null +++ b/components/yourls/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/yourls", + "version": "0.0.1", + "description": "Pipedream YOURLS Components", + "main": "yourls.app.mjs", + "keywords": [ + "pipedream", + "yourls" + ], + "homepage": "https://pipedream.com/apps/yourls", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/yourls/yourls.app.mjs b/components/yourls/yourls.app.mjs new file mode 100644 index 0000000000000..a5361d9cfc6d2 --- /dev/null +++ b/components/yourls/yourls.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "yourls", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/youtube_data_api_custom_app/actions/add-playlist-items/add-playlist-items.mjs b/components/youtube_data_api_custom_app/actions/add-playlist-items/add-playlist-items.mjs index 320009dfb8627..47f7b3f676137 100644 --- a/components/youtube_data_api_custom_app/actions/add-playlist-items/add-playlist-items.mjs +++ b/components/youtube_data_api_custom_app/actions/add-playlist-items/add-playlist-items.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/add-playlist-items/common.mjs"; +import common from "@pipedream/youtube_data_api/actions/add-playlist-items/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-add-playlist-items", name: "Add Playlist Items", description: "Adds resources to a playlist. [See the docs](https://developers.google.com/youtube/v3/docs/playlistItems/insert) for more information", - version: "0.0.1", + version: "0.0.2", type: "action", props: { youtubeDataApi, diff --git a/components/youtube_data_api_custom_app/actions/channel-statistics/channel-statistics.mjs b/components/youtube_data_api_custom_app/actions/channel-statistics/channel-statistics.mjs index cd666ffcc522d..536d7a7d3cd30 100644 --- a/components/youtube_data_api_custom_app/actions/channel-statistics/channel-statistics.mjs +++ b/components/youtube_data_api_custom_app/actions/channel-statistics/channel-statistics.mjs @@ -1,13 +1,13 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/channel-statistics/common.mjs"; -import consts from "../../../youtube_data_api/common/consts.mjs"; +import common from "@pipedream/youtube_data_api/actions/channel-statistics/common.mjs"; +import consts from "@pipedream/youtube_data_api/common/consts.mjs"; export default { ...common, key: "youtube_data_api_custom_app-channel-statistics", name: "Channel Statistics", description: "Returns statistics from my YouTube Channel or by id. [See the docs](https://developers.google.com/youtube/v3/docs/channels/list) for more information", - version: "0.0.2", + version: "0.0.3", type: "action", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/actions/create-comment-thread/create-comment-thread.mjs b/components/youtube_data_api_custom_app/actions/create-comment-thread/create-comment-thread.mjs index 351531e1a79d5..4a211319f1e4a 100644 --- a/components/youtube_data_api_custom_app/actions/create-comment-thread/create-comment-thread.mjs +++ b/components/youtube_data_api_custom_app/actions/create-comment-thread/create-comment-thread.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/create-comment-thread/common.mjs"; +import common from "@pipedream/youtube_data_api/actions/create-comment-thread/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-create-comment-thread", name: "Create Comment Thread", description: "Creates a new top-level comment in a video. [See the docs](https://developers.google.com/youtube/v3/docs/commentThreads/insert) for more information", - version: "0.0.1", + version: "0.0.2", type: "action", props: { youtubeDataApi, diff --git a/components/youtube_data_api_custom_app/actions/create-playlist/create-playlist.mjs b/components/youtube_data_api_custom_app/actions/create-playlist/create-playlist.mjs index 9820291a944cb..89ff2c830b994 100644 --- a/components/youtube_data_api_custom_app/actions/create-playlist/create-playlist.mjs +++ b/components/youtube_data_api_custom_app/actions/create-playlist/create-playlist.mjs @@ -1,13 +1,13 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/create-playlist/common.mjs"; -import consts from "../../../youtube_data_api/common/consts.mjs"; +import common from "@pipedream/youtube_data_api/actions/create-playlist/common.mjs"; +import consts from "@pipedream/youtube_data_api/common/consts.mjs"; export default { ...common, key: "youtube_data_api_custom_app-create-playlist", name: "Create Playlist", description: "Creates a playlist. [See the docs](https://developers.google.com/youtube/v3/docs/playlists/insert) for more information", - version: "0.0.1", + version: "0.0.2", type: "action", props: { youtubeDataApi, diff --git a/components/youtube_data_api_custom_app/actions/delete-playlist-items/delete-playlist-items.mjs b/components/youtube_data_api_custom_app/actions/delete-playlist-items/delete-playlist-items.mjs index fc3f12374a279..97dbc372f477f 100644 --- a/components/youtube_data_api_custom_app/actions/delete-playlist-items/delete-playlist-items.mjs +++ b/components/youtube_data_api_custom_app/actions/delete-playlist-items/delete-playlist-items.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/delete-playlist-items/common.mjs"; +import common from "@pipedream/youtube_data_api/actions/delete-playlist-items/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-delete-playlist-items", name: "Delete Playlist Items", description: "Deletes a playlist item. [See the docs](https://developers.google.com/youtube/v3/docs/playlistItems/delete) for more information", - version: "0.0.1", + version: "0.0.2", type: "action", props: { youtubeDataApi, diff --git a/components/youtube_data_api_custom_app/actions/delete-playlist/delete-playlist.mjs b/components/youtube_data_api_custom_app/actions/delete-playlist/delete-playlist.mjs index c5aabbeb9f5a9..ed6fe8c32f4c0 100644 --- a/components/youtube_data_api_custom_app/actions/delete-playlist/delete-playlist.mjs +++ b/components/youtube_data_api_custom_app/actions/delete-playlist/delete-playlist.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/delete-playlist/common.mjs"; +import common from "@pipedream/youtube_data_api/actions/delete-playlist/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-delete-playlist", name: "Delete Playlist", description: "Deletes a playlist. [See the docs](https://developers.google.com/youtube/v3/docs/playlists/delete) for more information", - version: "0.0.1", + version: "0.0.2", type: "action", props: { youtubeDataApi, diff --git a/components/youtube_data_api_custom_app/actions/list-activities/list-activities.mjs b/components/youtube_data_api_custom_app/actions/list-activities/list-activities.mjs index f32e8698f290f..c956a4ea1aed1 100644 --- a/components/youtube_data_api_custom_app/actions/list-activities/list-activities.mjs +++ b/components/youtube_data_api_custom_app/actions/list-activities/list-activities.mjs @@ -1,13 +1,13 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/list-activities/common.mjs"; -import consts from "../../../youtube_data_api/common/consts.mjs"; +import common from "@pipedream/youtube_data_api/actions/list-activities/common.mjs"; +import consts from "@pipedream/youtube_data_api/common/consts.mjs"; export default { ...common, key: "youtube_data_api_custom_app-list-activities", name: "List Activities", description: "Returns a list of channel activity events that match the request criteria. [See the docs](https://developers.google.com/youtube/v3/docs/channels/list) for more information", - version: "0.0.2", + version: "0.0.3", type: "action", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/actions/list-playlists/list-playlists.mjs b/components/youtube_data_api_custom_app/actions/list-playlists/list-playlists.mjs index dcfeb4999427f..3876008c0ab1b 100644 --- a/components/youtube_data_api_custom_app/actions/list-playlists/list-playlists.mjs +++ b/components/youtube_data_api_custom_app/actions/list-playlists/list-playlists.mjs @@ -1,13 +1,13 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/list-playlists/common.mjs"; -import consts from "../../../youtube_data_api/common/consts.mjs"; +import common from "@pipedream/youtube_data_api/actions/list-playlists/common.mjs"; +import consts from "@pipedream/youtube_data_api/common/consts.mjs"; export default { ...common, key: "youtube_data_api_custom_app-list-playlists", name: "List Playlists", description: "Returns a collection of playlists that match the API request parameters. [See the docs](https://developers.google.com/youtube/v3/docs/playlists/list) for more information", - version: "0.0.2", + version: "0.0.3", type: "action", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/actions/list-videos/list-videos.mjs b/components/youtube_data_api_custom_app/actions/list-videos/list-videos.mjs index 08093d5f202bd..01558c40f6cbb 100644 --- a/components/youtube_data_api_custom_app/actions/list-videos/list-videos.mjs +++ b/components/youtube_data_api_custom_app/actions/list-videos/list-videos.mjs @@ -1,13 +1,13 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/list-videos/common.mjs"; -import consts from "../../../youtube_data_api/common/consts.mjs"; +import common from "@pipedream/youtube_data_api/actions/list-videos/common.mjs"; +import consts from "@pipedream/youtube_data_api/common/consts.mjs"; export default { ...common, key: "youtube_data_api_custom_app-list-videos", name: "List Videos", description: "Returns a list of videos that match the API request parameters. [See the docs](https://developers.google.com/youtube/v3/docs/videos/list) for more information", - version: "0.0.2", + version: "0.0.3", type: "action", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/actions/reply-to-comment/reply-to-comment.mjs b/components/youtube_data_api_custom_app/actions/reply-to-comment/reply-to-comment.mjs index 804ee5dc9a37d..e6f91db9fc973 100644 --- a/components/youtube_data_api_custom_app/actions/reply-to-comment/reply-to-comment.mjs +++ b/components/youtube_data_api_custom_app/actions/reply-to-comment/reply-to-comment.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/reply-to-comment/common.mjs"; +import common from "@pipedream/youtube_data_api/actions/reply-to-comment/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-reply-to-comment", name: "Reply To Comment", description: "Creates a reply to an existing comment. [See the docs](https://developers.google.com/youtube/v3/docs/comments/insert) for more information", - version: "0.0.1", + version: "0.0.2", type: "action", props: { youtubeDataApi, diff --git a/components/youtube_data_api_custom_app/actions/update-channel/update-channel.mjs b/components/youtube_data_api_custom_app/actions/update-channel/update-channel.mjs index e8b679d71302d..a3134926f7fd7 100644 --- a/components/youtube_data_api_custom_app/actions/update-channel/update-channel.mjs +++ b/components/youtube_data_api_custom_app/actions/update-channel/update-channel.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/update-channel/common.mjs"; +import common from "@pipedream/youtube_data_api/actions/update-channel/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-update-channel", name: "Update Channel", description: "Updates a channel's metadata. [See the docs](https://developers.google.com/youtube/v3/docs/channels/update) for more information", - version: "0.0.1", + version: "0.0.2", type: "action", props: { youtubeDataApi, diff --git a/components/youtube_data_api_custom_app/actions/update-playlist/update-playlist.mjs b/components/youtube_data_api_custom_app/actions/update-playlist/update-playlist.mjs index 7d097875dd119..daeca6b3b3c1b 100644 --- a/components/youtube_data_api_custom_app/actions/update-playlist/update-playlist.mjs +++ b/components/youtube_data_api_custom_app/actions/update-playlist/update-playlist.mjs @@ -1,13 +1,13 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/update-playlist/common.mjs"; -import consts from "../../../youtube_data_api/common/consts.mjs"; +import common from "@pipedream/youtube_data_api/actions/update-playlist/common.mjs"; +import consts from "@pipedream/youtube_data_api/common/consts.mjs"; export default { ...common, key: "youtube_data_api_custom_app-update-playlist", name: "Update Playlist", description: "Modifies a playlist. For example, you could change a playlist's title, description, or privacy status. **If you are submitting an update request, and your request does not specify a value for a property that already has a value, the property's existing value will be deleted.** [See the docs](https://developers.google.com/youtube/v3/docs/playlists/update) for more information", - version: "0.0.2", + version: "0.0.3", type: "action", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/actions/update-video-details/update-video-details.mjs b/components/youtube_data_api_custom_app/actions/update-video-details/update-video-details.mjs index bd75072f46223..f0b3cf2fb6caf 100644 --- a/components/youtube_data_api_custom_app/actions/update-video-details/update-video-details.mjs +++ b/components/youtube_data_api_custom_app/actions/update-video-details/update-video-details.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/update-video-details/common.mjs"; +import common from "@pipedream/youtube_data_api/actions/update-video-details/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-update-video-details", name: "Update Video Details", description: "Updates a video's metadata. [See the docs](https://developers.google.com/youtube/v3/docs/videos/update) for more information", - version: "0.0.1", + version: "0.0.2", type: "action", props: { youtubeDataApi, diff --git a/components/youtube_data_api_custom_app/actions/upload-channel-banner/upload-channel-banner.mjs b/components/youtube_data_api_custom_app/actions/upload-channel-banner/upload-channel-banner.mjs index eb6ce6da361ef..5fd1e481ab0a8 100644 --- a/components/youtube_data_api_custom_app/actions/upload-channel-banner/upload-channel-banner.mjs +++ b/components/youtube_data_api_custom_app/actions/upload-channel-banner/upload-channel-banner.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/upload-channel-banner/common.mjs"; +import common from "@pipedream/youtube_data_api/actions/upload-channel-banner/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-upload-channel-banner", name: "Upload Channel Banner", description: "Uploads a channel banner image to YouTube. [See the docs](https://developers.google.com/youtube/v3/docs/channelBanners/insert) for more information", - version: "0.0.3", + version: "0.0.4", type: "action", props: { youtubeDataApi, diff --git a/components/youtube_data_api_custom_app/actions/upload-thumbnail/upload-thumbnail.mjs b/components/youtube_data_api_custom_app/actions/upload-thumbnail/upload-thumbnail.mjs index 106d14ee6e003..df6ef9ca4aa5d 100644 --- a/components/youtube_data_api_custom_app/actions/upload-thumbnail/upload-thumbnail.mjs +++ b/components/youtube_data_api_custom_app/actions/upload-thumbnail/upload-thumbnail.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/upload-thumbnail/common.mjs"; +import common from "@pipedream/youtube_data_api/actions/upload-thumbnail/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-upload-thumbnail", name: "Upload Thumbnail", description: "Uploads a custom video thumbnail to YouTube and sets it for a video. [See the docs](https://developers.google.com/youtube/v3/docs/thumbnails/set) for more information", - version: "0.0.2", + version: "0.0.3", type: "action", props: { youtubeDataApi, diff --git a/components/youtube_data_api_custom_app/actions/upload-video/upload-video.mjs b/components/youtube_data_api_custom_app/actions/upload-video/upload-video.mjs index f028f3e632a15..e185686e488b5 100644 --- a/components/youtube_data_api_custom_app/actions/upload-video/upload-video.mjs +++ b/components/youtube_data_api_custom_app/actions/upload-video/upload-video.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/actions/upload-video/common.mjs"; +import common from "@pipedream/youtube_data_api/actions/upload-video/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-upload-video", name: "Upload Video", description: "Post a video to your channel. [See the docs](https://developers.google.com/youtube/v3/docs/videos/insert) for more information", - version: "0.0.3", + version: "0.0.4", type: "action", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/package.json b/components/youtube_data_api_custom_app/package.json index 02741f13144b9..9756ef0908d8a 100644 --- a/components/youtube_data_api_custom_app/package.json +++ b/components/youtube_data_api_custom_app/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/youtube_data_api_custom_app", - "version": "0.0.8", + "version": "0.0.9", "description": "Pipedream Youtube Custom App Components", "main": "youtube_data_api_custom_app.app.mjs", "keywords": [ @@ -14,6 +14,7 @@ }, "dependencies": { "@googleapis/youtube": "^6.0.0", - "got": "^12.5.1" + "got": "^12.5.1", + "@pipedream/youtube_data_api": "^1.0.1" } } diff --git a/components/youtube_data_api_custom_app/sources/new-comment-posted/new-comment-posted.mjs b/components/youtube_data_api_custom_app/sources/new-comment-posted/new-comment-posted.mjs index 578ae5607daf8..d9fd08989614d 100644 --- a/components/youtube_data_api_custom_app/sources/new-comment-posted/new-comment-posted.mjs +++ b/components/youtube_data_api_custom_app/sources/new-comment-posted/new-comment-posted.mjs @@ -1,5 +1,5 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/sources/new-comment-posted/common.mjs"; +import common from "@pipedream/youtube_data_api/sources/new-comment-posted/common.mjs"; export default { ...common, @@ -7,7 +7,7 @@ export default { key: "youtube_data_api_custom_app-new-comment-posted", name: "New Comment Posted", description: "Emit new event for each new comment or reply posted to a Youtube video.", - version: "0.0.1", + version: "0.0.2", dedupe: "unique", props: { youtubeDataApi, diff --git a/components/youtube_data_api_custom_app/sources/new-liked-videos/new-liked-videos.mjs b/components/youtube_data_api_custom_app/sources/new-liked-videos/new-liked-videos.mjs index 69d2758586779..3a9305299587f 100644 --- a/components/youtube_data_api_custom_app/sources/new-liked-videos/new-liked-videos.mjs +++ b/components/youtube_data_api_custom_app/sources/new-liked-videos/new-liked-videos.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/sources/new-liked-videos/common.mjs"; +import common from "@pipedream/youtube_data_api/sources/new-liked-videos/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-new-liked-videos", name: "New Liked Videos", description: "Emit new event for each new Youtube video liked by the authenticated user", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/sources/new-subscriber/new-subscriber.mjs b/components/youtube_data_api_custom_app/sources/new-subscriber/new-subscriber.mjs index 1ad4ed1f3625e..4eee191bc4705 100644 --- a/components/youtube_data_api_custom_app/sources/new-subscriber/new-subscriber.mjs +++ b/components/youtube_data_api_custom_app/sources/new-subscriber/new-subscriber.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/sources/new-subscriber/common.mjs"; +import common from "@pipedream/youtube_data_api/sources/new-subscriber/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-new-subscriber", name: "New Subscriber", description: "Emit new event for each new Youtube subscriber to user Channel.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/sources/new-subscription/new-subscription.mjs b/components/youtube_data_api_custom_app/sources/new-subscription/new-subscription.mjs index 216e77eb4020f..257844aefde35 100644 --- a/components/youtube_data_api_custom_app/sources/new-subscription/new-subscription.mjs +++ b/components/youtube_data_api_custom_app/sources/new-subscription/new-subscription.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/sources/new-subscription/common.mjs"; +import common from "@pipedream/youtube_data_api/sources/new-subscription/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-new-subscription", name: "New Subscription", description: "Emit new event for each new subscription from authenticated user.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/sources/new-videos-by-handle/new-videos-by-handle.mjs b/components/youtube_data_api_custom_app/sources/new-videos-by-handle/new-videos-by-handle.mjs index a20e02ebab3be..c430d1ca0c75e 100644 --- a/components/youtube_data_api_custom_app/sources/new-videos-by-handle/new-videos-by-handle.mjs +++ b/components/youtube_data_api_custom_app/sources/new-videos-by-handle/new-videos-by-handle.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/sources/new-videos-by-handle/common.mjs"; +import common from "@pipedream/youtube_data_api/sources/new-videos-by-handle/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-new-videos-by-handle", name: "New Videos by Handle", description: "Emit new event for each new Youtube video tied to a handle.", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/sources/new-videos-by-location/new-videos-by-location.mjs b/components/youtube_data_api_custom_app/sources/new-videos-by-location/new-videos-by-location.mjs deleted file mode 100644 index cd23f717d9a0a..0000000000000 --- a/components/youtube_data_api_custom_app/sources/new-videos-by-location/new-videos-by-location.mjs +++ /dev/null @@ -1,16 +0,0 @@ -import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/sources/new-videos-by-location/common.mjs"; - -export default { - ...common, - key: "youtube_data_api_custom_app-new-videos-by-location", - name: "New Videos by Location", - description: "Emit new event for each new YouTube video tied to a location.", - version: "0.0.2", - type: "source", - dedupe: "unique", - props: { - youtubeDataApi, - ...common.props, - }, -}; diff --git a/components/youtube_data_api_custom_app/sources/new-videos-by-search/new-videos-by-search.mjs b/components/youtube_data_api_custom_app/sources/new-videos-by-search/new-videos-by-search.mjs index 815bed592dd7b..8a414c6647350 100644 --- a/components/youtube_data_api_custom_app/sources/new-videos-by-search/new-videos-by-search.mjs +++ b/components/youtube_data_api_custom_app/sources/new-videos-by-search/new-videos-by-search.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/sources/new-videos-by-search/common.mjs"; +import common from "@pipedream/youtube_data_api/sources/new-videos-by-search/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-new-videos-by-search", name: "New Videos by Search", description: "Emit new event for each new YouTube video matching a search query.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/sources/new-videos-in-channel/new-videos-in-channel.mjs b/components/youtube_data_api_custom_app/sources/new-videos-in-channel/new-videos-in-channel.mjs deleted file mode 100644 index 0bdbe02ecfad7..0000000000000 --- a/components/youtube_data_api_custom_app/sources/new-videos-in-channel/new-videos-in-channel.mjs +++ /dev/null @@ -1,16 +0,0 @@ -import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/sources/new-videos-in-channel/common.mjs"; - -export default { - ...common, - key: "youtube_data_api_custom_app-new-videos-in-channel", - name: "New Videos in Channel", - description: "Emit new event for each new Youtube video posted to a Channel.", - version: "0.0.2", - type: "source", - dedupe: "unique", - props: { - youtubeDataApi, - ...common.props, - }, -}; diff --git a/components/youtube_data_api_custom_app/sources/new-videos-in-playlist/new-videos-in-playlist.mjs b/components/youtube_data_api_custom_app/sources/new-videos-in-playlist/new-videos-in-playlist.mjs index 542b78bc38afe..3f568471d270c 100644 --- a/components/youtube_data_api_custom_app/sources/new-videos-in-playlist/new-videos-in-playlist.mjs +++ b/components/youtube_data_api_custom_app/sources/new-videos-in-playlist/new-videos-in-playlist.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/sources/new-videos-in-playlist/common.mjs"; +import common from "@pipedream/youtube_data_api/sources/new-videos-in-playlist/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-new-videos-in-playlist", name: "New Videos in Playlist", description: "Emit new event for each new Youtube video added to a Playlist.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/sources/new-videos-in-subscribed-channels/new-videos-in-subscribed-channels.mjs b/components/youtube_data_api_custom_app/sources/new-videos-in-subscribed-channels/new-videos-in-subscribed-channels.mjs index 2d071bdda8ff8..92b81028284f2 100644 --- a/components/youtube_data_api_custom_app/sources/new-videos-in-subscribed-channels/new-videos-in-subscribed-channels.mjs +++ b/components/youtube_data_api_custom_app/sources/new-videos-in-subscribed-channels/new-videos-in-subscribed-channels.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/sources/new-videos-in-subscribed-channels/common.mjs"; +import common from "@pipedream/youtube_data_api/sources/new-videos-in-subscribed-channels/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-new-videos-in-subscribed-channels", name: "New Videos in Subscribed Channels", description: "Emit new event for each new YouTube video posted to a subscribed channel.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/sources/new-videos/new-videos.mjs b/components/youtube_data_api_custom_app/sources/new-videos/new-videos.mjs index fc81772609157..22849e1ada9a0 100644 --- a/components/youtube_data_api_custom_app/sources/new-videos/new-videos.mjs +++ b/components/youtube_data_api_custom_app/sources/new-videos/new-videos.mjs @@ -1,12 +1,12 @@ import youtubeDataApi from "../../youtube_data_api_custom_app.app.mjs"; -import common from "../../../youtube_data_api/sources/new-videos/common.mjs"; +import common from "@pipedream/youtube_data_api/sources/new-videos/common.mjs"; export default { ...common, key: "youtube_data_api_custom_app-new-videos", name: "New Videos", description: "Emit new event for each new Youtube video the user posts.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/components/youtube_data_api_custom_app/youtube_data_api_custom_app.app.mjs b/components/youtube_data_api_custom_app/youtube_data_api_custom_app.app.mjs index 1f6e29ca7da11..9fc65df80a9f6 100644 --- a/components/youtube_data_api_custom_app/youtube_data_api_custom_app.app.mjs +++ b/components/youtube_data_api_custom_app/youtube_data_api_custom_app.app.mjs @@ -1,4 +1,4 @@ -import commonApp from "../youtube_data_api/common-app.mjs"; +import commonApp from "@pipedream/youtube_data_api/common-app.mjs"; export default { ...commonApp, diff --git a/components/yr/.gitignore b/components/yr/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/yr/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/yr/app/yr.app.ts b/components/yr/app/yr.app.ts deleted file mode 100644 index edabc089a9218..0000000000000 --- a/components/yr/app/yr.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "yr", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/yr/package.json b/components/yr/package.json index 46ea0724fda98..7a1e16a5a2e0c 100644 --- a/components/yr/package.json +++ b/components/yr/package.json @@ -1,15 +1,12 @@ { "name": "@pipedream/yr", - "version": "0.0.3", + "version": "0.0.4", "description": "Pipedream Yr Components", - "main": "dist/app/yr.app.mjs", + "main": "yr.app.mjs", "keywords": [ "pipedream", "yr" ], - "files": [ - "dist" - ], "homepage": "https://pipedream.com/apps/yr", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/yr/yr.app.mjs b/components/yr/yr.app.mjs new file mode 100644 index 0000000000000..4e21c26f12d44 --- /dev/null +++ b/components/yr/yr.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "yr", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/yumpu/.gitignore b/components/yumpu/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/yumpu/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/yumpu/app/yumpu.app.ts b/components/yumpu/app/yumpu.app.ts deleted file mode 100644 index 9946b26f29433..0000000000000 --- a/components/yumpu/app/yumpu.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "yumpu", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); \ No newline at end of file diff --git a/components/yumpu/package.json b/components/yumpu/package.json index f037a5782e61b..d9a8d690b67f5 100644 --- a/components/yumpu/package.json +++ b/components/yumpu/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/yumpu", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Yumpu Components", - "main": "dist/app/yumpu.app.mjs", + "main": "yumpu.app.mjs", "keywords": [ "pipedream", "yumpu" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/yumpu", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/yumpu/yumpu.app.mjs b/components/yumpu/yumpu.app.mjs new file mode 100644 index 0000000000000..7201fbf90e67b --- /dev/null +++ b/components/yumpu/yumpu.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "yumpu", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/components/zammad/package.json b/components/zammad/package.json new file mode 100644 index 0000000000000..f2478e0a7fd43 --- /dev/null +++ b/components/zammad/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/zammad", + "version": "0.0.1", + "description": "Pipedream Zammad Components", + "main": "zammad.app.mjs", + "keywords": [ + "pipedream", + "zammad" + ], + "homepage": "https://pipedream.com/apps/zammad", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/zammad/zammad.app.mjs b/components/zammad/zammad.app.mjs new file mode 100644 index 0000000000000..b2d3ac575972b --- /dev/null +++ b/components/zammad/zammad.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "zammad", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/zapr_link/package.json b/components/zapr_link/package.json new file mode 100644 index 0000000000000..ed46c526b2462 --- /dev/null +++ b/components/zapr_link/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/zapr_link", + "version": "0.0.1", + "description": "Pipedream zapr.link Components", + "main": "zapr_link.app.mjs", + "keywords": [ + "pipedream", + "zapr_link" + ], + "homepage": "https://pipedream.com/apps/zapr_link", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/components/zapr_link/zapr_link.app.mjs b/components/zapr_link/zapr_link.app.mjs new file mode 100644 index 0000000000000..1e51d18e28510 --- /dev/null +++ b/components/zapr_link/zapr_link.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "zapr_link", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/zendesk/actions/add-ticket-tags/add-ticket-tags.mjs b/components/zendesk/actions/add-ticket-tags/add-ticket-tags.mjs index 871e44663c82b..c171ca1259755 100644 --- a/components/zendesk/actions/add-ticket-tags/add-ticket-tags.mjs +++ b/components/zendesk/actions/add-ticket-tags/add-ticket-tags.mjs @@ -5,7 +5,7 @@ export default { name: "Add Ticket Tags", description: "Add tags to a ticket (appends to existing tags). [See the documentation](https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/#add-tags).", type: "action", - version: "0.0.1", + version: "0.0.3", props: { app, ticketId: { diff --git a/components/zendesk/actions/create-ticket/create-ticket.mjs b/components/zendesk/actions/create-ticket/create-ticket.mjs index 5825035c04107..a0e396a0be85a 100644 --- a/components/zendesk/actions/create-ticket/create-ticket.mjs +++ b/components/zendesk/actions/create-ticket/create-ticket.mjs @@ -5,7 +5,7 @@ export default { name: "Create Ticket", description: "Creates a ticket. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#create-ticket).", type: "action", - version: "0.1.5", + version: "0.1.7", props: { app, ticketCommentBody: { diff --git a/components/zendesk/actions/delete-ticket/delete-ticket.mjs b/components/zendesk/actions/delete-ticket/delete-ticket.mjs index 8a04291895dd9..bef6c225f95f0 100644 --- a/components/zendesk/actions/delete-ticket/delete-ticket.mjs +++ b/components/zendesk/actions/delete-ticket/delete-ticket.mjs @@ -5,7 +5,7 @@ export default { name: "Delete Ticket", description: "Deletes a ticket. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#delete-ticket).", type: "action", - version: "0.1.5", + version: "0.1.7", props: { app, ticketId: { diff --git a/components/zendesk/actions/get-ticket-info/get-ticket-info.mjs b/components/zendesk/actions/get-ticket-info/get-ticket-info.mjs index 17d7063962217..4d841013e3fe7 100644 --- a/components/zendesk/actions/get-ticket-info/get-ticket-info.mjs +++ b/components/zendesk/actions/get-ticket-info/get-ticket-info.mjs @@ -5,7 +5,7 @@ export default { name: "Get Ticket Info", description: "Retrieves information about a specific ticket. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#show-ticket).", type: "action", - version: "0.0.3", + version: "0.0.5", props: { app, ticketId: { diff --git a/components/zendesk/actions/get-user-info/get-user-info.mjs b/components/zendesk/actions/get-user-info/get-user-info.mjs new file mode 100644 index 0000000000000..c0dd22f32a66e --- /dev/null +++ b/components/zendesk/actions/get-user-info/get-user-info.mjs @@ -0,0 +1,28 @@ +import zendesk from "../../zendesk.app.mjs"; + +export default { + key: "zendesk-get-user-info", + name: "Get User Info", + description: "Retrieves information about a specific user. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/users/users/#show-user).", + version: "0.0.2", + type: "action", + props: { + zendesk, + userId: { + propDefinition: [ + zendesk, + "userId", + ], + }, + }, + async run({ $: step }) { + const response = await this.zendesk.getUserInfo({ + step, + userId: this.userId, + }); + + step.export("$summary", `Successfully retrieved user info for ${response.user.name}`); + + return response; + }, +}; diff --git a/components/zendesk/actions/list-locales/list-locales.mjs b/components/zendesk/actions/list-locales/list-locales.mjs new file mode 100644 index 0000000000000..e6e0050650a43 --- /dev/null +++ b/components/zendesk/actions/list-locales/list-locales.mjs @@ -0,0 +1,21 @@ +import zendesk from "../../zendesk.app.mjs"; + +export default { + key: "zendesk-list-locales", + name: "List Locales", + description: "Retrieves all locales. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/account-configuration/locales/).", + version: "0.0.2", + type: "action", + props: { + zendesk, + }, + async run({ $: step }) { + const { locales } = await this.zendesk.listLocales(); + + step.export("$summary", `Successfully retrieved ${locales.length} locale${locales.length === 1 + ? "" + : "s"}`); + + return locales; + }, +}; diff --git a/components/zendesk/actions/list-macros/list-macros.mjs b/components/zendesk/actions/list-macros/list-macros.mjs new file mode 100644 index 0000000000000..2d2d3cb1cac79 --- /dev/null +++ b/components/zendesk/actions/list-macros/list-macros.mjs @@ -0,0 +1,99 @@ +import zendesk from "../../zendesk.app.mjs"; + +export default { + key: "zendesk-list-macros", + name: "List Macros", + description: "Retrieves all macros. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/business-rules/macros/#list-macros).", + version: "0.0.2", + type: "action", + props: { + zendesk, + access: { + type: "string", + label: "Access", + description: "The access level of the macros to return", + options: [ + "personal", + "agents", + "shared", + "account", + ], + optional: true, + }, + active: { + type: "boolean", + label: "Active", + description: "Filter by active macros if `true` or inactive macros if `false`", + optional: true, + }, + macroCategory: { + propDefinition: [ + zendesk, + "macroCategory", + ], + }, + groupId: { + propDefinition: [ + zendesk, + "groupId", + ], + }, + sortBy: { + type: "string", + label: "Sort By", + description: "The field to sort the results by", + options: [ + "alphabetical", + "created_at", + "updated_at", + "usage_1h", + "usage_24h", + "usage_7d", + "usage_30d", + ], + optional: true, + }, + sortOrder: { + propDefinition: [ + zendesk, + "sortOrder", + ], + }, + limit: { + propDefinition: [ + zendesk, + "limit", + ], + description: "Maximum number of macros to return", + }, + }, + async run({ $: step }) { + const results = this.zendesk.paginate({ + fn: this.zendesk.listMacros, + args: { + step, + params: { + access: this.access, + active: this.active, + category: this.macroCategory, + group_id: this.groupId, + sort_by: this.sortBy, + sort_order: this.sortOrder, + }, + }, + resourceKey: "macros", + max: this.limit, + }); + + const macros = []; + for await (const macro of results) { + macros.push(macro); + } + + step.export("$summary", `Successfully retrieved ${macros.length} macro${macros.length === 1 + ? "" + : "s"}`); + + return macros; + }, +}; diff --git a/components/zendesk/actions/list-ticket-comments/list-ticket-comments.mjs b/components/zendesk/actions/list-ticket-comments/list-ticket-comments.mjs new file mode 100644 index 0000000000000..be82b6c26e703 --- /dev/null +++ b/components/zendesk/actions/list-ticket-comments/list-ticket-comments.mjs @@ -0,0 +1,56 @@ +import zendesk from "../../zendesk.app.mjs"; + +export default { + key: "zendesk-list-ticket-comments", + name: "List Ticket Comments", + description: "Retrieves all comments for a specific ticket. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/#list-comments).", + version: "0.0.2", + type: "action", + props: { + zendesk, + ticketId: { + propDefinition: [ + zendesk, + "ticketId", + ], + }, + sortOrder: { + propDefinition: [ + zendesk, + "sortOrder", + ], + }, + limit: { + propDefinition: [ + zendesk, + "limit", + ], + description: "Maximum number of comments to return", + }, + }, + async run({ $: step }) { + const results = this.zendesk.paginate({ + fn: this.zendesk.listTicketComments, + args: { + step, + ticketId: this.ticketId, + params: { + sort_order: this.sortOrder, + }, + }, + resourceKey: "comments", + max: this.limit, + }); + + const comments = []; + for await (const comment of results) { + comments.push(comment); + } + + step.export("$summary", `Successfully retrieved ${comments.length} comment${comments.length === 1 + ? "" + : "s"}`); + + return comments; + }, +}; diff --git a/components/zendesk/actions/list-tickets/list-tickets.mjs b/components/zendesk/actions/list-tickets/list-tickets.mjs index 6b0e71c4eff4c..26ef649461123 100644 --- a/components/zendesk/actions/list-tickets/list-tickets.mjs +++ b/components/zendesk/actions/list-tickets/list-tickets.mjs @@ -5,7 +5,7 @@ export default { name: "List Tickets", description: "Retrieves a list of tickets. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets).", type: "action", - version: "0.0.3", + version: "0.0.5", props: { app, sortBy: { diff --git a/components/zendesk/actions/remove-ticket-tags/remove-ticket-tags.mjs b/components/zendesk/actions/remove-ticket-tags/remove-ticket-tags.mjs index 9fe3c48395232..17b81b1626c4d 100644 --- a/components/zendesk/actions/remove-ticket-tags/remove-ticket-tags.mjs +++ b/components/zendesk/actions/remove-ticket-tags/remove-ticket-tags.mjs @@ -5,7 +5,7 @@ export default { name: "Remove Ticket Tags", description: "Remove specific tags from a ticket. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/#remove-tags).", type: "action", - version: "0.0.1", + version: "0.0.3", props: { app, ticketId: { diff --git a/components/zendesk/actions/search-tickets/search-tickets.mjs b/components/zendesk/actions/search-tickets/search-tickets.mjs index 0ba5a398e1e3f..a4bc5c4981490 100644 --- a/components/zendesk/actions/search-tickets/search-tickets.mjs +++ b/components/zendesk/actions/search-tickets/search-tickets.mjs @@ -5,7 +5,7 @@ export default { name: "Search Tickets", description: "Searches for tickets using Zendesk's search API. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/#search-tickets).", type: "action", - version: "0.0.3", + version: "0.0.6", props: { app, query: { @@ -37,6 +37,13 @@ export default { "customSubdomain", ], }, + page: { + type: "integer", + label: "Page", + description: "The page number to retrieve. Default is 1.", + default: 1, + optional: true, + }, }, async run({ $: step }) { const { @@ -47,28 +54,20 @@ export default { customSubdomain, } = this; - const results = this.app.paginate({ - fn: this.app.searchTickets, - args: { - step, - customSubdomain, - params: { - query, - sort_by: sortBy, - sort_order: sortOrder, - }, + const results = await this.app.searchTickets({ + step, + customSubdomain, + params: { + query, + sort_by: sortBy, + sort_order: sortOrder, + per_page: limit, + page: this.page, }, - resourceKey: "results", - max: limit, }); - const tickets = []; - for await (const ticket of results) { - tickets.push(ticket); - } - - step.export("$summary", `Successfully found ${tickets.length} tickets matching the search query`); + step.export("$summary", "Successfully retrieved tickets matching the search query"); - return tickets; + return results; }, }; diff --git a/components/zendesk/actions/set-ticket-tags/set-ticket-tags.mjs b/components/zendesk/actions/set-ticket-tags/set-ticket-tags.mjs index 6aa5599d34ee6..2a584a38128d8 100644 --- a/components/zendesk/actions/set-ticket-tags/set-ticket-tags.mjs +++ b/components/zendesk/actions/set-ticket-tags/set-ticket-tags.mjs @@ -5,7 +5,7 @@ export default { name: "Set Ticket Tags", description: "Set tags on a ticket (replaces all existing tags). [See the documentation](https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/#set-tags).", type: "action", - version: "0.0.1", + version: "0.0.3", props: { app, ticketId: { diff --git a/components/zendesk/actions/update-ticket/update-ticket.mjs b/components/zendesk/actions/update-ticket/update-ticket.mjs index 1ff78de950280..75708ec495e3f 100644 --- a/components/zendesk/actions/update-ticket/update-ticket.mjs +++ b/components/zendesk/actions/update-ticket/update-ticket.mjs @@ -3,9 +3,9 @@ import app from "../../zendesk.app.mjs"; export default { key: "zendesk-update-ticket", name: "Update Ticket", - description: "Updates a ticket and optionally manages tags. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#update-ticket).", + description: "Updates a ticket. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#update-ticket).", type: "action", - version: "0.1.5", + version: "0.2.0", props: { app, ticketId: { @@ -56,6 +56,12 @@ export default { "customSubdomain", ], }, + attachments: { + propDefinition: [ + app, + "attachments", + ], + }, ticketTags: { propDefinition: [ app, @@ -104,6 +110,7 @@ export default { ticketStatus, ticketCommentPublic, customSubdomain, + attachments, ticketTags, tagAction, } = this; @@ -118,6 +125,24 @@ export default { ticketComment.public = ticketCommentPublic; + // Upload attachments if provided + if (attachments && attachments.length > 0) { + try { + const uploadTokens = await this.app.uploadFiles({ + attachments, + customSubdomain, + step, + }); + + if (uploadTokens.length > 0) { + ticketComment.uploads = uploadTokens; + } + } catch (error) { + step.export("$summary", `Failed to upload attachments: ${error.message}`); + throw error; + } + } + const response = await this.updateTicket({ step, ticketId, @@ -132,6 +157,13 @@ export default { }, }); + const attachmentCount = ticketComment.uploads?.length || 0; + const summary = attachmentCount > 0 + ? `Successfully updated ticket with ID ${response.ticket.id} with ${attachmentCount} attachment(s)` + : `Successfully updated ticket with ID ${response.ticket.id}`; + + step.export("$summary", summary); + // Handle tag operations if tags are provided if (ticketTags && ticketTags.length > 0) { let tagResponse; diff --git a/components/zendesk/package.json b/components/zendesk/package.json index f3bd8778a20e4..4c1206e7c0f68 100644 --- a/components/zendesk/package.json +++ b/components/zendesk/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/zendesk", - "version": "0.7.2", + "version": "0.8.2", "description": "Pipedream Zendesk Components", "main": "zendesk.app.mjs", "keywords": [ @@ -14,7 +14,8 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.0.3", - "crypto": "^1.0.1" + "@pipedream/platform": "^3.1.0", + "crypto": "^1.0.1", + "path": "^0.12.7" } } diff --git a/components/zendesk/sources/common/polling.mjs b/components/zendesk/sources/common/polling.mjs new file mode 100644 index 0000000000000..efd13dd1b58a7 --- /dev/null +++ b/components/zendesk/sources/common/polling.mjs @@ -0,0 +1,23 @@ +import zendesk from "../../zendesk.app.mjs"; +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; + +export default { + props: { + zendesk, + db: "$.service.db", + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + methods: { + _getLastTs() { + return this.db.get("lastTs") || 0; + }, + _setLastTs(ts) { + this.db.set("lastTs", ts); + }, + }, +}; diff --git a/components/zendesk/sources/common/webhook.mjs b/components/zendesk/sources/common/webhook.mjs index bc1382c5a2835..126d6d1108556 100644 --- a/components/zendesk/sources/common/webhook.mjs +++ b/components/zendesk/sources/common/webhook.mjs @@ -212,6 +212,15 @@ export default { isRelevant() { return true; }, + emitEvent(payload) { + const ts = Date.parse(payload.updatedAt); + const id = `${payload.ticketId}-${ts}`; + this.$emit(payload, { + id, + summary: payload.title || payload.ticketId, + ts, + }); + }, }, async run(event) { const { @@ -241,13 +250,6 @@ export default { return; } - const ts = Date.parse(payload.updatedAt); - const id = `${payload.ticketId}-${ts}`; - - this.$emit(payload, { - id, - summary: payload.title || payload.ticketId, - ts, - }); + this.emitEvent(payload); }, }; diff --git a/components/zendesk/sources/locale-updated/locale-updated.mjs b/components/zendesk/sources/locale-updated/locale-updated.mjs new file mode 100644 index 0000000000000..edf4439a54a4f --- /dev/null +++ b/components/zendesk/sources/locale-updated/locale-updated.mjs @@ -0,0 +1,29 @@ +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "zendesk-locale-updated", + name: "Locale Updated", + type: "source", + description: "Emit new event when a locale has been updated", + version: "0.0.2", + dedupe: "unique", + async run() { + const lastTs = this._getLastTs(); + let maxTs = lastTs; + + const { locales } = await this.zendesk.listLocales(); + for (const locale of locales) { + const ts = Date.parse(locale.updated_at); + if (ts > lastTs) { + this.$emit(locale, { + id: `${locale.id}-${ts}`, + summary: locale.name, + ts, + }); + maxTs = Math.max(maxTs, ts); + } + } + this._setLastTs(maxTs); + }, +}; diff --git a/components/zendesk/sources/new-ticket-comment-added/new-ticket-comment-added.mjs b/components/zendesk/sources/new-ticket-comment-added/new-ticket-comment-added.mjs new file mode 100644 index 0000000000000..b760f5e740890 --- /dev/null +++ b/components/zendesk/sources/new-ticket-comment-added/new-ticket-comment-added.mjs @@ -0,0 +1,111 @@ +import app from "../../zendesk.app.mjs"; +import common from "../common/ticket.mjs"; + +export default { + ...common, + name: "New Ticket Comment Added (Instant)", + key: "zendesk-new-ticket-comment-added", + type: "source", + description: "Emit new event when a ticket comment has been added", + version: "0.0.2", + dedupe: "unique", + props: { + app, + db: "$.service.db", + http: "$.interface.http", + categoryId: { + propDefinition: [ + app, + "categoryId", + ], + }, + customSubdomain: { + propDefinition: [ + app, + "customSubdomain", + ], + }, + }, + methods: { + ...common.methods, + _getLastTs() { + return this.db.get("lastTs"); + }, + _setLastTs(ts) { + this.db.set("lastTs", ts); + }, + getWebhookName() { + return "Ticket Comment Added Webhook"; + }, + getTriggerTitle() { + return "Ticket Comment Added Trigger"; + }, + getTriggerConditions() { + return { + all: [ + { + field: "update_type", + value: "Change", + }, + ], + }; + }, + getTriggerPayload() { + const payload = common.methods.getTriggerPayload.call(this); + return { + ...payload, + ticketComments: "{{ticket.comments}}", + }; + }, + convertCommentsToJson(raw) { + return [ + ...raw.matchAll(/#/g), + ].map((match) => { + const fields = match[1] + .split(",") + .map((part) => part.trim()) + .map((pair) => { + const [ + key, + value, + ] = pair.split(/:\s+/); + // Clean up values: remove extra quotes or cast to appropriate types + let cleaned = value; + if (cleaned === "nil") cleaned = null; + else if (cleaned === "true") cleaned = true; + else if (cleaned === "false") cleaned = false; + else if (/^\d+$/.test(cleaned)) cleaned = parseInt(cleaned, 10); + else if (/^".*"$/.test(cleaned)) cleaned = cleaned.slice(1, -1); + return [ + key, + cleaned, + ]; + }); + return Object.fromEntries(fields); + }); + }, + isRelevant(payload) { + const lastTs = this._getLastTs() || 0; + let maxTs = lastTs; + const comments = this.convertCommentsToJson(payload.ticketComments); + for (const comment of comments) { + const ts = Date.parse(comment.created_at); + maxTs = Math.max(maxTs, ts); + } + this._setLastTs(maxTs); + return comments.length > 0 && maxTs > lastTs; + }, + emitEvent(payload) { + payload.ticketComments = this.convertCommentsToJson(payload.ticketComments); + for (const comment of payload.ticketComments) { + const ts = Date.parse(comment.created_at); + const id = `${payload.ticketId}-${ts}`; + this.$emit(comment, { + id, + summary: comment.value, + ts, + }); + } + }, + }, +}; diff --git a/components/zendesk/sources/new-ticket/new-ticket.mjs b/components/zendesk/sources/new-ticket/new-ticket.mjs index 5bfd7ce49c8d5..afbefcb407383 100644 --- a/components/zendesk/sources/new-ticket/new-ticket.mjs +++ b/components/zendesk/sources/new-ticket/new-ticket.mjs @@ -6,7 +6,7 @@ export default { key: "zendesk-new-ticket", type: "source", description: "Emit new event when a ticket is created", - version: "0.2.5", + version: "0.2.7", dedupe: "unique", methods: { ...common.methods, diff --git a/components/zendesk/sources/ticket-added-to-view/ticket-added-to-view.mjs b/components/zendesk/sources/ticket-added-to-view/ticket-added-to-view.mjs index 3aa085c714ba1..0dc8ce8ace2c0 100644 --- a/components/zendesk/sources/ticket-added-to-view/ticket-added-to-view.mjs +++ b/components/zendesk/sources/ticket-added-to-view/ticket-added-to-view.mjs @@ -5,7 +5,7 @@ export default { key: "zendesk-ticket-added-to-view", name: "New Ticket Added to View (Instant)", description: "Emit new event when a ticket is added to the specified view", - version: "0.0.5", + version: "0.0.7", type: "source", dedupe: "unique", props: { diff --git a/components/zendesk/sources/ticket-closed/ticket-closed.mjs b/components/zendesk/sources/ticket-closed/ticket-closed.mjs index f44f5b0731577..f77aa1444b38e 100644 --- a/components/zendesk/sources/ticket-closed/ticket-closed.mjs +++ b/components/zendesk/sources/ticket-closed/ticket-closed.mjs @@ -6,7 +6,7 @@ export default { key: "zendesk-ticket-closed", type: "source", description: "Emit new event when a ticket has changed to closed status", - version: "0.2.5", + version: "0.2.7", dedupe: "unique", methods: { ...common.methods, diff --git a/components/zendesk/sources/ticket-pended/ticket-pended.mjs b/components/zendesk/sources/ticket-pended/ticket-pended.mjs index dfc23f2014886..48a1f0b901980 100644 --- a/components/zendesk/sources/ticket-pended/ticket-pended.mjs +++ b/components/zendesk/sources/ticket-pended/ticket-pended.mjs @@ -6,7 +6,7 @@ export default { key: "zendesk-ticket-pended", type: "source", description: "Emit new event when a ticket has changed to pending status", - version: "0.2.5", + version: "0.2.7", dedupe: "unique", methods: { ...common.methods, diff --git a/components/zendesk/sources/ticket-solved/ticket-solved.mjs b/components/zendesk/sources/ticket-solved/ticket-solved.mjs index 9672a7fc67158..206007e0390b6 100644 --- a/components/zendesk/sources/ticket-solved/ticket-solved.mjs +++ b/components/zendesk/sources/ticket-solved/ticket-solved.mjs @@ -6,7 +6,7 @@ export default { key: "zendesk-ticket-solved", type: "source", description: "Emit new event when a ticket has changed to solved status", - version: "0.2.5", + version: "0.2.7", dedupe: "unique", methods: { ...common.methods, diff --git a/components/zendesk/sources/ticket-updated/ticket-updated.mjs b/components/zendesk/sources/ticket-updated/ticket-updated.mjs index 0118c9d3e47ad..24a0c3edc7780 100644 --- a/components/zendesk/sources/ticket-updated/ticket-updated.mjs +++ b/components/zendesk/sources/ticket-updated/ticket-updated.mjs @@ -6,7 +6,7 @@ export default { key: "zendesk-ticket-updated", type: "source", description: "Emit new event when a ticket has been updated", - version: "0.2.5", + version: "0.2.7", dedupe: "unique", methods: { ...common.methods, diff --git a/components/zendesk/zendesk.app.mjs b/components/zendesk/zendesk.app.mjs index 81e5f865ee428..40c1ab4d8bc6f 100644 --- a/components/zendesk/zendesk.app.mjs +++ b/components/zendesk/zendesk.app.mjs @@ -1,5 +1,7 @@ import { axios } from "@pipedream/platform"; import constants from "./common/constants.mjs"; +import { getFileStreamAndMetadata } from "@pipedream/platform"; +import path from "path"; export default { type: "app", @@ -101,6 +103,77 @@ export default { }; }, }, + userId: { + type: "string", + label: "User ID", + description: "The ID of the user", + async options({ prevContext }) { + const { afterCursor } = prevContext; + + const { + users, + meta, + } = await this.listUsers({ + params: { + [constants.PAGE_SIZE_PARAM]: constants.DEFAULT_LIMIT, + [constants.PAGE_AFTER_PARAM]: afterCursor, + }, + }); + + return { + context: { + afterCursor: meta.after_cursor, + }, + options: users.map(({ + id, name, + }) => ({ + label: name, + value: id, + })), + }; + }, + }, + groupId: { + type: "string", + label: "Group ID", + description: "The ID of the group", + optional: true, + async options({ prevContext }) { + const { afterCursor } = prevContext; + + const { + groups, + meta, + } = await this.listGroups({ + params: { + [constants.PAGE_SIZE_PARAM]: constants.DEFAULT_LIMIT, + [constants.PAGE_AFTER_PARAM]: afterCursor, + }, + }); + + return { + context: { + afterCursor: meta.after_cursor, + }, + options: groups.map(({ + id, name, + }) => ({ + label: name, + value: id, + })), + }; + }, + }, + macroCategory: { + type: "string", + label: "Macro Category", + description: "The category of the macro", + optional: true, + async options() { + const { categories } = await this.listMacroCategories(); + return categories.map((category) => category); + }, + }, fields: { type: "string[]", label: "Fields", @@ -189,6 +262,12 @@ export default { description: "For Enterprise Zendesk accounts: optionally specify the subdomain to use. This will override the subdomain that was provided when connecting your Zendesk account to Pipedream. For example, if you Zendesk URL is https://examplehelp.zendesk.com, your subdomain is `examplehelp`", optional: true, }, + attachments: { + type: "string[]", + label: "Attachments", + description: "File paths or URLs to attach to the ticket. Multiple files can be attached.", + optional: true, + }, ticketTags: { type: "string[]", label: "Tags", @@ -234,6 +313,14 @@ export default { ...args, }); }, + getUserInfo({ + userId, ...args + }) { + return this.makeRequest({ + path: `/users/${userId}`, + ...args, + }); + }, searchTickets(args = {}) { return this.makeRequest({ path: "/search", @@ -290,6 +377,132 @@ export default { ...args, }); }, + streamToBuffer(stream) { + return new Promise((resolve, reject) => { + const chunks = []; + stream.on("data", (chunk) => chunks.push(chunk)); + stream.on("end", () => resolve(Buffer.concat(chunks))); + stream.on("error", reject); + }); + }, + /** + * Upload a single file (local path or http(s) URL) to Zendesk Uploads API. + * @param {Object} params + * @param {string} params.filePath - Local filesystem path or http(s) URL. + * @param {string} [params.filename] - Optional filename override for the upload. + * @param {string} [params.customSubdomain] + * @param {*} [params.step] + */ + async uploadFile({ + filePath, filename, customSubdomain, step, + }) { + if (!filePath || typeof filePath !== "string") { + throw new Error("uploadFile: 'filePath' (string) is required"); + } + + const { + stream, metadata, + } = await getFileStreamAndMetadata(filePath); + const fileBinary = await this.streamToBuffer(stream); + + if (!filename) { + filename = path.basename(filePath); + } + + return this.makeRequest({ + step, + method: "post", + path: `/uploads?filename=${encodeURIComponent(filename)}`, + customSubdomain, + headers: { + "Content-Type": metadata.contentType, + "Content-Length": metadata.size, + "Accept": "application/json", + }, + data: Buffer.from(fileBinary, "binary"), + }); + }, + async uploadFiles({ + attachments, customSubdomain, step, + } = {}) { + if (!attachments || !attachments.length) { + return []; + } + const files = attachments + .map((a) => (typeof a === "string" + ? a.trim() + : a)) + .filter(Boolean); + + const settled = await Promise.allSettled( + files.map((attachment) => + this.uploadFile({ + filePath: attachment, + customSubdomain, + step, + })), + ); + + const tokens = []; + const errors = []; + settled.forEach((res, i) => { + const attachment = files[i]; + if (res.status === "fulfilled") { + const token = res.value?.upload?.token; + if (!token) { + errors.push(`Upload API returned no token for ${attachment}`); + } else { + tokens.push(token); + } + } else { + const reason = res.reason?.message || String(res.reason || "Unknown error"); + errors.push(`${attachment}: ${reason}`); + } + }); + + if (errors.length) { + throw new Error(`Failed to upload ${errors.length}/${files.length} attachment(s): ${errors.join("; ")}`); + } + return tokens; + }, + listTicketComments({ + ticketId, ...args + } = {}) { + return this.makeRequest({ + path: `/tickets/${ticketId}/comments`, + ...args, + }); + }, + listUsers(args = {}) { + return this.makeRequest({ + path: "/users", + ...args, + }); + }, + listLocales(args = {}) { + return this.makeRequest({ + path: "/locales", + ...args, + }); + }, + listMacros(args = {}) { + return this.makeRequest({ + path: "/macros", + ...args, + }); + }, + listMacroCategories(args = {}) { + return this.makeRequest({ + path: "/macros/categories", + ...args, + }); + }, + listGroups(args = {}) { + return this.makeRequest({ + path: "/groups", + ...args, + }); + }, async *paginate({ fn, args, resourceKey, max, }) { diff --git a/components/zep/actions/add-memory/add-memory.mjs b/components/zep/actions/add-memory/add-memory.mjs index b4111f01e514e..858fbc9205c8d 100644 --- a/components/zep/actions/add-memory/add-memory.mjs +++ b/components/zep/actions/add-memory/add-memory.mjs @@ -5,7 +5,7 @@ export default { key: "zep-add-memory", name: "Add Memory to Session", description: "Adds memory to an existing session in Zep. [See the documentation](https://help.getzep.com/api-reference/memory/add)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { zep, diff --git a/components/zep/actions/add-user/add-user.mjs b/components/zep/actions/add-user/add-user.mjs index 85e30feec2b86..96a752a2a593a 100644 --- a/components/zep/actions/add-user/add-user.mjs +++ b/components/zep/actions/add-user/add-user.mjs @@ -5,7 +5,7 @@ export default { key: "zep-add-user", name: "Add User", description: "Adds a user in Zep. [See the documentation](https://help.getzep.com/api-reference/user/add)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { zep, diff --git a/components/zep/actions/create-session/create-session.mjs b/components/zep/actions/create-session/create-session.mjs index 3700067d25cbf..0473dd193707f 100644 --- a/components/zep/actions/create-session/create-session.mjs +++ b/components/zep/actions/create-session/create-session.mjs @@ -5,7 +5,7 @@ export default { key: "zep-create-session", name: "Create Session", description: "Creates a new session in Zep. [See the documentation](https://help.getzep.com/api-reference/memory/add-session)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { zep, diff --git a/components/zep/actions/get-thread-messages/get-thread-messages.mjs b/components/zep/actions/get-thread-messages/get-thread-messages.mjs new file mode 100644 index 0000000000000..f6ec2f0430d90 --- /dev/null +++ b/components/zep/actions/get-thread-messages/get-thread-messages.mjs @@ -0,0 +1,51 @@ +import zep from "../../zep.app.mjs"; + +export default { + key: "zep-get-thread-messages", + name: "Get Thread Messages", + description: "Returns messages for the thread with the specified ID. [See the documentation](https://help.getzep.com/sdk-reference/thread/get)", + version: "0.0.1", + type: "action", + props: { + zep, + threadId: { + propDefinition: [ + zep, + "threadId", + ], + }, + }, + async run({ $ }) { + const allMessages = []; + let cursor = 0; + const limit = 100; // Tamanho da pรกgina + + while (true) { + const response = await this.zep.getThreadMessages({ + $, + threadId: this.threadId, + params: { + limit, + cursor, + }, + }); + + if (!response.messages || response.messages.length === 0) { + break; + } + + allMessages.push(...response.messages); + + // Se recebemos menos mensagens que o limite, chegamos ao fim + if (response.messages.length < limit) { + break; + } + + cursor += limit; + } + + $.export("$summary", `Successfully retrieved ${allMessages.length} messages for the thread with ID: ${this.threadId}`); + + return allMessages; + }, +}; diff --git a/components/zep/actions/get-threads/get-threads.mjs b/components/zep/actions/get-threads/get-threads.mjs new file mode 100644 index 0000000000000..01a4e4e106748 --- /dev/null +++ b/components/zep/actions/get-threads/get-threads.mjs @@ -0,0 +1,76 @@ +import zep from "../../zep.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "zep-get-threads", + name: "Get Threads", + description: "Returns a paginated list of threads. [See the documentation](https://help.getzep.com/sdk-reference/thread/list-all)", + version: "0.0.1", + type: "action", + props: { + zep, + order_by: { + type: "string", + label: "Order By", + description: "Field to order by (e.g., updated_at).", + optional: true, + options: constants.SORT_OPTIONS, + }, + asc: { + type: "boolean", + label: "Ascending", + description: "If true, results are returned in ascending order.", + optional: true, + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "Maximum number of threads to return across pages.", + optional: true, + default: 50, + }, + }, + async run({ $ }) { + const max = this.maxResults ?? 50; + const threads = []; + + let page = 1; + while (threads.length < max) { + const pageSize = Math.min(1000, max - threads.length); + const params = { + page_number: page, + page_size: pageSize, + }; + + if (this.order_by) { + params.order_by = this.order_by; + } + if (typeof this.asc === "boolean") { + params.asc = this.asc; + } + + const response = await this.zep.getThreads({ + $, + params, + }); + + const pageThreads = response?.threads || []; + if (!Array.isArray(pageThreads) || pageThreads.length === 0) { + break; + } + + threads.push(...pageThreads); + if (pageThreads.length < pageSize) { + break; + } + + page += 1; + } + + const plural = threads.length === 1 + ? "" + : "s"; + $.export("$summary", `Successfully retrieved ${threads.length} thread${plural}`); + return threads; + }, +}; diff --git a/components/zep/actions/update-session/update-session.mjs b/components/zep/actions/update-session/update-session.mjs index 093227a3de2dd..c754a83717988 100644 --- a/components/zep/actions/update-session/update-session.mjs +++ b/components/zep/actions/update-session/update-session.mjs @@ -5,7 +5,7 @@ export default { key: "zep-update-session", name: "Update Session", description: "Updates an existing session in Zep. [See the documentation](https://help.getzep.com/api-reference/memory/update-session)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { zep, diff --git a/components/zep/common/constants.mjs b/components/zep/common/constants.mjs new file mode 100644 index 0000000000000..e686b0aafb91a --- /dev/null +++ b/components/zep/common/constants.mjs @@ -0,0 +1,8 @@ +export default { + SORT_OPTIONS: [ + "created_at", + "updated_at", + "user_id", + "thread_id", + ], +}; diff --git a/components/zep/package.json b/components/zep/package.json index 5f49cb70ac437..a6d6151ca909a 100644 --- a/components/zep/package.json +++ b/components/zep/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/zep", - "version": "0.1.0", + "version": "0.2.0", "description": "Pipedream Zep Components", "main": "zep.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.0.3" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/zep/sources/new-message/new-message.mjs b/components/zep/sources/new-message/new-message.mjs index 72869259ea2ec..8947fd3cf02d8 100644 --- a/components/zep/sources/new-message/new-message.mjs +++ b/components/zep/sources/new-message/new-message.mjs @@ -5,7 +5,7 @@ export default { key: "zep-new-message", name: "New Message in Session", description: "Emit new event when a message is added to a session. [See the documentation](https://help.getzep.com/api-reference/memory/get-session-messages)", - version: "0.0.1", + version: "0.0.3", type: "source", dedupe: "unique", methods: { diff --git a/components/zep/sources/new-session/new-session.mjs b/components/zep/sources/new-session/new-session.mjs index 49842ba20f6bc..f3289893dc799 100644 --- a/components/zep/sources/new-session/new-session.mjs +++ b/components/zep/sources/new-session/new-session.mjs @@ -5,7 +5,7 @@ export default { key: "zep-new-session", name: "New Session Created", description: "Emit new event when a new session is created in Zep. [See the documentation](https://help.getzep.com/api-reference/memory/list-sessions)", - version: "0.0.1", + version: "0.0.3", type: "source", dedupe: "unique", methods: { diff --git a/components/zep/sources/session-updated/session-updated.mjs b/components/zep/sources/session-updated/session-updated.mjs index 08e7955f228b8..02dcf576e96a8 100644 --- a/components/zep/sources/session-updated/session-updated.mjs +++ b/components/zep/sources/session-updated/session-updated.mjs @@ -3,9 +3,9 @@ import common from "../common/base.mjs"; export default { ...common, key: "zep-session-updated", - name: "Session Updated", + name: "New Session Updated", description: "Emit new event when an existing session is updated. [See the documentation](https://help.getzep.com/api-reference/memory/list-sessions)", - version: "0.0.1", + version: "0.0.3", type: "source", dedupe: "unique", methods: { diff --git a/components/zep/zep.app.mjs b/components/zep/zep.app.mjs index 4ea32d1fb7b45..23eda54752ee4 100644 --- a/components/zep/zep.app.mjs +++ b/components/zep/zep.app.mjs @@ -39,6 +39,20 @@ export default { })) || []; }, }, + threadId: { + type: "string", + label: "Thread ID", + description: "The ID of the thread", + async options({ page }) { + const { threads } = await this.getThreads({ + params: { + page_number: page, + }, + }); + + return threads?.map(({ thread_id }) => thread_id) || []; + }, + }, factRatingInstructions: { type: "object", label: "Fact Rating Instructions", @@ -58,10 +72,11 @@ export default { _makeRequest({ $ = this, path, + version, ...otherOpts }) { return axios($, { - url: `${this._baseUrl()}${path}`, + url: `${this._baseUrl(version)}${path}`, headers: { "authorization": `Api-Key ${this.$auth.api_key}`, }, @@ -120,5 +135,35 @@ export default { ...opts, }); }, + getSession({ + sessionId, ...opts + }) { + return this._makeRequest({ + path: `/sessions/${sessionId}`, + ...opts, + }); + }, + listSessionMemory({ + sessionId, ...opts + }) { + return this._makeRequest({ + path: `/sessions/${sessionId}/memory`, + ...opts, + }); + }, + getThreads(opts = {}) { + return this._makeRequest({ + path: "/threads", + ...opts, + }); + }, + getThreadMessages({ + threadId, ...opts + }) { + return this._makeRequest({ + path: `/threads/${threadId}/messages`, + ...opts, + }); + }, }, }; diff --git a/components/zoho_analytics/package.json b/components/zoho_analytics/package.json index 9057445300128..e3b2e19a58295 100644 --- a/components/zoho_analytics/package.json +++ b/components/zoho_analytics/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/zoho_analytics", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Zoho Analytics Components", "main": "zoho_analytics.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/zoho_assist/package.json b/components/zoho_assist/package.json index 19e6f589452ec..9f8bc012d2881 100644 --- a/components/zoho_assist/package.json +++ b/components/zoho_assist/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/zoho_assist", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Zoho Assist Components", "main": "dist/app/zoho_assist.app.mjs", "keywords": [ @@ -14,7 +14,9 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.5.1", - "@pipedream/types": "^0.1.4" + "@pipedream/platform": "^3.1.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/zoho_assist/tsconfig.json b/components/zoho_assist/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/zoho_assist/tsconfig.json +++ b/components/zoho_assist/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/zoho_campaigns/package.json b/components/zoho_campaigns/package.json index 9bb6a41a6c766..6004bf9d73c5c 100644 --- a/components/zoho_campaigns/package.json +++ b/components/zoho_campaigns/package.json @@ -1,16 +1,18 @@ { "name": "@pipedream/zoho_campaigns", - "version": "0.1.1", + "version": "0.1.2", "description": "Pipedream Zoho Campaigns Components", - "main": "dist/app/zoho_campaigns.app.mjs", + "main": "zoho_campaigns.app.mjs", "keywords": [ "pipedream", "zoho_campaigns" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/zoho_campaigns", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/zoho_catalyst/package.json b/components/zoho_catalyst/package.json index a0fa5725a87c0..545fb598e82f8 100644 --- a/components/zoho_catalyst/package.json +++ b/components/zoho_catalyst/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/zoho_catalyst", - "version": "0.2.0", + "version": "0.2.1", "description": "Pipedream Zoho Catalyst Components", "main": "dist/app/zoho_catalyst.app.mjs", "keywords": [ @@ -15,7 +15,9 @@ }, "dependencies": { "@pipedream/platform": "^3.1.0", - "@pipedream/types": "^0.1.6", "form-data": "^4.0.0" + }, + "devDependencies": { + "@pipedream/types": "^0.3.2" } } diff --git a/components/zoho_catalyst/tsconfig.json b/components/zoho_catalyst/tsconfig.json index ec9c833423b99..3a9389484d040 100644 --- a/components/zoho_catalyst/tsconfig.json +++ b/components/zoho_catalyst/tsconfig.json @@ -1,22 +1,3 @@ { - "compilerOptions": { - "lib": ["es2020"], - "module": "ES2020", - "target": "ES2020", - "moduleResolution": "node", - "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script - "composite": true, - "outDir": "dist", - "allowSyntheticDefaultImports": true, - }, - "allowJs": true, - "include": [ - "app", - "actions", - "sources", - "common" - ], - "exclude": [ - "dist", - ] - } + "extends": "../../tsconfig.components.json" +} diff --git a/components/zoho_desk/actions/add-ticket-attachment/add-ticket-attachment.mjs b/components/zoho_desk/actions/add-ticket-attachment/add-ticket-attachment.mjs index 65763736af511..825574b807286 100644 --- a/components/zoho_desk/actions/add-ticket-attachment/add-ticket-attachment.mjs +++ b/components/zoho_desk/actions/add-ticket-attachment/add-ticket-attachment.mjs @@ -7,7 +7,7 @@ export default { name: "Add Ticket Attachment", description: "Attaches a file to a ticket. [See the docs here](https://desk.zoho.com/DeskAPIDocument#TicketAttachments#TicketAttachments_CreateTicketattachment)", type: "action", - version: "0.1.1", + version: "0.1.2", props: { zohoDesk, orgId: { diff --git a/components/zoho_desk/actions/add-ticket-comment/add-ticket-comment.mjs b/components/zoho_desk/actions/add-ticket-comment/add-ticket-comment.mjs index dcc8d294bd657..5bc72c5637080 100644 --- a/components/zoho_desk/actions/add-ticket-comment/add-ticket-comment.mjs +++ b/components/zoho_desk/actions/add-ticket-comment/add-ticket-comment.mjs @@ -5,7 +5,7 @@ export default { name: "Add Ticket Comment", description: "Adds a comment to a ticket. [See the docs here](https://desk.zoho.com/DeskAPIDocument#TicketsComments#TicketsComments_Createticketcomment)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { zohoDesk, orgId: { diff --git a/components/zoho_desk/actions/create-account/create-account.mjs b/components/zoho_desk/actions/create-account/create-account.mjs index fdf4577482eab..8338646fec753 100644 --- a/components/zoho_desk/actions/create-account/create-account.mjs +++ b/components/zoho_desk/actions/create-account/create-account.mjs @@ -5,7 +5,7 @@ export default { name: "Create Account", description: "Creates an account in your help desk portal. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Accounts#Accounts_CreateAccount)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { zohoDesk, orgId: { diff --git a/components/zoho_desk/actions/create-contact/create-contact.mjs b/components/zoho_desk/actions/create-contact/create-contact.mjs index 1da75403d1ee6..f4399aacfc1e5 100644 --- a/components/zoho_desk/actions/create-contact/create-contact.mjs +++ b/components/zoho_desk/actions/create-contact/create-contact.mjs @@ -5,7 +5,7 @@ export default { name: "Create Contact", description: "Creates a contact in your help desk portal. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Contacts#Contacts_CreateContact)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { zohoDesk, orgId: { diff --git a/components/zoho_desk/actions/create-ticket/create-ticket.mjs b/components/zoho_desk/actions/create-ticket/create-ticket.mjs index 6c324e1e0699b..b2d1d22332ed2 100644 --- a/components/zoho_desk/actions/create-ticket/create-ticket.mjs +++ b/components/zoho_desk/actions/create-ticket/create-ticket.mjs @@ -5,7 +5,7 @@ export default { name: "Create Ticket", description: "Creates a ticket in your helpdesk. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Tickets#Tickets_Createaticket)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { zohoDesk, orgId: { diff --git a/components/zoho_desk/actions/find-contact/find-contact.mjs b/components/zoho_desk/actions/find-contact/find-contact.mjs index 6f7c96da39277..f4ab6751784fc 100644 --- a/components/zoho_desk/actions/find-contact/find-contact.mjs +++ b/components/zoho_desk/actions/find-contact/find-contact.mjs @@ -5,7 +5,7 @@ export default { name: "Find Contact", description: "Searches for contacts in your help desk portal. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Search#Search_SearchContacts)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { zohoDesk, orgId: { diff --git a/components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs b/components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs index 8e10ac83b48cd..25b966e0f3cc7 100644 --- a/components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs +++ b/components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs @@ -5,7 +5,7 @@ export default { name: "Find or Create Contact", description: "Finds or create a contact. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Contacts#Contacts_CreateContact)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { zohoDesk, orgId: { diff --git a/components/zoho_desk/actions/search-ticket/search-ticket.mjs b/components/zoho_desk/actions/search-ticket/search-ticket.mjs index a49cf2877db13..b96ad28c8b505 100644 --- a/components/zoho_desk/actions/search-ticket/search-ticket.mjs +++ b/components/zoho_desk/actions/search-ticket/search-ticket.mjs @@ -5,7 +5,7 @@ export default { name: "Search Ticket", description: "Searches for tickets in your help desk. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Search_TicketsSearchAPI)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { zohoDesk, orgId: { diff --git a/components/zoho_desk/actions/send-email-reply/send-email-reply.mjs b/components/zoho_desk/actions/send-email-reply/send-email-reply.mjs index b9a99c00b022b..6d365b2a7ba53 100644 --- a/components/zoho_desk/actions/send-email-reply/send-email-reply.mjs +++ b/components/zoho_desk/actions/send-email-reply/send-email-reply.mjs @@ -5,7 +5,7 @@ export default { name: "Send E-Mail Reply", description: "Sends an email reply. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Threads#Threads_SendEmailReply)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { zohoDesk, orgId: { diff --git a/components/zoho_desk/actions/update-contact/update-contact.mjs b/components/zoho_desk/actions/update-contact/update-contact.mjs index 1e08be6bef34c..df9bbcf18986d 100644 --- a/components/zoho_desk/actions/update-contact/update-contact.mjs +++ b/components/zoho_desk/actions/update-contact/update-contact.mjs @@ -5,7 +5,7 @@ export default { name: "Update Contact", description: "Updates details of an existing contact. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Contacts#Contacts_Updateacontact)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { zohoDesk, orgId: { diff --git a/components/zoho_desk/actions/update-ticket/update-ticket.mjs b/components/zoho_desk/actions/update-ticket/update-ticket.mjs index 4c3ae72b89c49..a2428d0761534 100644 --- a/components/zoho_desk/actions/update-ticket/update-ticket.mjs +++ b/components/zoho_desk/actions/update-ticket/update-ticket.mjs @@ -5,7 +5,7 @@ export default { name: "Update Ticket", description: "Updates an existing ticket. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Tickets#Tickets_Updateaticket)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { zohoDesk, orgId: { diff --git a/components/zoho_desk/package.json b/components/zoho_desk/package.json index 77722d645209b..dd33cd2e89812 100644 --- a/components/zoho_desk/package.json +++ b/components/zoho_desk/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/zoho_desk", - "version": "0.1.1", + "version": "0.2.0", "description": "Pipedream Zoho_desk Components", "main": "zoho_desk.app.mjs", "keywords": [ diff --git a/components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs b/components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs index be41226f0d2e0..a800e8d0cd780 100644 --- a/components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs +++ b/components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs @@ -1,4 +1,4 @@ -import common from "../common.mjs"; +import common from "../common/common-polling.mjs"; export default { ...common, @@ -6,7 +6,7 @@ export default { name: "New Ticket Status Change", description: "Emit new event when a status ticket is changed. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Tickets#Tickets_Listalltickets)", type: "source", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/common.mjs b/components/zoho_desk/sources/common.mjs deleted file mode 100644 index c46756f67b75c..0000000000000 --- a/components/zoho_desk/sources/common.mjs +++ /dev/null @@ -1,89 +0,0 @@ -import constants from "../common/constants.mjs"; -import utils from "../common/utils.mjs"; -import zohoDesk from "../zoho_desk.app.mjs"; -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; - -export default { - props: { - zohoDesk, - db: "$.service.db", - timer: { - type: "$.interface.timer", - label: "Polling schedule", - description: "How often to poll the Zoho Desk API", - default: { - intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, - }, - }, - }, - methods: { - setLastCreatedAt(value) { - this.db.set(constants.LAST_CREATED_AT, value); - }, - getLastCreatedAt() { - return this.db.get(constants.LAST_CREATED_AT); - }, - setLastUpdatedAt(value) { - this.db.set(constants.LAST_UPDATED_AT, value); - }, - getLastUpdatedAt() { - return this.db.get(constants.LAST_UPDATED_AT); - }, - getResourceFn() { - throw new Error("getResourceFn is not implemented"); - }, - getResourceFnArgs() { - throw new Error("getResourceFnArgs is not implemented"); - }, - generateMeta() { - throw new Error("generateMeta is not implemented"); - }, - resourceFilter() { - throw new Error("resourceFilter is not implemented"); - }, - processEvent(resource) { - const meta = this.generateMeta(resource); - this.$emit(resource, meta); - }, - async processStreamEvents(stream) { - const resources = await utils.streamIterator(stream); - - const [ - lastResource, - ] = resources; - - resources - .filter(this.resourceFilter) - .forEach(this.processEvent); - - if (lastResource) { - const { - commentedTime, - createdTime, - modifiedTime, - } = lastResource; - const lastCreatedAt = - Date.parse( - commentedTime - || createdTime - || new Date(), - ); - const lastUpdatedAt = - Date.parse( - modifiedTime - || new Date(), - ); - this.setLastCreatedAt(lastCreatedAt); - this.setLastUpdatedAt(lastUpdatedAt); - } - }, - }, - async run() { - const resourcesStream = await this.zohoDesk.getResourcesStream({ - resourceFn: this.getResourceFn(), - resourceFnArgs: this.getResourceFnArgs(), - }); - - await this.processStreamEvents(resourcesStream); - }, -}; diff --git a/components/zoho_desk/sources/common/common-polling.mjs b/components/zoho_desk/sources/common/common-polling.mjs new file mode 100644 index 0000000000000..465601a125adc --- /dev/null +++ b/components/zoho_desk/sources/common/common-polling.mjs @@ -0,0 +1,89 @@ +import constants from "../../common/constants.mjs"; +import utils from "../../common/utils.mjs"; +import zohoDesk from "../../zoho_desk.app.mjs"; +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; + +export default { + props: { + zohoDesk, + db: "$.service.db", + timer: { + type: "$.interface.timer", + label: "Polling schedule", + description: "How often to poll the Zoho Desk API", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + methods: { + setLastCreatedAt(value) { + this.db.set(constants.LAST_CREATED_AT, value); + }, + getLastCreatedAt() { + return this.db.get(constants.LAST_CREATED_AT); + }, + setLastUpdatedAt(value) { + this.db.set(constants.LAST_UPDATED_AT, value); + }, + getLastUpdatedAt() { + return this.db.get(constants.LAST_UPDATED_AT); + }, + getResourceFn() { + throw new Error("getResourceFn is not implemented"); + }, + getResourceFnArgs() { + throw new Error("getResourceFnArgs is not implemented"); + }, + generateMeta() { + throw new Error("generateMeta is not implemented"); + }, + resourceFilter() { + throw new Error("resourceFilter is not implemented"); + }, + processEvent(resource) { + const meta = this.generateMeta(resource); + this.$emit(resource, meta); + }, + async processStreamEvents(stream) { + const resources = await utils.streamIterator(stream); + + const [ + lastResource, + ] = resources; + + resources + .filter(this.resourceFilter) + .forEach(this.processEvent); + + if (lastResource) { + const { + commentedTime, + createdTime, + modifiedTime, + } = lastResource; + const lastCreatedAt = + Date.parse( + commentedTime + || createdTime + || new Date(), + ); + const lastUpdatedAt = + Date.parse( + modifiedTime + || new Date(), + ); + this.setLastCreatedAt(lastCreatedAt); + this.setLastUpdatedAt(lastUpdatedAt); + } + }, + }, + async run() { + const resourcesStream = await this.zohoDesk.getResourcesStream({ + resourceFn: this.getResourceFn(), + resourceFnArgs: this.getResourceFnArgs(), + }); + + await this.processStreamEvents(resourcesStream); + }, +}; diff --git a/components/zoho_desk/sources/common/common-webhook.mjs b/components/zoho_desk/sources/common/common-webhook.mjs new file mode 100644 index 0000000000000..4ee31fc46b935 --- /dev/null +++ b/components/zoho_desk/sources/common/common-webhook.mjs @@ -0,0 +1,68 @@ +import zohoDesk from "../../zoho_desk.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + props: { + zohoDesk, + db: "$.service.db", + http: { + type: "$.interface.http", + customResponse: true, + }, + infoAlert: { + type: "alert", + alertType: "info", + content: "Webhooks are available for Professional and Enterprise plans only", + }, + }, + hooks: { + async activate() { + const { id } = await this.zohoDesk.createWebhook({ + data: { + url: this.http.endpoint, + subscriptions: this.getSubscriptions(), + }, + }); + this._setWebhookId(id); + }, + async deactivate() { + const webhookId = this._getWebhookId(); + if (webhookId) { + await this.zohoDesk.deleteWebhook({ + webhookId, + }); + } + }, + }, + methods: { + _getWebhookId() { + return this.db.get("webhookId"); + }, + _setWebhookId(webhookId) { + this.db.set("webhookId", webhookId); + }, + getSubscriptions() { + throw new ConfigurationError("getSubscriptions is not implemented"); + }, + generateMeta() { + throw new ConfigurationError("generateMeta is not implemented"); + }, + }, + async run(event) { + this.http.respond({ + status: 200, + }); + + const { body: events } = event; + + if (!events || !Array.isArray(events)) { + return; + } + + for (const event of events) { + const { payload } = event; + const meta = this.generateMeta(payload); + this.$emit(payload, meta); + } + }, +}; diff --git a/components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs b/components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs new file mode 100644 index 0000000000000..e2b2f51b4953d --- /dev/null +++ b/components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs @@ -0,0 +1,28 @@ +import common from "../common/common-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "zoho_desk-deleted-article-instant", + name: "Deleted Article (Instant)", + description: "Emit new event when an article is deleted from the recycle bin", + type: "source", + version: "0.0.1", + dedupe: "unique", + methods: { + ...common.methods, + getSubscriptions() { + return { + Article_Delete: null, + }; + }, + generateMeta(payload) { + return { + id: payload.id, + summary: `Article Deleted: ${payload.id}`, + ts: Date.now(), + }; + }, + }, + sampleEmit, +}; diff --git a/components/zoho_desk/sources/deleted-article-instant/test-event.mjs b/components/zoho_desk/sources/deleted-article-instant/test-event.mjs new file mode 100644 index 0000000000000..89a9c6bf0de31 --- /dev/null +++ b/components/zoho_desk/sources/deleted-article-instant/test-event.mjs @@ -0,0 +1,3 @@ +export default { + "id" : "123456789044" +} \ No newline at end of file diff --git a/components/zoho_desk/sources/new-account/new-account.mjs b/components/zoho_desk/sources/new-account/new-account.mjs index bf768c6f0afce..ff975e65e83a0 100644 --- a/components/zoho_desk/sources/new-account/new-account.mjs +++ b/components/zoho_desk/sources/new-account/new-account.mjs @@ -1,4 +1,4 @@ -import common from "../common.mjs"; +import common from "../common/common-polling.mjs"; export default { ...common, @@ -6,7 +6,7 @@ export default { name: "New Account", description: "Emit new event when a new account is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Accounts#Accounts_Listaccounts)", type: "source", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/new-agent/new-agent.mjs b/components/zoho_desk/sources/new-agent/new-agent.mjs index ed02e33ccd8eb..576c6bf921def 100644 --- a/components/zoho_desk/sources/new-agent/new-agent.mjs +++ b/components/zoho_desk/sources/new-agent/new-agent.mjs @@ -1,4 +1,4 @@ -import common from "../common.mjs"; +import common from "../common/common-polling.mjs"; export default { ...common, @@ -6,7 +6,7 @@ export default { name: "New Agent", description: "Emit new event when a new agent is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Agents#Agents_Listagents)", type: "source", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/new-article-instant/new-article-instant.mjs b/components/zoho_desk/sources/new-article-instant/new-article-instant.mjs new file mode 100644 index 0000000000000..31c8dc0ab06de --- /dev/null +++ b/components/zoho_desk/sources/new-article-instant/new-article-instant.mjs @@ -0,0 +1,28 @@ +import common from "../common/common-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "zoho_desk-new-article-instant", + name: "New Article (Instant)", + description: "Emit new event when a new article is created", + type: "source", + version: "0.0.1", + dedupe: "unique", + methods: { + ...common.methods, + getSubscriptions() { + return { + Article_Add: null, + }; + }, + generateMeta(payload) { + return { + id: payload.id, + summary: `New Article Created: ${payload.title}`, + ts: Date.parse(payload.createdTime), + }; + }, + }, + sampleEmit, +}; diff --git a/components/zoho_desk/sources/new-article-instant/test-event.mjs b/components/zoho_desk/sources/new-article-instant/test-event.mjs new file mode 100644 index 0000000000000..680c77406d076 --- /dev/null +++ b/components/zoho_desk/sources/new-article-instant/test-event.mjs @@ -0,0 +1,103 @@ +export default { + "modifiedTime" : "2020-09-02T07:53:28.000Z", + "attachments" : [ ], + "reviewedTime" : null, + "departmentId" : "112534000000394045", + "modifierId" : "112534000000192635", + "dislikeCount" : "0", + "creatorId" : "112534000000192635", + "likeCount" : "0", + "ownerId" : "112534000000192635", + "title" : "Zoho Desk - An Overview", + "locale" : "en", + "translationState" : "UP-TO-DATE", + "expiryDate" : null, + "isTrashed" : false, + "isLocked" : false, + "createdTime" : "2020-09-02T07:53:28.000Z", + "modifiedBy" : { + "photoURL" : "https://contacts.zoho.com/file?ID=53947797&t=user&API=true&fs=thumb", + "name" : "Zylker", + "id" : "112534000000192635", + "status" : "ACTIVE", + "zuid" : "53947797" + }, + "id" : "112534000000396881", + "viewCount" : "0", + "translationSource" : null, + "seo" : { + "keywords" : null, + "description" : null, + "title" : null + }, + "summary" : "Zoho Desk - An Overview", + "owner" : { + "photoURL" : "https://contacts.zoho.com/file?ID=53947797&t=user&API=true&fs=thumb", + "name" : "Zylker", + "id" : "112534000000192635", + "status" : "ACTIVE", + "zuid" : "53947797" + }, + "latestVersionStatus" : "Published", + "author" : { + "photoURL" : "https://contacts.zoho.com/file?ID=53947797&t=user&API=true&fs=thumb", + "name" : "Zylker", + "id" : "112534000000192635", + "status" : "ACTIVE", + "zuid" : "53947797" + }, + "permission" : "AGENTS", + "reviewedBy" : null, + "authorId" : "112534000000192635", + "usageCount" : "0", + "commentCount" : "0", + "tags" : [ ], + "rootCategoryId" : "112534000000397001", + "sourceLocale" : "en", + "translationId" : "112534000000396883", + "createdBy" : { + "photoURL" : "https://contacts.zoho.com/file?ID=53947797&t=user&API=true&fs=thumb", + "name" : "Zylker", + "id" : "112534000000192635", + "status" : "ACTIVE", + "zuid" : "53947797" + }, + "latestVersion" : "1.0", + "webUrl" : "https://desk.zoho.com/support/zylker/ShowHomePage.do#Solutions/dv/112534000000396881/en", + "feedbackCount" : "0", + "portalUrl" : "https://desk.zoho.com/portal/zylker/en/kb/articles/asa", + "latestPublishedVersion" : "1.0", + "attachmentCount" : "0", + "metrics" : { + "feedbackCount" : "0", + "unlikeCount" : "0", + "dislikeCount" : "0", + "lastUsageTime" : null, + "likeCount" : "0", + "viewCount" : "0", + "lastActivityTime" : null, + "usageCount" : "0" + }, + "position" : "3", + "availableLocaleTranslations" : [ { + "latestVersionStatus" : "Published", + "translationId" : "112534000000396883", + "isTrashed" : false, + "recycleBinEntityId" : "112534000000396881", + "latestVersion" : "1.0", + "latestPublishedVersion" : "1.0", + "href" : "https://desk.zoho.com/api/v1/articles/112534000000396881/translations/en?orgId=62366276", + "authorId" : "112534000000192635", + "locale" : "en", + "translationState" : "UP-TO-DATE", + "status" : "Published" + } ], + "permalink" : "zoho-desk-overview", + "category" : { + "name" : "General", + "id" : "112534000000397018", + "locale" : "en" + }, + "categoryId" : "112534000000397018", + "status" : "Published" +} \ No newline at end of file diff --git a/components/zoho_desk/sources/new-contact/new-contact.mjs b/components/zoho_desk/sources/new-contact/new-contact.mjs index 9a9a5f79e22c4..94c6662b4abf2 100644 --- a/components/zoho_desk/sources/new-contact/new-contact.mjs +++ b/components/zoho_desk/sources/new-contact/new-contact.mjs @@ -1,4 +1,4 @@ -import common from "../common.mjs"; +import common from "../common/common-polling.mjs"; export default { ...common, @@ -6,7 +6,7 @@ export default { name: "New Contact", description: "Emit new event when a new contact is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Contacts#Contacts_Listcontacts)", type: "source", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs b/components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs index 36635f0a09f3c..c9b95d060ce16 100644 --- a/components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs +++ b/components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs @@ -1,4 +1,4 @@ -import common from "../common.mjs"; +import common from "../common/common-polling.mjs"; export default { ...common, @@ -6,7 +6,7 @@ export default { name: "New Ticket Attachment", description: "Emit new event when a new ticket attachment is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#TicketAttachments#TicketAttachments_Listticketattachments)", type: "source", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs b/components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs index 0e3958c132a0e..14d31838efe57 100644 --- a/components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs +++ b/components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs @@ -1,4 +1,4 @@ -import common from "../common.mjs"; +import common from "../common/common-polling.mjs"; export default { ...common, @@ -6,7 +6,7 @@ export default { name: "New Ticket Comment", description: "Emit new event when a new ticket comment is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#TicketsComments#TicketsComments_Listallticketcomments)", type: "source", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs b/components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs index 15b747c59ef8e..d909ba1e39ada 100644 --- a/components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs +++ b/components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs @@ -1,4 +1,4 @@ -import common from "../common.mjs"; +import common from "../common/common-polling.mjs"; export default { ...common, @@ -6,7 +6,7 @@ export default { name: "New Ticket Message", description: "Emit new event when a message ticket is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Threads#Threads_Listallthreads)", type: "source", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/new-ticket/new-ticket.mjs b/components/zoho_desk/sources/new-ticket/new-ticket.mjs index 79bf3211e2295..878001f3b95f1 100644 --- a/components/zoho_desk/sources/new-ticket/new-ticket.mjs +++ b/components/zoho_desk/sources/new-ticket/new-ticket.mjs @@ -1,4 +1,4 @@ -import common from "../common.mjs"; +import common from "../common/common-polling.mjs"; export default { ...common, @@ -6,7 +6,7 @@ export default { name: "New Ticket", description: "Emit new event when a new ticket is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Tickets#Tickets_Listalltickets)", type: "source", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/updated-article-instant/test-event.mjs b/components/zoho_desk/sources/updated-article-instant/test-event.mjs new file mode 100644 index 0000000000000..680c77406d076 --- /dev/null +++ b/components/zoho_desk/sources/updated-article-instant/test-event.mjs @@ -0,0 +1,103 @@ +export default { + "modifiedTime" : "2020-09-02T07:53:28.000Z", + "attachments" : [ ], + "reviewedTime" : null, + "departmentId" : "112534000000394045", + "modifierId" : "112534000000192635", + "dislikeCount" : "0", + "creatorId" : "112534000000192635", + "likeCount" : "0", + "ownerId" : "112534000000192635", + "title" : "Zoho Desk - An Overview", + "locale" : "en", + "translationState" : "UP-TO-DATE", + "expiryDate" : null, + "isTrashed" : false, + "isLocked" : false, + "createdTime" : "2020-09-02T07:53:28.000Z", + "modifiedBy" : { + "photoURL" : "https://contacts.zoho.com/file?ID=53947797&t=user&API=true&fs=thumb", + "name" : "Zylker", + "id" : "112534000000192635", + "status" : "ACTIVE", + "zuid" : "53947797" + }, + "id" : "112534000000396881", + "viewCount" : "0", + "translationSource" : null, + "seo" : { + "keywords" : null, + "description" : null, + "title" : null + }, + "summary" : "Zoho Desk - An Overview", + "owner" : { + "photoURL" : "https://contacts.zoho.com/file?ID=53947797&t=user&API=true&fs=thumb", + "name" : "Zylker", + "id" : "112534000000192635", + "status" : "ACTIVE", + "zuid" : "53947797" + }, + "latestVersionStatus" : "Published", + "author" : { + "photoURL" : "https://contacts.zoho.com/file?ID=53947797&t=user&API=true&fs=thumb", + "name" : "Zylker", + "id" : "112534000000192635", + "status" : "ACTIVE", + "zuid" : "53947797" + }, + "permission" : "AGENTS", + "reviewedBy" : null, + "authorId" : "112534000000192635", + "usageCount" : "0", + "commentCount" : "0", + "tags" : [ ], + "rootCategoryId" : "112534000000397001", + "sourceLocale" : "en", + "translationId" : "112534000000396883", + "createdBy" : { + "photoURL" : "https://contacts.zoho.com/file?ID=53947797&t=user&API=true&fs=thumb", + "name" : "Zylker", + "id" : "112534000000192635", + "status" : "ACTIVE", + "zuid" : "53947797" + }, + "latestVersion" : "1.0", + "webUrl" : "https://desk.zoho.com/support/zylker/ShowHomePage.do#Solutions/dv/112534000000396881/en", + "feedbackCount" : "0", + "portalUrl" : "https://desk.zoho.com/portal/zylker/en/kb/articles/asa", + "latestPublishedVersion" : "1.0", + "attachmentCount" : "0", + "metrics" : { + "feedbackCount" : "0", + "unlikeCount" : "0", + "dislikeCount" : "0", + "lastUsageTime" : null, + "likeCount" : "0", + "viewCount" : "0", + "lastActivityTime" : null, + "usageCount" : "0" + }, + "position" : "3", + "availableLocaleTranslations" : [ { + "latestVersionStatus" : "Published", + "translationId" : "112534000000396883", + "isTrashed" : false, + "recycleBinEntityId" : "112534000000396881", + "latestVersion" : "1.0", + "latestPublishedVersion" : "1.0", + "href" : "https://desk.zoho.com/api/v1/articles/112534000000396881/translations/en?orgId=62366276", + "authorId" : "112534000000192635", + "locale" : "en", + "translationState" : "UP-TO-DATE", + "status" : "Published" + } ], + "permalink" : "zoho-desk-overview", + "category" : { + "name" : "General", + "id" : "112534000000397018", + "locale" : "en" + }, + "categoryId" : "112534000000397018", + "status" : "Published" +} \ No newline at end of file diff --git a/components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs b/components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs new file mode 100644 index 0000000000000..01de420a9bb6b --- /dev/null +++ b/components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs @@ -0,0 +1,29 @@ +import common from "../common/common-webhook.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "zoho_desk-updated-article-instant", + name: "Updated Article (Instant)", + description: "Emit new event when an article is updated", + type: "source", + version: "0.0.1", + dedupe: "unique", + methods: { + ...common.methods, + getSubscriptions() { + return { + Article_Update: null, + }; + }, + generateMeta(payload) { + const ts = Date.parse(payload.modifiedTime); + return { + id: `${payload.id}-${ts}`, + summary: `Article Updated: ${payload.title}`, + ts, + }; + }, + }, + sampleEmit, +}; diff --git a/components/zoho_desk/sources/updated-ticket/updated-ticket.mjs b/components/zoho_desk/sources/updated-ticket/updated-ticket.mjs index d989a2ac4b5c2..cf793594ee531 100644 --- a/components/zoho_desk/sources/updated-ticket/updated-ticket.mjs +++ b/components/zoho_desk/sources/updated-ticket/updated-ticket.mjs @@ -1,4 +1,4 @@ -import common from "../common.mjs"; +import common from "../common/common-polling.mjs"; export default { ...common, @@ -6,7 +6,7 @@ export default { name: "New Updated Ticket", description: "Emit new event when a ticket is updated. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Tickets#Tickets_Listalltickets)", type: "source", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/zoho_desk.app.mjs b/components/zoho_desk/zoho_desk.app.mjs index 5df21a3aa84aa..a911852d9958a 100644 --- a/components/zoho_desk/zoho_desk.app.mjs +++ b/components/zoho_desk/zoho_desk.app.mjs @@ -145,6 +145,22 @@ export default { throw error.response?.data; } }, + createWebhook(args = {}) { + return this.makeRequest({ + method: "post", + path: "/webhooks", + ...args, + }); + }, + deleteWebhook({ + webhookId, ...args + }) { + return this.makeRequest({ + method: "delete", + path: `/webhooks/${webhookId}`, + ...args, + }); + }, getOrganizations(args = {}) { return this.makeRequest({ path: "/organizations", diff --git a/components/zoho_fms/zoho_fms.app.mjs b/components/zoho_fms/zoho_fms.app.mjs index 4a7762ca62a68..72c6634d0fd61 100644 --- a/components/zoho_fms/zoho_fms.app.mjs +++ b/components/zoho_fms/zoho_fms.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/zoho_people/package.json b/components/zoho_people/package.json index 90c8ebb68f0f4..6b8edbb35c220 100644 --- a/components/zoho_people/package.json +++ b/components/zoho_people/package.json @@ -2,6 +2,7 @@ "name": "@pipedream/zoho_people", "version": "0.1.0", "description": "Pipedream Zoho People Components", + "main": "zoho_people.app.mjs", "keywords": [ "pipedream", "zoho_people" @@ -10,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } } diff --git a/components/zoom/actions/get-meeting-transcript/get-meeting-transcript.mjs b/components/zoom/actions/get-meeting-transcript/get-meeting-transcript.mjs new file mode 100644 index 0000000000000..4f08923d16002 --- /dev/null +++ b/components/zoom/actions/get-meeting-transcript/get-meeting-transcript.mjs @@ -0,0 +1,39 @@ +import zoom from "../../zoom.app.mjs"; + +export default { + key: "zoom-get-meeting-transcript", + name: "Get Meeting Transcript", + description: "Get the transcript of a meeting. [See the documentation](https://developers.zoom.us/docs/api/meetings/#tag/cloud-recording/get/meetings/{meetingId}/transcript)", + version: "0.0.1", + type: "action", + props: { + zoom, + meetingId: { + propDefinition: [ + zoom, + "meetingId", + ], + description: "The meeting ID to get the transcript for", + optional: false, + }, + }, + methods: { + getMeetingTranscript({ + meetingId, ...opts + }) { + return this.zoom._makeRequest({ + path: `/meetings/${meetingId}/transcript`, + ...opts, + }); + }, + }, + async run({ $: step }) { + const transcript = await this.getMeetingTranscript({ + step, + meetingId: this.meetingId, + }); + + step.export("$summary", `Retrieved transcript for meeting ${this.meetingId}`); + return transcript; + }, +}; diff --git a/components/zoom/package.json b/components/zoom/package.json index 5b926e64ad543..9c9a8fb73f6c9 100644 --- a/components/zoom/package.json +++ b/components/zoom/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/zoom", - "version": "0.6.0", + "version": "0.7.0", "description": "Pipedream Zoom Components", "main": "zoom.app.mjs", "keywords": [ @@ -14,6 +14,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.3.0" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/zoom/sources/new-recording-transcript-completed/new-recording-transcript-completed.mjs b/components/zoom/sources/new-recording-transcript-completed/new-recording-transcript-completed.mjs new file mode 100644 index 0000000000000..0487c09457be7 --- /dev/null +++ b/components/zoom/sources/new-recording-transcript-completed/new-recording-transcript-completed.mjs @@ -0,0 +1,94 @@ +import common from "../common/common.mjs"; +import constants from "../common/constants.mjs"; + +export default { + ...common, + key: "zoom-new-recording-transcript-completed", + name: "New Recording Transcript Completed (Instant)", + description: "Emit new event each time a recording transcript is completed", + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + ...common.props, + // eslint-disable-next-line pipedream/props-label, pipedream/props-description + apphook: { + type: "$.interface.apphook", + appProp: "app", + eventNames() { + return [ + constants.CUSTOM_EVENT_TYPES.RECORDING_TRANSCRIPT_COMPLETED, + ]; + }, + }, + }, + hooks: { + async deploy() { + const { meetings } = await this.app.listMeetings({ + params: { + from: this.monthAgo(), + to: new Date().toISOString() + .slice(0, 10), + page_size: 25, + }, + }); + if (!meetings || meetings.length === 0) { + return; + } + for (const meeting of meetings) { + if (!this.isMeetingRelevant(meeting)) { + continue; + } + for (const file of meeting.recording_files) { + if (!this.isFileRelevant(file)) { + continue; + } + this.emitEvent(file, meeting); + } + } + }, + }, + methods: { + ...common.methods, + isMeetingRelevant(meeting) { + return meeting.recording_files && meeting.recording_files.length > 0; + }, + isFileRelevant(file) { + return file.file_type === "TRANSCRIPT" && file.status === "completed"; + }, + emitEvent(file, meeting) { + this.$emit({ + meeting, + file, + }, this.generateMeta(file, meeting)); + }, + generateMeta(file, meeting) { + return { + id: file.id, + summary: `Transcript completed for ${meeting.topic}`, + ts: +new Date(file.recording_end), + }; + }, + }, + async run(event) { + if (event.event !== constants.CUSTOM_EVENT_TYPES.RECORDING_TRANSCRIPT_COMPLETED) { + console.log("Not a recording.transcript.completed event. Exiting"); + return; + } + const { payload } = event; + const { object } = payload; + const { recording_files: recordingFiles } = object; + + if (!this.isMeetingRelevant(object)) { + return; + } + + for (const file of recordingFiles) { + if (!this.isFileRelevant(file)) { + continue; + } + + this.emitEvent(file, object); + } + }, +}; diff --git a/components/zoom_admin/actions/get-meeting-transcript/get-meeting-transcript.mjs b/components/zoom_admin/actions/get-meeting-transcript/get-meeting-transcript.mjs new file mode 100644 index 0000000000000..ea2df315317e4 --- /dev/null +++ b/components/zoom_admin/actions/get-meeting-transcript/get-meeting-transcript.mjs @@ -0,0 +1,39 @@ +import zoomAdmin from "../../zoom_admin.app.mjs"; + +export default { + key: "zoom_admin-get-meeting-transcript", + name: "Get Meeting Transcript", + description: "Get the transcript of a meeting. [See the documentation](https://developers.zoom.us/docs/api/meetings/#tag/cloud-recording/get/meetings/{meetingId}/transcript)", + version: "0.0.1", + type: "action", + props: { + zoomAdmin, + meetingId: { + propDefinition: [ + zoomAdmin, + "meeting", + ], + description: "The meeting ID to get the transcript for", + }, + }, + methods: { + getMeetingTranscript({ + meetingId, ...opts + }) { + return this.zoomAdmin._makeRequest({ + path: `/meetings/${meetingId}/transcript`, + ...opts, + }); + }, + }, + async run({ $ }) { + const meetingId = this.meetingId.value || this.meetingId; + const { data: transcript } = await this.getMeetingTranscript({ + $, + meetingId, + }); + + $.export("$summary", `Retrieved transcript for meeting ${meetingId}`); + return transcript; + }, +}; diff --git a/components/zoom_admin/package.json b/components/zoom_admin/package.json index 598b901d69f8e..738ee3499ae3e 100644 --- a/components/zoom_admin/package.json +++ b/components/zoom_admin/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/zoom_admin", - "version": "0.10.0", + "version": "0.11.0", "description": "Pipedream Zoom_admin Components", "main": "zoom_admin.app.mjs", "keywords": [ @@ -14,7 +14,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.4.0", + "@pipedream/platform": "^3.1.0", "lodash": "^4.17.21", "uuid": "^8.3.2" } diff --git a/components/zoom_admin/sources/new-recording-transcript-completed/new-recording-transcript-completed.mjs b/components/zoom_admin/sources/new-recording-transcript-completed/new-recording-transcript-completed.mjs new file mode 100644 index 0000000000000..d4e817907892d --- /dev/null +++ b/components/zoom_admin/sources/new-recording-transcript-completed/new-recording-transcript-completed.mjs @@ -0,0 +1,94 @@ +import zoomAdmin from "../../zoom_admin.app.mjs"; + +export default { + key: "zoom_admin-new-recording-transcript-completed", + name: "New Recording Transcript Completed (Instant)", + description: "Emit new event each time a recording transcript is completed", + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + zoomAdmin, + zoomApphook: { + type: "$.interface.apphook", + appProp: "zoomAdmin", + eventNames: [ + "recording.transcript_completed", + ], + }, + }, + hooks: { + async deploy() { + const { meetings } = await this.zoomAdmin.listMeetings({ + params: { + from: this.monthAgo(), + to: new Date().toISOString() + .slice(0, 10), + page_size: 25, + }, + }); + if (!meetings || meetings.length === 0) { + return; + } + for (const meeting of meetings) { + if (!this.isMeetingRelevant(meeting)) { + continue; + } + for (const file of meeting.recording_files) { + if (!this.isFileRelevant(file)) { + continue; + } + this.emitEvent(file, meeting); + } + } + }, + }, + methods: { + monthAgo() { + const now = new Date(); + const monthAgo = new Date(now.getTime()); + monthAgo.setMonth(monthAgo.getMonth() - 1); + return monthAgo.toISOString().slice(0, 10); + }, + isMeetingRelevant(meeting) { + return meeting.recording_files && meeting.recording_files.length > 0; + }, + isFileRelevant(file) { + return file.file_type === "TRANSCRIPT" && file.status === "completed"; + }, + emitEvent(file, meeting) { + this.$emit({ + meeting, + file, + }, this.generateMeta(file, meeting)); + }, + generateMeta(file, meeting) { + return { + id: file.id, + summary: `Transcript completed for ${meeting.topic}`, + ts: +new Date(file.recording_end), + }; + }, + }, + async run(event) { + if (event.event !== "recording.transcript_completed") { + console.log("Not a recording.transcript_completed event. Exiting"); + return; + } + const { payload } = event; + const { object } = payload; + const { recording_files: recordingFiles } = object; + + if (!this.isMeetingRelevant(object)) { + return; + } + + for (const file of recordingFiles) { + if (!this.isFileRelevant(file)) { + continue; + } + + this.emitEvent(file, object); + } + }, +}; diff --git a/components/zuora/.gitignore b/components/zuora/.gitignore deleted file mode 100644 index ec761ccab7595..0000000000000 --- a/components/zuora/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.js -*.mjs -dist \ No newline at end of file diff --git a/components/zuora/app/zuora.app.ts b/components/zuora/app/zuora.app.ts deleted file mode 100644 index 1e71d872ada91..0000000000000 --- a/components/zuora/app/zuora.app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineApp } from "@pipedream/types"; - -export default defineApp({ - type: "app", - app: "zuora", - propDefinitions: {}, - methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); - }, - }, -}); diff --git a/components/zuora/package.json b/components/zuora/package.json index 66eddbae6fc14..c0f5d22338d69 100644 --- a/components/zuora/package.json +++ b/components/zuora/package.json @@ -1,13 +1,12 @@ { "name": "@pipedream/zuora", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Zuora Billing Components", - "main": "dist/app/zuora.app.mjs", + "main": "zuora.app.mjs", "keywords": [ "pipedream", "zuora" ], - "files": ["dist"], "homepage": "https://pipedream.com/apps/zuora", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { diff --git a/components/zuora/zuora.app.mjs b/components/zuora/zuora.app.mjs new file mode 100644 index 0000000000000..cdd1470565cea --- /dev/null +++ b/components/zuora/zuora.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "zuora", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; diff --git a/docs-v2/.env.example b/docs-v2/.env.example deleted file mode 100644 index 03daff629db0d..0000000000000 --- a/docs-v2/.env.example +++ /dev/null @@ -1,13 +0,0 @@ -# Connect demo API configuration -PIPEDREAM_CLIENT_ID=your_client_id -PIPEDREAM_CLIENT_SECRET=your_client_secret -PIPEDREAM_PROJECT_ID=your_project_id -PIPEDREAM_PROJECT_ENVIRONMENT=development - -# Additional redirect URIs for the Connect demo (optional) -PIPEDREAM_CONNECT_TOKEN_WEBHOOK_URI= -PIPEDREAM_CONNECT_SUCCESS_REDIRECT_URI= -PIPEDREAM_CONNECT_ERROR_REDIRECT_URI= - -# Comma-separated list of additional allowed origins (optional) -# ALLOWED_ORIGINS=https://your-custom-domain.com,https://another-domain.com \ No newline at end of file diff --git a/docs-v2/.gitignore b/docs-v2/.gitignore deleted file mode 100644 index 7e3ff65bac0df..0000000000000 --- a/docs-v2/.gitignore +++ /dev/null @@ -1,38 +0,0 @@ -# dependencies -/node_modules -/.pnp -.pnp.js -.yarn/install-state.gz - -# testing -/coverage - -# next.js -.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - -# sitemap -/public/sitemap*.xml -/public/robots.txt diff --git a/docs-v2/.npmrc b/docs-v2/.npmrc deleted file mode 100644 index 9dc7c37f87031..0000000000000 --- a/docs-v2/.npmrc +++ /dev/null @@ -1,8 +0,0 @@ -auto-install-peers=true -enable-pre-post-scripts=true -save-workspace-protocol=false -link-workspace-packages=false -shamefully-hoist=true -node-linker=hoisted -shared-workspace-lockfile=true -engine-strict=false \ No newline at end of file diff --git a/docs-v2/.tool-versions b/docs-v2/.tool-versions deleted file mode 100644 index 264e90ee943ed..0000000000000 --- a/docs-v2/.tool-versions +++ /dev/null @@ -1,2 +0,0 @@ -nodejs 20.13.1 -pnpm 9.14.2 diff --git a/docs-v2/LICENSE b/docs-v2/LICENSE deleted file mode 100644 index 490da1feb81b0..0000000000000 --- a/docs-v2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 Shu Ding - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/docs-v2/README.md b/docs-v2/README.md index 446ce1d4d15af..7b108b42260a7 100644 --- a/docs-v2/README.md +++ b/docs-v2/README.md @@ -1,76 +1,5 @@ # Pipedream docs -> [!WARNING] -> **โš ๏ธ THIS PROJECT IS DEPRECATED โš ๏ธ** -> -> This docs-v2 directory is no longer maintained. Do not make changes to files in this directory as they will not be deployed or used. -> -> The documentation has been moved to a new location. Please contact the team for the current documentation repository. - -## Quickstart - -[Install `asdf`](https://asdf-vm.com/guide/getting-started.html) if you haven't already. - -```bash -asdf install -pnpm dev -``` - -Open [http://localhost:3000/docs](http://localhost:3000/docs). - -We use [Nextra](https://nextra.site/docs), [a Next.js app](https://nextjs.org/docs). Nextra builds docs from the `pages/` directory. All docs are [MDX](https://mdxjs.com/) files (Markdown with React components / JSX). - -Run `yarn build` before pushing to your branch to confirm everything builds OK. - -## VuePress -> Nextra - -We're moving from VuePress to Nextra. Here's what's the same and what's different: - -- New docs are here, in the `docs-v2/` directory. -- All docs are still Markdown. Now MDX files instead of just Markdown, so extensions have been renamed to `.mdx`. -- Keep images in `public/images/foo.png`, reference with `![alt text](/images/foo.png)` -- Leaf nodes in VuePress were at files like `/docs/workflows/workspaces/sso/google/README.md`. Nextra allows leaf nodes to be non-index files like `/docs/workflows/workspaces/sso/google.mdx`, so there's no need for the final directory, which simplifies things. -- VuePress used Vue, Nextra uses React. All of the custom components used in MDX files are either [built-in Nextra components](https://nextra.site/docs/guide/built-ins) or Pipedream-specific components in `components/`, ported from Vue. -- Learn the [built-in Nextra components](https://nextra.site/docs/guide/built-ins). All the `::: tip`, `::: warning`, or other special VuePress components have an equivalent Nextra component. - -## Nextra - -We use the [Nextra Docs Theme](https://nextra.site/docs/docs-theme/start), which adds functionality on the base Nextra app. Most of the features we use are well-documented there. - -The [Nextra docs](https://nextra.site/docs) and [GitHub](https://github.com/shuding/nextra) are great. Anything not specific to Nextra is likely a feature of [Next.js](https://nextjs.org/docs) or [MDX](https://mdxjs.com/), also well-maintained and modern projects as of 2024. - -Check `theme.config.tsx` for the latest config. - -### Useful Nextra components - -We use almost all of [the Nextra built-in components](https://nextra.site/docs/guide/built-ins) in docs. - -### Adding new pages / routes - -Nextra and Next.js tie routing closer to the directory structure of the app: - -``` -pages - index.mdx # /docs - data-stores.mdx # /docs/data-stores - http.mdx # /docs/http - workspaces/ - index.mdx # /docs/workspaces - sso/ - index.mdx # /docs/workflows/workspaces/sso - google.mdx # /docs/workflows/workspaces/sso/google -``` - -The `_meta.tsx` files in each directory defines a mapping between the labels in the sidebar and the files in that directory. If you want to add an item to the sidebar, you'll probably want to edit the `_meta.tsx` file. [See the Nextra docs](https://nextra.site/docs/docs-theme/page-configuration) for more info. - -## Custom components - -Use (and create!) custom components in `components/`. You'll see a lot of references to these components in the MDX. - -## Redirects - -If you need to add any custom redirects, e.g. when you move pages to a different directory, add then to the `vercel.json` file in this directory. - -## Adding new versions - -Add a new version of docs by creating a new feature branch in the format of `docs-v{number}-pathing`. +> [!WARNING] > **โš ๏ธ THIS PROJECT IS DEPRECATED โš ๏ธ** +> +> Pipedream public docs have moved to a new repo. Please contact the team for the current documentation repository. diff --git a/docs-v2/components/AccountConnectionDemo.jsx b/docs-v2/components/AccountConnectionDemo.jsx deleted file mode 100644 index 4f81f1807cf6a..0000000000000 --- a/docs-v2/components/AccountConnectionDemo.jsx +++ /dev/null @@ -1,89 +0,0 @@ -"use client"; - -import { useGlobalConnect } from "./GlobalConnectProvider"; -import CodeBlock from "./CodeBlock"; -import { styles } from "../utils/componentStyles"; - -export default function AccountConnectionDemo() { - const { - appSlug, - setAppSlug, - tokenData, - getClientCodeSnippet, - connectAccount, - connectedAccount, - error, - } = useGlobalConnect(); - - return ( -
-
- Connect an account from your frontend -
-
-
- - -
-
- -
-
-
- -
- - {!tokenData &&

Generate a token above in order to test the account connection flow

} -
- - {error && ( -
-
Error
-
{error}
-
- )} - - {connectedAccount && ( -
-
Successfully connected your {appSlug} account!
-
- {connectedAccount.loading - ? ( -
Loading account details...
- ) - : ( - <> - {connectedAccount.name - ? ( -
Account info: {connectedAccount.name}
- ) - : null} -
Account ID: {connectedAccount.id}
- - )} -
-
- )} -
-
- ); -} diff --git a/docs-v2/components/AppSearchDemo.jsx b/docs-v2/components/AppSearchDemo.jsx deleted file mode 100644 index 4f5358a6a5d67..0000000000000 --- a/docs-v2/components/AppSearchDemo.jsx +++ /dev/null @@ -1,277 +0,0 @@ -"use client"; - -import { - useState, useEffect, useCallback, -} from "react"; -import { styles } from "../utils/componentStyles"; -import { generateRequestToken } from "./api"; - -// Debounce hook -function useDebounce(value, delay) { - const [ - debouncedValue, - setDebouncedValue, - ] = useState(value); - - useEffect(() => { - const handler = setTimeout(() => { - setDebouncedValue(value); - }, delay); - - return () => { - clearTimeout(handler); - }; - }, [ - value, - delay, - ]); - - return debouncedValue; -} - -// Custom scrollbar styles -const scrollbarStyles = ` - .custom-scrollbar::-webkit-scrollbar { - width: 6px; - } - .custom-scrollbar::-webkit-scrollbar-track { - background: transparent; - } - .custom-scrollbar::-webkit-scrollbar-thumb { - background-color: rgba(156, 163, 175, 0.5); - border-radius: 3px; - } - .custom-scrollbar::-webkit-scrollbar-thumb:hover { - background-color: rgba(156, 163, 175, 0.8); - } - .dark .custom-scrollbar::-webkit-scrollbar-thumb { - background-color: rgba(75, 85, 99, 0.5); - } - .dark .custom-scrollbar::-webkit-scrollbar-thumb:hover { - background-color: rgba(75, 85, 99, 0.8); - } -`; - -export default function AppSearchDemo() { - const [ - searchQuery, - setSearchQuery, - ] = useState(""); - const [ - apps, - setApps, - ] = useState([]); - const [ - isLoading, - setIsLoading, - ] = useState(false); - const [ - error, - setError, - ] = useState(""); - const [ - copiedSlug, - setCopiedSlug, - ] = useState(""); - - const debouncedSearchQuery = useDebounce(searchQuery, 300); - - const searchApps = useCallback(async (query) => { - if (!query || query.length < 2) { - setApps([]); - return; - } - - setIsLoading(true); - setError(""); - - try { - const requestToken = generateRequestToken(); - // Convert spaces to underscores for name_slug searching - const searchQuery = query.replace(/\s+/g, "_"); - const response = await fetch( - `/docs/api-demo-connect/apps?q=${encodeURIComponent(searchQuery)}`, - { - headers: { - "Content-Type": "application/json", - "X-Request-Token": requestToken, - }, - }, - ); - - if (!response.ok) { - throw new Error("Failed to search apps"); - } - - const data = await response.json(); - console.log("App icons:", data.apps.map((app) => ({ - name: app.name, - icon: app.icon, - }))); - // Sort apps by featured_weight in descending order - const sortedApps = [...data.apps].sort((a, b) => (b.featured_weight || 0) - (a.featured_weight || 0)); - setApps(sortedApps); - } catch (err) { - console.error("Error searching apps:", err); - setError("Failed to search apps. Please try again."); - setApps([]); - } finally { - setIsLoading(false); - } - }, []); - - useEffect(() => { - searchApps(debouncedSearchQuery); - }, [ - debouncedSearchQuery, - searchApps, - ]); - - async function copyToClipboard(nameSlug) { - try { - await navigator.clipboard.writeText(nameSlug); - setCopiedSlug(nameSlug); - setTimeout(() => setCopiedSlug(""), 2000); - } catch (err) { - console.error("Failed to copy:", err); - } - } - - return ( -
- -
Search for an app
-
- setSearchQuery(e.target.value)} - placeholder="Search for an app (e.g., slack, notion, gmail)" - className="w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 placeholder-gray-400 dark:placeholder-gray-500" - /> - - {searchQuery.length > 0 && searchQuery.length < 2 && ( -

- Type at least 2 characters to search -

- )} - - {isLoading && ( -
-

Searching...

-
- )} - - {error && ( -
-

{error}

-
- )} - - {apps.length > 0 && !isLoading && ( -
-
-
- {apps.map((app) => ( -
-
- {app.icon && ( - {app.name} - )} -
-
-

- {app.name} -

-
-
- {app.name_slug} -
- -
-
-

- {app.description} -

- {app.categories.length > 0 && ( -
- {app.categories.map((category) => ( - - {category} - - ))} -
- )} -
-
-
- ))} -
- {apps.length > 5 && ( -
- )} -
- {apps.length > 5 && ( -

- Scroll to see more -

- )} -
- )} - - {debouncedSearchQuery.length >= 2 && - apps.length === 0 && - !isLoading && - !error && ( -
-

- No apps found for "{debouncedSearchQuery}" -

-
- )} - -
-

- Browse all available apps at{" "} - - mcp.pipedream.com - -

-
-
-
- ); -} diff --git a/docs-v2/components/ArcadeEmbed.tsx b/docs-v2/components/ArcadeEmbed.tsx deleted file mode 100644 index dd303a2ba0d21..0000000000000 --- a/docs-v2/components/ArcadeEmbed.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react"; - -interface ArcadeEmbedProps { - src: string; - title?: string; -} - -const ArcadeEmbed: React.FC = ({ - src, title, -}) => { - return ( -
- -
- ); -}; - -export default ArcadeEmbed; diff --git a/docs-v2/components/CR.tsx b/docs-v2/components/CR.tsx deleted file mode 100644 index 350e8389b3255..0000000000000 --- a/docs-v2/components/CR.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import Script from "next/script"; - -export default function RB2B() { - return ( - - ); -} diff --git a/docs-v2/components/Callout.tsx b/docs-v2/components/Callout.tsx deleted file mode 100644 index d317891f4ff00..0000000000000 --- a/docs-v2/components/Callout.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react"; -import { Callout } from "nextra/components"; - -interface CalloutProps { - type?: "default" | "info" | "warning" | "error"; - emoji?: string | React.ReactNode; - children: React.ReactNode; -} - -const PipedreamCallout: React.FC = ({ - type, - emoji, - children, -}) => { - return ( - -
{children}
-
- ); -}; - -export default PipedreamCallout; diff --git a/docs-v2/components/CodeBlock.js b/docs-v2/components/CodeBlock.js deleted file mode 100644 index 6c9dc9bc55e9c..0000000000000 --- a/docs-v2/components/CodeBlock.js +++ /dev/null @@ -1,109 +0,0 @@ -"use client"; - -import { - useState, useEffect, -} from "react"; -// We don't need the default Prism CSS as we're using our custom CSS -// import "prismjs/themes/prism.css"; - -// We'll dynamically import Prism on the client side only -let Prism; - -export default function CodeBlock({ - code, language = "javascript", className = "", -}) { - const [ - copied, - setCopied, - ] = useState(false); - const [ - highlightedCode, - setHighlightedCode, - ] = useState(code); - const [ - isClient, - setIsClient, - ] = useState(false); - - // Load Prism and highlight code on client-side only - useEffect(() => { - setIsClient(true); - - const loadPrism = async () => { - Prism = (await import("prismjs")).default; - - // Use manual mode so we can control highlighting - Prism.manual = true; - - // Import language definitions dynamically - if (!Prism.languages.javascript) { - await import("prismjs/components/prism-javascript"); - } - - if (!Prism.languages.json && language === "json") { - await import("prismjs/components/prism-json"); - } - - // Apply syntax highlighting - try { - if (Prism.languages[language]) { - const highlighted = Prism.highlight(code, Prism.languages[language], language); - setHighlightedCode(highlighted); - } - } catch (error) { - console.error("Prism highlighting error:", error); - } - }; - - loadPrism(); - }, [ - code, - language, - ]); - - const copyToClipboard = () => { - navigator.clipboard.writeText(code); - setCopied(true); - setTimeout(() => setCopied(false), 2000); - }; - - return ( -
-
-        
- -
- {isClient - ? ( - - ) - : ( - {code} - )} -
-
- ); -} diff --git a/docs-v2/components/ConnectCodeSnippets.js b/docs-v2/components/ConnectCodeSnippets.js deleted file mode 100644 index 335aea0a0c128..0000000000000 --- a/docs-v2/components/ConnectCodeSnippets.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * This file contains all the code snippets used in the Connect SDK demo. - * Centralizing them here helps to maintain consistency and makes updates easier. - */ - -/** - * Server-side code for generating a Connect token - * @param {string} externalUserId - The user's external ID - * @returns {string} The server code snippet - */ -export function getServerCodeSnippet(externalUserId) { - return `import { createBackendClient } from "@pipedream/sdk/server"; - -// This code runs on your server -const pd = createBackendClient({ - environment: "production", - credentials: { - clientId: process.env.PIPEDREAM_CLIENT_ID, - clientSecret: process.env.PIPEDREAM_CLIENT_SECRET, - }, - projectId: process.env.PIPEDREAM_PROJECT_ID -}); - -// Create a token for a specific user -const { token, expires_at, connect_link_url } = await pd.createConnectToken({ - external_user_id: "${externalUserId || "YOUR_USER_ID"}", -});`; -} - -/** - * Client-side code for connecting an account - * @param {string} appSlug - The app to connect to (slack, github, etc) - * @param {object} tokenData - The token data from the server - * @returns {string} The client code snippet - */ -export function getClientCodeSnippet(appSlug, tokenData) { - return `import { createFrontendClient } from "@pipedream/sdk/browser" - -// This code runs in the frontend using the token from your server -export default function Home() { - function connectAccount() { - const pd = createFrontendClient() - pd.connectAccount({ - app: "${appSlug}", - token: "${tokenData?.token - ? tokenData.token - : "{connect_token}"}", - onSuccess: (account) => { - // Handle successful connection - console.log(\`Account successfully connected: \${account.id}\`) - }, - onError: (err) => { - // Handle connection error - console.error(\`Connection error: \${err.message}\`) - } - }) - } - - return ( -
- -
- ) -}`; -} diff --git a/docs-v2/components/ConnectLinkDemo.jsx b/docs-v2/components/ConnectLinkDemo.jsx deleted file mode 100644 index 6580434904fe4..0000000000000 --- a/docs-v2/components/ConnectLinkDemo.jsx +++ /dev/null @@ -1,120 +0,0 @@ -"use client"; - -import { - useState, - useEffect, -} from "react"; -import { useGlobalConnect } from "./GlobalConnectProvider"; -import { styles } from "../utils/componentStyles"; - -export default function ConnectLinkDemo() { - const { - tokenData, - appSlug, - setAppSlug, - } = useGlobalConnect(); - const [ - connectLinkUrl, - setConnectLinkUrl, - ] = useState(""); - - useEffect(() => { - if (tokenData?.connect_link_url) { - // Add app parameter to the URL if it doesn't already exist - const baseUrl = tokenData.connect_link_url; - const url = new URL(baseUrl); - - // Update or add the app parameter - url.searchParams.set("app", appSlug); - - setConnectLinkUrl(url.toString()); - } else { - setConnectLinkUrl(""); - } - }, [ - tokenData, - appSlug, - ]); - - // No token data or connect_link_url - need to generate a token - if (!tokenData?.connect_link_url) { - return ( -
-

- Generate a token above - {" "} to see a Connect Link URL here -

-
- ); - } - - return ( -
-
- Connect Link URL -
-
-
- - -
-
- {connectLinkUrl} -
-
-
- -
- - Open - - - - - - -
- -
-

- This URL contains a Connect Token that expires in 4 hours - or after it's used once. - You can send this link to your users via email, SMS, or chat. -

-

- - Note: - - {" "}Connect tokens are single-use. After a successful connection, you'll need to generate a new token. -

-
-
-
- ); -} diff --git a/docs-v2/components/DocSearch.tsx b/docs-v2/components/DocSearch.tsx deleted file mode 100644 index 187234dd20b23..0000000000000 --- a/docs-v2/components/DocSearch.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { DocSearch } from "@docsearch/react"; - -import "@docsearch/css"; - -function Search() { - return ( - { - return items.map((item) => ({ - ...item, - content: item.url, - })); - }} - /> - ); -} - -export default Search; diff --git a/docs-v2/components/GA4.tsx b/docs-v2/components/GA4.tsx deleted file mode 100644 index 464876de41e6e..0000000000000 --- a/docs-v2/components/GA4.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import Script from "next/script"; - -export default function GA4() { - return ( - <> - - - ); -} diff --git a/docs-v2/components/GlobalConnectProvider.jsx b/docs-v2/components/GlobalConnectProvider.jsx deleted file mode 100644 index 894b5f9ab9008..0000000000000 --- a/docs-v2/components/GlobalConnectProvider.jsx +++ /dev/null @@ -1,174 +0,0 @@ -"use client"; - -import { - createContext, - useContext, - useState, - useEffect, -} from "react"; -import { createFrontendClient } from "@pipedream/sdk/browser"; -import { - getServerCodeSnippet, - getClientCodeSnippet, -} from "./ConnectCodeSnippets"; -import { - generateConnectToken, - fetchAccountDetails, -} from "./api"; - -/** - * Generate a UUID v4 for use as external_user_id - */ -function generateUUID() { - return crypto.randomUUID(); -} - -// Create the context -const GlobalConnectContext = createContext(null); - -/** - * Provider component for Connect demo state management - */ -export function GlobalConnectProvider({ children }) { - // User and app state - const [ - appSlug, - setAppSlug, - ] = useState("google_sheets"); - const [ - externalUserId, - setExternalUserId, - ] = useState(""); - const [ - connectedAccount, - setConnectedAccount, - ] = useState(null); - - // Token state - const [ - tokenData, - setTokenData, - ] = useState(null); - - // UI state - const [ - tokenLoading, - setTokenLoading, - ] = useState(false); - const [ - error, - setError, - ] = useState(null); - - // Generate a new UUID when the component mounts - useEffect(() => { - setExternalUserId(generateUUID()); - }, []); - - // Get code snippet wrapper functions - const getServerSnippet = () => getServerCodeSnippet(externalUserId); - const getClientSnippet = () => getClientCodeSnippet(appSlug, tokenData); - - /** - * Generate a token for the Connect demo - */ - async function generateToken() { - setTokenLoading(true); - setError(null); - // Clear any previously connected account when generating a new token - setConnectedAccount(null); - - try { - const data = await generateConnectToken(externalUserId); - setTokenData(data); - } catch (err) { - setError(err.message || "An error occurred"); - } finally { - setTokenLoading(false); - } - } - - /** - * Connect an account using the Pipedream Connect SDK - */ - function connectAccount() { - if (!tokenData?.token) { - setError("Please generate a token first"); - return; - } - - setError(null); - - try { - const pd = createFrontendClient(); - pd.connectAccount({ - app: appSlug, - token: tokenData.token, - onSuccess: async (account) => { - // Initialize with just the ID and loading state - setConnectedAccount({ - id: account.id, - loading: true, - }); - - // Fetch additional account details - const accountDetails = await fetchAccountDetails(account.id); - - // Update with the full details - setConnectedAccount({ - ...accountDetails, - loading: false, - }); - - // Token is single-use, so clear it after successful connection - setTokenData(null); - }, - onError: (err) => { - setError(err.message || "Failed to connect account"); - }, - onClose: () => { - // Dialog closed by user - no action needed - }, - }); - } catch (err) { - setError(err.message || "An error occurred"); - } - } - - // Create context value object - const contextValue = { - // State - appSlug, - externalUserId, - tokenData, - connectedAccount, - error, - tokenLoading, - - // Actions - setAppSlug, - generateToken, - connectAccount, - - // Code snippets - getServerCodeSnippet: getServerSnippet, - getClientCodeSnippet: getClientSnippet, - }; - - return ( - - {children} - - ); -} - -/** - * Custom hook for accessing the Connect demo context - */ -export function useGlobalConnect() { - const context = useContext(GlobalConnectContext); - if (!context) { - throw new Error("useGlobalConnect must be used within a GlobalConnectProvider"); - } - return context; -} diff --git a/docs-v2/components/LanguageLink.tsx b/docs-v2/components/LanguageLink.tsx deleted file mode 100644 index e2876ef78208b..0000000000000 --- a/docs-v2/components/LanguageLink.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react"; - -type LanguageLinkProps = { - icon: string; - name: string; - link: string; -}; - -function LanguageLink({ - icon, name, link, -}: LanguageLinkProps) { - return ( -
- - {name} - -
- ); -} - -export default LanguageLink; diff --git a/docs-v2/components/PipedreamCode.tsx b/docs-v2/components/PipedreamCode.tsx deleted file mode 100644 index 853a532ace90e..0000000000000 --- a/docs-v2/components/PipedreamCode.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react"; -import { Fira_Code } from "next/font/google"; - -interface PipedreamCodeProps { - children: React.ReactNode; -} - -const fira = Fira_Code({ - weight: [ - "400", - "600", - ], - subsets: [ - "latin", - ], -}); - -const PipedreamCode = ({ children }: PipedreamCodeProps) => <> - {children} -; - -export default PipedreamCode; diff --git a/docs-v2/components/PipedreamImg.tsx b/docs-v2/components/PipedreamImg.tsx deleted file mode 100644 index 12a974c50f5a7..0000000000000 --- a/docs-v2/components/PipedreamImg.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react"; -import Image from "next/image"; - -interface PipedreamImgProps { - src: string; - alt: string; - width: number; - height: number; -} - -const PipedreamImg = ({ - src, alt, width, height, -}: PipedreamImgProps) => { - return ( -
- {alt} -
- ); -}; - -export default PipedreamImg; diff --git a/docs-v2/components/PipedreamLink.tsx b/docs-v2/components/PipedreamLink.tsx deleted file mode 100644 index eb00912df058a..0000000000000 --- a/docs-v2/components/PipedreamLink.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from "react"; -import Link from "next/link"; - -interface PipedreamLinkProps { - href: string; - children: React.ReactNode; -} - -const PipedreamLink = ({ - href, children, -}: PipedreamLinkProps) => { - return ( - {children} - ); -}; - -export default PipedreamLink; diff --git a/docs-v2/components/PipedreamTextLogo.tsx b/docs-v2/components/PipedreamTextLogo.tsx deleted file mode 100644 index a4246ba663047..0000000000000 --- a/docs-v2/components/PipedreamTextLogo.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from "react"; - -const svg = () => <> - - - -; - -export default svg; diff --git a/docs-v2/components/PublicIPs.tsx b/docs-v2/components/PublicIPs.tsx deleted file mode 100644 index ad4c30607c766..0000000000000 --- a/docs-v2/components/PublicIPs.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import publicIps from "./publicNodeIps.json"; - -// Create a React component to display the public IPs in a code block, one IP on each line -export default function PublicIPs() { - return ( -
-      {publicIps.map((ip) => (
-        {ip}
-      ))}
-    
- ); -} diff --git a/docs-v2/components/PythonMappings.tsx b/docs-v2/components/PythonMappings.tsx deleted file mode 100644 index 0da362ff00aa2..0000000000000 --- a/docs-v2/components/PythonMappings.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import React, { - useState, useEffect, -} from "react"; -import rawMappings from "./python-mappings.json"; - -const PythonMappings = () => { - const [ - mappings, - setMappings, - ] = useState([]); - const [ - query, - setQuery, - ] = useState(""); - - useEffect(() => { - setMappings(Object.entries(rawMappings)); - }, []); - - useEffect(() => { - search(query); - }, [ - query, - ]); - - const search = (query) => { - if (query === "") { - setMappings(Object.entries(rawMappings)); - } else { - const filteredMappings = mappings.filter((mapping) => - new RegExp(query, "i").test(mapping[0])); - setMappings(filteredMappings); - } - }; - - return ( -
-
- setQuery(e.target.value)} - placeholder="Search by package name" - className=" - my-3 - px-3 - py-3 - placeholder-slate-300 - relative - rounded - text-sm - border-0 - shadow - outline-none - focus:outline-none focus:ring - w-full - m-auto - " - /> -
- - - - - - - - - - {mappings.map((mapping, index) => ( - - - - - ))} - -
PyPI Package NameImport into Pipedream with
- - {`# pipedream add-package ${mapping[0]}`} - - - import {mapping[1]} -
-
- ); -}; - -export default PythonMappings; diff --git a/docs-v2/components/RB2B.tsx b/docs-v2/components/RB2B.tsx deleted file mode 100644 index 36826ab7df9c6..0000000000000 --- a/docs-v2/components/RB2B.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import Script from "next/script"; - -export default function RB2B() { - return ( - - ); -} diff --git a/docs-v2/components/RocketShip.tsx b/docs-v2/components/RocketShip.tsx deleted file mode 100644 index 4a9fb188f2a0f..0000000000000 --- a/docs-v2/components/RocketShip.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import React from "react"; - -const svg = () => <> - rocket-launch -; - -export default svg; diff --git a/docs-v2/components/SDKButton.js b/docs-v2/components/SDKButton.js deleted file mode 100644 index 5477f534c8828..0000000000000 --- a/docs-v2/components/SDKButton.js +++ /dev/null @@ -1,21 +0,0 @@ -"use client"; - -export default function SDKButton({ - onClick, - disabled = false, - loading = false, - children, - className = "", -}) { - return ( - - ); -} diff --git a/docs-v2/components/SlackLogo.module.css b/docs-v2/components/SlackLogo.module.css deleted file mode 100644 index c489d1c24961d..0000000000000 --- a/docs-v2/components/SlackLogo.module.css +++ /dev/null @@ -1,14 +0,0 @@ -.container { - display: flex; - justify-content: center; - align-items: center; - width: 100%; - height: auto; -} - -.container svg { - width: 100%; - height: auto; - max-width: 100%; - display: block; -} \ No newline at end of file diff --git a/docs-v2/components/SlackLogo.tsx b/docs-v2/components/SlackLogo.tsx deleted file mode 100644 index 01eaa976dbcfb..0000000000000 --- a/docs-v2/components/SlackLogo.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from "react"; -import styles from "./SlackLogo.module.css"; - -const svg = () => -
- - - - - - -
; - -export default svg; diff --git a/docs-v2/components/TemporaryTokenGenerator.jsx b/docs-v2/components/TemporaryTokenGenerator.jsx deleted file mode 100644 index fd41a7a7839e4..0000000000000 --- a/docs-v2/components/TemporaryTokenGenerator.jsx +++ /dev/null @@ -1,90 +0,0 @@ -"use client"; - -import { useState } from "react"; -import { styles } from "../utils/componentStyles"; - -export default function TemporaryTokenGenerator() { - const [ - token, - setToken, - ] = useState(""); - const [ - copied, - setCopied, - ] = useState(false); - - // Generate a UUID v4 - function generateUUID() { - return crypto.randomUUID(); - } - - function generateToken() { - const uuid = generateUUID(); - const newToken = `devtok_${uuid}`; - setToken(newToken); - setCopied(false); - } - - async function copyToClipboard() { - try { - await navigator.clipboard.writeText(token); - setCopied(true); - setTimeout(() => setCopied(false), 2000); - } catch (err) { - console.error("Failed to copy:", err); - } - } - - return ( -
-
- Generate a temporary access token -
-
-
- -
- - {token && ( -
-
-
-
{token}
-
- -
-
- This is a temporary token. Any linked connected accounts will be regularly deleted. -
-
- )} -
-
- ); -} diff --git a/docs-v2/components/TokenGenerationDemo.jsx b/docs-v2/components/TokenGenerationDemo.jsx deleted file mode 100644 index f4da7407d6768..0000000000000 --- a/docs-v2/components/TokenGenerationDemo.jsx +++ /dev/null @@ -1,61 +0,0 @@ -"use client"; - -import { useGlobalConnect } from "./GlobalConnectProvider"; -import CodeBlock from "./CodeBlock"; -import { styles } from "../utils/componentStyles"; - -export default function TokenGenerationDemo() { - const { - externalUserId, - getServerCodeSnippet, - generateToken, - tokenLoading, - tokenData, - } = useGlobalConnect(); - - return ( -
-
- Generate a Connect Token from your server -
-
-
-
- External User ID: - {externalUserId} -
-
-
- -
-
-
- -
- -
- - {tokenData && ( -
-
Response:
-
- -
-
- )} -
-
- ); -} diff --git a/docs-v2/components/Vector.tsx b/docs-v2/components/Vector.tsx deleted file mode 100644 index 1ae0b2b2277b9..0000000000000 --- a/docs-v2/components/Vector.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import Script from "next/script"; - -export default function Vector() { - return ( - - ); -} diff --git a/docs-v2/components/VectorConnect.tsx b/docs-v2/components/VectorConnect.tsx deleted file mode 100644 index a856afe9900ee..0000000000000 --- a/docs-v2/components/VectorConnect.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import Script from "next/script"; - -export default function VectorConnect() { - return ( - - ); -} diff --git a/docs-v2/components/VideoPlayer.module.css b/docs-v2/components/VideoPlayer.module.css deleted file mode 100644 index 09962b4e2824c..0000000000000 --- a/docs-v2/components/VideoPlayer.module.css +++ /dev/null @@ -1,6 +0,0 @@ -.video { - margin: auto; - aspect-ratio: 16 / 9; - width: 100%; -} - \ No newline at end of file diff --git a/docs-v2/components/VideoPlayer.tsx b/docs-v2/components/VideoPlayer.tsx deleted file mode 100644 index 798d6574930d7..0000000000000 --- a/docs-v2/components/VideoPlayer.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react"; - -type VideoPlayerProps = { - src: string; - title: string; - startAt?: number; -}; - -const VideoPlayer = ({ - src, title, startAt, -}: VideoPlayerProps) => { - const embedUrl = `${src}?rel=0${startAt - ? `&start=${startAt}` - : ""}`; - - return ( -
- -
- ); -}; - -export default VideoPlayer; diff --git a/docs-v2/components/api.js b/docs-v2/components/api.js deleted file mode 100644 index 979528ec89633..0000000000000 --- a/docs-v2/components/api.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * API client functions for demo components - */ - -/** - * Generate a request token based on the browser environment - * Creates a token that matches what the API will generate - * - * Note: Server-side uses the origin's hostname for token generation - * to handle domain mapping in production environments - */ -export function generateRequestToken() { - if (typeof window === "undefined") return ""; - - // Use the same origin's hostname that the server will use when generating the token - const baseString = `${navigator.userAgent}:${window.location.host}:connect-demo`; - return btoa(baseString); -} - -/** - * Generate a token for the Connect demo - * @param {string} externalUserId - The user ID to associate with the token - * @returns {Promise} - The token data - */ -export async function generateConnectToken(externalUserId) { - const requestToken = generateRequestToken(); - const response = await fetch("/docs/api-demo-connect/token", { - method: "POST", - headers: { - "Content-Type": "application/json", - "X-Request-Token": requestToken, - }, - body: JSON.stringify({ - external_user_id: externalUserId, - }), - }); - - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData.error || "Failed to get token"); - } - - return await response.json(); -} - -/** - * Fetch account details from the API - * @param {string} accountId - The account ID to fetch - * @returns {Promise} - The account details - */ -export async function fetchAccountDetails(accountId) { - const requestToken = generateRequestToken(); - const response = await fetch(`/docs/api-demo-connect/accounts/${accountId}`, { - method: "GET", - headers: { - "Content-Type": "application/json", - "X-Request-Token": requestToken, - }, - }); - - if (!response.ok) { - return { - id: accountId, - }; // Fall back to just the ID - } - - return await response.json(); -} diff --git a/docs-v2/components/publicNodeIps.json b/docs-v2/components/publicNodeIps.json deleted file mode 100644 index d487a15c26752..0000000000000 --- a/docs-v2/components/publicNodeIps.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - "3.208.254.105", - "3.212.246.173", - "3.223.179.131", - "3.227.157.189", - "3.232.105.55", - "3.234.187.126", - "18.235.13.182", - "34.225.84.31", - "52.2.233.8", - "52.23.40.208", - "52.202.86.9", - "52.207.145.190", - "54.86.100.50", - "54.88.18.81", - "54.161.28.250", - "107.22.76.172" -] diff --git a/docs-v2/components/python-mappings.json b/docs-v2/components/python-mappings.json deleted file mode 100644 index 3e6d4aa49bbe6..0000000000000 --- a/docs-v2/components/python-mappings.json +++ /dev/null @@ -1,1078 +0,0 @@ -{ - "ShopifyAPI": "shopify", - "google-cloud-bigquery": "bigquery", - "carbon3d-client": "carbon3d", - "python-telegram-bot": "telegram", - "pyAFQ": "AFQ", - "agpy": "AG_fft_tools", - "pexpect": "screen", - "Adafruit_Libraries": "Adafruit", - "Zope2": "webdav", - "py_Asterisk": "Asterisk", - "bitbucket_jekyll_hook": "BB_jekyll_hook", - "Banzai_NGS": "Banzai", - "BeautifulSoup": "BeautifulSoupTests", - "biopython": "BioSQL", - "BuildbotEightStatusShields": "BuildbotStatusShields", - "ExtensionClass": "MethodObject", - "pycryptodome": "Crypto", - "pycryptodomex": "Cryptodome", - "51degrees_mobile_detector_v3_wrapper": "FiftyOneDegrees", - "pyfunctional": "functional", - "GeoBasesDev": "GeoBases", - "ipython": "IPython", - "astro_kittens": "Kittens", - "python_Levenshtein": "Levenshtein", - "MySQL-python": "MySQLdb", - "PyOpenGL": "OpenGL", - "pyOpenSSL": "OpenSSL", - "Pillow": "PIL", - "astLib": "PyWCSTools", - "astro_pyxis": "Pyxides", - "PySide": "pysideuic", - "s3cmd": "S3", - "pystick": "SCons", - "PyStemmer": "Stemmer", - "topzootools": "TopZooTools", - "DocumentTemplate": "TreeDisplay", - "aspose_pdf_java_for_python": "WorkingWithDocumentConversion", - "auto_adjust_display_brightness": "aadb", - "abakaffe_cli": "abakaffe", - "abiosgaming.py": "abiosgaming", - "abiquo_api": "abiquo", - "abl.cssprocessor": "abl", - "abl.robot": "abl", - "abl.util": "abl", - "abl.vpath": "abl", - "abo_generator": "abo", - "abris": "abris_transform", - "abstract.jwrotator": "abstract", - "abu.admin": "abu", - "AC_Flask_HipChat": "ac_flask", - "anikom15": "acg", - "acme.dchat": "acme", - "acme.hello": "acme", - "acted.projects": "acted", - "ActionServer": "action", - "actionbar.panel": "actionbar", - "afn": "activehomed", - "ActivePapers.Py": "activepapers", - "address_book_lansry": "address_book", - "adi.commons": "adi", - "adi.devgen": "adi", - "adi.fullscreen": "adi", - "adi.init": "adi", - "adi.playlist": "adi", - "adi.samplecontent": "adi", - "adi.slickstyle": "adi", - "adi.suite": "adi", - "adi.trash": "adi", - "aDict2": "adict", - "aditam.agent": "aditam", - "aditam.core": "aditam", - "adium_sh": "adiumsh", - "AdjectorClient": "adjector", - "AdjectorTracPlugin": "adjector", - "Banner_Ad_Toolkit": "adkit", - "django_admin_tools": "admin_tools", - "adminish_categories": "adminishcategories", - "django_admin_sortable": "adminsortable", - "adspygoogle.adwords": "adspygoogle", - "agtl": "advancedcaching", - "Adytum_PyMonitor": "adytum", - "affinitic.docpyflakes": "affinitic", - "affinitic.recipe.fakezope2eggs": "affinitic", - "affinitic.simplecookiecuttr": "affinitic", - "affinitic.verifyinterface": "affinitic", - "affinitic.zamqp": "affinitic", - "afpy.xap": "afpy", - "agate_sql": "agatesql", - "ageliaco.recipe.csvconfig": "ageliaco", - "agent.http": "agent_http", - "Agora_Client": "agora", - "Agora_Fountain": "agora", - "Agora_Fragment": "agora", - "Agora_Planner": "agora", - "Agora_Service_Provider": "agora", - "agoraplex.themes.sphinx": "agoraplex", - "agsci.blognewsletter": "agsci", - "agx.core": "agx", - "agx.dev": "agx", - "agx.generator.buildout": "agx", - "agx.generator.dexterity": "agx", - "agx.generator.generator": "agx", - "agx.generator.plone": "agx", - "agx.generator.pyegg": "agx", - "agx.generator.sql": "agx", - "agx.generator.uml": "agx", - "agx.generator.zca": "agx", - "agx.transform.uml2fs": "agx", - "agx.transform.xmi2uml": "agx", - "aimes.bundle": "aimes", - "aimes.skeleton": "aimes", - "aio.app": "aio", - "aio.config": "aio", - "aio.core": "aio", - "aio.signals": "aio", - "aio_hs2": "aiohs2", - "aio_routes": "aioroutes", - "aio_s3": "aios3", - "airbrake_flask": "airbrake", - "airship_icloud": "airship", - "airship_steamcloud": "airship", - "edgegrid_python": "akamai", - "alation_api": "alation", - "alba_client_python": "alba_client", - "alburnum_maas_client": "alburnum", - "alchemist.audit": "alchemist", - "alchemist.security": "alchemist", - "alchemist.traversal": "alchemist", - "alchemist.ui": "alchemist", - "alchemyapi_python": "alchemyapi", - "alerta_server": "alerta", - "Alexandria_Upload_Utils": "alexandria_upload", - "alibaba_python_sdk": "alibaba", - "aliyun_python_sdk": "aliyun", - "alicloudcli": "aliyuncli", - "aliyun_python_sdk_acs": "aliyunsdkacs", - "aliyun_python_sdk_batchcompute": "aliyunsdkbatchcompute", - "aliyun_python_sdk_bsn": "aliyunsdkbsn", - "aliyun_python_sdk_bss": "aliyunsdkbss", - "aliyun_python_sdk_cdn": "aliyunsdkcdn", - "aliyun_python_sdk_cms": "aliyunsdkcms", - "aliyun_python_sdk_core": "aliyunsdkcore", - "aliyun_python_sdk_crm": "aliyunsdkcrm", - "aliyun_python_sdk_cs": "aliyunsdkcs", - "aliyun_python_sdk_drds": "aliyunsdkdrds", - "aliyun_python_sdk_ecs": "aliyunsdkecs", - "aliyun_python_sdk_ess": "aliyunsdkess", - "aliyun_python_sdk_ft": "aliyunsdkft", - "aliyun_python_sdk_mts": "aliyunsdkmts", - "aliyun_python_sdk_ocs": "aliyunsdkocs", - "aliyun_python_sdk_oms": "aliyunsdkoms", - "aliyun_python_sdk_ossadmin": "aliyunsdkossadmin", - "aliyun_python_sdk_r_kvstore": "aliyunsdkr-kvstore", - "aliyun_python_sdk_ram": "aliyunsdkram", - "aliyun_python_sdk_rds": "aliyunsdkrds", - "aliyun_python_sdk_risk": "aliyunsdkrisk", - "aliyun_python_sdk_ros": "aliyunsdkros", - "aliyun_python_sdk_slb": "aliyunsdkslb", - "aliyun_python_sdk_sts": "aliyunsdksts", - "aliyun_python_sdk_ubsms": "aliyunsdkubsms", - "aliyun_python_sdk_yundun": "aliyunsdkyundun", - "AllAttachmentsMacro": "allattachments", - "allocine_wrapper": "allocine", - "django_allowedsites": "allowedsites", - "alm.solrindex": "alm", - "aloft.py": "aloft", - "alpaca": "alpacalib", - "alphabetic_simple": "alphabetic", - "alphasms_client": "alphasms", - "altered.states": "altered", - "alterootheme.busycity": "alterootheme", - "alterootheme.intensesimplicity": "alterootheme", - "alterootheme.lazydays": "alterootheme", - "alurinium_image_processing": "alurinium", - "alx": "alxlib", - "amara3_iri": "amara3", - "amara3_xml": "amara3", - "AmazonAPIWrapper": "amazon", - "python_amazon_simple_product_api": "amazon", - "ambikesh1349_1": "ambikesh1349-1", - "AmbilightParty": "ambilight", - "amifs_core": "amifs", - "ami_organizer": "amiorganizer", - "amitu.lipy": "amitu", - "amitu_putils": "amitu", - "amitu_websocket_client": "amitu", - "amitu_zutils": "amitu", - "AMLT_learn": "amltlearn", - "amocrm_api": "amocrm", - "amqp_dispatcher": "amqpdispatcher", - "AMQP_Storm": "amqpstorm", - "analytics_python": "analytics", - "AnalyzeDirectory": "analyzedir", - "ancientsolutions_crypttools": "ancientsolutions", - "anderson.paginator": "anderson_paginator", - "android_resource_remover": "android_clean_app", - "AnelPowerControl": "anel_power_control", - "angus_sdk_python": "angus", - "Annalist": "annalist_root", - "ANNOgesic": "annogesiclib", - "ansible_role_apply": "ansible-role-apply", - "ansible_playbook_debugger": "ansibledebugger", - "ansible_docgen": "ansibledocgen", - "ansible_flow": "ansibleflow", - "ansible_inventory_grapher": "ansibleinventorygrapher", - "ansible_lint": "ansiblelint", - "ansible_roles_graph": "ansiblerolesgraph", - "ansible_tools": "ansibletools", - "anthill.exampletheme": "anthill", - "anthill.skinner": "anthill", - "anthill.tal.macrorenderer": "anthill", - "AnthraxDojoFrontend": "anthrax", - "AnthraxHTMLInput": "anthrax", - "AnthraxImage": "anthrax", - "antiweb": "antisphinx", - "antispoofing.evaluation": "antispoofing", - "antlr4_python2_runtime": "antlr4", - "antlr4_python3_runtime": "antlr4", - "antlr4_python_alt": "antlr4", - "anybox.buildbot.openerp": "anybox", - "anybox.nose.odoo": "anybox", - "anybox.paster.odoo": "anybox", - "anybox.paster.openerp": "anybox", - "anybox.recipe.sysdeps": "anybox", - "anybox.scripts.odoo": "anybox", - "google_api_python_client": "googleapiclient", - "google_apitools": "apitools", - "arpm": "apm", - "django_appdata": "app_data", - "django_appconf": "appconf", - "AppDynamicsDownloader": "appd", - "AppDynamicsREST": "appd", - "appdynamics_bindeps_linux_x64": "appdynamics_bindeps", - "appdynamics_bindeps_linux_x86": "appdynamics_bindeps", - "appdynamics_bindeps_osx_x64": "appdynamics_bindeps", - "appdynamics_proxysupport_linux_x64": "appdynamics_proxysupport", - "appdynamics_proxysupport_linux_x86": "appdynamics_proxysupport", - "appdynamics_proxysupport_osx_x64": "appdynamics_proxysupport", - "Appium_Python_Client": "appium", - "applibase": "appliapps", - "broadwick": "appserver", - "archetypes.kss": "archetypes", - "archetypes.multilingual": "archetypes", - "archetypes.schemaextender": "archetypes", - "ansible_role_manager": "arm", - "armor_api": "armor", - "armstrong.apps.related_content": "armstrong", - "armstrong.apps.series": "armstrong", - "armstrong.cli": "armstrong", - "armstrong.core.arm_access": "armstrong", - "armstrong.core.arm_layout": "armstrong", - "armstrong.core.arm_sections": "armstrong", - "armstrong.core.arm_wells": "armstrong", - "armstrong.dev": "armstrong", - "armstrong.esi": "armstrong", - "armstrong.hatband": "armstrong", - "armstrong.templates.standard": "armstrong", - "armstrong.utils.backends": "armstrong", - "armstrong.utils.celery": "armstrong", - "arstecnica.raccoon.autobahn": "arstecnica", - "arstecnica.sqlalchemy.async": "arstecnica", - "article_downloader": "article-downloader", - "artifact_cli": "artifactcli", - "arvados_python_client": "arvados", - "arvados_cwl_runner": "arvados_cwl", - "arvados_node_manager": "arvnodeman", - "AsanaToGithub": "asana_to_github", - "AsciiBinaryConverter": "asciibinary", - "AdvancedSearchDiscovery": "asd", - "askbot_tuan": "askbot", - "askbot_tuanpa": "askbot", - "asnhistory_redis": "asnhistory", - "aspen_jinja2": "aspen_jinja2_renderer", - "aspen_tornado": "aspen_tornado_engine", - "asprise_ocr_sdk_python_api": "asprise_ocr_api", - "aspy.refactor_imports": "aspy", - "aspy.yaml": "aspy", - "asterisk_ami": "asterisk", - "add_asts": "asts", - "asymmetricbase.enum": "asymmetricbase", - "asymmetricbase.fields": "asymmetricbase", - "asymmetricbase.logging": "asymmetricbase", - "asymmetricbase.utils": "asymmetricbase", - "asyncio_irc": "asyncirc", - "asyncmongoorm_je": "asyncmongoorm", - "asyncssh_unofficial": "asyncssh", - "athletelistyy": "athletelist", - "automium": "atm", - "atmosphere_python_client": "atmosphere", - "gdata": "atom", - "AtomicWrite": "atomic", - "atomisator.db": "atomisator", - "atomisator.enhancers": "atomisator", - "atomisator.feed": "atomisator", - "atomisator.indexer": "atomisator", - "atomisator.outputs": "atomisator", - "atomisator.parser": "atomisator", - "atomisator.readers": "atomisator", - "atreal.cmfeditions.unlocker": "atreal", - "atreal.filestorage.common": "atreal", - "atreal.layouts": "atreal", - "atreal.mailservices": "atreal", - "atreal.massloader": "atreal", - "atreal.monkeyplone": "atreal", - "atreal.override.albumview": "atreal", - "atreal.richfile.preview": "atreal", - "atreal.richfile.qualifier": "atreal", - "atreal.usersinout": "atreal", - "atsim.potentials": "atsim", - "attract_sdk": "attractsdk", - "audio.bitstream": "audio", - "audio.coders": "audio", - "audio.filters": "audio", - "audio.fourier": "audio", - "audio.frames": "audio", - "audio.lp": "audio", - "audio.psychoacoustics": "audio", - "audio.quantizers": "audio", - "audio.shrink": "audio", - "audio.wave": "audio", - "auf_refer": "aufrefer", - "auslfe.formonline.content": "auslfe", - "auspost_apis": "auspost", - "auth0_python": "auth0", - "AuthServerClient": "auth_server_client", - "AuthorizeSauce": "authorize", - "AuthzPolicyPlugin": "authzpolicy", - "autobahn_rce": "autobahn", - "geonode_avatar": "avatar", - "android_webview": "awebview", - "azure_common": "azure", - "azure_mgmt_common": "azure", - "azure_mgmt_compute": "azure", - "azure_mgmt_network": "azure", - "azure_mgmt_nspkg": "azure", - "azure_mgmt_resource": "azure", - "azure_mgmt_storage": "azure", - "azure_nspkg": "azure", - "azure_servicebus": "azure", - "azure_servicemanagement_legacy": "azure", - "azure_storage": "azure", - "b2g_commands": "b2gcommands", - "b2gperf_v1.3": "b2gperf", - "b2gperf_v1.4": "b2gperf", - "b2gperf_v2.0": "b2gperf", - "b2gperf_v2.1": "b2gperf", - "b2gperf_v2.2": "b2gperf", - "b2gpopulate_v1.3": "b2gpopulate", - "b2gpopulate_v1.4": "b2gpopulate", - "b2gpopulate_v2.0": "b2gpopulate", - "b2gpopulate_v2.1": "b2gpopulate", - "b2gpopulate_v2.2": "b2gpopulate", - "b3j0f.annotation": "b3j0f", - "b3j0f.aop": "b3j0f", - "b3j0f.conf": "b3j0f", - "b3j0f.sync": "b3j0f", - "b3j0f.utils": "b3j0f", - "Babel": "babel", - "BabelGladeExtractor": "babelglade", - "backplane2_pyclient": "backplane", - "backport_collections": "backport_abcoll", - "backports.functools_lru_cache": "backports", - "backports.inspect": "backports", - "backports.pbkdf2": "backports", - "backports.shutil_get_terminal_size": "backports", - "backports.socketpair": "backports", - "backports.ssl": "backports", - "backports.ssl_match_hostname": "backports", - "backports.statistics": "backports", - "badgekit_api_client": "badgekit", - "BadLinksPlugin": "badlinks", - "bael.project": "bael", - "baidupy": "baidu", - "buildtools": "balrog", - "baluhn_redux": "baluhn", - "bamboo.pantrybell": "bamboo", - "bamboo.scaffold": "bamboo", - "bamboo.setuptools_version": "bamboo", - "bamboo_data": "bamboo", - "bamboo_server": "bamboo", - "bambu_codemirror": "bambu", - "bambu_dataportability": "bambu", - "bambu_enqueue": "bambu", - "bambu_faq": "bambu", - "bambu_ffmpeg": "bambu", - "bambu_grids": "bambu", - "bambu_international": "bambu", - "bambu_jwplayer": "bambu", - "bambu_minidetect": "bambu", - "bambu_navigation": "bambu", - "bambu_notifications": "bambu", - "bambu_payments": "bambu", - "bambu_pusher": "bambu", - "bambu_saas": "bambu", - "bambu_sites": "bambu", - "Bananas": "banana", - "banana.maya": "banana", - "bangtext": "bang", - "barcode_generator": "barcode", - "bark_ssg": "bark", - "BarkingOwl": "barking_owl", - "bart_py": "bart", - "basalt_tasks": "basalt", - "base_62": "base62", - "basemap_Jim": "basemap", - "bash_toolbelt": "bash", - "Python_Bash_Utils": "bashutils", - "BasicHttp": "basic_http", - "basil_daq": "basil", - "azure_batch_apps": "batchapps", - "python_bcrypt": "bcrypt", - "Beaker": "beaker", - "beets": "beetsplug", - "begins": "begin", - "bench_it": "benchit", - "beproud.utils": "beproud", - "burrito_fillings": "bfillings", - "BigJob": "pilot", - "billboard.py": "billboard", - "anaconda_build": "binstar_build_client", - "anaconda_client": "binstar_client", - "biocommons.dev": "biocommons", - "birdhousebuilder.recipe.conda": "birdhousebuilder", - "birdhousebuilder.recipe.docker": "birdhousebuilder", - "birdhousebuilder.recipe.redis": "birdhousebuilder", - "birdhousebuilder.recipe.supervisor": "birdhousebuilder", - "pymeshio": "blender26-meshio", - "borg.localrole": "borg", - "bagofwords": "bow", - "bpython": "bpdb", - "bisque_api": "bqapi", - "django_braces": "braces", - "briefs_caster": "briefscaster", - "brisa_media_server_plugins": "brisa_media_server/plugins", - "brkt_sdk": "brkt_requests", - "broadcast_logging": "broadcastlogging", - "brocade_tool": "brocadetool", - "bronto_python": "bronto", - "Brownie": "brownie", - "browsermob_proxy": "browsermobproxy", - "brubeck_mysql": "brubeckmysql", - "brubeck_oauth": "brubeckoauth", - "brubeck_service": "brubeckservice", - "brubeck_uploader": "brubeckuploader", - "beautifulsoup4": "bs4", - "pymongo": "gridfs", - "bst.pygasus.core": "bst", - "bst.pygasus.datamanager": "bst", - "bst.pygasus.demo": "bst", - "bst.pygasus.i18n": "bst", - "bst.pygasus.resources": "bst", - "bst.pygasus.scaffolding": "bst", - "bst.pygasus.security": "bst", - "bst.pygasus.session": "bst", - "bst.pygasus.wsgi": "bst", - "btable_py": "btable", - "bananatag_api": "btapi", - "btce_api": "btceapi", - "btce_bot": "btcebot", - "btsync.py": "btsync", - "buck.pprint": "buck", - "bud.nospam": "bud", - "budy_api": "budy", - "buffer_alpaca": "buffer", - "bug.gd": "buggd", - "bugle_sites": "bugle", - "bug_spots": "bugspots", - "python_bugzilla": "bugzilla", - "bugzscout_py": "bugzscout", - "ajk_ios_buildTools": "buildTools", - "BuildNotify": "buildnotifylib", - "buildout.bootstrap": "buildout", - "buildout.disablessl": "buildout", - "buildout.dumppickedversions": "buildout", - "buildout.dumppickedversions2": "buildout", - "buildout.dumprequirements": "buildout", - "buildout.eggnest": "buildout", - "buildout.eggscleaner": "buildout", - "buildout.eggsdirectories": "buildout", - "buildout.eggtractor": "buildout", - "buildout.extensionscripts": "buildout", - "buildout.locallib": "buildout", - "buildout.packagename": "buildout", - "buildout.recipe.isolation": "buildout", - "buildout.removeaddledeggs": "buildout", - "buildout.requirements": "buildout", - "buildout.sanitycheck": "buildout", - "buildout.sendpickedversions": "buildout", - "buildout.threatlevel": "buildout", - "buildout.umask": "buildout", - "buildout.variables": "buildout", - "buildbot_slave": "buildslave", - "pies2overrides": "xmlrpc", - "bumper_lib": "bumper", - "bumple_downloader": "bumple", - "bundesliga_cli": "bundesliga", - "bundlemanager": "bundlemaker", - "burp_ui": "burpui", - "busyflow.pivotal": "busyflow", - "buttercms_django": "buttercms-django", - "buzz_python_client": "buzz", - "buildout_versions_checker": "bvc", - "bvg_grabber": "bvggrabber", - "BYONDTools": "byond", - "Bugzilla_ETL": "bzETL", - "bugzillatools": "bzlib", - "bzr": "bzrlib", - "bzr_automirror": "bzrlib", - "bzr_bash_completion": "bzrlib", - "bzr_colo": "bzrlib", - "bzr_killtrailing": "bzrlib", - "bzr_pqm": "bzrlib", - "c2c.cssmin": "c2c", - "c2c.recipe.closurecompile": "c2c", - "c2c.recipe.cssmin": "c2c", - "c2c.recipe.jarfile": "c2c", - "c2c.recipe.msgfmt": "c2c", - "c2c.recipe.pkgversions": "c2c", - "c2c.sqlalchemy.rest": "c2c", - "c2c.versions": "c2c", - "c2c.recipe.facts": "c2c_recipe_facts", - "cabalgata_silla_de_montar": "cabalgata", - "cabalgata_zookeeper": "cabalgata", - "django_cache_utils": "cache_utils", - "django_recaptcha": "captcha", - "Cartridge": "cartridge", - "cassandra_driver": "cassandra", - "CassandraLauncher": "cassandralauncher", - "42qucc": "cc42", - "Cerberus": "cerberus", - "cfn-lint": "cfnlint", - "Chameleon": "chameleon", - "charm_tools": "charmtools", - "PyChef": "chef", - "c8d": "chip8", - "python_cjson": "cjson", - "django_classy_tags": "classytags", - "ConcurrentLogHandler": "cloghandler", - "virtualenv_clone": "clonevirtualenv", - "al_cloudinsight": "cloud-insight", - "adminapi": "cloud_admin", - "python_cloudservers": "cloudservers", - "cerebrod": "tasksitter", - "django_cms": "cms", - "ba_colander": "colander", - "ansicolors": "colors", - "bf_lc3": "compile", - "docker_compose": "compose", - "django_compressor": "compressor", - "futures": "concurrent", - "ConfigArgParse": "configargparse", - "PyContracts": "contracts", - "weblogo": "weblogolib", - "Couchapp": "couchapp", - "CouchDB": "couchdb", - "couchdb_python_curl": "couchdbcurl", - "coursera_dl": "courseradownloader", - "cow_framework": "cow", - "python_creole": "creole", - "Creoleparser": "creoleparser", - "django_crispy_forms": "crispy_forms", - "python_crontab": "crontab", - "tff": "ctff", - "pycups": "cups", - "elasticsearch_curator": "curator", - "pycurl": "curl", - "python_daemon": "daemon", - "DARE": "dare", - "python_dateutil": "dateutil", - "DAWG": "dawg", - "python_debian": "debian", - "python-decouple": "decouple", - "webunit": "demo", - "PySynth": "pysynth_samp", - "juju_deployer": "deployer", - "filedepot": "depot", - "tg.devtools": "devtools", - "2gis": "dgis", - "pyDHTMLParser": "dhtmlparser", - "python_digitalocean": "digitalocean", - "discord.py": "discord", - "ez_setup": "distribute_setup", - "Distutils2": "distutils2", - "Django": "django", - "amitu_hstore": "django_hstore", - "django_bower": "djangobower", - "django_celery": "djcelery", - "django_kombu": "djkombu", - "djorm_ext_pgarray": "djorm_pgarray", - "dnspython": "dns", - "ansible_docgenerator": "docgen", - "docker_py": "docker", - "dogpile.cache": "dogpile", - "dogpile.core": "dogpile", - "dogapi": "dogshell", - "pydot": "dot_parser", - "pydot2": "dot_parser", - "pydot3k": "dot_parser", - "python-dotenv": "dotenv", - "dpkt_fix": "dpkt", - "python_ldap": "ldif", - "django_durationfield": "durationfield", - "datazilla": "dzclient", - "easybuild_framework": "easybuild", - "python_editor": "editor", - "azure_elasticluster": "elasticluster", - "azure_elasticluster_current": "elasticluster", - "pyelftools": "elftools", - "Elixir": "elixir", - "empy": "emlib", - "pyenchant": "enchant", - "cssutils": "encutils", - "python_engineio": "engineio", - "enum34": "enum", - "pyephem": "ephem", - "abl.errorreporter": "errorreporter", - "beaker_es_plot": "esplot", - "adrest": "example", - "tweepy": "examples", - "pycassa": "ez_setup", - "Fabric": "fabric", - "Faker": "faker", - "python_fedora": "fedora", - "ailove_django_fias": "fias", - "51degrees_mobile_detector": "fiftyone_degrees", - "five.customerize": "five", - "five.globalrequest": "five", - "five.intid": "five", - "five.localsitemanager": "five", - "five.pt": "five", - "android_flasher": "flasher", - "Flask": "flask", - "Frozen_Flask": "flask_frozen", - "Flask_And_Redis": "flask_redis", - "Flask_Bcrypt": "flaskext", - "vnc2flv": "flvscreen", - "django_followit": "followit", - "pyforge": "forge", - "FormEncode": "formencode", - "django_formtools": "formtools", - "4ch": "fourch", - "allegrordf": "franz", - "freetype_py": "freetype", - "python_frontmatter": "frontmatter", - "ftp_cloudfs": "ftpcloudfs", - "librabbitmq": "funtests", - "fusepy": "fuse", - "Fuzzy": "fuzzy", - "tiddlyweb": "gabbi", - "3d_wallet_generator": "gen_3dwallet", - "android_gendimen": "gendimen", - "Genshi": "genshi", - "python_geohash": "quadtree", - "GeoNode": "geonode", - "gsconfig": "geoserver", - "Geraldo": "geraldo", - "django_getenv": "getenv", - "gevent_websocket": "geventwebsocket", - "python_gflags": "gflags", - "GitPython": "git", - "PyGithub": "github", - "github3.py": "github3", - "git_py": "gitpy", - "globusonline_transfer_api_client": "globusonline", - "protobuf": "google", - "grace_dizmo": "grace-dizmo", - "anovelmous_grammar": "grammar", - "graphenelib": "grapheneapi", - "scales": "greplin", - "grokcore.component": "grokcore", - "gsutil": "gslib", - "PyHamcrest": "hamcrest", - "HARPy": "harpy", - "PyHawk_with_a_single_extra_commit": "hawk", - "django_haystack": "haystack", - "mercurial": "hgext", - "hg_git": "hggit", - "python_hglib": "hglib", - "pisa": "sx", - "amarokHola": "hola", - "Hoover": "hoover", - "python_hostlist": "hostlist", - "nosehtmloutput": "htmloutput", - "django_hvad": "hvad", - "hydra-core": "hydra", - "199Fix": "i99fix", - "python_igraph": "igraph", - "IMDbPY": "imdb", - "impyla": "impala", - "ambition_inmemorystorage": "inmemorystorage", - "backport_ipaddress": "ipaddress", - "jaraco.timing": "jaraco", - "jaraco.util": "jaraco", - "Jinja2": "jinja2", - "jira_cli": "jiracli", - "johnny_cache": "johnny", - "JPype1": "jpypex", - "django_jsonfield": "jsonfield", - "aino_jstools": "jstools", - "jupyter_pip": "jupyterpip", - "PyJWT": "jwt", - "asana_kazoo": "kazoo", - "line_profiler": "kernprof", - "python_keyczar": "keyczar", - "django_keyedcache": "keyedcache", - "python_keystoneclient": "keystoneclient", - "kickstart": "kickstarter", - "krbV": "krbv", - "kss.core": "kss", - "Kuyruk": "kuyruk", - "AdvancedLangConv": "langconv", - "lava_utils_interface": "lava", - "lazr.authentication": "lazr", - "lazr.restfulclient": "lazr", - "lazr.uri": "lazr", - "adpasswd": "ldaplib", - "2or3": "lib2or3", - "3to2": "lib3to2", - "Aito": "libaito", - "bugs_everywhere": "libbe", - "bucket": "libbucket", - "apache_libcloud": "libcloud", - "future": "winreg", - "generateDS": "libgenerateDS", - "mitmproxy": "libmproxy", - "7lk_ocr_deploy": "libsvm", - "lisa_server": "lisa", - "aspose_words_java_for_python": "loadingandsaving", - "locustio": "locust", - "Logbook": "logbook", - "buildbot_status_logentries": "logentries", - "logilab_mtconverter": "logilab", - "python_magic": "magic", - "Mako": "mako", - "ManifestDestiny": "manifestparser", - "marionette_client": "marionette", - "Markdown": "markdown", - "pytest_marks": "marks", - "MarkupSafe": "markupsafe", - "pymavlink": "mavnative", - "python_memcached": "memcache", - "AllPairs": "metacomm", - "Metafone": "metaphone", - "metlog_py": "metlog", - "Mezzanine": "mezzanine", - "sqlalchemy_migrate": "migrate", - "python_mimeparse": "mimeparse", - "minitage.paste": "minitage", - "minitage.recipe.common": "minitage", - "android_missingdrawables": "missingdrawables", - "2lazy2rest": "mkrst_themes", - "mockredispy": "mockredis", - "python_modargs": "modargs", - "django_model_utils": "model_utils", - "asposebarcode": "models", - "asposestorage": "models", - "moksha.common": "moksha", - "moksha.hub": "moksha", - "moksha.wsgi": "moksha", - "py_moneyed": "moneyed", - "MongoAlchemy": "mongoalchemy", - "MonthDelta": "monthdelta", - "Mopidy": "mopidy", - "MoPyTools": "mopytools", - "django_mptt": "mptt", - "python-mpv": "mpv", - "mr.bob": "mrbob", - "msgpack_python": "msgpack", - "aino_mutations": "mutations", - "amazon_mws": "mws", - "mysql_connector_repackaged": "mysql", - "django_native_tags": "native_tags", - "ndg_httpsclient": "ndg", - "trytond_nereid": "nereid", - "baojinhuan": "nested", - "Amauri": "nester", - "abofly": "nester", - "bssm_pythonSig": "nester", - "python_novaclient": "novaclient", - "alauda_django_oauth": "oauth2_provider", - "oauth2client": "oauth2client", - "odfpy": "odf", - "Parsley": "ometa", - "python_openid": "openid", - "ali_opensearch": "opensearchsdk", - "oslo.i18n": "oslo_i18n", - "oslo.serialization": "oslo_serialization", - "oslo.utils": "oslo_utils", - "alioss": "oss", - "aliyun_python_sdk_oss": "oss", - "aliyunoss": "oss", - "cashew": "output", - "OWSLib": "owslib", - "nwdiag": "rackdiag", - "paho_mqtt": "paho", - "django_paintstore": "paintstore", - "django_parler": "parler", - "PasteScript": "paste", - "forked_path": "path", - "path.py": "path", - "patricia-trie": "patricia", - "Paver": "paver", - "ProxyTypes": "peak", - "anderson.picasso": "picasso", - "django-picklefield": "picklefield", - "pivotal_py": "pivotal", - "peewee": "pwiz", - "plivo": "plivoxml", - "plone.alterego": "plone", - "plone.api": "plone", - "plone.app.blob": "plone", - "plone.app.collection": "plone", - "plone.app.content": "plone", - "plone.app.contentlisting": "plone", - "plone.app.contentmenu": "plone", - "plone.app.contentrules": "plone", - "plone.app.contenttypes": "plone", - "plone.app.controlpanel": "plone", - "plone.app.customerize": "plone", - "plone.app.dexterity": "plone", - "plone.app.discussion": "plone", - "plone.app.event": "plone", - "plone.app.folder": "plone", - "plone.app.i18n": "plone", - "plone.app.imaging": "plone", - "plone.app.intid": "plone", - "plone.app.layout": "plone", - "plone.app.linkintegrity": "plone", - "plone.app.locales": "plone", - "plone.app.lockingbehavior": "plone", - "plone.app.multilingual": "plone", - "plone.app.portlets": "plone", - "plone.app.querystring": "plone", - "plone.app.redirector": "plone", - "plone.app.registry": "plone", - "plone.app.relationfield": "plone", - "plone.app.textfield": "plone", - "plone.app.theming": "plone", - "plone.app.users": "plone", - "plone.app.uuid": "plone", - "plone.app.versioningbehavior": "plone", - "plone.app.viewletmanager": "plone", - "plone.app.vocabularies": "plone", - "plone.app.widgets": "plone", - "plone.app.workflow": "plone", - "plone.app.z3cform": "plone", - "plone.autoform": "plone", - "plone.batching": "plone", - "plone.behavior": "plone", - "plone.browserlayer": "plone", - "plone.caching": "plone", - "plone.contentrules": "plone", - "plone.dexterity": "plone", - "plone.event": "plone", - "plone.folder": "plone", - "plone.formwidget.namedfile": "plone", - "plone.formwidget.recurrence": "plone", - "plone.i18n": "plone", - "plone.indexer": "plone", - "plone.intelligenttext": "plone", - "plone.keyring": "plone", - "plone.locking": "plone", - "plone.memoize": "plone", - "plone.namedfile": "plone", - "plone.outputfilters": "plone", - "plone.portlet.collection": "plone", - "plone.portlet.static": "plone", - "plone.portlets": "plone", - "plone.protect": "plone", - "plone.recipe.zope2install": "plone", - "plone.registry": "plone", - "plone.resource": "plone", - "plone.resourceeditor": "plone", - "plone.rfc822": "plone", - "plone.scale": "plone", - "plone.schema": "plone", - "plone.schemaeditor": "plone", - "plone.session": "plone", - "plone.stringinterp": "plone", - "plone.subrequest": "plone", - "plone.supermodel": "plone", - "plone.synchronize": "plone", - "plone.theme": "plone", - "plone.transformchain": "plone", - "plone.uuid": "plone", - "plone.z3cform": "plone", - "plonetheme.barceloneta": "plonetheme", - "pypng": "png", - "django_polymorphic": "polymorphic", - "python_postmark": "postmark", - "bash_powerprompt": "powerprompt", - "django-prefetch": "prefetch", - "AndrewList": "printList", - "progressbar2": "progressbar", - "progressbar33": "progressbar", - "django_oauth2_provider": "provider", - "pure_sasl": "puresasl", - "pylzma": "py7zlib", - "pyAMI_core": "pyAMI", - "arsespyder": "pyarsespyder", - "asdf": "pyasdf", - "aspell_python_ctypes": "pyaspell", - "pybbm": "pybb", - "pybloomfiltermmap": "pybloomfilter", - "Pyccuracy": "pyccuracy", - "PyCK": "pyck", - "python_crfsuite": "pycrfsuite", - "PyDispatcher": "pydispatch", - "pygeocoder": "pygeolib", - "Pygments": "pygments", - "python_graph_core": "pygraph", - "pyjon.utils": "pyjon", - "python_jsonrpc": "pyjsonrpc", - "Pykka": "pykka", - "PyLogo": "pylogo", - "adhocracy_Pylons": "pylons", - "libmagic": "pymagic", - "Amalwebcrawler": "pymycraawler", - "AbakaffeNotifier": "pynma", - "Pyphen": "pyphen", - "AEI": "pyrimaa", - "adhocracy_pysqlite": "pysqlite2", - "pysqlite": "pysqlite2", - "python_gettext": "pythongettext", - "python_json_logger": "pythonjsonlogger", - "PyUtilib": "pyutilib", - "Cython": "pyximport", - "qserve": "qs", - "django_quickapi": "quickapi", - "nose_quickunit": "quickunit", - "radical.pilot": "radical", - "radical.utils": "radical", - "readability_lxml": "readability", - "gnureadline": "readline", - "django_recaptcha_works": "recaptcha_works", - "RelStorage": "relstorage", - "django_reportapi": "reportapi", - "Requests": "requests", - "requirements_parser": "requirements", - "djangorestframework": "rest_framework", - "py_restclient": "restclient", - "async_retrial": "retrial", - "django_reversion": "reversion", - "rhaptos2.common": "rhaptos2", - "robotframework": "robot", - "django_robots": "robots", - "rosdep": "rosdep2", - "RSFile": "rsbackends", - "ruamel.base": "ruamel", - "pysaml2": "xmlenc", - "saga_python": "saga", - "aws-sam-translator": "samtranslator", - "libsass": "sassutils", - "alex_sayhi": "sayhi", - "scalr": "scalrtools", - "scikits.talkbox": "scikits", - "scratchpy": "scratch", - "pyScss": "scss", - "dict.sorted": "sdict", - "android_sdk_updater": "sdk_updater", - "django_sekizai": "sekizai", - "pysendfile": "sendfile", - "pyserial": "serial", - "astor": "setuputils", - "pyshp": "shapefile", - "Shapely": "shapely", - "ahonya_sika": "sika", - "pysingleton": "singleton", - "scikit_bio": "skbio", - "scikit_learn": "sklearn", - "slackclient": "slack", - "unicode_slugify": "slugify", - "smk_python_sdk": "smarkets", - "ctypes_snappy": "snappy", - "gevent_socketio": "socketio", - "sockjs_tornado": "sockjs", - "SocksiPy_branch": "socks", - "solrpy": "solr", - "Solution": "solution", - "sorl_thumbnail": "sorl", - "South": "south", - "Sphinx": "sphinx", - "ATD_document": "sphinx_pypi_upload", - "sphinxcontrib_programoutput": "sphinxcontrib", - "SQLAlchemy": "sqlalchemy", - "atlas": "src", - "auto_mix_prep": "src", - "bw_stats_toolkit": "stats_toolkit", - "dogstatsd_python": "statsd", - "python_stdnum": "stdnum", - "StoneageHTML": "stoneagehtml", - "django_storages": "storages", - "mox": "stubout", - "suds_jurko": "suds", - "python_swiftclient": "swiftclient", - "pytabix": "test", - "django_taggit": "taggit", - "django_tastypie": "tastypie", - "teamcity_messages": "teamcity", - "pyTelegramBotAPI": "telebot", - "Tempita": "tempita", - "Tenjin": "tenjin", - "python_termstyle": "termstyle", - "treeherder_client": "thclient", - "django_threaded_multihost": "threaded_multihost", - "3color_Press": "threecolor", - "pytidylib": "tidylib", - "3lwg": "tlw", - "toredis_fork": "toredis", - "tornado_redis": "tornadoredis", - "ansible_tower_cli": "tower_cli", - "Trac": "tracopt", - "android_localization_helper": "translation_helper", - "django_treebeard": "treebeard", - "trytond_stock": "trytond", - "tsuru_circus": "tsuru", - "python_tvrage": "tvrage", - "tw2.core": "tw2", - "tw2.d3": "tw2", - "tw2.dynforms": "tw2", - "tw2.excanvas": "tw2", - "tw2.forms": "tw2", - "tw2.jit": "tw2", - "tw2.jqplugins.flot": "tw2", - "tw2.jqplugins.gritter": "tw2", - "tw2.jqplugins.ui": "tw2", - "tw2.jquery": "tw2", - "tw2.sqla": "tw2", - "Twisted": "twisted", - "python_twitter": "twitter", - "transifex_client": "txclib", - "115wangpan": "u115", - "Unidecode": "unidecode", - "ansible_universe": "universe", - "pyusb": "usb", - "useless.pipes": "useless", - "auth_userpass": "userpass", - "automakesetup.py": "utilities", - "aino_utkik": "utkik", - "uWSGI": "uwsgidecorators", - "ab": "valentine", - "configobj": "validate", - "chartio": "version", - "ar_virtualenv_api": "virtualenvapi", - "brocade_plugins": "vyatta", - "WebOb": "webob", - "websocket_client": "websocket", - "WebTest": "webtest", - "Werkzeug": "werkzeug", - "wheezy.caching": "wheezy", - "wheezy.core": "wheezy", - "wheezy.http": "wheezy", - "tiddlywebwiki": "wikklytext", - "pywinrm": "winrm", - "Alfred_Workflow": "workflow", - "WSME": "wsmeext", - "WTForms": "wtforms", - "wtf_peewee": "wtfpeewee", - "pyxdg": "xdg", - "pytest_xdist": "xdist", - "xmpppy": "xmpp", - "XStatic_Font_Awesome": "xstatic", - "XStatic_jQuery": "xstatic", - "XStatic_jquery_ui": "xstatic", - "PyYAML": "yaml", - "z3c.autoinclude": "z3c", - "z3c.caching": "z3c", - "z3c.form": "z3c", - "z3c.formwidget.query": "z3c", - "z3c.objpath": "z3c", - "z3c.pt": "z3c", - "z3c.relationfield": "z3c", - "z3c.traverser": "z3c", - "z3c.zcmlhook": "z3c", - "pyzmq": "zmq", - "zopyx.textindexng3": "zopyx" -} diff --git a/docs-v2/next-sitemap.config.js b/docs-v2/next-sitemap.config.js deleted file mode 100644 index af36b94bdc385..0000000000000 --- a/docs-v2/next-sitemap.config.js +++ /dev/null @@ -1,33 +0,0 @@ -/** @type {import('next-sitemap').IConfig} */ -module.exports = { - siteUrl: "https://pipedream.com/docs", - generateRobotsTxt: true, - outDir: "public", - changefreq: "daily", - priority: 0.7, - generateIndexSitemap: false, - exclude: [ - "/hidden/*", - "/deprecated/*", - ], - transform: async (config, path) => { - // Add any custom transformations for URL paths here if needed in the future - return { - loc: path, - changefreq: config.changefreq, - priority: config.priority, - lastmod: config.autoLastmod - ? new Date().toISOString() - : undefined, - alternateRefs: config.alternateRefs ?? [], - }; - }, - robotsTxtOptions: { - policies: [ - { - userAgent: "*", - allow: "/", - }, - ], - }, -}; diff --git a/docs-v2/next.config.mjs b/docs-v2/next.config.mjs deleted file mode 100644 index 7f792c7ea65dc..0000000000000 --- a/docs-v2/next.config.mjs +++ /dev/null @@ -1,661 +0,0 @@ -import nextra from "nextra"; - -const withNextra = nextra({ - theme: "nextra-theme-docs", - themeConfig: "./theme.config.tsx", - defaultShowCopyCode: true, -}); - -export default withNextra({ - basePath: "/docs", - trailingSlash: true, - images: { - remotePatterns: [ - { - protocol: "https", - hostname: "res.cloudinary.com", - }, - ], - }, - // Add custom headers for better cross-origin support - async headers() { - return [ - { - // Apply to all routes serving the Connect demo pages - source: "/connect/:path*", - headers: [ - { - key: "Cross-Origin-Opener-Policy", - value: "same-origin-allow-popups", - }, - ], - }, - ]; - }, - async redirects() { - return [ - { - source: "/apps/apps/", - destination: "/apps/", - permanent: true, - }, - { - source: "/v3/", - destination: "/", - permanent: true, - }, - { - source: "/v3/:path*/", - destination: "/:path*/", - permanent: true, - }, - { - source: "/what-is-pipedream/", - destination: "/", - permanent: true, - }, - { - source: "/integrations/", - destination: "/integrations/apps/", - permanent: true, - }, - { - source: "/apps/guide/requesting-additional-oauth-scopes/", - destination: "/integrations/oauth-clients/", - permanent: true, - }, - { - source: "/apps/contributing/", - destination: "/workflows/contributing/", - permanent: true, - }, - { - source: "/apps/all-apps/", - destination: "https://pipedream.com/apps/", - permanent: true, - }, - { - source: "/apps/connected-accounts/external-auth/", - destination: "/connect/", - permanent: true, - }, - - { - source: "/support/", - destination: "https://pipedream.com/support/", - permanent: true, - }, - { - source: "/security/", - destination: "/privacy-and-security/", - permanent: true, - }, - { - source: "/user-settings/", - destination: "/account/user-settings/", - permanent: true, - }, - { - source: "/quickstart/run-workflow-on-a-schedule/", - destination: "/workflows/quickstart/", - permanent: true, - }, - { - source: "/quickstart/", - destination: "/workflows/quickstart/", - permanent: true, - }, - { - source: "/quickstart/github-sync/", - destination: "/workflows/git/", - permanent: true, - }, - { - source: "/cron/", - destination: "/workflows/building-workflows/triggers/", - permanent: true, - }, - { - source: "/notebook/", - destination: "/workflows/", - permanent: true, - }, - { - source: "/notebook/actions/", - destination: "/workflows/building-workflows/actions/", - permanent: true, - }, - { - source: "/notebook/fork/", - destination: "/workflows/building-workflows/sharing/", - permanent: true, - }, - { - source: "/notebook/inspector/", - destination: "/workflows/building-workflows/inspect/", - permanent: true, - }, - { - source: "/notebook/destinations/snowflake/", - destination: "/workflows/data-management/databases/", - permanent: true, - }, - { - source: "/notebook/destinations/:path*/", - destination: "/workflows/data-management/destinations/:path*/", - permanent: true, - }, - { - source: "/notebook/destinations/", - destination: "/workflows/data-management/destinations/", - permanent: true, - }, - { - source: "/notebook/code/", - destination: "/workflows/building-workflows/code/", - permanent: true, - }, - { - source: "/notebook/observability/", - destination: "/workflows/building-workflows/inspect/", - permanent: true, - }, - { - source: "/notebook/sources/", - destination: "/workflows/building-workflows/triggers/", - permanent: true, - }, - { - source: "/notebook/sql/", - destination: "/workflows/data-management/databases/working-with-sql/", - permanent: true, - }, - { - source: "/sources/", - destination: "/workflows/building-workflows/triggers/", - permanent: true, - }, - { - source: "/destinations/", - destination: "/workflows/data-management/destinations/", - permanent: true, - }, - { - source: "/destinations/:path*/", - destination: "/workflows/data-management/destinations/:path*/", - permanent: true, - }, - { - source: "/projects/git/", - destination: "/workflows/git/", - permanent: true, - }, - { - source: "/projects/file-stores/", - destination: "/workflows/data-management/file-stores/", - permanent: true, - }, - { - source: "/projects/file-stores/:path*/", - destination: "/workflows/data-management/file-stores/:path*/", - permanent: true, - }, - { - source: "/event-history/", - destination: "/workflows/event-history/", - permanent: true, - }, - { - source: "/workflows/building-workflows/", - destination: "/workflows/", - permanent: true, - }, - { - source: "/workflows/concurrency-and-throttling/", - destination: - "/workflows/building-workflows/settings/concurrency-and-throttling/", - permanent: true, - }, - { - source: "/workflows/steps/", - destination: "/workflows/#steps", - permanent: true, - }, - { - source: "/workflows/fork/", - destination: "/workflows/building-workflows/sharing/", - permanent: true, - }, - { - source: "/workflows/steps/code/async/", - destination: "/workflows/building-workflows/code/nodejs/async/", - permanent: true, - }, - { - source: "/workflows/steps/code/state/", - destination: "/workflows/#step-exports", - permanent: true, - }, - { - source: "/workflows/steps/params/", - destination: "/workflows/building-workflows/using-props/", - permanent: true, - }, - { - source: "/workflows/events/cold-starts/", - destination: - "/workflows/building-workflows/settings/#eliminate-cold-starts", - permanent: true, - }, - { - source: "/workflows/examples/waiting-to-execute-next-step-of-workflow/", - destination: "/workflows/building-workflows/code/nodejs/delay/", - permanent: true, - }, - { - source: "/workflows/networking/", - destination: "/workflows/vpc/", - permanent: true, - }, - { - source: "/workflows/built-in-functions/", - destination: "/workflows/building-workflows/actions/", - permanent: true, - }, - { - source: "/workflows/events/inspect/", - destination: "/workflows/building-workflows/inspect/", - permanent: true, - }, - { - source: "/workflows/triggers/", - destination: "/workflows/building-workflows/triggers/", - permanent: true, - }, - { - source: "/workflows/steps/triggers/", - destination: "/workflows/building-workflows/triggers/", - permanent: true, - }, - { - source: "/workflows/actions/", - destination: "/workflows/building-workflows/actions/", - permanent: true, - }, - { - source: "/workflows/steps/actions/", - destination: "/workflows/building-workflows/actions/", - permanent: true, - }, - { - source: "/workflows/flow-control/", - destination: "/workflows/building-workflows/control-flow/", - permanent: true, - }, - { - source: "/workflows/control-flow/", - destination: "/workflows/building-workflows/control-flow/", - permanent: true, - }, - { - source: "/workflows/sharing/", - destination: "/workflows/building-workflows/sharing/", - permanent: true, - }, - { - source: "/workflows/settings/", - destination: "/workflows/building-workflows/settings/", - permanent: true, - }, - { - source: "/code/", - destination: "/workflows/building-workflows/code/", - permanent: true, - }, - { - source: "/code/:path*/", - destination: "/workflows/building-workflows/code/:path*/", - permanent: true, - }, - { - source: "/http/", - destination: "/workflows/building-workflows/http/", - permanent: true, - }, - { - source: "/environment-variables/", - destination: "/workflows/environment-variables/", - permanent: true, - }, - { - source: "/components/quickstart/nodejs/actions/", - destination: "/workflows/contributing/components/actions-quickstart/", - permanent: true, - }, - { - source: "/components/", - destination: "/components/contributing/", - permanent: true, - }, - { - source: "/components/api/", - destination: "/components/contributing/api/", - permanent: true, - }, - { - source: "/components/quickstart/:path*/", - destination: "/components/contributing/:path*/", - permanent: true, - }, - { - source: "/components/guidelines/", - destination: "/components/contributing/guidelines/", - permanent: true, - }, - { - source: "/components/actions-quickstart/", - destination: "/components/contributing/actions-quickstart/", - permanent: true, - }, - { - source: "/components/sources-quickstart/", - destination: "/components/contributing/sources-quickstart/", - permanent: true, - }, - { - source: "/components/typescript/", - destination: "/components/contributing/typescript/", - permanent: true, - }, - { - source: "/github-sync/", - destination: "/workflows/git/", - permanent: true, - }, - { - source: "/components/typescript/", - destination: "/components/contributing/typescript/", - permanent: true, - }, - { - source: "/github-sync/", - destination: "/workflows/git/", - permanent: true, - }, - { - source: "/workspaces/okta/", - destination: "/workflows/workspaces/sso/okta/", - permanent: true, - }, - { - source: "/workspaces/google/", - destination: "/workflows/workspaces/sso/google/", - permanent: true, - }, - { - source: "/workspaces/saml/", - destination: "/workflows/workspaces/sso/saml/", - permanent: true, - }, - { - source: "/workspaces-and-credits-faq/", - destination: "/pricing/faq/", - permanent: true, - }, - { - source: "/connected-accounts/api/", - destination: "/connect/api/#accounts/", - permanent: true, - }, - { - source: "/connected-accounts/", - destination: "/integrations/connected-accounts/", - permanent: true, - }, - { - source: "/connected-accounts/:path*/", - destination: "/integrations/connected-accounts/:path*/", - permanent: true, - }, - { - source: "/api/", - destination: "/rest-api/", - permanent: true, - }, - { - source: "/api/:path*/", - destination: "/rest-api/:path*/", - permanent: true, - }, - { - source: "/data-stores/", - destination: "/workflows/data-management/data-stores/", - permanent: true, - }, - { - source: "/databases/", - destination: "/workflows/data-management/databases/", - permanent: true, - }, - { - source: "/databases/:path*/", - destination: "/workflows/data-management/databases/:path*/", - permanent: true, - }, - { - source: "/cli/", - destination: "/components/contributing/cli/reference/", - permanent: true, - }, - { - source: "/cli/reference/", - destination: "/components/contributing/cli/reference/", - permanent: true, - }, - { - source: "/cli/login/", - destination: "/components/contributing/cli/login/", - permanent: true, - }, - { - source: "/cli/install/", - destination: "/components/contributing/cli/install/", - permanent: true, - }, - { - source: "/cli/:path*", - destination: "/components/contributing/cli/:path*", - permanent: true, - }, - { - source: "/workflows/cli/", - destination: "/components/contributing/cli/reference/", - permanent: true, - }, - { - source: "/workflows/cli/:path*", - destination: "/components/contributing/cli/:path*", - permanent: true, - }, - { - source: "/limits/", - destination: "/workflows/limits/", - permanent: true, - }, - { - source: "/connect/connect-link/", - destination: "/connect/managed-auth/connect-link/", - permanent: true, - }, - { - source: "/connect/customize-your-app/", - destination: "/connect/managed-auth/customization/", - permanent: true, - }, - { - source: "/connect/oauth-clients/", - destination: "/connect/managed-auth/oauth-clients/", - permanent: true, - }, - { - source: "/connect/quickstart/", - destination: "/connect/managed-auth/quickstart/", - permanent: true, - }, - { - source: "/connect/tokens/", - destination: "/connect/managed-auth/tokens/", - permanent: true, - }, - { - source: "/connect/webhooks/", - destination: "/connect/managed-auth/webhooks/", - permanent: true, - }, - { - source: "/connect/environments/", - destination: "/connect/managed-auth/environments/", - permanent: true, - }, - { - source: "/integrations/connected-accounts/oauth-clients/", - destination: "/integrations/oauth-clients/", - permanent: true, - }, - { - source: "/integrations/", - destination: "/apps/", - permanent: true, - }, - { - source: "/integrations/:path*/", - destination: "/apps/:path*/", - permanent: true, - }, - { - source: "/workflows/contributing/components/:path*/", - destination: "/components/contributing/:path*/", - permanent: true, - }, - { - source: "/workflows/contributing/components/", - destination: "/components/contributing/", - permanent: true, - }, - { - source: "/workflows/contributing/", - destination: "/components/contributing/", - permanent: true, - }, - { - source: "/workflows/projects/", - destination: "/projects/", - permanent: true, - }, - { - source: "/workflows/projects/:path*/", - destination: "/projects/:path*/", - permanent: true, - }, - { - source: "/workflows/workspaces/:path*/", - destination: "/workspaces/:path*/", - permanent: true, - }, - { - source: "/workflows/workspaces/", - destination: "/workspaces/", - permanent: true, - }, - ]; - }, - async rewrites() { - return [ - { - source: "/shopify-faq-2023-10", - destination: "/deprecated/shopify-faq-2023-10", - }, - { - source: "/abuse", - destination: "/hidden/abuse", - }, - { - source: "/scheduling-future-tasks", - destination: "/hidden/scheduling-future-tasks", - }, - { - source: "/status", - destination: "/hidden/status", - }, - { - source: "/subprocessors", - destination: "/hidden/subprocessors", - }, - { - source: "/api-demo-connect/token", - destination: "/api/demo-connect/token", - }, - { - source: "/api-demo-connect/token/", - destination: "/api/demo-connect/token", - }, - { - source: "/api-demo-connect/accounts/:id", - destination: "/api/demo-connect/accounts/:id", - }, - { - source: "/api-demo-connect/accounts/:id/", - destination: "/api/demo-connect/accounts/:id", - }, - { - source: "/api-demo-connect/apps", - destination: "/api/demo-connect/apps", - }, - { - source: "/api-demo-connect/apps/", - destination: "/api/demo-connect/apps", - }, - { - source: "/workflows/errors/", - destination: "/workflows/building-workflows/errors/", - }, - ]; - }, - env: { - PIPEDREAM_NODE_VERSION: "20", - PIPEDREAM_BASE_URL: "https://pipedream.com", - API_BASE_URL: "https://api.pipedream.com/v1", - SQL_API_BASE_URL: "https://rt.pipedream.com/sql", - ENDPOINT_BASE_URL: "*.m.pipedream.net", - PAYLOAD_SIZE_LIMIT: "512KB", - MEMORY_LIMIT: "256MB", - MEMORY_ABSOLUTE_LIMIT: "10GB", - EMAIL_PAYLOAD_SIZE_LIMIT: "30MB", - MAX_WORKFLOW_EXECUTION_LIMIT: "750", - BASE_CREDITS_PRICE_MEMORY: "256", - BASE_CREDITS_PRICE_SECONDS: "30", - DAILY_TESTING_LIMIT: "30 minutes", - INSPECTOR_EVENT_EXPIRY_DAYS: "365", - FUNCTION_PAYLOAD_LIMIT: "6MB", - DEFAULT_WORKFLOW_QUEUE_SIZE: "100", - MAX_WORKFLOW_QUEUE_SIZE: "10,000", - PYTHON_VERSION: "3.12", - GO_LANG_VERSION: "1.21.5", - CONFIGURED_PROPS_SIZE_LIMIT: "64KB", - SERVICE_DB_SIZE_LIMIT: "60KB", - TMP_SIZE_LIMIT: "2GB", - DELAY_MIN_MAX_TIME: - "You can pause your workflow for as little as one millisecond, or as long as one year", - PUBLIC_APPS: "2,700", - REGISTRY_ACTIONS: "5,300", - REGISTRY_SOURCES: "2,500", - REGISTRY_COMPONENTS: "8,000", - FREE_INSPECTOR_EVENT_LIMIT: "7 days of events", - WARM_WORKERS_INTERVAL: "10 minutes", - WARM_WORKERS_CREDITS_PER_INTERVAL: "5", - ALGOLIA_APP_ID: "XY28M447C5", - ALGOLIA_SEARCH_API_KEY: "a7d274c84696bac04e14cc87139d9eaf", - ALGOLIA_INDEX_NAME: "pipedream", - PD_EGRESS_IP_RANGE: "44.223.89.56/29", - }, -}); diff --git a/docs-v2/package-lock.json b/docs-v2/package-lock.json deleted file mode 100644 index 7dc9508c53225..0000000000000 --- a/docs-v2/package-lock.json +++ /dev/null @@ -1,11679 +0,0 @@ -{ - "name": "@pipedream/docs", - "version": "0.0.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@pipedream/docs", - "version": "0.0.1", - "license": "MIT", - "dependencies": { - "@docsearch/react": "^3.8.1", - "@pipedream/sdk": "^1.5.3", - "@vercel/analytics": "^1.5.0", - "chalk": "^5.3.0", - "jest": "^29.7.0", - "lint-staged": "^15.2.7", - "next": "^14.2.5", - "nextra": "^3", - "nextra-theme-docs": "^3", - "prismjs": "^1.30.0", - "react": "^18.3.1", - "react-dom": "^18.3.1", - "react-markdown": "^9.0.1", - "sharp": "^0.33.4" - }, - "devDependencies": { - "@types/node": "18.11.10", - "autoprefixer": "^10.4.19", - "next-sitemap": "^4.2.3", - "postcss": "^8.4.40", - "prettier": "^3.3.3", - "tailwindcss": "^3.4.7", - "typescript": "^5.5.4" - }, - "engines": { - "node": "20.9.0", - "pnpm": "9.14.2" - } - }, - "node_modules/@algolia/autocomplete-core": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.17.7.tgz", - "integrity": "sha512-BjiPOW6ks90UKl7TwMv7oNQMnzU+t/wk9mgIDi6b1tXpUek7MW0lbNOUHpvam9pe3lVCf4xPFT+lK7s+e+fs7Q==", - "dependencies": { - "@algolia/autocomplete-plugin-algolia-insights": "1.17.7", - "@algolia/autocomplete-shared": "1.17.7" - } - }, - "node_modules/@algolia/autocomplete-plugin-algolia-insights": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.17.7.tgz", - "integrity": "sha512-Jca5Ude6yUOuyzjnz57og7Et3aXjbwCSDf/8onLHSQgw1qW3ALl9mrMWaXb5FmPVkV3EtkD2F/+NkT6VHyPu9A==", - "dependencies": { - "@algolia/autocomplete-shared": "1.17.7" - }, - "peerDependencies": { - "search-insights": ">= 1 < 3" - } - }, - "node_modules/@algolia/autocomplete-preset-algolia": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.17.7.tgz", - "integrity": "sha512-ggOQ950+nwbWROq2MOCIL71RE0DdQZsceqrg32UqnhDz8FlO9rL8ONHNsI2R1MH0tkgVIDKI/D0sMiUchsFdWA==", - "dependencies": { - "@algolia/autocomplete-shared": "1.17.7" - }, - "peerDependencies": { - "@algolia/client-search": ">= 4.9.1 < 6", - "algoliasearch": ">= 4.9.1 < 6" - } - }, - "node_modules/@algolia/autocomplete-shared": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.17.7.tgz", - "integrity": "sha512-o/1Vurr42U/qskRSuhBH+VKxMvkkUVTLU6WZQr+L5lGZZLYWyhdzWjW0iGXY7EkwRTjBqvN2EsR81yCTGV/kmg==", - "peerDependencies": { - "@algolia/client-search": ">= 4.9.1 < 6", - "algoliasearch": ">= 4.9.1 < 6" - } - }, - "node_modules/@algolia/client-abtesting": { - "version": "5.23.2", - "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.23.2.tgz", - "integrity": "sha512-EudQGeYEzviwqPH8WoqP5VTQssE/PW6sEdL0zzOyKt2bWnWoUp5Rnm67sCbxYDR44JpUchbkul0PfWrSYsBPjQ==", - "dependencies": { - "@algolia/client-common": "5.23.2", - "@algolia/requester-browser-xhr": "5.23.2", - "@algolia/requester-fetch": "5.23.2", - "@algolia/requester-node-http": "5.23.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/client-analytics": { - "version": "5.23.2", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.23.2.tgz", - "integrity": "sha512-zmJrkZqWFu+ft+VRcttZZJhw5ElkhBtOArRzQOu9sRnrSSodBOdPRhAfvu8tG93Hv67wh5qQaTBwLxM58AxuMg==", - "dependencies": { - "@algolia/client-common": "5.23.2", - "@algolia/requester-browser-xhr": "5.23.2", - "@algolia/requester-fetch": "5.23.2", - "@algolia/requester-node-http": "5.23.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/client-common": { - "version": "5.23.2", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.23.2.tgz", - "integrity": "sha512-xaE6o4BMdqYBe0iB7JjX6G9/Qeqx6TSs9T4d6VJ0JHPsEyklSwIbKRiomPeYD7vzt2P4t45Io6QBhifOUP+0qg==", - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/client-insights": { - "version": "5.23.2", - "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.23.2.tgz", - "integrity": "sha512-F85hpMszbr5ZGt8gFdl7WOugELRF4z3R1nD9n3t7PZ/2alV7IR75UQY8/jMQDwij/lrnVaKbLeIvKKy6K7ncZw==", - "dependencies": { - "@algolia/client-common": "5.23.2", - "@algolia/requester-browser-xhr": "5.23.2", - "@algolia/requester-fetch": "5.23.2", - "@algolia/requester-node-http": "5.23.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/client-personalization": { - "version": "5.23.2", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.23.2.tgz", - "integrity": "sha512-TuGaGKiQvQqFNR4c3Vdl+JBe6dkEPmRzVyIdWLrurOPEmFmVCKRxtSnLr0TVFl6de/JfDAXuchvtvLHFxv9P2A==", - "dependencies": { - "@algolia/client-common": "5.23.2", - "@algolia/requester-browser-xhr": "5.23.2", - "@algolia/requester-fetch": "5.23.2", - "@algolia/requester-node-http": "5.23.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/client-query-suggestions": { - "version": "5.23.2", - "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.23.2.tgz", - "integrity": "sha512-fg2tZf7Sf51Icjfrea0dnfbfwlJ7kXMcRsWSJN3DZhEi/Y4mMmK9L0Cq8sby6HDzxy5T8xEWNWC3TMx5FvrJ6w==", - "dependencies": { - "@algolia/client-common": "5.23.2", - "@algolia/requester-browser-xhr": "5.23.2", - "@algolia/requester-fetch": "5.23.2", - "@algolia/requester-node-http": "5.23.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/client-search": { - "version": "5.23.2", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.23.2.tgz", - "integrity": "sha512-XiTjt0qgsJk9OqvDpMwTgUaPAYNSQcMILRfSYiorgiyc71yYM7Lq1vRSVxhB0m51mrViWj4rIR6kSiJRXebqvQ==", - "dependencies": { - "@algolia/client-common": "5.23.2", - "@algolia/requester-browser-xhr": "5.23.2", - "@algolia/requester-fetch": "5.23.2", - "@algolia/requester-node-http": "5.23.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/ingestion": { - "version": "1.23.2", - "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.23.2.tgz", - "integrity": "sha512-7ClIghvUFZTomBipD8Kor9Z5llcAM3lHUBG3VFOvUsOxOJcaMMONlBXyoFDfI1na+u14lVaGehY2oIEfY1eB0w==", - "dependencies": { - "@algolia/client-common": "5.23.2", - "@algolia/requester-browser-xhr": "5.23.2", - "@algolia/requester-fetch": "5.23.2", - "@algolia/requester-node-http": "5.23.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/monitoring": { - "version": "1.23.2", - "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.23.2.tgz", - "integrity": "sha512-kF7KKd0iIIlaD70flFS+8+DNxRvIzrG9A22iWG5LDX225Kl6pITroq+qIUweqqyyoqJBYuIXKZGDGtnahEwQxw==", - "dependencies": { - "@algolia/client-common": "5.23.2", - "@algolia/requester-browser-xhr": "5.23.2", - "@algolia/requester-fetch": "5.23.2", - "@algolia/requester-node-http": "5.23.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/recommend": { - "version": "5.23.2", - "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.23.2.tgz", - "integrity": "sha512-nAgS2O5ww8J4fgW6GAiybAdr0uH7MV74srPdx51cPJRpQBEge4WnYBaOWx1/a53qI0xwNtQudnEyBGUzsSYaAw==", - "dependencies": { - "@algolia/client-common": "5.23.2", - "@algolia/requester-browser-xhr": "5.23.2", - "@algolia/requester-fetch": "5.23.2", - "@algolia/requester-node-http": "5.23.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/requester-browser-xhr": { - "version": "5.23.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.23.2.tgz", - "integrity": "sha512-yw6IzgQcwr4cZuoQCEoQui9G0rhVRGCyhPhW+gmrXe6oVr4qB50FV6mWGLA170+iqGVjPn/DVuOhExjBzcViTQ==", - "dependencies": { - "@algolia/client-common": "5.23.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/requester-fetch": { - "version": "5.23.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.23.2.tgz", - "integrity": "sha512-8rmSybTwIqmGx3P0qkOEUkkyeIewglaKq6yUnxnVkBJbd4USfIZsw9cME1YUEHeZI7aOhTQg9QteUHSKXclF5A==", - "dependencies": { - "@algolia/client-common": "5.23.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/requester-node-http": { - "version": "5.23.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.23.2.tgz", - "integrity": "sha512-IHpUiW3d3oVE5tCYqQN7X71/EbXI7f8WxU85eWW1UYEWEknqW3csdGctyIW7+qMHFfxeDymI1Wln/gGHHIXLIw==", - "dependencies": { - "@algolia/client-common": "5.23.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@alloc/quick-lru": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", - "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@antfu/install-pkg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-1.0.0.tgz", - "integrity": "sha512-xvX6P/lo1B3ej0OsaErAjqgFYzYVcJpamjLAFLYh9vRJngBrMoUG7aVnrGTeqM7yxbyTD5p3F2+0/QUEh8Vzhw==", - "dependencies": { - "package-manager-detector": "^0.2.8", - "tinyexec": "^0.3.2" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/@antfu/utils": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-8.1.1.tgz", - "integrity": "sha512-Mex9nXf9vR6AhcXmMrlz/HVgYYZpVGJ6YlPgwl7UnaFpnshXs6EK/oa5Gpf3CzENMjkvEx2tQtntGnb7UtSTOQ==", - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", - "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz", - "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.10", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.10", - "@babel/parser": "^7.26.10", - "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.10", - "@babel/types": "^7.26.10", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.0.tgz", - "integrity": "sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw==", - "dependencies": { - "@babel/parser": "^7.27.0", - "@babel/types": "^7.27.0", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.0.tgz", - "integrity": "sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA==", - "dependencies": { - "@babel/compat-data": "^7.26.8", - "@babel/helper-validator-option": "^7.25.9", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", - "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", - "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", - "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", - "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", - "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", - "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.0.tgz", - "integrity": "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==", - "dependencies": { - "@babel/template": "^7.27.0", - "@babel/types": "^7.27.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz", - "integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==", - "dependencies": { - "@babel/types": "^7.27.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", - "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", - "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", - "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.0.tgz", - "integrity": "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/parser": "^7.27.0", - "@babel/types": "^7.27.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.0.tgz", - "integrity": "sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA==", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.27.0", - "@babel/parser": "^7.27.0", - "@babel/template": "^7.27.0", - "@babel/types": "^7.27.0", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz", - "integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==", - "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" - }, - "node_modules/@braintree/sanitize-url": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.1.tgz", - "integrity": "sha512-i1L7noDNxtFyL5DmZafWy1wRVhGehQmzZaz1HiN5e7iylJMSZR7ekOV7NsIqa5qBldlLrsKv4HbgFUVlQrz8Mw==" - }, - "node_modules/@chevrotain/cst-dts-gen": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz", - "integrity": "sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ==", - "dependencies": { - "@chevrotain/gast": "11.0.3", - "@chevrotain/types": "11.0.3", - "lodash-es": "4.17.21" - } - }, - "node_modules/@chevrotain/gast": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-11.0.3.tgz", - "integrity": "sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q==", - "dependencies": { - "@chevrotain/types": "11.0.3", - "lodash-es": "4.17.21" - } - }, - "node_modules/@chevrotain/regexp-to-ast": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz", - "integrity": "sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA==" - }, - "node_modules/@chevrotain/types": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.0.3.tgz", - "integrity": "sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ==" - }, - "node_modules/@chevrotain/utils": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-11.0.3.tgz", - "integrity": "sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==" - }, - "node_modules/@corex/deepmerge": { - "version": "4.0.43", - "resolved": "https://registry.npmjs.org/@corex/deepmerge/-/deepmerge-4.0.43.tgz", - "integrity": "sha512-N8uEMrMPL0cu/bdboEWpQYb/0i2K5Qn8eCsxzOmxSggJbbQte7ljMRoXm917AbntqTGOzdTu+vP3KOOzoC70HQ==", - "dev": true - }, - "node_modules/@docsearch/css": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.8.1.tgz", - "integrity": "sha512-XiPhKT+ghUi4pEi/ACE9iDmwWsLA6d6xSwtR5ab48iB63OtYWFLZHUKdH7jHKTmwOs0Eg22TX4Kb3H5liFm5bQ==" - }, - "node_modules/@docsearch/react": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.8.1.tgz", - "integrity": "sha512-7vgQuktQNBQdNWO1jbkiwgIrTZ0r5nPIHqcO3Z2neAWgkdUuldvvMfEOEaPXT5lqcezEv7i0h+tC285nD3jpZg==", - "dependencies": { - "@algolia/autocomplete-core": "1.17.7", - "@algolia/autocomplete-preset-algolia": "1.17.7", - "@docsearch/css": "3.8.1", - "algoliasearch": "^5.14.2" - }, - "peerDependencies": { - "@types/react": ">= 16.8.0 < 19.0.0", - "react": ">= 16.8.0 < 19.0.0", - "react-dom": ">= 16.8.0 < 19.0.0", - "search-insights": ">= 1 < 3" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "react": { - "optional": true - }, - "react-dom": { - "optional": true - }, - "search-insights": { - "optional": true - } - } - }, - "node_modules/@emnapi/runtime": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.0.tgz", - "integrity": "sha512-64WYIf4UYcdLnbKn/umDlNjQDSS8AgZrI/R9+x5ilkUVFxXcA1Ebl+gQLc/6mERA4407Xof0R7wEyEuj091CVw==", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@floating-ui/core": { - "version": "1.6.9", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.9.tgz", - "integrity": "sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw==", - "dependencies": { - "@floating-ui/utils": "^0.2.9" - } - }, - "node_modules/@floating-ui/dom": { - "version": "1.6.13", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.13.tgz", - "integrity": "sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w==", - "dependencies": { - "@floating-ui/core": "^1.6.0", - "@floating-ui/utils": "^0.2.9" - } - }, - "node_modules/@floating-ui/react": { - "version": "0.26.28", - "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.28.tgz", - "integrity": "sha512-yORQuuAtVpiRjpMhdc0wJj06b9JFjrYF4qp96j++v2NBpbi6SEGF7donUJ3TMieerQ6qVkAv1tgr7L4r5roTqw==", - "dependencies": { - "@floating-ui/react-dom": "^2.1.2", - "@floating-ui/utils": "^0.2.8", - "tabbable": "^6.0.0" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0" - } - }, - "node_modules/@floating-ui/react-dom": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.2.tgz", - "integrity": "sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==", - "dependencies": { - "@floating-ui/dom": "^1.0.0" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0" - } - }, - "node_modules/@floating-ui/utils": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.9.tgz", - "integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==" - }, - "node_modules/@formatjs/intl-localematcher": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.10.tgz", - "integrity": "sha512-af3qATX+m4Rnd9+wHcjJ4w2ijq+rAVP3CCinJQvFv1kgSu1W6jypUmvleJxcewdxmutM8dmIRZFxO/IQBZmP2Q==", - "dependencies": { - "tslib": "2" - } - }, - "node_modules/@headlessui/react": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-2.2.1.tgz", - "integrity": "sha512-daiUqVLae8CKVjEVT19P/izW0aGK0GNhMSAeMlrDebKmoVZHcRRwbxzgtnEadUVDXyBsWo9/UH4KHeniO+0tMg==", - "dependencies": { - "@floating-ui/react": "^0.26.16", - "@react-aria/focus": "^3.17.1", - "@react-aria/interactions": "^3.21.3", - "@tanstack/react-virtual": "^3.11.1" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "react": "^18 || ^19 || ^19.0.0-rc", - "react-dom": "^18 || ^19 || ^19.0.0-rc" - } - }, - "node_modules/@iconify/types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", - "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==" - }, - "node_modules/@iconify/utils": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-2.3.0.tgz", - "integrity": "sha512-GmQ78prtwYW6EtzXRU1rY+KwOKfz32PD7iJh6Iyqw68GiKuoZ2A6pRtzWONz5VQJbp50mEjXh/7NkumtrAgRKA==", - "dependencies": { - "@antfu/install-pkg": "^1.0.0", - "@antfu/utils": "^8.1.0", - "@iconify/types": "^2.0.0", - "debug": "^4.4.0", - "globals": "^15.14.0", - "kolorist": "^1.8.0", - "local-pkg": "^1.0.0", - "mlly": "^1.7.4" - } - }, - "node_modules/@iconify/utils/node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@iconify/utils/node_modules/globals": { - "version": "15.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", - "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@img/sharp-darwin-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", - "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.0.4" - } - }, - "node_modules/@img/sharp-darwin-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", - "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.0.4" - } - }, - "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", - "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-darwin-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", - "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-arm": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", - "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", - "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-s390x": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz", - "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==", - "cpu": [ - "s390x" - ], - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", - "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linuxmusl-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", - "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linuxmusl-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", - "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-linux-arm": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", - "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.0.5" - } - }, - "node_modules/@img/sharp-linux-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", - "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.0.4" - } - }, - "node_modules/@img/sharp-linux-s390x": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz", - "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==", - "cpu": [ - "s390x" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.0.4" - } - }, - "node_modules/@img/sharp-linux-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", - "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.0.4" - } - }, - "node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", - "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" - } - }, - "node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", - "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.0.4" - } - }, - "node_modules/@img/sharp-wasm32": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz", - "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==", - "cpu": [ - "wasm32" - ], - "optional": true, - "dependencies": { - "@emnapi/runtime": "^1.2.0" - }, - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-win32-ia32": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz", - "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-win32-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", - "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", - "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/console/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/console/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/console/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/core": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", - "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/core/node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@jest/core/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/core/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/core/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/core/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/core/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", - "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", - "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", - "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", - "dependencies": { - "jest-get-type": "^29.6.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", - "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", - "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", - "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", - "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/reporters/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/reporters/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/reporters/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/reporters/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/reporters/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", - "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", - "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", - "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", - "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/transform/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/transform/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/types/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/types/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/types/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@mdx-js/mdx": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.1.0.tgz", - "integrity": "sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw==", - "dependencies": { - "@types/estree": "^1.0.0", - "@types/estree-jsx": "^1.0.0", - "@types/hast": "^3.0.0", - "@types/mdx": "^2.0.0", - "collapse-white-space": "^2.0.0", - "devlop": "^1.0.0", - "estree-util-is-identifier-name": "^3.0.0", - "estree-util-scope": "^1.0.0", - "estree-walker": "^3.0.0", - "hast-util-to-jsx-runtime": "^2.0.0", - "markdown-extensions": "^2.0.0", - "recma-build-jsx": "^1.0.0", - "recma-jsx": "^1.0.0", - "recma-stringify": "^1.0.0", - "rehype-recma": "^1.0.0", - "remark-mdx": "^3.0.0", - "remark-parse": "^11.0.0", - "remark-rehype": "^11.0.0", - "source-map": "^0.7.0", - "unified": "^11.0.0", - "unist-util-position-from-estree": "^2.0.0", - "unist-util-stringify-position": "^4.0.0", - "unist-util-visit": "^5.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/@mdx-js/mdx/node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@mdx-js/react": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.0.tgz", - "integrity": "sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==", - "dependencies": { - "@types/mdx": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - }, - "peerDependencies": { - "@types/react": ">=16", - "react": ">=16" - } - }, - "node_modules/@mermaid-js/parser": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-0.4.0.tgz", - "integrity": "sha512-wla8XOWvQAwuqy+gxiZqY+c7FokraOTHRWMsbB4AgRx9Sy7zKslNyejy7E+a77qHfey5GXw/ik3IXv/NHMJgaA==", - "dependencies": { - "langium": "3.3.1" - } - }, - "node_modules/@napi-rs/simple-git": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git/-/simple-git-0.1.19.tgz", - "integrity": "sha512-jMxvwzkKzd3cXo2EB9GM2ic0eYo2rP/BS6gJt6HnWbsDO1O8GSD4k7o2Cpr2YERtMpGF/MGcDfsfj2EbQPtrXw==", - "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@napi-rs/simple-git-android-arm-eabi": "0.1.19", - "@napi-rs/simple-git-android-arm64": "0.1.19", - "@napi-rs/simple-git-darwin-arm64": "0.1.19", - "@napi-rs/simple-git-darwin-x64": "0.1.19", - "@napi-rs/simple-git-freebsd-x64": "0.1.19", - "@napi-rs/simple-git-linux-arm-gnueabihf": "0.1.19", - "@napi-rs/simple-git-linux-arm64-gnu": "0.1.19", - "@napi-rs/simple-git-linux-arm64-musl": "0.1.19", - "@napi-rs/simple-git-linux-powerpc64le-gnu": "0.1.19", - "@napi-rs/simple-git-linux-s390x-gnu": "0.1.19", - "@napi-rs/simple-git-linux-x64-gnu": "0.1.19", - "@napi-rs/simple-git-linux-x64-musl": "0.1.19", - "@napi-rs/simple-git-win32-arm64-msvc": "0.1.19", - "@napi-rs/simple-git-win32-x64-msvc": "0.1.19" - } - }, - "node_modules/@napi-rs/simple-git-android-arm-eabi": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm-eabi/-/simple-git-android-arm-eabi-0.1.19.tgz", - "integrity": "sha512-XryEH/hadZ4Duk/HS/HC/cA1j0RHmqUGey3MsCf65ZS0VrWMqChXM/xlTPWuY5jfCc/rPubHaqI7DZlbexnX/g==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/simple-git-android-arm64": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm64/-/simple-git-android-arm64-0.1.19.tgz", - "integrity": "sha512-ZQ0cPvY6nV9p7zrR9ZPo7hQBkDAcY/CHj3BjYNhykeUCiSNCrhvwX+WEeg5on8M1j4d5jcI/cwVG2FslfiByUg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/simple-git-darwin-arm64": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-arm64/-/simple-git-darwin-arm64-0.1.19.tgz", - "integrity": "sha512-viZB5TYgjA1vH+QluhxZo0WKro3xBA+1xSzYx8mcxUMO5gnAoUMwXn0ZO/6Zy6pai+aGae+cj6XihGnrBRu3Pg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/simple-git-darwin-x64": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-x64/-/simple-git-darwin-x64-0.1.19.tgz", - "integrity": "sha512-6dNkzSNUV5X9rsVYQbpZLyJu4Gtkl2vNJ3abBXHX/Etk0ILG5ZasO3ncznIANZQpqcbn/QPHr49J2QYAXGoKJA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/simple-git-freebsd-x64": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-freebsd-x64/-/simple-git-freebsd-x64-0.1.19.tgz", - "integrity": "sha512-sB9krVIchzd20FjI2ZZ8FDsTSsXLBdnwJ6CpeVyrhXHnoszfcqxt49ocZHujAS9lMpXq7i2Nv1EXJmCy4KdhwA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/simple-git-linux-arm-gnueabihf": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm-gnueabihf/-/simple-git-linux-arm-gnueabihf-0.1.19.tgz", - "integrity": "sha512-6HPn09lr9N1n5/XKfP8Np53g4fEXVxOFqNkS6rTH3Rm1lZHdazTRH62RggXLTguZwjcE+MvOLvoTIoR5kAS8+g==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/simple-git-linux-arm64-gnu": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-gnu/-/simple-git-linux-arm64-gnu-0.1.19.tgz", - "integrity": "sha512-G0gISckt4cVDp3oh5Z6PV3GHJrJO6Z8bIS+9xA7vTtKdqB1i5y0n3cSFLlzQciLzhr+CajFD27doW4lEyErQ/Q==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/simple-git-linux-arm64-musl": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-musl/-/simple-git-linux-arm64-musl-0.1.19.tgz", - "integrity": "sha512-OwTRF+H4IZYxmDFRi1IrLMfqbdIpvHeYbJl2X94NVsLVOY+3NUHvEzL3fYaVx5urBaMnIK0DD3wZLbcueWvxbA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/simple-git-linux-powerpc64le-gnu": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-powerpc64le-gnu/-/simple-git-linux-powerpc64le-gnu-0.1.19.tgz", - "integrity": "sha512-p7zuNNVyzpRvkCt2RIGv9FX/WPcPbZ6/FRUgUTZkA2WU33mrbvNqSi4AOqCCl6mBvEd+EOw5NU4lS9ORRJvAEg==", - "cpu": [ - "powerpc64le" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/simple-git-linux-s390x-gnu": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-s390x-gnu/-/simple-git-linux-s390x-gnu-0.1.19.tgz", - "integrity": "sha512-6N2vwJUPLiak8GLrS0a3is0gSb0UwI2CHOOqtvQxPmv+JVI8kn3vKiUscsktdDb0wGEPeZ8PvZs0y8UWix7K4g==", - "cpu": [ - "s390x" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/simple-git-linux-x64-gnu": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-gnu/-/simple-git-linux-x64-gnu-0.1.19.tgz", - "integrity": "sha512-61YfeO1J13WK7MalLgP3QlV6of2rWnVw1aqxWkAgy/lGxoOFSJ4Wid6ANVCEZk4tJpPX/XNeneqkUz5xpeb2Cw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/simple-git-linux-x64-musl": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-musl/-/simple-git-linux-x64-musl-0.1.19.tgz", - "integrity": "sha512-cCTWNpMJnN3PrUBItWcs3dQKCydsIasbrS3laMzq8k7OzF93Zrp2LWDTPlLCO9brbBVpBzy2Qk5Xg9uAfe/Ukw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/simple-git-win32-arm64-msvc": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-arm64-msvc/-/simple-git-win32-arm64-msvc-0.1.19.tgz", - "integrity": "sha512-sWavb1BjeLKKBA+PbTsRSSzVNfb7V/dOpaJvkgR5d2kWFn/AHmCZHSSj/3nyZdYf0BdDC+DIvqk3daAEZ6QMVw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/simple-git-win32-x64-msvc": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-x64-msvc/-/simple-git-win32-x64-msvc-0.1.19.tgz", - "integrity": "sha512-FmNuPoK4+qwaSCkp8lm3sJlrxk374enW+zCE5ZksXlZzj/9BDJAULJb5QUJ7o9Y8A/G+d8LkdQLPBE2Jaxe5XA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/env": { - "version": "14.2.26", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.26.tgz", - "integrity": "sha512-vO//GJ/YBco+H7xdQhzJxF7ub3SUwft76jwaeOyVVQFHCi5DCnkP16WHB+JBylo4vOKPoZBlR94Z8xBxNBdNJA==" - }, - "node_modules/@next/swc-darwin-arm64": { - "version": "14.2.26", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.26.tgz", - "integrity": "sha512-zDJY8gsKEseGAxG+C2hTMT0w9Nk9N1Sk1qV7vXYz9MEiyRoF5ogQX2+vplyUMIfygnjn9/A04I6yrUTRTuRiyQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-x64": { - "version": "14.2.26", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.26.tgz", - "integrity": "sha512-U0adH5ryLfmTDkahLwG9sUQG2L0a9rYux8crQeC92rPhi3jGQEY47nByQHrVrt3prZigadwj/2HZ1LUUimuSbg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.2.26", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.26.tgz", - "integrity": "sha512-SINMl1I7UhfHGM7SoRiw0AbwnLEMUnJ/3XXVmhyptzriHbWvPPbbm0OEVG24uUKhuS1t0nvN/DBvm5kz6ZIqpg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.2.26", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.26.tgz", - "integrity": "sha512-s6JaezoyJK2DxrwHWxLWtJKlqKqTdi/zaYigDXUJ/gmx/72CrzdVZfMvUc6VqnZ7YEvRijvYo+0o4Z9DencduA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.2.26", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.26.tgz", - "integrity": "sha512-FEXeUQi8/pLr/XI0hKbe0tgbLmHFRhgXOUiPScz2hk0hSmbGiU8aUqVslj/6C6KA38RzXnWoJXo4FMo6aBxjzg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "14.2.26", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.26.tgz", - "integrity": "sha512-BUsomaO4d2DuXhXhgQCVt2jjX4B4/Thts8nDoIruEJkhE5ifeQFtvW5c9JkdOtYvE5p2G0hcwQ0UbRaQmQwaVg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.2.26", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.26.tgz", - "integrity": "sha512-5auwsMVzT7wbB2CZXQxDctpWbdEnEW/e66DyXO1DcgHxIyhP06awu+rHKshZE+lPLIGiwtjo7bsyeuubewwxMw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.26", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.26.tgz", - "integrity": "sha512-GQWg/Vbz9zUGi9X80lOeGsz1rMH/MtFO/XqigDznhhhTfDlDoynCM6982mPCbSlxJ/aveZcKtTlwfAjwhyxDpg==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.2.26", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.26.tgz", - "integrity": "sha512-2rdB3T1/Gp7bv1eQTTm9d1Y1sv9UuJ2LAwOE0Pe2prHKe32UNscj7YS13fRB37d0GAiGNR+Y7ZcW8YjDI8Ns0w==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@pipedream/sdk": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@pipedream/sdk/-/sdk-1.5.3.tgz", - "integrity": "sha512-shXEDK91RzaTAbFQCVLHCV+PuKjQaes9V1C8r1abV6hRCyAQcYnr5j6alJuKiozBnIh5BGA/OYh0JEYBWau7yA==", - "dependencies": { - "@rails/actioncable": "^8.0.0", - "commander": "^12.1.0", - "oauth4webapi": "^3.1.4", - "ws": "^8.18.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@rails/actioncable": { - "version": "8.0.200", - "resolved": "https://registry.npmjs.org/@rails/actioncable/-/actioncable-8.0.200.tgz", - "integrity": "sha512-EDqWyxck22BHmv1e+mD8Kl6GmtNkhEPdRfGFT7kvsv1yoXd9iYrqHDVAaR8bKmU/syC5eEZ2I5aWWxtB73ukMw==" - }, - "node_modules/@react-aria/focus": { - "version": "3.20.1", - "resolved": "https://registry.npmjs.org/@react-aria/focus/-/focus-3.20.1.tgz", - "integrity": "sha512-lgYs+sQ1TtBrAXnAdRBQrBo0/7o5H6IrfDxec1j+VRpcXL0xyk0xPq+m3lZp8typzIghqDgpnKkJ5Jf4OrzPIw==", - "dependencies": { - "@react-aria/interactions": "^3.24.1", - "@react-aria/utils": "^3.28.1", - "@react-types/shared": "^3.28.0", - "@swc/helpers": "^0.5.0", - "clsx": "^2.0.0" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", - "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" - } - }, - "node_modules/@react-aria/interactions": { - "version": "3.24.1", - "resolved": "https://registry.npmjs.org/@react-aria/interactions/-/interactions-3.24.1.tgz", - "integrity": "sha512-OWEcIC6UQfWq4Td5Ptuh4PZQ4LHLJr/JL2jGYvuNL6EgL3bWvzPrRYIF/R64YbfVxIC7FeZpPSkS07sZ93/NoA==", - "dependencies": { - "@react-aria/ssr": "^3.9.7", - "@react-aria/utils": "^3.28.1", - "@react-stately/flags": "^3.1.0", - "@react-types/shared": "^3.28.0", - "@swc/helpers": "^0.5.0" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", - "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" - } - }, - "node_modules/@react-aria/ssr": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.9.7.tgz", - "integrity": "sha512-GQygZaGlmYjmYM+tiNBA5C6acmiDWF52Nqd40bBp0Znk4M4hP+LTmI0lpI1BuKMw45T8RIhrAsICIfKwZvi2Gg==", - "dependencies": { - "@swc/helpers": "^0.5.0" - }, - "engines": { - "node": ">= 12" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" - } - }, - "node_modules/@react-aria/utils": { - "version": "3.28.1", - "resolved": "https://registry.npmjs.org/@react-aria/utils/-/utils-3.28.1.tgz", - "integrity": "sha512-mnHFF4YOVu9BRFQ1SZSKfPhg3z+lBRYoW5mLcYTQihbKhz48+I1sqRkP7ahMITr8ANH3nb34YaMME4XWmK2Mgg==", - "dependencies": { - "@react-aria/ssr": "^3.9.7", - "@react-stately/flags": "^3.1.0", - "@react-stately/utils": "^3.10.5", - "@react-types/shared": "^3.28.0", - "@swc/helpers": "^0.5.0", - "clsx": "^2.0.0" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", - "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" - } - }, - "node_modules/@react-stately/flags": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@react-stately/flags/-/flags-3.1.0.tgz", - "integrity": "sha512-KSHOCxTFpBtxhIRcKwsD1YDTaNxFtCYuAUb0KEihc16QwqZViq4hasgPBs2gYm7fHRbw7WYzWKf6ZSo/+YsFlg==", - "dependencies": { - "@swc/helpers": "^0.5.0" - } - }, - "node_modules/@react-stately/utils": { - "version": "3.10.5", - "resolved": "https://registry.npmjs.org/@react-stately/utils/-/utils-3.10.5.tgz", - "integrity": "sha512-iMQSGcpaecghDIh3mZEpZfoFH3ExBwTtuBEcvZ2XnGzCgQjeYXcMdIUwAfVQLXFTdHUHGF6Gu6/dFrYsCzySBQ==", - "dependencies": { - "@swc/helpers": "^0.5.0" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" - } - }, - "node_modules/@react-types/shared": { - "version": "3.28.0", - "resolved": "https://registry.npmjs.org/@react-types/shared/-/shared-3.28.0.tgz", - "integrity": "sha512-9oMEYIDc3sk0G5rysnYvdNrkSg7B04yTKl50HHSZVbokeHpnU0yRmsDaWb9B/5RprcKj8XszEk5guBO8Sa/Q+Q==", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" - } - }, - "node_modules/@shikijs/core": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.29.2.tgz", - "integrity": "sha512-vju0lY9r27jJfOY4Z7+Rt/nIOjzJpZ3y+nYpqtUZInVoXQ/TJZcfGnNOGnKjFdVZb8qexiCuSlZRKcGfhhTTZQ==", - "dependencies": { - "@shikijs/engine-javascript": "1.29.2", - "@shikijs/engine-oniguruma": "1.29.2", - "@shikijs/types": "1.29.2", - "@shikijs/vscode-textmate": "^10.0.1", - "@types/hast": "^3.0.4", - "hast-util-to-html": "^9.0.4" - } - }, - "node_modules/@shikijs/engine-javascript": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.29.2.tgz", - "integrity": "sha512-iNEZv4IrLYPv64Q6k7EPpOCE/nuvGiKl7zxdq0WFuRPF5PAE9PRo2JGq/d8crLusM59BRemJ4eOqrFrC4wiQ+A==", - "dependencies": { - "@shikijs/types": "1.29.2", - "@shikijs/vscode-textmate": "^10.0.1", - "oniguruma-to-es": "^2.2.0" - } - }, - "node_modules/@shikijs/engine-oniguruma": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.29.2.tgz", - "integrity": "sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==", - "dependencies": { - "@shikijs/types": "1.29.2", - "@shikijs/vscode-textmate": "^10.0.1" - } - }, - "node_modules/@shikijs/langs": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-1.29.2.tgz", - "integrity": "sha512-FIBA7N3LZ+223U7cJDUYd5shmciFQlYkFXlkKVaHsCPgfVLiO+e12FmQE6Tf9vuyEsFe3dIl8qGWKXgEHL9wmQ==", - "dependencies": { - "@shikijs/types": "1.29.2" - } - }, - "node_modules/@shikijs/themes": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-1.29.2.tgz", - "integrity": "sha512-i9TNZlsq4uoyqSbluIcZkmPL9Bfi3djVxRnofUHwvx/h6SRW3cwgBC5SML7vsDcWyukY0eCzVN980rqP6qNl9g==", - "dependencies": { - "@shikijs/types": "1.29.2" - } - }, - "node_modules/@shikijs/twoslash": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/twoslash/-/twoslash-1.29.2.tgz", - "integrity": "sha512-2S04ppAEa477tiaLfGEn1QJWbZUmbk8UoPbAEw4PifsrxkBXtAtOflIZJNtuCwz8ptc/TPxy7CO7gW4Uoi6o/g==", - "dependencies": { - "@shikijs/core": "1.29.2", - "@shikijs/types": "1.29.2", - "twoslash": "^0.2.12" - } - }, - "node_modules/@shikijs/types": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.29.2.tgz", - "integrity": "sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==", - "dependencies": { - "@shikijs/vscode-textmate": "^10.0.1", - "@types/hast": "^3.0.4" - } - }, - "node_modules/@shikijs/vscode-textmate": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", - "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==" - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@swc/counter": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", - "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==" - }, - "node_modules/@swc/helpers": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.5.tgz", - "integrity": "sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==", - "dependencies": { - "@swc/counter": "^0.1.3", - "tslib": "^2.4.0" - } - }, - "node_modules/@tanstack/react-virtual": { - "version": "3.13.6", - "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.13.6.tgz", - "integrity": "sha512-WT7nWs8ximoQ0CDx/ngoFP7HbQF9Q2wQe4nh2NB+u2486eX3nZRE40P9g6ccCVq7ZfTSH5gFOuCoVH5DLNS/aA==", - "dependencies": { - "@tanstack/virtual-core": "3.13.6" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, - "node_modules/@tanstack/virtual-core": { - "version": "3.13.6", - "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.13.6.tgz", - "integrity": "sha512-cnQUeWnhNP8tJ4WsGcYiX24Gjkc9ALstLbHcBj1t3E7EimN6n6kHH+DPV4PpDnuw00NApQp+ViojMj1GRdwYQg==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@theguild/remark-mermaid": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@theguild/remark-mermaid/-/remark-mermaid-0.1.3.tgz", - "integrity": "sha512-2FjVlaaKXK7Zj7UJAgOVTyaahn/3/EAfqYhyXg0BfDBVUl+lXcoIWRaxzqfnDr2rv8ax6GsC5mNh6hAaT86PDw==", - "dependencies": { - "mermaid": "^11.0.0", - "unist-util-visit": "^5.0.0" - }, - "peerDependencies": { - "react": "^18.2.0" - } - }, - "node_modules/@theguild/remark-npm2yarn": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@theguild/remark-npm2yarn/-/remark-npm2yarn-0.3.3.tgz", - "integrity": "sha512-ma6DvR03gdbvwqfKx1omqhg9May/VYGdMHvTzB4VuxkyS7KzfZ/lzrj43hmcsggpMje0x7SADA/pcMph0ejRnA==", - "dependencies": { - "npm-to-yarn": "^3.0.0", - "unist-util-visit": "^5.0.0" - } - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", - "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", - "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/d3": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz", - "integrity": "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==", - "dependencies": { - "@types/d3-array": "*", - "@types/d3-axis": "*", - "@types/d3-brush": "*", - "@types/d3-chord": "*", - "@types/d3-color": "*", - "@types/d3-contour": "*", - "@types/d3-delaunay": "*", - "@types/d3-dispatch": "*", - "@types/d3-drag": "*", - "@types/d3-dsv": "*", - "@types/d3-ease": "*", - "@types/d3-fetch": "*", - "@types/d3-force": "*", - "@types/d3-format": "*", - "@types/d3-geo": "*", - "@types/d3-hierarchy": "*", - "@types/d3-interpolate": "*", - "@types/d3-path": "*", - "@types/d3-polygon": "*", - "@types/d3-quadtree": "*", - "@types/d3-random": "*", - "@types/d3-scale": "*", - "@types/d3-scale-chromatic": "*", - "@types/d3-selection": "*", - "@types/d3-shape": "*", - "@types/d3-time": "*", - "@types/d3-time-format": "*", - "@types/d3-timer": "*", - "@types/d3-transition": "*", - "@types/d3-zoom": "*" - } - }, - "node_modules/@types/d3-array": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.1.tgz", - "integrity": "sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==" - }, - "node_modules/@types/d3-axis": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz", - "integrity": "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==", - "dependencies": { - "@types/d3-selection": "*" - } - }, - "node_modules/@types/d3-brush": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz", - "integrity": "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==", - "dependencies": { - "@types/d3-selection": "*" - } - }, - "node_modules/@types/d3-chord": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz", - "integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==" - }, - "node_modules/@types/d3-color": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", - "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==" - }, - "node_modules/@types/d3-contour": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz", - "integrity": "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==", - "dependencies": { - "@types/d3-array": "*", - "@types/geojson": "*" - } - }, - "node_modules/@types/d3-delaunay": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz", - "integrity": "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==" - }, - "node_modules/@types/d3-dispatch": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.6.tgz", - "integrity": "sha512-4fvZhzMeeuBJYZXRXrRIQnvUYfyXwYmLsdiN7XXmVNQKKw1cM8a5WdID0g1hVFZDqT9ZqZEY5pD44p24VS7iZQ==" - }, - "node_modules/@types/d3-drag": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz", - "integrity": "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==", - "dependencies": { - "@types/d3-selection": "*" - } - }, - "node_modules/@types/d3-dsv": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz", - "integrity": "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==" - }, - "node_modules/@types/d3-ease": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", - "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==" - }, - "node_modules/@types/d3-fetch": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz", - "integrity": "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==", - "dependencies": { - "@types/d3-dsv": "*" - } - }, - "node_modules/@types/d3-force": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz", - "integrity": "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==" - }, - "node_modules/@types/d3-format": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz", - "integrity": "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==" - }, - "node_modules/@types/d3-geo": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.0.tgz", - "integrity": "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==", - "dependencies": { - "@types/geojson": "*" - } - }, - "node_modules/@types/d3-hierarchy": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz", - "integrity": "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==" - }, - "node_modules/@types/d3-interpolate": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", - "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", - "dependencies": { - "@types/d3-color": "*" - } - }, - "node_modules/@types/d3-path": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", - "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==" - }, - "node_modules/@types/d3-polygon": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz", - "integrity": "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==" - }, - "node_modules/@types/d3-quadtree": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz", - "integrity": "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==" - }, - "node_modules/@types/d3-random": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.3.tgz", - "integrity": "sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ==" - }, - "node_modules/@types/d3-scale": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz", - "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==", - "dependencies": { - "@types/d3-time": "*" - } - }, - "node_modules/@types/d3-scale-chromatic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", - "integrity": "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==" - }, - "node_modules/@types/d3-selection": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz", - "integrity": "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==" - }, - "node_modules/@types/d3-shape": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.7.tgz", - "integrity": "sha512-VLvUQ33C+3J+8p+Daf+nYSOsjB4GXp19/S/aGo60m9h1v6XaxjiT82lKVWJCfzhtuZ3yD7i/TPeC/fuKLLOSmg==", - "dependencies": { - "@types/d3-path": "*" - } - }, - "node_modules/@types/d3-time": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", - "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==" - }, - "node_modules/@types/d3-time-format": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz", - "integrity": "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==" - }, - "node_modules/@types/d3-timer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", - "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==" - }, - "node_modules/@types/d3-transition": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz", - "integrity": "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==", - "dependencies": { - "@types/d3-selection": "*" - } - }, - "node_modules/@types/d3-zoom": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz", - "integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==", - "dependencies": { - "@types/d3-interpolate": "*", - "@types/d3-selection": "*" - } - }, - "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "dependencies": { - "@types/ms": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==" - }, - "node_modules/@types/estree-jsx": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz", - "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==", - "dependencies": { - "@types/estree": "*" - } - }, - "node_modules/@types/geojson": { - "version": "7946.0.16", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", - "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==" - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", - "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/hast": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", - "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", - "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", - "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/katex": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.7.tgz", - "integrity": "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==" - }, - "node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/@types/mdx": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.13.tgz", - "integrity": "sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==" - }, - "node_modules/@types/ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", - "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==" - }, - "node_modules/@types/nlcst": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/nlcst/-/nlcst-2.0.3.tgz", - "integrity": "sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA==", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/@types/node": { - "version": "18.11.10", - "resolved": "file:../node_modules/.pnpm/@types+node@18.11.10/node_modules/@types/node", - "license": "MIT" - }, - "node_modules/@types/prop-types": { - "version": "15.7.14", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz", - "integrity": "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==", - "peer": true - }, - "node_modules/@types/react": { - "version": "18.3.20", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.20.tgz", - "integrity": "sha512-IPaCZN7PShZK/3t6Q87pfTkRm6oLTd4vztyoj+cbHUF1g3FfVb2tFIL79uCRKEfv16AhqDMBywP2VW3KIZUvcg==", - "peer": true, - "dependencies": { - "@types/prop-types": "*", - "csstype": "^3.0.2" - } - }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==" - }, - "node_modules/@types/trusted-types": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", - "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", - "optional": true - }, - "node_modules/@types/unist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", - "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==" - }, - "node_modules/@types/yargs": { - "version": "17.0.33", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", - "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==" - }, - "node_modules/@typescript/vfs": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.1.tgz", - "integrity": "sha512-JwoxboBh7Oz1v38tPbkrZ62ZXNHAk9bJ7c9x0eI5zBfBnBYGhURdbnh7Z4smN/MV48Y5OCcZb58n972UtbazsA==", - "dependencies": { - "debug": "^4.1.1" - }, - "peerDependencies": { - "typescript": "*" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==" - }, - "node_modules/@vercel/analytics": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.5.0.tgz", - "integrity": "sha512-MYsBzfPki4gthY5HnYN7jgInhAZ7Ac1cYDoRWFomwGHWEX7odTEzbtg9kf/QSo7XEsEAqlQugA6gJ2WS2DEa3g==", - "peerDependencies": { - "@remix-run/react": "^2", - "@sveltejs/kit": "^1 || ^2", - "next": ">= 13", - "react": "^18 || ^19 || ^19.0.0-rc", - "svelte": ">= 4", - "vue": "^3", - "vue-router": "^4" - }, - "peerDependenciesMeta": { - "@remix-run/react": { - "optional": true - }, - "@sveltejs/kit": { - "optional": true - }, - "next": { - "optional": true - }, - "react": { - "optional": true - }, - "svelte": { - "optional": true - }, - "vue": { - "optional": true - }, - "vue-router": { - "optional": true - } - } - }, - "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/algoliasearch": { - "version": "5.23.2", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.23.2.tgz", - "integrity": "sha512-IhKP22Czzg8Y9HaF6aIb5aAHK2HBj4VAzLLnKEPUnxqDwxpryH9sXbm0NkeY7Cby9GlF81wF+AG/VulKDFBphg==", - "dependencies": { - "@algolia/client-abtesting": "5.23.2", - "@algolia/client-analytics": "5.23.2", - "@algolia/client-common": "5.23.2", - "@algolia/client-insights": "5.23.2", - "@algolia/client-personalization": "5.23.2", - "@algolia/client-query-suggestions": "5.23.2", - "@algolia/client-search": "5.23.2", - "@algolia/ingestion": "1.23.2", - "@algolia/monitoring": "1.23.2", - "@algolia/recommend": "5.23.2", - "@algolia/requester-browser-xhr": "5.23.2", - "@algolia/requester-fetch": "5.23.2", - "@algolia/requester-node-http": "5.23.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/ansi-escapes": { - "version": "7.0.0", - "license": "MIT", - "dependencies": { - "environment": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "6.1.0", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ansi-styles": { - "version": "6.2.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/array-iterate": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/array-iterate/-/array-iterate-2.0.1.tgz", - "integrity": "sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/astring": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/astring/-/astring-1.9.0.tgz", - "integrity": "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==", - "bin": { - "astring": "bin/astring" - } - }, - "node_modules/autoprefixer": { - "version": "10.4.21", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz", - "integrity": "sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/autoprefixer" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "browserslist": "^4.24.4", - "caniuse-lite": "^1.0.30001702", - "fraction.js": "^4.3.7", - "normalize-range": "^0.1.2", - "picocolors": "^1.1.1", - "postcss-value-parser": "^4.2.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" - }, - "engines": { - "node": "^10 || ^12 || >=14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/babel-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", - "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", - "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-jest/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/babel-jest/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/babel-jest/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", - "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", - "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-import-attributes": "^7.24.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", - "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", - "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/bail": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", - "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/better-react-mathjax": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/better-react-mathjax/-/better-react-mathjax-2.1.0.tgz", - "integrity": "sha512-RrHudli76sgoVu+YtjHTKhCkjO2eH1B7Xje1sa0YPjhKzq2y/GIwOt9+tuel3s2L+mCPmFbYBFLDFfo3pEa8rQ==", - "dependencies": { - "mathjax-full": "^3.2.2" - }, - "peerDependencies": { - "react": ">=16.8" - } - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", - "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", - "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" - }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001710", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001710.tgz", - "integrity": "sha512-B5C0I0UmaGqHgo5FuqJ7hBd4L57A4dDD+Xi+XX1nXOoxGeDdY4Ko38qJYOyqznBVJEqON5p8P1x5zRR3+rsnxA==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/ccount": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", - "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/chalk": { - "version": "5.3.0", - "resolved": "file:../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk", - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "engines": { - "node": ">=10" - } - }, - "node_modules/character-entities": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", - "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/character-entities-html4": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", - "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/character-entities-legacy": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", - "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/character-reference-invalid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", - "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/chevrotain": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz", - "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", - "dependencies": { - "@chevrotain/cst-dts-gen": "11.0.3", - "@chevrotain/gast": "11.0.3", - "@chevrotain/regexp-to-ast": "11.0.3", - "@chevrotain/types": "11.0.3", - "@chevrotain/utils": "11.0.3", - "lodash-es": "4.17.21" - } - }, - "node_modules/chevrotain-allstar": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/chevrotain-allstar/-/chevrotain-allstar-0.3.1.tgz", - "integrity": "sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw==", - "dependencies": { - "lodash-es": "^4.17.21" - }, - "peerDependencies": { - "chevrotain": "^11.0.0" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", - "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==" - }, - "node_modules/cli-cursor": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "restore-cursor": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate": { - "version": "4.0.0", - "license": "MIT", - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/node_modules/slice-ansi": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/client-only": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", - "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" - }, - "node_modules/clipboardy": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-4.0.0.tgz", - "integrity": "sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w==", - "dependencies": { - "execa": "^8.0.1", - "is-wsl": "^3.1.0", - "is64bit": "^2.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collapse-white-space": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-2.1.0.tgz", - "integrity": "sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==" - }, - "node_modules/color": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", - "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", - "dependencies": { - "color-convert": "^2.0.1", - "color-string": "^1.9.0" - }, - "engines": { - "node": ">=12.5.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==" - }, - "node_modules/comma-separated-tokens": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", - "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/commander": { - "version": "12.1.0", - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/compute-scroll-into-view": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.1.tgz", - "integrity": "sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw==" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "node_modules/confbox": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz", - "integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==" - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" - }, - "node_modules/cose-base": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz", - "integrity": "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==", - "dependencies": { - "layout-base": "^1.0.0" - } - }, - "node_modules/create-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", - "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/create-jest/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/create-jest/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/create-jest/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cross-spawn/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "peer": true - }, - "node_modules/cytoscape": { - "version": "3.31.2", - "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.31.2.tgz", - "integrity": "sha512-/eOXg2uGdMdpGlEes5Sf6zE+jUG+05f3htFNQIxLxduOH/SsaUZiPBfAwP1btVIVzsnhiNOdi+hvDRLYfMZjGw==", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/cytoscape-cose-bilkent": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz", - "integrity": "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==", - "dependencies": { - "cose-base": "^1.0.0" - }, - "peerDependencies": { - "cytoscape": "^3.2.0" - } - }, - "node_modules/cytoscape-fcose": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz", - "integrity": "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==", - "dependencies": { - "cose-base": "^2.2.0" - }, - "peerDependencies": { - "cytoscape": "^3.2.0" - } - }, - "node_modules/cytoscape-fcose/node_modules/cose-base": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-2.2.0.tgz", - "integrity": "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==", - "dependencies": { - "layout-base": "^2.0.0" - } - }, - "node_modules/cytoscape-fcose/node_modules/layout-base": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-2.0.1.tgz", - "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==" - }, - "node_modules/d3": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz", - "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==", - "dependencies": { - "d3-array": "3", - "d3-axis": "3", - "d3-brush": "3", - "d3-chord": "3", - "d3-color": "3", - "d3-contour": "4", - "d3-delaunay": "6", - "d3-dispatch": "3", - "d3-drag": "3", - "d3-dsv": "3", - "d3-ease": "3", - "d3-fetch": "3", - "d3-force": "3", - "d3-format": "3", - "d3-geo": "3", - "d3-hierarchy": "3", - "d3-interpolate": "3", - "d3-path": "3", - "d3-polygon": "3", - "d3-quadtree": "3", - "d3-random": "3", - "d3-scale": "4", - "d3-scale-chromatic": "3", - "d3-selection": "3", - "d3-shape": "3", - "d3-time": "3", - "d3-time-format": "4", - "d3-timer": "3", - "d3-transition": "3", - "d3-zoom": "3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-array": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", - "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", - "dependencies": { - "internmap": "1 - 2" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-axis": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz", - "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-brush": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz", - "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==", - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-drag": "2 - 3", - "d3-interpolate": "1 - 3", - "d3-selection": "3", - "d3-transition": "3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-chord": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz", - "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==", - "dependencies": { - "d3-path": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-color": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", - "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-contour": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz", - "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==", - "dependencies": { - "d3-array": "^3.2.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-delaunay": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz", - "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==", - "dependencies": { - "delaunator": "5" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-dispatch": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", - "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-drag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz", - "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==", - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-selection": "3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-dsv": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz", - "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==", - "dependencies": { - "commander": "7", - "iconv-lite": "0.6", - "rw": "1" - }, - "bin": { - "csv2json": "bin/dsv2json.js", - "csv2tsv": "bin/dsv2dsv.js", - "dsv2dsv": "bin/dsv2dsv.js", - "dsv2json": "bin/dsv2json.js", - "json2csv": "bin/json2dsv.js", - "json2dsv": "bin/json2dsv.js", - "json2tsv": "bin/json2dsv.js", - "tsv2csv": "bin/dsv2dsv.js", - "tsv2json": "bin/dsv2json.js" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-dsv/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/d3-ease": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", - "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-fetch": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz", - "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==", - "dependencies": { - "d3-dsv": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-force": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz", - "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==", - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-quadtree": "1 - 3", - "d3-timer": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-format": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", - "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-geo": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz", - "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==", - "dependencies": { - "d3-array": "2.5.0 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-hierarchy": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", - "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-interpolate": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", - "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", - "dependencies": { - "d3-color": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-path": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", - "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-polygon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz", - "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-quadtree": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz", - "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-random": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz", - "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-sankey": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz", - "integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==", - "dependencies": { - "d3-array": "1 - 2", - "d3-shape": "^1.2.0" - } - }, - "node_modules/d3-sankey/node_modules/d3-array": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", - "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==", - "dependencies": { - "internmap": "^1.0.0" - } - }, - "node_modules/d3-sankey/node_modules/d3-path": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", - "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==" - }, - "node_modules/d3-sankey/node_modules/d3-shape": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", - "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", - "dependencies": { - "d3-path": "1" - } - }, - "node_modules/d3-sankey/node_modules/internmap": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz", - "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==" - }, - "node_modules/d3-scale": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", - "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", - "dependencies": { - "d3-array": "2.10.0 - 3", - "d3-format": "1 - 3", - "d3-interpolate": "1.2.0 - 3", - "d3-time": "2.1.1 - 3", - "d3-time-format": "2 - 4" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-scale-chromatic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", - "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==", - "dependencies": { - "d3-color": "1 - 3", - "d3-interpolate": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-selection": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", - "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-shape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", - "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", - "dependencies": { - "d3-path": "^3.1.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-time": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", - "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", - "dependencies": { - "d3-array": "2 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-time-format": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", - "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", - "dependencies": { - "d3-time": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-timer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", - "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-transition": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz", - "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==", - "dependencies": { - "d3-color": "1 - 3", - "d3-dispatch": "1 - 3", - "d3-ease": "1 - 3", - "d3-interpolate": "1 - 3", - "d3-timer": "1 - 3" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "d3-selection": "2 - 3" - } - }, - "node_modules/d3-zoom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz", - "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==", - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-drag": "2 - 3", - "d3-interpolate": "1 - 3", - "d3-selection": "2 - 3", - "d3-transition": "2 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/dagre-d3-es": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.11.tgz", - "integrity": "sha512-tvlJLyQf834SylNKax8Wkzco/1ias1OPw8DcUMDE7oUIoSEW25riQVuiu/0OWEFqT0cxHT3Pa9/D82Jr47IONw==", - "dependencies": { - "d3": "^7.9.0", - "lodash-es": "^4.17.21" - } - }, - "node_modules/dayjs": { - "version": "1.11.13", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", - "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" - }, - "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decode-named-character-reference": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.1.0.tgz", - "integrity": "sha512-Wy+JTSbFThEOXQIR2L6mxJvEs+veIzpmqD7ynWxMXGpnk3smkHQOp6forLdHsKpAMW9iJpaBBIxz285t1n1C3w==", - "dependencies": { - "character-entities": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/dedent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", - "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/delaunator": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.0.1.tgz", - "integrity": "sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==", - "dependencies": { - "robust-predicates": "^3.0.2" - } - }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/devlop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", - "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", - "dependencies": { - "dequal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/didyoumean": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", - "dev": true - }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "dev": true - }, - "node_modules/dompurify": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.5.tgz", - "integrity": "sha512-mLPd29uoRe9HpvwP2TxClGQBzGXeEC/we/q+bFlmPPmj2p2Ugl3r6ATu/UU1v77DXNcehiBg9zsr1dREyA/dJQ==", - "optionalDependencies": { - "@types/trusted-types": "^2.0.7" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "node_modules/electron-to-chromium": { - "version": "1.5.132", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.132.tgz", - "integrity": "sha512-QgX9EBvWGmvSRa74zqfnG7+Eno0Ak0vftBll0Pt2/z5b3bEGYL6OUXLgKPtvx73dn3dvwrlyVkjPKRRlhLYTEg==" - }, - "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "10.4.0", - "license": "MIT" - }, - "node_modules/emoji-regex-xs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex-xs/-/emoji-regex-xs-1.0.0.tgz", - "integrity": "sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==" - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/environment": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", - "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/esast-util-from-estree": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/esast-util-from-estree/-/esast-util-from-estree-2.0.0.tgz", - "integrity": "sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==", - "dependencies": { - "@types/estree-jsx": "^1.0.0", - "devlop": "^1.0.0", - "estree-util-visit": "^2.0.0", - "unist-util-position-from-estree": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/esast-util-from-js": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/esast-util-from-js/-/esast-util-from-js-2.0.1.tgz", - "integrity": "sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==", - "dependencies": { - "@types/estree-jsx": "^1.0.0", - "acorn": "^8.0.0", - "esast-util-from-estree": "^2.0.0", - "vfile-message": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", - "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/esm": { - "version": "3.2.25", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", - "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/estree-util-attach-comments": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/estree-util-attach-comments/-/estree-util-attach-comments-3.0.0.tgz", - "integrity": "sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw==", - "dependencies": { - "@types/estree": "^1.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/estree-util-build-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/estree-util-build-jsx/-/estree-util-build-jsx-3.0.1.tgz", - "integrity": "sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ==", - "dependencies": { - "@types/estree-jsx": "^1.0.0", - "devlop": "^1.0.0", - "estree-util-is-identifier-name": "^3.0.0", - "estree-walker": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/estree-util-is-identifier-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz", - "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/estree-util-scope": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/estree-util-scope/-/estree-util-scope-1.0.0.tgz", - "integrity": "sha512-2CAASclonf+JFWBNJPndcOpA8EMJwa0Q8LUFJEKqXLW6+qBvbFZuF5gItbQOs/umBUkjviCSDCbBwU2cXbmrhQ==", - "dependencies": { - "@types/estree": "^1.0.0", - "devlop": "^1.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/estree-util-to-js": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/estree-util-to-js/-/estree-util-to-js-2.0.0.tgz", - "integrity": "sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg==", - "dependencies": { - "@types/estree-jsx": "^1.0.0", - "astring": "^1.8.0", - "source-map": "^0.7.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/estree-util-to-js/node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/estree-util-value-to-estree": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/estree-util-value-to-estree/-/estree-util-value-to-estree-3.3.2.tgz", - "integrity": "sha512-hYH1aSvQI63Cvq3T3loaem6LW4u72F187zW4FHpTrReJSm6W66vYTFNO1vH/chmcOulp1HlAj1pxn8Ag0oXI5Q==", - "dependencies": { - "@types/estree": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/remcohaszing" - } - }, - "node_modules/estree-util-visit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/estree-util-visit/-/estree-util-visit-2.0.0.tgz", - "integrity": "sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==", - "dependencies": { - "@types/estree-jsx": "^1.0.0", - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, - "node_modules/eventemitter3": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" - }, - "node_modules/execa": { - "version": "8.0.1", - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/execa/node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "license": "MIT", - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/exsolve": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.4.tgz", - "integrity": "sha512-xsZH6PXaER4XoV+NiT7JHp1bJodJVT+cxeSH1G0f0tlT0lJqYuHUP3bUx2HtfTDvOagMINYp8rsqusxud3RXhw==" - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fault": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fault/-/fault-2.0.1.tgz", - "integrity": "sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==", - "dependencies": { - "format": "^0.2.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/flexsearch": { - "version": "0.7.43", - "resolved": "https://registry.npmjs.org/flexsearch/-/flexsearch-0.7.43.tgz", - "integrity": "sha512-c5o/+Um8aqCSOXGcZoqZOm+NqtVwNsvVpWv6lfmSclU954O3wvQKxxK8zj74fPaSJbXpSLTs4PRhh+wnoCXnKg==" - }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/format": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", - "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/fraction.js": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", - "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", - "dev": true, - "engines": { - "node": "*" - }, - "funding": { - "type": "patreon", - "url": "https://github.com/sponsors/rawify" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-east-asian-width": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", - "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/github-slugger": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz", - "integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==" - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "engines": { - "node": ">=4" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" - }, - "node_modules/gray-matter": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", - "integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==", - "dependencies": { - "js-yaml": "^3.13.1", - "kind-of": "^6.0.2", - "section-matter": "^1.0.0", - "strip-bom-string": "^1.0.0" - }, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/hachure-fill": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz", - "integrity": "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==" - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hast-util-from-dom": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/hast-util-from-dom/-/hast-util-from-dom-5.0.1.tgz", - "integrity": "sha512-N+LqofjR2zuzTjCPzyDUdSshy4Ma6li7p/c3pA78uTwzFgENbgbUrm2ugwsOdcjI1muO+o6Dgzp9p8WHtn/39Q==", - "dependencies": { - "@types/hast": "^3.0.0", - "hastscript": "^9.0.0", - "web-namespaces": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-from-html": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.3.tgz", - "integrity": "sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==", - "dependencies": { - "@types/hast": "^3.0.0", - "devlop": "^1.1.0", - "hast-util-from-parse5": "^8.0.0", - "parse5": "^7.0.0", - "vfile": "^6.0.0", - "vfile-message": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-from-html-isomorphic": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hast-util-from-html-isomorphic/-/hast-util-from-html-isomorphic-2.0.0.tgz", - "integrity": "sha512-zJfpXq44yff2hmE0XmwEOzdWin5xwH+QIhMLOScpX91e/NSGPsAzNCvLQDIEPyO2TXi+lBmU6hjLIhV8MwP2kw==", - "dependencies": { - "@types/hast": "^3.0.0", - "hast-util-from-dom": "^5.0.0", - "hast-util-from-html": "^2.0.0", - "unist-util-remove-position": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-from-parse5": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-8.0.3.tgz", - "integrity": "sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg==", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/unist": "^3.0.0", - "devlop": "^1.0.0", - "hastscript": "^9.0.0", - "property-information": "^7.0.0", - "vfile": "^6.0.0", - "vfile-location": "^5.0.0", - "web-namespaces": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-is-element": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-3.0.0.tgz", - "integrity": "sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==", - "dependencies": { - "@types/hast": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-parse-selector": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-4.0.0.tgz", - "integrity": "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==", - "dependencies": { - "@types/hast": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-raw": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.1.0.tgz", - "integrity": "sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/unist": "^3.0.0", - "@ungap/structured-clone": "^1.0.0", - "hast-util-from-parse5": "^8.0.0", - "hast-util-to-parse5": "^8.0.0", - "html-void-elements": "^3.0.0", - "mdast-util-to-hast": "^13.0.0", - "parse5": "^7.0.0", - "unist-util-position": "^5.0.0", - "unist-util-visit": "^5.0.0", - "vfile": "^6.0.0", - "web-namespaces": "^2.0.0", - "zwitch": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-to-estree": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hast-util-to-estree/-/hast-util-to-estree-3.1.3.tgz", - "integrity": "sha512-48+B/rJWAp0jamNbAAf9M7Uf//UVqAoMmgXhBdxTDJLGKY+LRnZ99qcG+Qjl5HfMpYNzS5v4EAwVEF34LeAj7w==", - "dependencies": { - "@types/estree": "^1.0.0", - "@types/estree-jsx": "^1.0.0", - "@types/hast": "^3.0.0", - "comma-separated-tokens": "^2.0.0", - "devlop": "^1.0.0", - "estree-util-attach-comments": "^3.0.0", - "estree-util-is-identifier-name": "^3.0.0", - "hast-util-whitespace": "^3.0.0", - "mdast-util-mdx-expression": "^2.0.0", - "mdast-util-mdx-jsx": "^3.0.0", - "mdast-util-mdxjs-esm": "^2.0.0", - "property-information": "^7.0.0", - "space-separated-tokens": "^2.0.0", - "style-to-js": "^1.0.0", - "unist-util-position": "^5.0.0", - "zwitch": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-to-html": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.5.tgz", - "integrity": "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/unist": "^3.0.0", - "ccount": "^2.0.0", - "comma-separated-tokens": "^2.0.0", - "hast-util-whitespace": "^3.0.0", - "html-void-elements": "^3.0.0", - "mdast-util-to-hast": "^13.0.0", - "property-information": "^7.0.0", - "space-separated-tokens": "^2.0.0", - "stringify-entities": "^4.0.0", - "zwitch": "^2.0.4" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-to-jsx-runtime": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz", - "integrity": "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==", - "dependencies": { - "@types/estree": "^1.0.0", - "@types/hast": "^3.0.0", - "@types/unist": "^3.0.0", - "comma-separated-tokens": "^2.0.0", - "devlop": "^1.0.0", - "estree-util-is-identifier-name": "^3.0.0", - "hast-util-whitespace": "^3.0.0", - "mdast-util-mdx-expression": "^2.0.0", - "mdast-util-mdx-jsx": "^3.0.0", - "mdast-util-mdxjs-esm": "^2.0.0", - "property-information": "^7.0.0", - "space-separated-tokens": "^2.0.0", - "style-to-js": "^1.0.0", - "unist-util-position": "^5.0.0", - "vfile-message": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-to-parse5": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-8.0.0.tgz", - "integrity": "sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==", - "dependencies": { - "@types/hast": "^3.0.0", - "comma-separated-tokens": "^2.0.0", - "devlop": "^1.0.0", - "property-information": "^6.0.0", - "space-separated-tokens": "^2.0.0", - "web-namespaces": "^2.0.0", - "zwitch": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-to-parse5/node_modules/property-information": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz", - "integrity": "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/hast-util-to-string": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-3.0.1.tgz", - "integrity": "sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A==", - "dependencies": { - "@types/hast": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-to-text": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.2.tgz", - "integrity": "sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/unist": "^3.0.0", - "hast-util-is-element": "^3.0.0", - "unist-util-find-after": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-whitespace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", - "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", - "dependencies": { - "@types/hast": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hastscript": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-9.0.1.tgz", - "integrity": "sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==", - "dependencies": { - "@types/hast": "^3.0.0", - "comma-separated-tokens": "^2.0.0", - "hast-util-parse-selector": "^4.0.0", - "property-information": "^7.0.0", - "space-separated-tokens": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==" - }, - "node_modules/html-url-attributes": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz", - "integrity": "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/html-void-elements": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", - "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "license": "Apache-2.0", - "engines": { - "node": ">=16.17.0" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/import-local": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", - "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/inline-style-parser": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.4.tgz", - "integrity": "sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==" - }, - "node_modules/internmap": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", - "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", - "engines": { - "node": ">=12" - } - }, - "node_modules/is-alphabetical": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", - "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/is-alphanumerical": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", - "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", - "dependencies": { - "is-alphabetical": "^2.0.0", - "is-decimal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-decimal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", - "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "get-east-asian-width": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-hexadecimal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", - "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "dependencies": { - "is-docker": "^3.0.0" - }, - "bin": { - "is-inside-container": "cli.js" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-plain-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", - "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-wsl": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", - "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", - "dependencies": { - "is-inside-container": "^1.0.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is64bit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is64bit/-/is64bit-2.0.0.tgz", - "integrity": "sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw==", - "dependencies": { - "system-architecture": "^0.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", - "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", - "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", - "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", - "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-changed-files/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/jest-changed-files/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-changed-files/node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/jest-changed-files/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-changed-files/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/jest-changed-files/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-changed-files/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-changed-files/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-changed-files/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, - "node_modules/jest-changed-files/node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/jest-circus": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", - "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-circus/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-circus/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-cli": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", - "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-cli/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-config/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-config/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-config/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-diff/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-diff/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-diff/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-docblock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", - "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", - "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-each/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-each/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-environment-node": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", - "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", - "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", - "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-matcher-utils/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-matcher-utils/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-message-util/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-message-util/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-mock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", - "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", - "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", - "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-resolve/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-resolve/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runner": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", - "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-runner/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-runner/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", - "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-runtime/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-runtime/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-snapshot/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-snapshot/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-util/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-util/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-util/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-validate": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", - "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-validate/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-validate/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-watcher": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", - "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", - "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-watcher/node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-watcher/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-watcher/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-watcher/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", - "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/jiti": { - "version": "1.21.7", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", - "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", - "dev": true, - "bin": { - "jiti": "bin/jiti.js" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/katex": { - "version": "0.16.21", - "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.21.tgz", - "integrity": "sha512-XvqR7FgOHtWupfMiigNzmh+MgUVmDGU2kXZm899ZkPfcuoPuFxyHmXsgATDpFZDAXCI8tvinaVcDo8PIIJSo4A==", - "funding": [ - "https://opencollective.com/katex", - "https://github.com/sponsors/katex" - ], - "dependencies": { - "commander": "^8.3.0" - }, - "bin": { - "katex": "cli.js" - } - }, - "node_modules/katex/node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", - "engines": { - "node": ">= 12" - } - }, - "node_modules/khroma": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/khroma/-/khroma-2.1.0.tgz", - "integrity": "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==" - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "engines": { - "node": ">=6" - } - }, - "node_modules/kolorist": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", - "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==" - }, - "node_modules/langium": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/langium/-/langium-3.3.1.tgz", - "integrity": "sha512-QJv/h939gDpvT+9SiLVlY7tZC3xB2qK57v0J04Sh9wpMb6MP1q8gB21L3WIo8T5P1MSMg3Ep14L7KkDCFG3y4w==", - "dependencies": { - "chevrotain": "~11.0.3", - "chevrotain-allstar": "~0.3.0", - "vscode-languageserver": "~9.0.1", - "vscode-languageserver-textdocument": "~1.0.11", - "vscode-uri": "~3.0.8" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/layout-base": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz", - "integrity": "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==" - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "engines": { - "node": ">=6" - } - }, - "node_modules/lilconfig": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", - "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" - }, - "node_modules/lint-staged": { - "version": "15.2.10", - "resolved": "file:../node_modules/.pnpm/lint-staged@15.2.10/node_modules/lint-staged", - "license": "MIT", - "dependencies": { - "chalk": "~5.3.0", - "commander": "~12.1.0", - "debug": "~4.3.6", - "execa": "~8.0.1", - "lilconfig": "~3.1.2", - "listr2": "~8.2.4", - "micromatch": "~4.0.8", - "pidtree": "~0.6.0", - "string-argv": "~0.3.2", - "yaml": "~2.5.0" - }, - "bin": { - "lint-staged": "bin/lint-staged.js" - }, - "engines": { - "node": ">=18.12.0" - }, - "funding": { - "url": "https://opencollective.com/lint-staged" - } - }, - "node_modules/listr2": { - "version": "8.2.5", - "license": "MIT", - "dependencies": { - "cli-truncate": "^4.0.0", - "colorette": "^2.0.20", - "eventemitter3": "^5.0.1", - "log-update": "^6.1.0", - "rfdc": "^1.4.1", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/local-pkg": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.1.1.tgz", - "integrity": "sha512-WunYko2W1NcdfAFpuLUoucsgULmgDBRkdxHxWQ7mK0cQqwPiy8E1enjuRBrhLtZkB5iScJ1XIPdhVEFK8aOLSg==", - "dependencies": { - "mlly": "^1.7.4", - "pkg-types": "^2.0.1", - "quansync": "^0.2.8" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" - }, - "node_modules/log-update": { - "version": "6.1.0", - "license": "MIT", - "dependencies": { - "ansi-escapes": "^7.0.0", - "cli-cursor": "^5.0.0", - "slice-ansi": "^7.1.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/longest-streak": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", - "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/markdown-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-2.0.0.tgz", - "integrity": "sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/markdown-table": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz", - "integrity": "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/marked": { - "version": "15.0.7", - "resolved": "https://registry.npmjs.org/marked/-/marked-15.0.7.tgz", - "integrity": "sha512-dgLIeKGLx5FwziAnsk4ONoGwHwGPJzselimvlVskE9XLN4Orv9u2VA3GWw/lYUqjfA0rUT/6fqKwfZJapP9BEg==", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/mathjax-full": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/mathjax-full/-/mathjax-full-3.2.2.tgz", - "integrity": "sha512-+LfG9Fik+OuI8SLwsiR02IVdjcnRCy5MufYLi0C3TdMT56L/pjB0alMVGgoWJF8pN9Rc7FESycZB9BMNWIid5w==", - "dependencies": { - "esm": "^3.2.25", - "mhchemparser": "^4.1.0", - "mj-context-menu": "^0.6.1", - "speech-rule-engine": "^4.0.6" - } - }, - "node_modules/mdast-util-find-and-replace": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.2.tgz", - "integrity": "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==", - "dependencies": { - "@types/mdast": "^4.0.0", - "escape-string-regexp": "^5.0.0", - "unist-util-is": "^6.0.0", - "unist-util-visit-parents": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-from-markdown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz", - "integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-frontmatter": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-2.0.1.tgz", - "integrity": "sha512-LRqI9+wdgC25P0URIJY9vwocIzCcksduHQ9OF2joxQoyTNVduwLAFUzjoopuRJbJAReaKrNQKAZKL3uCMugWJA==", - "dependencies": { - "@types/mdast": "^4.0.0", - "devlop": "^1.0.0", - "escape-string-regexp": "^5.0.0", - "mdast-util-from-markdown": "^2.0.0", - "mdast-util-to-markdown": "^2.0.0", - "micromark-extension-frontmatter": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-gfm": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.1.0.tgz", - "integrity": "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==", - "dependencies": { - "mdast-util-from-markdown": "^2.0.0", - "mdast-util-gfm-autolink-literal": "^2.0.0", - "mdast-util-gfm-footnote": "^2.0.0", - "mdast-util-gfm-strikethrough": "^2.0.0", - "mdast-util-gfm-table": "^2.0.0", - "mdast-util-gfm-task-list-item": "^2.0.0", - "mdast-util-to-markdown": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-gfm-autolink-literal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.1.tgz", - "integrity": "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==", - "dependencies": { - "@types/mdast": "^4.0.0", - "ccount": "^2.0.0", - "devlop": "^1.0.0", - "mdast-util-find-and-replace": "^3.0.0", - "micromark-util-character": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-gfm-footnote": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.1.0.tgz", - "integrity": "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==", - "dependencies": { - "@types/mdast": "^4.0.0", - "devlop": "^1.1.0", - "mdast-util-from-markdown": "^2.0.0", - "mdast-util-to-markdown": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-gfm-strikethrough": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.0.tgz", - "integrity": "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==", - "dependencies": { - "@types/mdast": "^4.0.0", - "mdast-util-from-markdown": "^2.0.0", - "mdast-util-to-markdown": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-gfm-table": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.0.tgz", - "integrity": "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==", - "dependencies": { - "@types/mdast": "^4.0.0", - "devlop": "^1.0.0", - "markdown-table": "^3.0.0", - "mdast-util-from-markdown": "^2.0.0", - "mdast-util-to-markdown": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-gfm-task-list-item": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.0.tgz", - "integrity": "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==", - "dependencies": { - "@types/mdast": "^4.0.0", - "devlop": "^1.0.0", - "mdast-util-from-markdown": "^2.0.0", - "mdast-util-to-markdown": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-math": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-math/-/mdast-util-math-3.0.0.tgz", - "integrity": "sha512-Tl9GBNeG/AhJnQM221bJR2HPvLOSnLE/T9cJI9tlc6zwQk2nPk/4f0cHkOdEixQPC/j8UtKDdITswvLAy1OZ1w==", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/mdast": "^4.0.0", - "devlop": "^1.0.0", - "longest-streak": "^3.0.0", - "mdast-util-from-markdown": "^2.0.0", - "mdast-util-to-markdown": "^2.1.0", - "unist-util-remove-position": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-mdx": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-mdx/-/mdast-util-mdx-3.0.0.tgz", - "integrity": "sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==", - "dependencies": { - "mdast-util-from-markdown": "^2.0.0", - "mdast-util-mdx-expression": "^2.0.0", - "mdast-util-mdx-jsx": "^3.0.0", - "mdast-util-mdxjs-esm": "^2.0.0", - "mdast-util-to-markdown": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-mdx-expression": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz", - "integrity": "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==", - "dependencies": { - "@types/estree-jsx": "^1.0.0", - "@types/hast": "^3.0.0", - "@types/mdast": "^4.0.0", - "devlop": "^1.0.0", - "mdast-util-from-markdown": "^2.0.0", - "mdast-util-to-markdown": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-mdx-jsx": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.0.tgz", - "integrity": "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==", - "dependencies": { - "@types/estree-jsx": "^1.0.0", - "@types/hast": "^3.0.0", - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "ccount": "^2.0.0", - "devlop": "^1.1.0", - "mdast-util-from-markdown": "^2.0.0", - "mdast-util-to-markdown": "^2.0.0", - "parse-entities": "^4.0.0", - "stringify-entities": "^4.0.0", - "unist-util-stringify-position": "^4.0.0", - "vfile-message": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-mdxjs-esm": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz", - "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==", - "dependencies": { - "@types/estree-jsx": "^1.0.0", - "@types/hast": "^3.0.0", - "@types/mdast": "^4.0.0", - "devlop": "^1.0.0", - "mdast-util-from-markdown": "^2.0.0", - "mdast-util-to-markdown": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-phrasing": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz", - "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==", - "dependencies": { - "@types/mdast": "^4.0.0", - "unist-util-is": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-hast": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz", - "integrity": "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/mdast": "^4.0.0", - "@ungap/structured-clone": "^1.0.0", - "devlop": "^1.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "trim-lines": "^3.0.0", - "unist-util-position": "^5.0.0", - "unist-util-visit": "^5.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-markdown": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz", - "integrity": "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "longest-streak": "^3.0.0", - "mdast-util-phrasing": "^4.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark-util-classify-character": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "unist-util-visit": "^5.0.0", - "zwitch": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", - "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==", - "dependencies": { - "@types/mdast": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/mermaid": { - "version": "11.6.0", - "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.6.0.tgz", - "integrity": "sha512-PE8hGUy1LDlWIHWBP05SFdqUHGmRcCcK4IzpOKPE35eOw+G9zZgcnMpyunJVUEOgb//KBORPjysKndw8bFLuRg==", - "dependencies": { - "@braintree/sanitize-url": "^7.0.4", - "@iconify/utils": "^2.1.33", - "@mermaid-js/parser": "^0.4.0", - "@types/d3": "^7.4.3", - "cytoscape": "^3.29.3", - "cytoscape-cose-bilkent": "^4.1.0", - "cytoscape-fcose": "^2.2.0", - "d3": "^7.9.0", - "d3-sankey": "^0.12.3", - "dagre-d3-es": "7.0.11", - "dayjs": "^1.11.13", - "dompurify": "^3.2.4", - "katex": "^0.16.9", - "khroma": "^2.1.0", - "lodash-es": "^4.17.21", - "marked": "^15.0.7", - "roughjs": "^4.6.6", - "stylis": "^4.3.6", - "ts-dedent": "^2.2.0", - "uuid": "^11.1.0" - } - }, - "node_modules/mhchemparser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/mhchemparser/-/mhchemparser-4.2.1.tgz", - "integrity": "sha512-kYmyrCirqJf3zZ9t/0wGgRZ4/ZJw//VwaRVGA75C4nhE60vtnIzhl9J9ndkX/h6hxSN7pjg/cE0VxbnNM+bnDQ==" - }, - "node_modules/micromark": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", - "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-core-commonmark": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz", - "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-factory-destination": "^2.0.0", - "micromark-factory-label": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-factory-title": "^2.0.0", - "micromark-factory-whitespace": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-classify-character": "^2.0.0", - "micromark-util-html-tag-name": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-extension-frontmatter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-2.0.0.tgz", - "integrity": "sha512-C4AkuM3dA58cgZha7zVnuVxBhDsbttIMiytjgsM2XbHAB2faRVaHRle40558FBN+DJcrLNCoqG5mlrpdU4cRtg==", - "dependencies": { - "fault": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/micromark-extension-gfm": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz", - "integrity": "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==", - "dependencies": { - "micromark-extension-gfm-autolink-literal": "^2.0.0", - "micromark-extension-gfm-footnote": "^2.0.0", - "micromark-extension-gfm-strikethrough": "^2.0.0", - "micromark-extension-gfm-table": "^2.0.0", - "micromark-extension-gfm-tagfilter": "^2.0.0", - "micromark-extension-gfm-task-list-item": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-types": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/micromark-extension-gfm-autolink-literal": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz", - "integrity": "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/micromark-extension-gfm-footnote": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz", - "integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==", - "dependencies": { - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/micromark-extension-gfm-strikethrough": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz", - "integrity": "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==", - "dependencies": { - "devlop": "^1.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-classify-character": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/micromark-extension-gfm-table": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.1.tgz", - "integrity": "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==", - "dependencies": { - "devlop": "^1.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/micromark-extension-gfm-tagfilter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-2.0.0.tgz", - "integrity": "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==", - "dependencies": { - "micromark-util-types": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/micromark-extension-gfm-task-list-item": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz", - "integrity": "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==", - "dependencies": { - "devlop": "^1.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/micromark-extension-math": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/micromark-extension-math/-/micromark-extension-math-3.1.0.tgz", - "integrity": "sha512-lvEqd+fHjATVs+2v/8kg9i5Q0AP2k85H0WUOwpIVvUML8BapsMvh1XAogmQjOCsLpoKRCVQqEkQBB3NhVBcsOg==", - "dependencies": { - "@types/katex": "^0.16.0", - "devlop": "^1.0.0", - "katex": "^0.16.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/micromark-extension-mdx-expression": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/micromark-extension-mdx-expression/-/micromark-extension-mdx-expression-3.0.1.tgz", - "integrity": "sha512-dD/ADLJ1AeMvSAKBwO22zG22N4ybhe7kFIZ3LsDI0GlsNr2A3KYxb0LdC1u5rj4Nw+CHKY0RVdnHX8vj8ejm4Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "@types/estree": "^1.0.0", - "devlop": "^1.0.0", - "micromark-factory-mdx-expression": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-events-to-acorn": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-extension-mdx-jsx": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-3.0.2.tgz", - "integrity": "sha512-e5+q1DjMh62LZAJOnDraSSbDMvGJ8x3cbjygy2qFEi7HCeUT4BDKCvMozPozcD6WmOt6sVvYDNBKhFSz3kjOVQ==", - "dependencies": { - "@types/estree": "^1.0.0", - "devlop": "^1.0.0", - "estree-util-is-identifier-name": "^3.0.0", - "micromark-factory-mdx-expression": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-events-to-acorn": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "vfile-message": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/micromark-extension-mdx-md": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-extension-mdx-md/-/micromark-extension-mdx-md-2.0.0.tgz", - "integrity": "sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ==", - "dependencies": { - "micromark-util-types": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/micromark-extension-mdxjs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs/-/micromark-extension-mdxjs-3.0.0.tgz", - "integrity": "sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==", - "dependencies": { - "acorn": "^8.0.0", - "acorn-jsx": "^5.0.0", - "micromark-extension-mdx-expression": "^3.0.0", - "micromark-extension-mdx-jsx": "^3.0.0", - "micromark-extension-mdx-md": "^2.0.0", - "micromark-extension-mdxjs-esm": "^3.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-types": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/micromark-extension-mdxjs-esm": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs-esm/-/micromark-extension-mdxjs-esm-3.0.0.tgz", - "integrity": "sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==", - "dependencies": { - "@types/estree": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-events-to-acorn": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-position-from-estree": "^2.0.0", - "vfile-message": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/micromark-factory-destination": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz", - "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-label": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz", - "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "devlop": "^1.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-mdx-expression": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-2.0.3.tgz", - "integrity": "sha512-kQnEtA3vzucU2BkrIa8/VaSAsP+EJ3CKOvhMuJgOEGg9KDC6OAY6nSnNDVRiVNRqj7Y4SlSzcStaH/5jge8JdQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "@types/estree": "^1.0.0", - "devlop": "^1.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-events-to-acorn": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-position-from-estree": "^2.0.0", - "vfile-message": "^4.0.0" - } - }, - "node_modules/micromark-factory-space": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", - "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-title": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz", - "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-whitespace": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz", - "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-character": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", - "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-chunked": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz", - "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-classify-character": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz", - "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-combine-extensions": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz", - "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-chunked": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-decode-numeric-character-reference": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz", - "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-decode-string": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz", - "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-encode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", - "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ] - }, - "node_modules/micromark-util-events-to-acorn": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/micromark-util-events-to-acorn/-/micromark-util-events-to-acorn-2.0.3.tgz", - "integrity": "sha512-jmsiEIiZ1n7X1Rr5k8wVExBQCg5jy4UXVADItHmNk1zkwEVhBuIUKRu3fqv+hs4nxLISi2DQGlqIOGiFxgbfHg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "@types/estree": "^1.0.0", - "@types/unist": "^3.0.0", - "devlop": "^1.0.0", - "estree-util-visit": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "vfile-message": "^4.0.0" - } - }, - "node_modules/micromark-util-html-tag-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz", - "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ] - }, - "node_modules/micromark-util-normalize-identifier": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz", - "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-resolve-all": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz", - "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-sanitize-uri": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", - "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-subtokenize": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz", - "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "devlop": "^1.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-symbol": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", - "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ] - }, - "node_modules/micromark-util-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", - "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ] - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mimic-function": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", - "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/mj-context-menu": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/mj-context-menu/-/mj-context-menu-0.6.1.tgz", - "integrity": "sha512-7NO5s6n10TIV96d4g2uDpG7ZDpIhMh0QNfGdJw/W47JswFcosz457wqz/b5sAKvl12sxINGFCn80NZHKwxQEXA==" - }, - "node_modules/mlly": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz", - "integrity": "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==", - "dependencies": { - "acorn": "^8.14.0", - "pathe": "^2.0.1", - "pkg-types": "^1.3.0", - "ufo": "^1.5.4" - } - }, - "node_modules/mlly/node_modules/confbox": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", - "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==" - }, - "node_modules/mlly/node_modules/pkg-types": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", - "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", - "dependencies": { - "confbox": "^0.1.8", - "mlly": "^1.7.4", - "pathe": "^2.0.1" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" - }, - "node_modules/negotiator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", - "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/next": { - "version": "14.2.26", - "resolved": "https://registry.npmjs.org/next/-/next-14.2.26.tgz", - "integrity": "sha512-b81XSLihMwCfwiUVRRja3LphLo4uBBMZEzBBWMaISbKTwOmq3wPknIETy/8000tr7Gq4WmbuFYPS7jOYIf+ZJw==", - "dependencies": { - "@next/env": "14.2.26", - "@swc/helpers": "0.5.5", - "busboy": "1.6.0", - "caniuse-lite": "^1.0.30001579", - "graceful-fs": "^4.2.11", - "postcss": "8.4.31", - "styled-jsx": "5.1.1" - }, - "bin": { - "next": "dist/bin/next" - }, - "engines": { - "node": ">=18.17.0" - }, - "optionalDependencies": { - "@next/swc-darwin-arm64": "14.2.26", - "@next/swc-darwin-x64": "14.2.26", - "@next/swc-linux-arm64-gnu": "14.2.26", - "@next/swc-linux-arm64-musl": "14.2.26", - "@next/swc-linux-x64-gnu": "14.2.26", - "@next/swc-linux-x64-musl": "14.2.26", - "@next/swc-win32-arm64-msvc": "14.2.26", - "@next/swc-win32-ia32-msvc": "14.2.26", - "@next/swc-win32-x64-msvc": "14.2.26" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.1.0", - "@playwright/test": "^1.41.2", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "sass": "^1.3.0" - }, - "peerDependenciesMeta": { - "@opentelemetry/api": { - "optional": true - }, - "@playwright/test": { - "optional": true - }, - "sass": { - "optional": true - } - } - }, - "node_modules/next-sitemap": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/next-sitemap/-/next-sitemap-4.2.3.tgz", - "integrity": "sha512-vjdCxeDuWDzldhCnyFCQipw5bfpl4HmZA7uoo3GAaYGjGgfL4Cxb1CiztPuWGmS+auYs7/8OekRS8C2cjdAsjQ==", - "dev": true, - "funding": [ - { - "url": "https://github.com/iamvishnusankar/next-sitemap.git" - } - ], - "dependencies": { - "@corex/deepmerge": "^4.0.43", - "@next/env": "^13.4.3", - "fast-glob": "^3.2.12", - "minimist": "^1.2.8" - }, - "bin": { - "next-sitemap": "bin/next-sitemap.mjs", - "next-sitemap-cjs": "bin/next-sitemap.cjs" - }, - "engines": { - "node": ">=14.18" - }, - "peerDependencies": { - "next": "*" - } - }, - "node_modules/next-sitemap/node_modules/@next/env": { - "version": "13.5.11", - "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.11.tgz", - "integrity": "sha512-fbb2C7HChgM7CemdCY+y3N1n8pcTKdqtQLbC7/EQtPdLvlMUT9JX/dBYl8MMZAtYG4uVMyPFHXckb68q/NRwqg==", - "dev": true - }, - "node_modules/next-themes": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.4.6.tgz", - "integrity": "sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==", - "peerDependencies": { - "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" - } - }, - "node_modules/next/node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/nextra": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nextra/-/nextra-3.3.1.tgz", - "integrity": "sha512-jiwj+LfUPHHeAxJAEqFuglxnbjFgzAOnDWFsjv7iv3BWiX8OksDwd3I2Sv3j2zba00iIBDEPdNeylfzTtTLZVg==", - "dependencies": { - "@formatjs/intl-localematcher": "^0.5.4", - "@headlessui/react": "^2.1.2", - "@mdx-js/mdx": "^3.0.0", - "@mdx-js/react": "^3.0.0", - "@napi-rs/simple-git": "^0.1.9", - "@shikijs/twoslash": "^1.0.0", - "@theguild/remark-mermaid": "^0.1.3", - "@theguild/remark-npm2yarn": "^0.3.2", - "better-react-mathjax": "^2.0.3", - "clsx": "^2.0.0", - "estree-util-to-js": "^2.0.0", - "estree-util-value-to-estree": "^3.0.1", - "github-slugger": "^2.0.0", - "graceful-fs": "^4.2.11", - "gray-matter": "^4.0.3", - "hast-util-to-estree": "^3.1.0", - "katex": "^0.16.9", - "mdast-util-from-markdown": "^2.0.1", - "mdast-util-gfm": "^3.0.0", - "mdast-util-to-hast": "^13.2.0", - "negotiator": "^1.0.0", - "p-limit": "^6.0.0", - "react-medium-image-zoom": "^5.2.12", - "rehype-katex": "^7.0.0", - "rehype-pretty-code": "0.14.0", - "rehype-raw": "^7.0.0", - "remark-frontmatter": "^5.0.0", - "remark-gfm": "^4.0.0", - "remark-math": "^6.0.0", - "remark-reading-time": "^2.0.1", - "remark-smartypants": "^3.0.0", - "shiki": "^1.0.0", - "slash": "^5.1.0", - "title": "^4.0.0", - "unist-util-remove": "^4.0.0", - "unist-util-visit": "^5.0.0", - "yaml": "^2.3.2", - "zod": "^3.22.3", - "zod-validation-error": "^3.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "next": ">=13", - "react": ">=18", - "react-dom": ">=18" - } - }, - "node_modules/nextra-theme-docs": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nextra-theme-docs/-/nextra-theme-docs-3.3.1.tgz", - "integrity": "sha512-P305m2UcW2IDyQhjrcAu0qpdPArikofinABslUCAyixYShsmcdDRUhIMd4QBHYru4gQuVjGWX9PhWZZCbNvzDQ==", - "dependencies": { - "@headlessui/react": "^2.1.2", - "clsx": "^2.0.0", - "escape-string-regexp": "^5.0.0", - "flexsearch": "^0.7.43", - "next-themes": "^0.4.0", - "scroll-into-view-if-needed": "^3.1.0", - "zod": "^3.22.3" - }, - "peerDependencies": { - "next": ">=13", - "nextra": "3.3.1", - "react": ">=18", - "react-dom": ">=18" - } - }, - "node_modules/nextra/node_modules/p-limit": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-6.2.0.tgz", - "integrity": "sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA==", - "dependencies": { - "yocto-queue": "^1.1.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/nextra/node_modules/slash": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", - "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/nextra/node_modules/yocto-queue": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", - "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/nlcst-to-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/nlcst-to-string/-/nlcst-to-string-4.0.0.tgz", - "integrity": "sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA==", - "dependencies": { - "@types/nlcst": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" - }, - "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==" - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "5.3.0", - "license": "MIT", - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-to-yarn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/npm-to-yarn/-/npm-to-yarn-3.0.1.tgz", - "integrity": "sha512-tt6PvKu4WyzPwWUzy/hvPFqn+uwXO0K1ZHka8az3NnrhWJDmSqI8ncWq0fkL0k/lmmi5tAC11FXwXuh0rFbt1A==", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/nebrelbug/npm-to-yarn?sponsor=1" - } - }, - "node_modules/oauth4webapi": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.5.0.tgz", - "integrity": "sha512-DF3mLWNuxPkxJkHmWxbSFz4aE5CjWOsm465VBfBdWzmzX4Mg3vF8icxK+iKqfdWrIumBJ2TaoNQWx+SQc2bsPQ==", - "funding": { - "url": "https://github.com/sponsors/panva" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/oniguruma-to-es": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-2.3.0.tgz", - "integrity": "sha512-bwALDxriqfKGfUufKGGepCzu9x7nJQuoRoAFp4AnwehhC2crqrDIAP/uN2qdlsAvSMpeRC3+Yzhqc7hLmle5+g==", - "dependencies": { - "emoji-regex-xs": "^1.0.0", - "regex": "^5.1.1", - "regex-recursion": "^5.1.1" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true - }, - "node_modules/package-manager-detector": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.11.tgz", - "integrity": "sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==", - "dependencies": { - "quansync": "^0.2.7" - } - }, - "node_modules/parse-entities": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", - "integrity": "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==", - "dependencies": { - "@types/unist": "^2.0.0", - "character-entities-legacy": "^3.0.0", - "character-reference-invalid": "^2.0.0", - "decode-named-character-reference": "^1.0.0", - "is-alphanumerical": "^2.0.0", - "is-decimal": "^2.0.0", - "is-hexadecimal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/parse-entities/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==" - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse-latin": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse-latin/-/parse-latin-7.0.0.tgz", - "integrity": "sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ==", - "dependencies": { - "@types/nlcst": "^2.0.0", - "@types/unist": "^3.0.0", - "nlcst-to-string": "^4.0.0", - "unist-util-modify-children": "^4.0.0", - "unist-util-visit-children": "^3.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/parse-numeric-range": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz", - "integrity": "sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==" - }, - "node_modules/parse5": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", - "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==", - "dependencies": { - "entities": "^4.5.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/path-data-parser": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz", - "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==" - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true - }, - "node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pidtree": { - "version": "0.6.0", - "license": "MIT", - "bin": { - "pidtree": "bin/pidtree.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pirates": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", - "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-types": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.1.0.tgz", - "integrity": "sha512-wmJwA+8ihJixSoHKxZJRBQG1oY8Yr9pGLzRmSsNms0iNWyHHAlZCa7mmKiFR10YPZuz/2k169JiS/inOjBCZ2A==", - "dependencies": { - "confbox": "^0.2.1", - "exsolve": "^1.0.1", - "pathe": "^2.0.3" - } - }, - "node_modules/points-on-curve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz", - "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==" - }, - "node_modules/points-on-path": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz", - "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==", - "dependencies": { - "path-data-parser": "0.1.0", - "points-on-curve": "0.2.0" - } - }, - "node_modules/postcss": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", - "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.8", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss-import": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", - "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "node_modules/postcss-js": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", - "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", - "dev": true, - "dependencies": { - "camelcase-css": "^2.0.1" - }, - "engines": { - "node": "^12 || ^14 || >= 16" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.4.21" - } - }, - "node_modules/postcss-load-config": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", - "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "lilconfig": "^3.0.0", - "yaml": "^2.3.4" - }, - "engines": { - "node": ">= 14" - }, - "peerDependencies": { - "postcss": ">=8.0.9", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/postcss-nested": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", - "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "postcss-selector-parser": "^6.1.1" - }, - "engines": { - "node": ">=12.0" - }, - "peerDependencies": { - "postcss": "^8.2.14" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", - "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", - "dev": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true - }, - "node_modules/prettier": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", - "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", - "dev": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/prismjs": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", - "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==", - "engines": { - "node": ">=6" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/property-information": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.0.0.tgz", - "integrity": "sha512-7D/qOz/+Y4X/rzSB6jKxKUsQnphO046ei8qxG59mtM3RG3DHgTK81HrxrmoDVINJb8NKT5ZsRbwHvQ6B68Iyhg==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/pure-rand": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", - "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ] - }, - "node_modules/quansync": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.10.tgz", - "integrity": "sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/antfu" - }, - { - "type": "individual", - "url": "https://github.com/sponsors/sxzz" - } - ] - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" - }, - "peerDependencies": { - "react": "^18.3.1" - } - }, - "node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" - }, - "node_modules/react-markdown": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-9.1.0.tgz", - "integrity": "sha512-xaijuJB0kzGiUdG7nc2MOMDUDBWPyGAjZtUrow9XxUeua8IqeP+VlIfAZ3bphpcLTnSZXz6z9jcVC/TCwbfgdw==", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/mdast": "^4.0.0", - "devlop": "^1.0.0", - "hast-util-to-jsx-runtime": "^2.0.0", - "html-url-attributes": "^3.0.0", - "mdast-util-to-hast": "^13.0.0", - "remark-parse": "^11.0.0", - "remark-rehype": "^11.0.0", - "unified": "^11.0.0", - "unist-util-visit": "^5.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - }, - "peerDependencies": { - "@types/react": ">=18", - "react": ">=18" - } - }, - "node_modules/react-medium-image-zoom": { - "version": "5.2.14", - "resolved": "https://registry.npmjs.org/react-medium-image-zoom/-/react-medium-image-zoom-5.2.14.tgz", - "integrity": "sha512-nfTVYcAUnBzXQpPDcZL+cG/e6UceYUIG+zDcnemL7jtAqbJjVVkA85RgneGtJeni12dTyiRPZVM6Szkmwd/o8w==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/rpearce" - } - ], - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, - "node_modules/read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dev": true, - "dependencies": { - "pify": "^2.3.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/reading-time": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/reading-time/-/reading-time-1.5.0.tgz", - "integrity": "sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==" - }, - "node_modules/recma-build-jsx": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/recma-build-jsx/-/recma-build-jsx-1.0.0.tgz", - "integrity": "sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-util-build-jsx": "^3.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/recma-jsx": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/recma-jsx/-/recma-jsx-1.0.0.tgz", - "integrity": "sha512-5vwkv65qWwYxg+Atz95acp8DMu1JDSqdGkA2Of1j6rCreyFUE/gp15fC8MnGEuG1W68UKjM6x6+YTWIh7hZM/Q==", - "dependencies": { - "acorn-jsx": "^5.0.0", - "estree-util-to-js": "^2.0.0", - "recma-parse": "^1.0.0", - "recma-stringify": "^1.0.0", - "unified": "^11.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/recma-parse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/recma-parse/-/recma-parse-1.0.0.tgz", - "integrity": "sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ==", - "dependencies": { - "@types/estree": "^1.0.0", - "esast-util-from-js": "^2.0.0", - "unified": "^11.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/recma-stringify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/recma-stringify/-/recma-stringify-1.0.0.tgz", - "integrity": "sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g==", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-util-to-js": "^2.0.0", - "unified": "^11.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/regex": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/regex/-/regex-5.1.1.tgz", - "integrity": "sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==", - "dependencies": { - "regex-utilities": "^2.3.0" - } - }, - "node_modules/regex-recursion": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-5.1.1.tgz", - "integrity": "sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==", - "dependencies": { - "regex": "^5.1.1", - "regex-utilities": "^2.3.0" - } - }, - "node_modules/regex-utilities": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz", - "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==" - }, - "node_modules/rehype-katex": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/rehype-katex/-/rehype-katex-7.0.1.tgz", - "integrity": "sha512-OiM2wrZ/wuhKkigASodFoo8wimG3H12LWQaH8qSPVJn9apWKFSH3YOCtbKpBorTVw/eI7cuT21XBbvwEswbIOA==", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/katex": "^0.16.0", - "hast-util-from-html-isomorphic": "^2.0.0", - "hast-util-to-text": "^4.0.0", - "katex": "^0.16.0", - "unist-util-visit-parents": "^6.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/rehype-parse": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/rehype-parse/-/rehype-parse-9.0.1.tgz", - "integrity": "sha512-ksCzCD0Fgfh7trPDxr2rSylbwq9iYDkSn8TCDmEJ49ljEUBxDVCzCHv7QNzZOfODanX4+bWQ4WZqLCRWYLfhag==", - "dependencies": { - "@types/hast": "^3.0.0", - "hast-util-from-html": "^2.0.0", - "unified": "^11.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/rehype-pretty-code": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/rehype-pretty-code/-/rehype-pretty-code-0.14.0.tgz", - "integrity": "sha512-hBeKF/Wkkf3zyUS8lal9RCUuhypDWLQc+h9UrP9Pav25FUm/AQAVh4m5gdvJxh4Oz+U+xKvdsV01p1LdvsZTiQ==", - "dependencies": { - "@types/hast": "^3.0.4", - "hast-util-to-string": "^3.0.0", - "parse-numeric-range": "^1.3.0", - "rehype-parse": "^9.0.0", - "unified": "^11.0.5", - "unist-util-visit": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "shiki": "^1.3.0" - } - }, - "node_modules/rehype-raw": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-7.0.0.tgz", - "integrity": "sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==", - "dependencies": { - "@types/hast": "^3.0.0", - "hast-util-raw": "^9.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/rehype-recma": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rehype-recma/-/rehype-recma-1.0.0.tgz", - "integrity": "sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw==", - "dependencies": { - "@types/estree": "^1.0.0", - "@types/hast": "^3.0.0", - "hast-util-to-estree": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-frontmatter": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-5.0.0.tgz", - "integrity": "sha512-XTFYvNASMe5iPN0719nPrdItC9aU0ssC4v14mH1BCi1u0n1gAocqcujWUrByftZTbLhRtiKRyjYTSIOcr69UVQ==", - "dependencies": { - "@types/mdast": "^4.0.0", - "mdast-util-frontmatter": "^2.0.0", - "micromark-extension-frontmatter": "^2.0.0", - "unified": "^11.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-gfm": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz", - "integrity": "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==", - "dependencies": { - "@types/mdast": "^4.0.0", - "mdast-util-gfm": "^3.0.0", - "micromark-extension-gfm": "^3.0.0", - "remark-parse": "^11.0.0", - "remark-stringify": "^11.0.0", - "unified": "^11.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-math": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/remark-math/-/remark-math-6.0.0.tgz", - "integrity": "sha512-MMqgnP74Igy+S3WwnhQ7kqGlEerTETXMvJhrUzDikVZ2/uogJCb+WHUg97hK9/jcfc0dkD73s3LN8zU49cTEtA==", - "dependencies": { - "@types/mdast": "^4.0.0", - "mdast-util-math": "^3.0.0", - "micromark-extension-math": "^3.0.0", - "unified": "^11.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-mdx": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-3.1.0.tgz", - "integrity": "sha512-Ngl/H3YXyBV9RcRNdlYsZujAmhsxwzxpDzpDEhFBVAGthS4GDgnctpDjgFl/ULx5UEDzqtW1cyBSNKqYYrqLBA==", - "dependencies": { - "mdast-util-mdx": "^3.0.0", - "micromark-extension-mdxjs": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-parse": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz", - "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==", - "dependencies": { - "@types/mdast": "^4.0.0", - "mdast-util-from-markdown": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unified": "^11.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-reading-time": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/remark-reading-time/-/remark-reading-time-2.0.1.tgz", - "integrity": "sha512-fy4BKy9SRhtYbEHvp6AItbRTnrhiDGbqLQTSYVbQPGuRCncU1ubSsh9p/W5QZSxtYcUXv8KGL0xBgPLyNJA1xw==", - "dependencies": { - "estree-util-is-identifier-name": "^2.0.0", - "estree-util-value-to-estree": "^1.3.0", - "reading-time": "^1.3.0", - "unist-util-visit": "^3.1.0" - } - }, - "node_modules/remark-reading-time/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==" - }, - "node_modules/remark-reading-time/node_modules/estree-util-is-identifier-name": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-2.1.0.tgz", - "integrity": "sha512-bEN9VHRyXAUOjkKVQVvArFym08BTWB0aJPppZZr0UNyAqWsLaVfAqP7hbaTJjzHifmB5ebnR8Wm7r7yGN/HonQ==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-reading-time/node_modules/estree-util-value-to-estree": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/estree-util-value-to-estree/-/estree-util-value-to-estree-1.3.0.tgz", - "integrity": "sha512-Y+ughcF9jSUJvncXwqRageavjrNPAI+1M/L3BI3PyLp1nmgYTGUXU6t5z1Y7OWuThoDdhPME07bQU+d5LxdJqw==", - "dependencies": { - "is-plain-obj": "^3.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/remark-reading-time/node_modules/is-plain-obj": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", - "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/remark-reading-time/node_modules/unist-util-is": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", - "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", - "dependencies": { - "@types/unist": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-reading-time/node_modules/unist-util-visit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-3.1.0.tgz", - "integrity": "sha512-Szoh+R/Ll68QWAyQyZZpQzZQm2UPbxibDvaY8Xc9SUtYgPsDzx5AWSk++UUt2hJuow8mvwR+rG+LQLw+KsuAKA==", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^5.0.0", - "unist-util-visit-parents": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-reading-time/node_modules/unist-util-visit-parents": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-4.1.1.tgz", - "integrity": "sha512-1xAFJXAKpnnJl8G7K5KgU7FY55y3GcLIXqkzUj5QF/QVP7biUm0K0O2oqVkYsdjzJKifYeWn9+o6piAK2hGSHw==", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-rehype": { - "version": "11.1.2", - "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz", - "integrity": "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/mdast": "^4.0.0", - "mdast-util-to-hast": "^13.0.0", - "unified": "^11.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-smartypants": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/remark-smartypants/-/remark-smartypants-3.0.2.tgz", - "integrity": "sha512-ILTWeOriIluwEvPjv67v7Blgrcx+LZOkAUVtKI3putuhlZm84FnqDORNXPPm+HY3NdZOMhyDwZ1E+eZB/Df5dA==", - "dependencies": { - "retext": "^9.0.0", - "retext-smartypants": "^6.0.0", - "unified": "^11.0.4", - "unist-util-visit": "^5.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/remark-stringify": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz", - "integrity": "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==", - "dependencies": { - "@types/mdast": "^4.0.0", - "mdast-util-to-markdown": "^2.0.0", - "unified": "^11.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", - "dependencies": { - "is-core-module": "^2.16.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve.exports": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", - "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", - "engines": { - "node": ">=10" - } - }, - "node_modules/restore-cursor": { - "version": "5.1.0", - "license": "MIT", - "dependencies": { - "onetime": "^7.0.0", - "signal-exit": "^4.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/restore-cursor/node_modules/onetime": { - "version": "7.0.0", - "license": "MIT", - "dependencies": { - "mimic-function": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/retext": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/retext/-/retext-9.0.0.tgz", - "integrity": "sha512-sbMDcpHCNjvlheSgMfEcVrZko3cDzdbe1x/e7G66dFp0Ff7Mldvi2uv6JkJQzdRcvLYE8CA8Oe8siQx8ZOgTcA==", - "dependencies": { - "@types/nlcst": "^2.0.0", - "retext-latin": "^4.0.0", - "retext-stringify": "^4.0.0", - "unified": "^11.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/retext-latin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/retext-latin/-/retext-latin-4.0.0.tgz", - "integrity": "sha512-hv9woG7Fy0M9IlRQloq/N6atV82NxLGveq+3H2WOi79dtIYWN8OaxogDm77f8YnVXJL2VD3bbqowu5E3EMhBYA==", - "dependencies": { - "@types/nlcst": "^2.0.0", - "parse-latin": "^7.0.0", - "unified": "^11.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/retext-smartypants": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/retext-smartypants/-/retext-smartypants-6.2.0.tgz", - "integrity": "sha512-kk0jOU7+zGv//kfjXEBjdIryL1Acl4i9XNkHxtM7Tm5lFiCog576fjNC9hjoR7LTKQ0DsPWy09JummSsH1uqfQ==", - "dependencies": { - "@types/nlcst": "^2.0.0", - "nlcst-to-string": "^4.0.0", - "unist-util-visit": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/retext-stringify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/retext-stringify/-/retext-stringify-4.0.0.tgz", - "integrity": "sha512-rtfN/0o8kL1e+78+uxPTqu1Klt0yPzKuQ2BfWwwfgIUSayyzxpM1PJzkKt4V8803uB9qSy32MvI7Xep9khTpiA==", - "dependencies": { - "@types/nlcst": "^2.0.0", - "nlcst-to-string": "^4.0.0", - "unified": "^11.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rfdc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", - "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==" - }, - "node_modules/robust-predicates": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", - "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==" - }, - "node_modules/roughjs": { - "version": "4.6.6", - "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.6.6.tgz", - "integrity": "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==", - "dependencies": { - "hachure-fill": "^0.5.2", - "path-data-parser": "^0.1.0", - "points-on-curve": "^0.2.0", - "points-on-path": "^0.2.1" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/rw": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", - "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/scroll-into-view-if-needed": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.1.0.tgz", - "integrity": "sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==", - "dependencies": { - "compute-scroll-into-view": "^3.0.2" - } - }, - "node_modules/search-insights": { - "version": "2.17.3", - "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.3.tgz", - "integrity": "sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==", - "peer": true - }, - "node_modules/section-matter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", - "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", - "dependencies": { - "extend-shallow": "^2.0.1", - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/sharp": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", - "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", - "hasInstallScript": true, - "dependencies": { - "color": "^4.2.3", - "detect-libc": "^2.0.3", - "semver": "^7.6.3" - }, - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-darwin-arm64": "0.33.5", - "@img/sharp-darwin-x64": "0.33.5", - "@img/sharp-libvips-darwin-arm64": "1.0.4", - "@img/sharp-libvips-darwin-x64": "1.0.4", - "@img/sharp-libvips-linux-arm": "1.0.5", - "@img/sharp-libvips-linux-arm64": "1.0.4", - "@img/sharp-libvips-linux-s390x": "1.0.4", - "@img/sharp-libvips-linux-x64": "1.0.4", - "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", - "@img/sharp-libvips-linuxmusl-x64": "1.0.4", - "@img/sharp-linux-arm": "0.33.5", - "@img/sharp-linux-arm64": "0.33.5", - "@img/sharp-linux-s390x": "0.33.5", - "@img/sharp-linux-x64": "0.33.5", - "@img/sharp-linuxmusl-arm64": "0.33.5", - "@img/sharp-linuxmusl-x64": "0.33.5", - "@img/sharp-wasm32": "0.33.5", - "@img/sharp-win32-ia32": "0.33.5", - "@img/sharp-win32-x64": "0.33.5" - } - }, - "node_modules/sharp/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, - "node_modules/shiki": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.29.2.tgz", - "integrity": "sha512-njXuliz/cP+67jU2hukkxCNuH1yUi4QfdZZY+sMr5PPrIyXSu5iTb/qYC4BiWWB0vZ+7TbdvYUCeL23zpwCfbg==", - "dependencies": { - "@shikijs/core": "1.29.2", - "@shikijs/engine-javascript": "1.29.2", - "@shikijs/engine-oniguruma": "1.29.2", - "@shikijs/langs": "1.29.2", - "@shikijs/themes": "1.29.2", - "@shikijs/types": "1.29.2", - "@shikijs/vscode-textmate": "^10.0.1", - "@types/hast": "^3.0.4" - } - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "node_modules/simple-swizzle/node_modules/is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "is-fullwidth-code-point": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/space-separated-tokens": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", - "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/speech-rule-engine": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/speech-rule-engine/-/speech-rule-engine-4.0.7.tgz", - "integrity": "sha512-sJrL3/wHzNwJRLBdf6CjJWIlxC04iYKkyXvYSVsWVOiC2DSkHmxsqOhEeMsBA9XK+CHuNcsdkbFDnoUfAsmp9g==", - "dependencies": { - "commander": "9.2.0", - "wicked-good-xpath": "1.3.0", - "xmldom-sre": "0.1.31" - }, - "bin": { - "sre": "bin/sre" - } - }, - "node_modules/speech-rule-engine/node_modules/commander": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.2.0.tgz", - "integrity": "sha512-e2i4wANQiSXgnrBlIatyHtP1odfUp0BbV5Y5nEGbxtIrStkEOAAzCUirvLBNXHLr7kwLvJl6V+4V3XV9x7Wd9w==", - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/string-argv": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", - "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", - "engines": { - "node": ">=0.6.19" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-length/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-length/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/stringify-entities": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", - "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", - "dependencies": { - "character-entities-html4": "^2.0.0", - "character-entities-legacy": "^3.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/strip-ansi": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", - "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/style-to-js": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.16.tgz", - "integrity": "sha512-/Q6ld50hKYPH3d/r6nr117TZkHR0w0kGGIVfpG9N6D8NymRPM9RqCUv4pRpJ62E5DqOYx2AFpbZMyCPnjQCnOw==", - "dependencies": { - "style-to-object": "1.0.8" - } - }, - "node_modules/style-to-object": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.8.tgz", - "integrity": "sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==", - "dependencies": { - "inline-style-parser": "0.2.4" - } - }, - "node_modules/styled-jsx": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz", - "integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==", - "dependencies": { - "client-only": "0.0.1" - }, - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/stylis": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.6.tgz", - "integrity": "sha512-yQ3rwFWRfwNUY7H5vpU0wfdkNSnvnJinhF9830Swlaxl03zsOjCfmX0ugac+3LtK0lYSgwL/KXc8oYL3mG4YFQ==" - }, - "node_modules/sucrase": { - "version": "3.35.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", - "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.2", - "commander": "^4.0.0", - "glob": "^10.3.10", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "ts-interface-checker": "^0.1.9" - }, - "bin": { - "sucrase": "bin/sucrase", - "sucrase-node": "bin/sucrase-node" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/sucrase/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/sucrase/node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/sucrase/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sucrase/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/system-architecture": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/system-architecture/-/system-architecture-0.1.0.tgz", - "integrity": "sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA==", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/tabbable": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", - "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==" - }, - "node_modules/tailwindcss": { - "version": "3.4.17", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", - "integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==", - "dev": true, - "dependencies": { - "@alloc/quick-lru": "^5.2.0", - "arg": "^5.0.2", - "chokidar": "^3.6.0", - "didyoumean": "^1.2.2", - "dlv": "^1.1.3", - "fast-glob": "^3.3.2", - "glob-parent": "^6.0.2", - "is-glob": "^4.0.3", - "jiti": "^1.21.6", - "lilconfig": "^3.1.3", - "micromatch": "^4.0.8", - "normalize-path": "^3.0.0", - "object-hash": "^3.0.0", - "picocolors": "^1.1.1", - "postcss": "^8.4.47", - "postcss-import": "^15.1.0", - "postcss-js": "^4.0.1", - "postcss-load-config": "^4.0.2", - "postcss-nested": "^6.2.0", - "postcss-selector-parser": "^6.1.2", - "resolve": "^1.22.8", - "sucrase": "^3.35.0" - }, - "bin": { - "tailwind": "lib/cli.js", - "tailwindcss": "lib/cli.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dev": true, - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tinyexec": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", - "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==" - }, - "node_modules/title": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/title/-/title-4.0.1.tgz", - "integrity": "sha512-xRnPkJx9nvE5MF6LkB5e8QJjE2FW8269wTu/LQdf7zZqBgPly0QJPf/CWAo7srj5so4yXfoLEdCFgurlpi47zg==", - "dependencies": { - "arg": "^5.0.0", - "chalk": "^5.0.0", - "clipboardy": "^4.0.0" - }, - "bin": { - "title": "dist/esm/bin.js" - } - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==" - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/trim-lines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", - "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/trough": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", - "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/ts-dedent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", - "integrity": "sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==", - "engines": { - "node": ">=6.10" - } - }, - "node_modules/ts-interface-checker": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "dev": true - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" - }, - "node_modules/twoslash": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/twoslash/-/twoslash-0.2.12.tgz", - "integrity": "sha512-tEHPASMqi7kqwfJbkk7hc/4EhlrKCSLcur+TcvYki3vhIfaRMXnXjaYFgXpoZRbT6GdprD4tGuVBEmTpUgLBsw==", - "dependencies": { - "@typescript/vfs": "^1.6.0", - "twoslash-protocol": "0.2.12" - }, - "peerDependencies": { - "typescript": "*" - } - }, - "node_modules/twoslash-protocol": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/twoslash-protocol/-/twoslash-protocol-0.2.12.tgz", - "integrity": "sha512-5qZLXVYfZ9ABdjqbvPc4RWMr7PrpPaaDSeaYY55vl/w1j6H6kzsWK/urAEIXlzYlyrFmyz1UbwIt+AA0ck+wbg==" - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", - "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/ufo": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", - "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==" - }, - "node_modules/unified": { - "version": "11.0.5", - "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz", - "integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==", - "dependencies": { - "@types/unist": "^3.0.0", - "bail": "^2.0.0", - "devlop": "^1.0.0", - "extend": "^3.0.0", - "is-plain-obj": "^4.0.0", - "trough": "^2.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-find-after": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-find-after/-/unist-util-find-after-5.0.0.tgz", - "integrity": "sha512-amQa0Ep2m6hE2g72AugUItjbuM8X8cGQnFoHk0pGfrFeT9GZhzN5SW8nRsiGKK7Aif4CrACPENkA6P/Lw6fHGQ==", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-is": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-is": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", - "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-modify-children": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-modify-children/-/unist-util-modify-children-4.0.0.tgz", - "integrity": "sha512-+tdN5fGNddvsQdIzUF3Xx82CU9sMM+fA0dLgR9vOmT0oPT2jH+P1nd5lSqfCfXAw+93NhcXNY2qqvTUtE4cQkw==", - "dependencies": { - "@types/unist": "^3.0.0", - "array-iterate": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-position": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", - "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-position-from-estree": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unist-util-position-from-estree/-/unist-util-position-from-estree-2.0.0.tgz", - "integrity": "sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ==", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-remove": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-remove/-/unist-util-remove-4.0.0.tgz", - "integrity": "sha512-b4gokeGId57UVRX/eVKej5gXqGlc9+trkORhFJpu9raqZkZhU0zm8Doi05+HaiBsMEIJowL+2WtQ5ItjsngPXg==", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-is": "^6.0.0", - "unist-util-visit-parents": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-remove-position": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-5.0.0.tgz", - "integrity": "sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-visit": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", - "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-is": "^6.0.0", - "unist-util-visit-parents": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit-children": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unist-util-visit-children/-/unist-util-visit-children-3.0.0.tgz", - "integrity": "sha512-RgmdTfSBOg04sdPcpTSD1jzoNBjt9a80/ZCzp5cI9n1qPzLZWF9YdvWGN2zmTumP1HWhXKdUWexjy/Wy/lJ7tA==", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit-parents": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", - "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-is": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", - "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/uuid": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", - "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/esm/bin/uuid" - } - }, - "node_modules/v8-to-istanbul": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", - "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/vfile": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", - "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", - "dependencies": { - "@types/unist": "^3.0.0", - "vfile-message": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/vfile-location": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-5.0.3.tgz", - "integrity": "sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==", - "dependencies": { - "@types/unist": "^3.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/vfile-message": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", - "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/vscode-jsonrpc": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", - "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/vscode-languageserver": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", - "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", - "dependencies": { - "vscode-languageserver-protocol": "3.17.5" - }, - "bin": { - "installServerIntoExtension": "bin/installServerIntoExtension" - } - }, - "node_modules/vscode-languageserver-protocol": { - "version": "3.17.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", - "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", - "dependencies": { - "vscode-jsonrpc": "8.2.0", - "vscode-languageserver-types": "3.17.5" - } - }, - "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", - "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==" - }, - "node_modules/vscode-languageserver-types": { - "version": "3.17.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", - "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" - }, - "node_modules/vscode-uri": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", - "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==" - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/web-namespaces": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", - "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wicked-good-xpath": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/wicked-good-xpath/-/wicked-good-xpath-1.3.0.tgz", - "integrity": "sha512-Gd9+TUn5nXdwj/hFsPVx5cuHHiF5Bwuc30jZ4+ronF1qHK5O7HD0sgmXWSEgwKquT3ClLoKPVbO6qGwVwLzvAw==" - }, - "node_modules/wrap-ansi": { - "version": "9.0.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/write-file-atomic/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, - "node_modules/ws": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", - "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/xmldom-sre": { - "version": "0.1.31", - "resolved": "https://registry.npmjs.org/xmldom-sre/-/xmldom-sre-0.1.31.tgz", - "integrity": "sha512-f9s+fUkX04BxQf+7mMWAp5zk61pciie+fFLC9hX9UVvCeJQfNHRHXpeo5MPcR0EUf57PYLdt+ZO4f3Ipk2oZUw==", - "engines": { - "node": ">=0.1" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - }, - "node_modules/yaml": { - "version": "2.5.1", - "license": "ISC", - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/zod": { - "version": "3.24.2", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz", - "integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zod-validation-error": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-3.4.0.tgz", - "integrity": "sha512-ZOPR9SVY6Pb2qqO5XHt+MkkTRxGXb4EVtnjc9JpXUOtUB1T9Ru7mZOT361AN3MsetVe7R0a1KZshJDZdgp9miQ==", - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "zod": "^3.18.0" - } - }, - "node_modules/zwitch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", - "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - } - } -} diff --git a/docs-v2/package.json b/docs-v2/package.json deleted file mode 100644 index 0a5f31c0a763c..0000000000000 --- a/docs-v2/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "@pipedream/docs", - "version": "0.0.1", - "description": "Pipedream docs", - "private": true, - "scripts": { - "predev": "echo '' && echo 'โš ๏ธ WARNING: This docs-v2 project is DEPRECATED!' && echo 'โš ๏ธ Do not commit changes to this directory.' && echo 'โš ๏ธ The documentation has moved to a new location.' && echo ''", - "dev": "next dev", - "build": "next build", - "postbuild": "next-sitemap", - "start": "next start" - }, - "packageManager": "pnpm@9.14.2", - "engines": { - "pnpm": "9.14.2", - "node": "20.9.0" - }, - "author": "Pipedream", - "license": "MIT", - "homepage": "https://pipedream.com", - "dependencies": { - "@docsearch/react": "^3.8.1", - "@pipedream/sdk": "^1.5.3", - "@vercel/analytics": "^1.5.0", - "chalk": "^5.3.0", - "jest": "^29.7.0", - "lint-staged": "^15.2.7", - "next": "^14.2.5", - "nextra": "^3", - "nextra-theme-docs": "^3", - "prismjs": "^1.30.0", - "react": "^18.3.1", - "react-dom": "^18.3.1", - "react-markdown": "^9.0.1", - "sharp": "^0.33.4" - }, - "devDependencies": { - "@types/node": "18.11.10", - "autoprefixer": "^10.4.19", - "next-sitemap": "^4.2.3", - "postcss": "^8.4.40", - "prettier": "^3.3.3", - "tailwindcss": "^3.4.7", - "typescript": "^5.5.4" - } -} diff --git a/docs-v2/pages/_app.tsx b/docs-v2/pages/_app.tsx deleted file mode 100644 index 4f4437ae877bd..0000000000000 --- a/docs-v2/pages/_app.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import "@/styles/globals.css"; -import type { AppProps } from "next/app"; -import { Analytics } from "@vercel/analytics/next"; -import { useRouter } from "next/router"; - -import CR from "@/components/CR"; -import GA4 from "@/components/GA4"; -import RB2B from "@/components/RB2B"; -import Vector from "@/components/Vector"; -import VectorConnect from "@/components/VectorConnect"; - -export default function MyApp({ - Component, pageProps, -}: AppProps) { - const router = useRouter(); - - let script = null; - if (router.pathname === "/") { - script = ( - <> - - - - ); - } else if (router.pathname.startsWith("/connect")) { - script = ( - <> - - - - - ); - } - - return <> - {script} - - - ; -} diff --git a/docs-v2/pages/_meta.tsx b/docs-v2/pages/_meta.tsx deleted file mode 100644 index 8bb8af7ebd69c..0000000000000 --- a/docs-v2/pages/_meta.tsx +++ /dev/null @@ -1,57 +0,0 @@ -export default { - "index": "Introduction", - "workspaces": "Workspaces", - "projects": "Projects", - "--connect": { - type: "separator", - title: "Connect", - }, - "connect": { - title: "Integrate APIs", - // display: "children", <-- https://github.com/shuding/nextra/issues/4611 - }, - "--workflows": { - type: "separator", - title: "Workflows", - }, - "workflows": { - title: "Build Workflows", - // display: "children", <-- https://github.com/shuding/nextra/issues/4611 - }, - "--platform": { - type: "separator", - title: "Platform", - }, - "apps": "Apps", - "components": "Components", - "rest-api": "REST API", - "pricing": "Pricing", - "account": "Account", - "privacy-and-security": "Security", - "troubleshooting": "Troubleshooting", - "glossary": "Glossary of Terms", - "support": { - title: "Support", - type: "page", - href: "https://pipedream.com/support", - newWindow: true, - }, - "pricing-page": { - title: "Pricing", - href: "https://pipedream.com/pricing", - newWindow: true, - type: "page", - }, - "statuspage": { - title: "Status", - type: "page", - href: "https://status.pipedream.com", - newWindow: true, - }, - "deprecated": { - display: "hidden", - }, - "hidden": { - display: "hidden", - }, -} as const diff --git a/docs-v2/pages/account/_meta.tsx b/docs-v2/pages/account/_meta.tsx deleted file mode 100644 index ac5cbfd10a9dc..0000000000000 --- a/docs-v2/pages/account/_meta.tsx +++ /dev/null @@ -1,4 +0,0 @@ -export default { - "user-settings": "User Settings", - "billing-settings": "Billing Settings", -} as const diff --git a/docs-v2/pages/account/billing-settings.mdx b/docs-v2/pages/account/billing-settings.mdx deleted file mode 100644 index 72c0806da4603..0000000000000 --- a/docs-v2/pages/account/billing-settings.mdx +++ /dev/null @@ -1,45 +0,0 @@ -import Callout from '@/components/Callout' - -# Billing Settings - -You'll find information on your usage data (for specific [Pipedream limits](/workflows/limits/)) in your [Billing Settings](https://pipedream.com/settings/billing). You can also upgrade to [paid plans](https://pipedream.com/pricing) from this page. - -## Subscription - -If you've already upgraded, you'll see an option to **Manage Subscription** here, which directs you to your personal Stripe portal. Here, you can change your payment method, review the details of previous invoices, and more. - -## Usage - -[Credits](/pricing/#credits-and-billing) are Pipedream's billable unit, and users on the [free plan](/pricing/#free-plan) are limited on the number of daily free credits allocated. The **Usage** section displays a chart of the daily credits across a historical range of time to provide insight into your usage patterns. - - -Credit usage from [Connect](/connect) is not yet reflected in this section. - - -Hover over a specific column in the chart to see the number of credits run for that specific day: - -![Daily credits tooltip](/images/account/daily-invocations-tooltip.png) - -Click on a specific column to see credits for that day, broken out by workflow / source: - -![Credits broken out by workflow / source](/images/account/usage-by-resource.png) - -Users on the free tier will see the last 30 days of usage in this chart. Users on [paid plans](https://pipedream.com/pricing) will see the cumulative usage tied to their current billing period. - -## Compute Budget - -Control the maximum number of credits permitted on your account with a **Credit Budget**. - -This will restrict your workspace-wide usage to the specified number of [credits](/pricing/#credits-and-billing) on a monthly or daily basis. The compute budget does not apply to credits incurred by [dedicated workers](/workflows/building-workflows/settings/#eliminate-cold-starts) or Pipedream Connect. - -To enable this feature, click on the toggle and define your maximum number of credits in the period. - - -Due to how credits are accrued, there may be cases where your credit usage may go slightly over the cap. - -In an example scenario, with a cap set at 20 credits and a long-running workflow that uses 10 credits per run, it's possible that two concurrent events trigger the workflow, and the cap won't apply until after the concurrent events are processed. - - -## Limits - -For users on the [Free tier](/pricing/#free-plan), this section displays your usage towards your [credits quota](/workflows/limits/#daily-credits-limit) for the current UTC day. diff --git a/docs-v2/pages/account/user-settings.mdx b/docs-v2/pages/account/user-settings.mdx deleted file mode 100644 index 233fd7052c860..0000000000000 --- a/docs-v2/pages/account/user-settings.mdx +++ /dev/null @@ -1,85 +0,0 @@ -import Callout from '@/components/Callout' -import VideoPlayer from '@/components/VideoPlayer' - -# User Settings - -You can find important account details, text editor configuration, and more in your [User Settings](https://pipedream.com/user). - -## Changing your email - -Pipedream sends system emails to the email address tied to your Pipedream login. You can change the email address to which these emails are delivered by modifying the **Email** in your Account Settings. Once changed, an email will be delivered to the new address requesting you verify it. - -Pipedream marketing emails may still be sent to the original email address you used when signing up for Pipedream. To change the email address tied to marketing emails, please [reach out to our team](https://pipedream.com/support). - -## Two-Factor Authentication - - - -Two-factor authentication (2FA) adds an additional layer of security for your Pipedream account and is recommended for all users. - -### Configuring 2FA - -1. Open your [Account Settings](https://pipedream.com/user) -2. Click **Configure** under **Two-Factor Authentication** -3. Scan the QR code in an authenticator app like [1Password](https://1password.com/) or Google Authenticator (available on [iOS](https://apps.apple.com/us/app/google-authenticator/id388497605) and [Android](https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en_US&gl=US)) -4. If you're unable to scan the QR code, you can view the setup key to configure 2FA manually in your authenticator app -5. Enter the one-time-password (OTP) from your authenticator app -6. **Save your recovery codes in a secure location**. You'll need these to access your Pipedream account in the case you lose access to your authenticator app. - - -Save your recovery codes - -If you lose access to your authenticator app and your recovery codes, you will permanently lose access to your Pipedream account. **Pipedream Support cannot recover these accounts.** - - -### Signing in with 2FA - -1. You'll be prompted to enter your OTP the next time you sign in to Pipedream -2. When prompted, you can enter the OTP from your authenticator app or a recovery code - - -Using recovery codes - -Each recovery code is a one-time-use code, so make sure to generate new recovery codes in your [Account Settings](https://pipedream.com/user) when you need to. All previously generated recovery codes expire when you generate new ones. - - - -2FA is not currently supported with Single Sign On -Pipedream recommends enabling 2FA with your identity provider. - - -### Requiring 2-Factor Authentication - -Workspaces on the Business plan can [require all workspace members to configure 2FA](/workspaces/#requiring-two-factor-authentication) in order to log in to Pipedream. - -If you are a member of any workspace where 2FA is required, you cannot disable 2FA, but you can still reconfigure it in your [account settings](https://pipedream.com/account/) if necessary. - - -Admins and Owners control 2FA settings - -Only workspace owner and admin members can enable or disable 2FA for an entire workspace. - - -## Pipedream API Key - -Pipedream provides a [REST API](/rest-api/) for interacting with Pipedream programmatically. You'll find your API key here, which you use to [authorize requests to the API](/rest-api/auth/). - -You can revoke and regenerate your API key from here at any time. - -## Delete Account - -You can delete your Pipedream account at any time by visiting your Account Settings and pressing the **Delete your Account** button. Account deletion is immediately and irreversible. - -## Application - -You can change how the Pipedream app displays data, and basic text editor config, in your [Application Settings](https://pipedream.com/settings/app). - -For example, you can: - -- Change the clock format to 12-hour or 24-hour mode -- Enable Vim keyboard shortcuts in the Pipedream text editor, or enable word wrap -- Set the number of spaces that will be added in the editor when pressing `Tab` - -## Environment Variables - -Environment variables allow you to securely store secrets or other config values that you can access in Pipedream workflows via `process.env`. [Read more about environment variables here](/workflows/environment-variables/). diff --git a/docs-v2/pages/api/demo-connect/accounts/[id].js b/docs-v2/pages/api/demo-connect/accounts/[id].js deleted file mode 100644 index d22a3aef81607..0000000000000 --- a/docs-v2/pages/api/demo-connect/accounts/[id].js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * API route to fetch account details from Pipedream API - * Retrieves information about connected accounts for the interactive demo - */ -import { createBackendClient } from "@pipedream/sdk/server"; -import { - createApiHandler, generateRequestToken, -} from "../utils"; - -/** - * Handler for account details retrieval - */ -async function accountHandler(req, res) { - const { id } = req.query; - - if (!id) { - return res.status(400).json({ - error: "Account ID is required", - }); - } - - // Debug logging for troubleshooting token validation - console.log("Account API request:", { - id, - host: req.headers.host, - origin: req.headers.origin, - requestToken: req.headers["x-request-token"], - expectedToken: generateRequestToken(req), - }); - - try { - // Initialize the Pipedream SDK client - const pd = createBackendClient({ - environment: process.env.PIPEDREAM_PROJECT_ENVIRONMENT || "development", - credentials: { - clientId: process.env.PIPEDREAM_CLIENT_ID, - clientSecret: process.env.PIPEDREAM_CLIENT_SECRET, - }, - projectId: process.env.PIPEDREAM_PROJECT_ID, - }); - - // Fetch the specific account by ID - const accountDetails = await pd.getAccountById(id); - - // Return the account details - return res.status(200).json(accountDetails); - } catch (err) { - console.error("Error fetching account details:", err.message); - return res.status(500).json({ - error: "Failed to fetch account details", - }); - } -} - -// Export the handler with validation and CORS -export default createApiHandler(accountHandler, "GET"); diff --git a/docs-v2/pages/api/demo-connect/apps.js b/docs-v2/pages/api/demo-connect/apps.js deleted file mode 100644 index 0a80b3f6f7dc4..0000000000000 --- a/docs-v2/pages/api/demo-connect/apps.js +++ /dev/null @@ -1,84 +0,0 @@ -// Search for apps in the Pipedream API - -import { createApiHandler } from "./utils"; - -/** - * Handler for searching apps - */ -async function appsHandler(req, res) { - try { - const { - q, limit = 50, - } = req.query; - - // Build the query parameters - const params = new URLSearchParams(); - if (q) params.append("q", q); - params.append("limit", String(limit)); - params.append("has_actions", "1"); // Only apps with components - - // First get an OAuth token - const tokenResponse = await fetch( - "https://api.pipedream.com/v1/oauth/token", - { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - grant_type: "client_credentials", - client_id: process.env.PIPEDREAM_CLIENT_ID, - client_secret: process.env.PIPEDREAM_CLIENT_SECRET, - }), - }, - ); - - if (!tokenResponse.ok) { - throw new Error("Failed to authenticate"); - } - - const { access_token } = await tokenResponse.json(); - - // Now search for apps - const appsResponse = await fetch( - `https://api.pipedream.com/v1/apps?${params.toString()}`, - { - headers: { - "Authorization": `Bearer ${access_token}`, - "Content-Type": "application/json", - }, - }, - ); - - if (!appsResponse.ok) { - throw new Error("Failed to fetch apps"); - } - - const appsData = await appsResponse.json(); - - // Format the response with the fields we need - const formattedApps = appsData.data.map((app) => ({ - id: app.id, - name: app.name, - name_slug: app.name_slug, - description: app.description, - icon: app.img_src, - featured_weight: app.featured_weight, - categories: app.categories || [], - })); - - return res.status(200).json({ - apps: formattedApps, - total_count: appsData.page_info?.total_count || formattedApps.length, - }); - } catch (error) { - console.error("Error searching apps:", error); - return res.status(500).json({ - error: "Failed to search apps", - details: error.message, - }); - } -} - -// Export the handler wrapped with security checks -export default createApiHandler(appsHandler, "GET"); diff --git a/docs-v2/pages/api/demo-connect/token.js b/docs-v2/pages/api/demo-connect/token.js deleted file mode 100644 index 29b485b7f56ba..0000000000000 --- a/docs-v2/pages/api/demo-connect/token.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * API route for generating Connect tokens for the interactive demo - * This endpoint creates short-lived tokens for testing the Pipedream Connect auth flow - */ -import { - createApiHandler, ALLOWED_ORIGINS, -} from "./utils"; - -/** - * Handler for token generation - */ -async function tokenHandler(req, res) { - try { - const { external_user_id } = req.body; - - if (!external_user_id) { - return res.status(400).json({ - error: "external_user_id is required", - }); - } - - // First, obtain an OAuth access token - const tokenResponse = await fetch("https://api.pipedream.com/v1/oauth/token", { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - grant_type: "client_credentials", - client_id: process.env.PIPEDREAM_CLIENT_ID, - client_secret: process.env.PIPEDREAM_CLIENT_SECRET, - }), - }); - - if (!tokenResponse.ok) { - return res.status(500).json({ - error: "Failed to authenticate with Pipedream API", - }); - } - - const { access_token } = await tokenResponse.json(); - - // Use the access token to create a Connect token - const connectTokenResponse = await fetch(`https://api.pipedream.com/v1/connect/${process.env.PIPEDREAM_PROJECT_ID}/tokens`, { - method: "POST", - headers: { - "Content-Type": "application/json", - "X-PD-Environment": process.env.PIPEDREAM_PROJECT_ENVIRONMENT || "development", - "Authorization": `Bearer ${access_token}`, - }, - body: JSON.stringify({ - external_user_id, - // Use only the list of origins for the API, not the helper object - allowed_origins: ALLOWED_ORIGINS.originsList, - webhook_uri: process.env.PIPEDREAM_CONNECT_TOKEN_WEBHOOK_URI, - success_redirect_uri: process.env.PIPEDREAM_CONNECT_SUCCESS_REDIRECT_URI, - error_redirect_uri: process.env.PIPEDREAM_CONNECT_ERROR_REDIRECT_URI, - }), - }); - - if (!connectTokenResponse.ok) { - return res.status(500).json({ - error: "Failed to create Connect token", - }); - } - - const connectTokenData = await connectTokenResponse.json(); - return res.status(200).json({ - token: connectTokenData.token, - expires_at: connectTokenData.expires_at, - connect_link_url: connectTokenData.connect_link_url, - }); - } catch (error) { - return res.status(500).json({ - error: "Failed to create token", - }); - } -} - -// Export the handler with validation and CORS -export default createApiHandler(tokenHandler, "POST"); diff --git a/docs-v2/pages/api/demo-connect/utils.js b/docs-v2/pages/api/demo-connect/utils.js deleted file mode 100644 index 3d224c4640dbf..0000000000000 --- a/docs-v2/pages/api/demo-connect/utils.js +++ /dev/null @@ -1,218 +0,0 @@ -/** - * Shared utilities for Connect demo API routes - */ - -/** - * Get allowed origins from environment variables or use defaults - * This supports Vercel preview deployments with their dynamic URLs - */ -export function getAllowedOrigins() { - // Get from environment if defined - const originsFromEnv = process.env.ALLOWED_ORIGINS - ? process.env.ALLOWED_ORIGINS.split(",").map((origin) => origin.trim()) - : []; - - // Default allowed origins - const defaultOrigins = [ - "https://pipedream.com", - "https://www.pipedream.com", - "http://localhost:3000", // For local development - ]; - - // Vercel preview deployment support - match any Vercel preview URL - const vercelPreviewRegexes = [ - // Standard preview URLs: project-branch-username.vercel.app - /^https:\/\/[a-zA-Z0-9-]+-[a-zA-Z0-9-]+-[a-zA-Z0-9-]+\.vercel\.app$/, - // Shortened preview URLs: project-username.vercel.app - /^https:\/\/[a-zA-Z0-9-]+-[a-zA-Z0-9-]+\.vercel\.app$/, - // Any subdomain on vercel.app (most permissive) - /^https:\/\/[a-zA-Z0-9-]+\.vercel\.app$/, - ]; - - return { - originsList: [ - ...defaultOrigins, - ...originsFromEnv, - ], - regexPatterns: vercelPreviewRegexes, - - // Helper method to check if an origin is allowed - isAllowed(origin) { - if (!origin) return false; - - // Check exact matches - if (this.originsList.includes(origin)) return true; - - // Check regex patterns - return this.regexPatterns.some((pattern) => pattern.test(origin)); - }, - }; -} - -// Export the helper for consistent use -export const ALLOWED_ORIGINS = getAllowedOrigins(); - -/** - * Generate a browser-specific token based on request properties - * Used to verify requests are coming from our frontend - */ -export function generateRequestToken(req) { - // Try to determine the effective host that matches what the client would use - let effectiveHost = req.headers["host"]; - - // First try to use origin header (best match for client's window.location.host) - if (req.headers.origin) { - try { - const originUrl = new URL(req.headers.origin); - effectiveHost = originUrl.host; - } catch (e) { - console.log("Error parsing origin:", e.message); - } - } - // If no origin, try referer (can also contain the original hostname) - else if (req.headers.referer) { - try { - const refererUrl = new URL(req.headers.referer); - effectiveHost = refererUrl.host; - } catch (e) { - console.log("Error parsing referer:", e.message); - } - } - // Fall back to x-forwarded-host which might be set by proxies - else if (req.headers["x-forwarded-host"]) { - effectiveHost = req.headers["x-forwarded-host"]; - } - - // For account endpoints specifically, try to extract the host from the requestToken - // This is a special case for the accounts endpoint where the origin header might be missing - if (req.url?.includes("/accounts/") && req.headers["x-request-token"]) { - try { - const decodedToken = Buffer.from(req.headers["x-request-token"], "base64").toString(); - const parts = decodedToken.split(":"); - // If the token has the expected format with 3 parts, use the host from the token - if (parts.length === 3) { - // User-agent:host:connect-demo - effectiveHost = parts[1]; - } - } catch (e) { - console.log("Error extracting host from token:", e.message); - } - } - - const baseString = `${req.headers["user-agent"]}:${effectiveHost}:connect-demo`; - return Buffer.from(baseString).toString("base64"); -} - -/** - * Sets CORS headers for API responses - */ -export function setCorsHeaders(req, res, methods = "GET, POST, OPTIONS") { - // Use the new isAllowed method to check if the origin is allowed - res.setHeader( - "Access-Control-Allow-Origin", - ALLOWED_ORIGINS.isAllowed(req.headers.origin) - ? req.headers.origin - : "", - ); - res.setHeader("Access-Control-Allow-Methods", methods); - res.setHeader("Access-Control-Allow-Headers", "Content-Type, X-Request-Token"); - - // Set COOP header to allow popups to communicate with the parent window - // This is important for OAuth flows in the Connect integration - res.setHeader("Cross-Origin-Opener-Policy", "same-origin-allow-popups"); -} - -/** - * Validates if a request comes from an allowed source - * Performs checks on origin, referer, and request token - */ -export function validateRequest(req, res, allowedMethod) { - const origin = req.headers.origin; - const referer = req.headers.referer; - const requestToken = req.headers["x-request-token"]; - - // Origin validation - if (origin && !ALLOWED_ORIGINS.isAllowed(origin)) { - return res.status(403).json({ - error: "Access denied", - }); - } - - // Referer validation for docs context - if (referer) { - // Extract the origin part of the referer URL (protocol + hostname) - let refererOrigin; - try { - // Try to parse the referer as a URL - const refererUrl = new URL(referer); - refererOrigin = refererUrl.origin; - } catch (e) { - // If parsing fails, construct it manually - const parts = referer.split("/"); - if (parts.length >= 3) { - refererOrigin = parts[0] + "//" + parts[2]; - } - } - - // Check if the referer origin is allowed - const isRefererAllowed = - // Check if referer matches allowed origins list - ALLOWED_ORIGINS.originsList.some((allowed) => referer.startsWith(allowed)) || - // Check if referer origin matches any regex pattern - (refererOrigin && - ALLOWED_ORIGINS.regexPatterns.some((pattern) => - pattern.test(refererOrigin)) - ) || - // Allow if it contains the docs path - referer.includes("/docs/connect/"); - - if (!isRefererAllowed) { - return res.status(403).json({ - error: "Access denied", - }); - } - } - - // Request token validation to prevent API automation - const expectedToken = generateRequestToken(req); - - if (!requestToken || requestToken !== expectedToken) { - return res.status(403).json({ - error: "Access denied", - }); - } - - // Method validation - if (req.method !== allowedMethod && req.method !== "OPTIONS") { - return res.status(405).json({ - error: "Method not allowed", - }); - } - - // All security checks passed - return null; -} - -/** - * Common handler for API requests with validation and CORS - */ -export function createApiHandler(handler, allowedMethod) { - return async (req, res) => { - // Set CORS headers - setCorsHeaders(req, res, allowedMethod === "GET" - ? "GET, OPTIONS" - : "POST, OPTIONS"); - - // Handle preflight requests - if (req.method === "OPTIONS") { - return res.status(200).end(); - } - - // Validate the request - const validationError = validateRequest(req, res, allowedMethod); - if (validationError) return validationError; - - // Call the actual handler - return handler(req, res); - }; -} diff --git a/docs-v2/pages/apps/_meta.tsx b/docs-v2/pages/apps/_meta.tsx deleted file mode 100644 index 8aa419bdcd5a9..0000000000000 --- a/docs-v2/pages/apps/_meta.tsx +++ /dev/null @@ -1,9 +0,0 @@ -export default { - "index": "Integrated Apps", - "connected-accounts": "Connected Accounts", - "oauth-clients": "OAuth Clients", - "external-auth": { - display: "hidden", - }, - "app-partners": "App Partners", -} as const diff --git a/docs-v2/pages/apps/app-partners.mdx b/docs-v2/pages/apps/app-partners.mdx deleted file mode 100644 index 11382e1a08236..0000000000000 --- a/docs-v2/pages/apps/app-partners.mdx +++ /dev/null @@ -1,23 +0,0 @@ -# App Partners - -By integrating your app with Pipedream, your users will be able to connect your app with over {process.env.PUBLIC_APPS} supported apps on our platform. You gain access and exposure to a community of over 800,000 developers, and can spend more time building your product and less time navigating app integrations. - -## Benefits of Integrating With Pipedream - -- **End-to-End Development:** Pipedream will handle the entire development process of the integration, from managing authentication, setting up an official Pipedream OAuth client where applicable, and final QA. -- **Custom Triggers and Actions:** We will create up to three triggers and three actions, based on the methods available within your APIs. -- **Extensive Developer Exposure:** Your app will be accessible to a large and growing community of developers. -- **Dedicated App Page:** Control and customize your dedicated app page to market your app to potential users, and share example use cases or workflow templates that can be built to help users get started. - -## Integration Process - -Integrating with Pipedream is a straightforward process: - -1. Pipedream requires an account for testing and development along with API documentation in order to get started. We will build the initial integration, and run test requests to test the connection. -2. Our team will build no-code triggers and actions that make the most sense from a workflow development perspective - if you have specific triggers and actions in mind to start with, weโ€™ll start there. -3. Our QA team will thoroughly test the no-code components to ensure that they work as intended, and then we will release and announce the completed integration in our public Slack with over 5,000 active members. - -## Get Started - -Are you ready to integrate with Pipedream? [Contact our integrations team](https://pipedream.com/support) today to get started. - diff --git a/docs-v2/pages/apps/connected-accounts.mdx b/docs-v2/pages/apps/connected-accounts.mdx deleted file mode 100644 index 620fcb01a0468..0000000000000 --- a/docs-v2/pages/apps/connected-accounts.mdx +++ /dev/null @@ -1,255 +0,0 @@ -import Callout from '@/components/Callout' -import VideoPlayer from '@/components/VideoPlayer' - -# Connected Accounts - - - -Pipedream provides native integrations for [{process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps). Once you connect an account, you can - -- [Link that account to any step of a workflow](#connecting-accounts), using the associated credentials to make API requests to any service. -- [Manage permissions](#managing-connected-accounts), limiting access to sensitive accounts - -Pipedream handles OAuth for you, ensuring you always have a fresh access token to authorize requests, and [credentials are tightly-secured](/privacy-and-security/#third-party-oauth-grants-api-keys-and-environment-variables). - -## Supported Apps - -Pipedream supports [{process.env.PUBLIC_APPS}+ apps](https://pipedream.com/apps), and we're adding more every day. - -If you don't see an integration for a service you need, you can [request the integration here](#requesting-a-new-app-or-service), or [use environment variables](/workflows/environment-variables/) to manage custom credentials. - -## Types of Integrations - -### OAuth - -For services that support OAuth, Pipedream operates an OAuth application that mediates access to the service so you don't have to maintain your own app, store refresh and access tokens, and more. - -When you connect an account, you'll see a new window open where you authorize the Pipedream application to access data in your account. Pipedream stores the OAuth refresh token tied to your authorization grant, automatically generating access tokens you can use to authorized requests to the service's API. You can [access these tokens in code steps](/workflows/building-workflows/code/nodejs/auth/). - -### Key-based - -We also support services that use API keys or other long-lived tokens to authorize requests. - -For those services, you'll have to create your keys in the service itself, then add them to your connected accounts in Pipedream. - -For example, if you add a new connected account for **Sendgrid**, you'll be asked to add your Sendgrid API key. - -## Connecting accounts - - -This section discusses connecting **your own account** within the Pipedream UI. If you're looking to use the connected accounts for your customers, check out the [Connect docs](/connect/). - - -### From an action - -Prebuilt actions that connect to a specific service require you connect your account for that service before you run your workflow. Click the **Connect [APP]** button to get started. - -Depending on the integration, this will either: - -- Open the OAuth flow for the target service, prompting you to authorize Pipedream to access your account, or -- Open a modal asking for your API credentials for key-based services - -If you've already connected an account for this app, you'll also see a list of existing accounts to select from. - -### From the HTTP Request action - -Craft a custom HTTP request in a workflow with a connected account _without code_. - -In a new step, select the **Send any HTTP Request** to start a new HTTP Request action. - -![Starting a new HTTP request action in a workflow](https://res.cloudinary.com/pipedreamin/image/upload/v1672947285/docs/CleanShot_2023-01-05_at_14.34.25_wi8rcc.png) - -Then, within the new HTTP request, open the **Authorization Type** dropdown to select a **Select an app**: - -![Opening the HTTP Request Authorization Type dropdown](https://res.cloudinary.com/pipedreamin/image/upload/v1673535917/docs/CleanShot_2023-01-12_at_10.05.02_vmttbf.png) - -This will open a new prompt to select an app to connect with. Once you select an app, the HTTP request will be updated with the correct headers to authenticate with that app's API. - -![Select an account](https://res.cloudinary.com/pipedreamin/image/upload/v1673536044/docs/CleanShot_2023-01-12_at_10.07.06_rejzyy.gif) - -Once you connect the selected app account Pipedream will autmatically include your account's authentication keys in the request in the headers, as well as update the URL to match the selected service. - -Now you can modify the request path, method, body or query params to perform an action on the endpoint with your authenticated account. - -### From a code step - -You can connect accounts to code steps by using an `app` prop. Refer to the [connecting apps in Node.js documentation](/workflows/building-workflows/code/nodejs/auth/). - -For example, you can connect to Slack from Pipedream (via their OAuth integration), and use the access token Pipedream generates to authorize requests: - -```javascript -import { WebClient } from '@slack/web-api'; - -// Sends a message to a Slack Channel -export default defineComponent({ - props: { - slack: { - type: 'app', - app: 'slack' - } - }, - async run({ steps, $ }) { - const web = new WebClient(this.slack.$auth.oauth_access_token) - return await web.chat.postMessage({ - text: "Hello, world!", - channel: "#general", - }) - } -}); -``` - -## Managing Connected Accounts - -Visit your [Accounts Page](https://pipedream.com/accounts) to see a list of all your connected accounts. - -On this page you can: - -- Connect your account for any integrated app -- [View and manage access](#access-control) for your connected accounts -- Delete a connected account -- Reconnect an account -- Change the nickname associated with an account - -You'll also see some data associated with these accounts: - -- For many OAuth apps, we'll list the scopes for which you've granted Pipedream access -- The workflows that are using the account - -### Connecting a new account - -1. Visit [https://pipedream.com/accounts](https://pipedream.com/accounts) -2. Click the **Connect an app** button at the top-right. -3. Select the app you'd like to connect. - -### Reconnecting an account - -If you encounter errors in a step that appear to be related to credentials or authorization, you can reconnect your account: - -1. Visit [https://pipedream.com/accounts](https://pipedream.com/accounts) -2. Search for your account -3. Click on the _..._ next to your account, on the right side of the page -4. Select the option to **Reconnect** your account - -## Access Control - -**New connected accounts are private by default** and can only be used by the person who added it. - - -Connected accounts created prior to August 2023 were accessible to all workspace members by default. You can [restrict access](#managing-access) at any time. - - -### Managing access - -- Find the account on the Accounts page and click the 3 dots on the far right of the row -- Select **Manage Access** - -![Selecting Manage Access](https://res.cloudinary.com/pipedreamin/image/upload/v1710869643/connected-account-manage-access_wsn98i.png) - -- You may be prompted to reconnect your account first to verify ownership of the account -- You can enable access to the entire workspace or individual members - -![Managing Access for a Connected Account](https://res.cloudinary.com/pipedreamin/image/upload/v1691614603/manage-access-modal_crmx3f.gif) - -### Collaborating with others - -Even if a workspace member doesn't have access to a private connected account, you can still collaborate together on the same workflows. - -Workspace members who don't have access to a connected account **can perform the following actions** on workflows: - -- Reference step exports -- Inspect prop inputs, step logs, and errors -- Test any step, so they can effectively develop and debug workflows end to end - -Workspace members who do **not** have access to a given connected account **cannot modify prop inputs or edit any code** with that account. - -![Read only action](https://res.cloudinary.com/pipedreamin/image/upload/v1691622307/read-only-action_uvdh1p.png) - -![Read only code step](https://res.cloudinary.com/pipedreamin/image/upload/v1691621275/read-only-code-step_ijqvjc.png) - -To make changes to steps that are locked in read-only mode, you can: - -- Ask the account owner to [grant access](#managing-access) -- Click **More Actions** and change the connected account to one that you have access to (note that this may remove some prop configurations) - -### Access - -Access to connected accounts is enforced at the step-level within workflows and is designed with security and control in mind. - -When you connect an account in Pipedream, you are the owner of that connected account, and you always have full access. You can: - -- Manage access -- Delete -- Reconnect -- Add to any step or trigger - -For connected accounts that are **not** shared with other workspace members: - -| Operation | Workspace Owner & Admin | Other Members | -| -------------------------------------------------- | :---------------------: | :----------------: | -| View on [Accounts](https://pipedream.com/accounts) | โœ… | โŒ | -| Add to a new trigger or step | โŒ | โŒ | -| Modify existing steps | โŒ | โŒ | -| Test exising steps | โœ… | โœ… | -| Manage access | โœ… | โŒ | -| Reconnect | โœ… | โŒ | -| Delete | โœ… | โŒ | - -For connected accounts that **are** shared with other workspace members: - -| Operations | Workspace Owner & Admin | Other Members | -| -------------------------------------------------- | :---------------------: | :----------------: | -| View on [Accounts](https://pipedream.com/accounts) | โœ… | โœ… | -| Add to a new trigger or step | โœ… | โœ… | -| Modify existing steps | โœ… | โœ… | -| Test exising steps | โœ… | โœ… | -| Manage access | โœ… | โŒ | -| Reconnect | โœ… | โŒ | -| Delete | โœ… | โŒ | - -### FAQ - -#### Why isn't my connected account showing up in the legacy workflow builder? - -In order to use a connected account in the legacy (v1) workflow builder, the account must be shared with the entire workspace. Private accounts are accessible in the latest version of the workflow builder. - -#### What is the "Owner" column? - -The owner column on the Accounts page indicates who in the workspace originally connected the account (that is the only person who has permissions to manage access). - -#### Why is there no "Owner" for certain connected accounts? - -Accounts that were connected before August 2023 don't have an owner associated with them, and are shared with the entire workspace. In order to manage access for any of those accounts, we'll first prompt you to reconnect. - -#### How can I restrict access to a connected account shared with the workspace? - -See above for info on [managing access](#managing-access). - -#### Can I still work with other people on a single workflow, even if I don't want them to have access to my connected account? - -Yes, see the section on [collaborating with others](#collaborating-with-others). - -## Accessing credentials via API - -You can access credentials for any connected account via API, letting you build services anywhere and use Pipedream to handle auth. See [the guide for accessing credentials via API](/connect/api/#accounts) for more details. - -## Connecting to apps with IP restrictions - - -These IP addresses are tied to **app connections only**, not workflows or other Pipedream services. To whitelist requests from Pipedream workflows, [use VPCs](/workflows/vpc/). - - -If you're connecting to an app that enforces IP restrictions, you may need to whitelist the Pipedream API's IP addresses: - -
-  {process.env.PD_EGRESS_IP_RANGE}
-
- -## Account security - -[See our security docs](/privacy-and-security/#third-party-oauth-grants-api-keys-and-environment-variables) for details on how Pipedream secures your connected accounts. - -## Requesting a new app or service - -1. Visit [https://pipedream.com/support](https://pipedream.com/support) -2. Scroll to the bottom, where you'll see a Support form. -3. Select **App / Integration questions** and submit the request. diff --git a/docs-v2/pages/apps/external-auth.mdx b/docs-v2/pages/apps/external-auth.mdx deleted file mode 100644 index f8f52fae944c5..0000000000000 --- a/docs-v2/pages/apps/external-auth.mdx +++ /dev/null @@ -1,61 +0,0 @@ -import Callout from '@/components/Callout' - -# Passing external credentials at runtime - -If you use a secrets store like [HashiCorp Vault](https://www.vaultproject.io/) or [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/), store credentials in a database, or use a service like [Nango](https://www.nango.dev/) to manage auth, you can retrieve these secrets at runtime and pass them to any step. - -There are two ways to pass external auth at runtime: - -1. [Pass it in an HTTP request](#pass-credentials-via-http) -2. [Fetch credentials from a DB or secrets store](#fetch-credentials-from-a-db-or-secrets-store) within a workflow step - - -Passing external credentials at runtime is a feature that's available to customers on the [Business plan](https://pipedream.com/pricing?plan=Enterprise). If you have a use case that you'd like to discuss, [we'd love to hear about it](https://pipedream.com/support)! - - -## Pass credentials via HTTP - -1. If not already configured, [add an HTTP trigger](/workflows/building-workflows/triggers/#http) to your workflow. -2. From your app, retrieve credentials and send them in an HTTP request to the endpoint with the rest of the payload. -3. In the step of your workflow where you'd like to pass these credentials, select the **Use external authentication** option at the bottom-right of the account selector: - -![Select "External Auth"](/images/integrations/select-external-auth.png) - -4. You'll be prompted for all required credentials for the app, often just an `oauth_access_token` or `api_key`. [Find the variable that contains your credentials](/workflows/building-workflows/triggers/#copying-references-to-event-data) and pass them to each field: - -![External auth](https://res.cloudinary.com/pipedreamin/image/upload/v1707630112/docs/Screenshot_2024-02-10_at_9.40.54_PM_hynkvq.png) - -Most steps require additional, user-specific configuration. For example, the Slack **Send a Message** action requires a **Channel ID**, which may be specific to the end user's workspace. You'll need to fetch these values from another step and reference them here. - -![Configure additional params](https://res.cloudinary.com/pipedreamin/image/upload/v1707630112/docs/Screenshot_2024-02-10_at_9.40.54_PM_hynkvq.png) - - -Default logging - -When you return credentials from workflow steps, Pipedream stores it with the rest of the workflow execution data. Workflow events are retained according to the default retention policy for your plan and any [data retention controls](/workflows/building-workflows/settings/#data-retention-controls) you've configured. - -You can set [the `pd-nostore` flag](/workflows/building-workflows/triggers/#x-pd-nostore) to `1` on requests with credentials to disable logging for those requests only. - - -## Fetch credentials from a DB or secrets store - -1. Add a step to your workflow to fetch credentials from your DB or secrets store. -2. In the step of your workflow where you'd like to pass these credentials, select the **Use external authentication** option at the bottom-right of the account selector: - -![Select "External Auth"](/images/integrations/select-external-auth.png) - -3. You'll be prompted for all required credentials for the app, often just an `oauth_access_token` or `api_key`. [Find the variable that contains your credentials](/workflows/building-workflows/triggers/#copying-references-to-event-data) and pass them to each field: - -![External auth](https://res.cloudinary.com/pipedreamin/image/upload/v1707630112/docs/Screenshot_2024-02-10_at_9.40.54_PM_hynkvq.png) - -Most steps require additional, user-specific configuration. For example, the Slack **Send a Message** action requires a **Channel ID**, which may be specific to the end user's workspace. You'll need to fetch these values from another step and reference them here. - -![Configure additional params](https://res.cloudinary.com/pipedreamin/image/upload/v1707630112/docs/Screenshot_2024-02-10_at_9.40.54_PM_hynkvq.png) - - -Default logging - -When you return credentials from workflow steps, Pipedream stores it with the rest of the workflow execution data. Workflow events are retained according to the default retention policy for your plan and any [data retention controls](/workflows/building-workflows/settings/#data-retention-controls) you've configured. - -You can set [the `pd-nostore` flag](/workflows/building-workflows/triggers/#x-pd-nostore) to `1` on requests with credentials to disable logging for those requests only. - diff --git a/docs-v2/pages/apps/index.mdx b/docs-v2/pages/apps/index.mdx deleted file mode 100644 index 8869e211f7031..0000000000000 --- a/docs-v2/pages/apps/index.mdx +++ /dev/null @@ -1,79 +0,0 @@ -import Callout from '@/components/Callout' - -# Integrated Apps - -Pipedream has built-in integrations with more than {process.env.PUBLIC_APPS} apps. Since you can [write any code](/workflows/building-workflows/code/nodejs/) on Pipedream, and pass API keys or credentials using [environment variables](/workflows/environment-variables/), you can connect to virtually any service, so the list is not exhaustive. - -But Pipedream-integrated apps provide a few benefits: - -- You can [connect the app once](/apps/connected-accounts/) and [link that connected account to any step of a workflow](/apps/connected-accounts/#connecting-accounts) -- Pipedream provides [pre-built actions](/components/contributing/#actions) that wrap common operations for the app. You shouldn't have to write the code to send a message to Slack, or add a new row to a Google Sheet, so actions make that easy. Actions are just code, so you can fork and modify them, or even [publish your own to the Pipedream community](/components/contributing/). -- [You have access to your API keys and access tokens in code steps](/workflows/building-workflows/code/nodejs/auth/), so you can write any code to authorize custom requests to these apps. - -## Premium Apps - -The vast majority of integrated apps on Pipedream are free to use in your workflows across any plan. However, in order to use any of the below apps in an active workflow, your workspace will need to have access to [Premium Apps](https://pipedream.com/pricing): - -- [ActiveCampaign](https://pipedream.com/apps/activecampaign) -- [ADP](https://pipedream.com/apps/adp) -- [Amazon Advertising](https://pipedream.com/apps/amazon_advertising) -- [Asana](https://pipedream.com/apps/asana) -- [AWS](https://pipedream.com/apps/aws) -- [Azure OpenAI Service](https://pipedream.com/apps/azure-openai-service) -- [BigCommerce](https://pipedream.com/apps/bigcommerce) -- [Cisco Webex](https://pipedream.com/apps/cisco-webex) -- [Cisco Webex (Custom App)](https://pipedream.com/apps/cisco-webex-custom-app) -- [Close](https://pipedream.com/apps/close) -- [Cloudinary](https://pipedream.com/apps/cloudinary) -- [Customer.io](https://pipedream.com/apps/customer-io) -- [Datadog](https://pipedream.com/apps/datadog) -- [dbt Cloud](https://pipedream.com/apps/dbt) -- [ERPNext](https://pipedream.com/apps/erpnext) -- [Exact](https://pipedream.com/apps/exact) -- [Freshdesk](https://pipedream.com/apps/freshdesk) -- [Google Cloud](https://pipedream.com/apps/google-cloud) -- [Gorgias](https://pipedream.com/apps/gorgias-oauth) -- [HubSpot](https://pipedream.com/apps/hubspot) -- [Intercom](https://pipedream.com/apps/intercom) -- [Jira](https://pipedream.com/apps/jira) -- [Jira Service Desk](https://pipedream.com/apps/jira-service-desk) -- [Klaviyo](https://pipedream.com/apps/klaviyo) -- [Linkedin](https://pipedream.com/apps/linkedin) -- [Linkedin Ads](https://pipedream.com/apps/linkedin-ads) -- [Mailchimp](https://pipedream.com/apps/mailchimp) -- [Mailgun](https://pipedream.com/apps/mailgun) -- [MongoDB](https://pipedream.com/apps/mongodb) -- [Outreach](https://pipedream.com/apps/outreach) -- [PagerDuty](https://pipedream.com/apps/pagerduty) -- [Pinterest](https://pipedream.com/apps/pinterest) -- [Pipedrive](https://pipedream.com/apps/pipedrive) -- [Pipefy](https://pipedream.com/apps/pipefy) -- [Propeller](https://pipedream.com/apps/propeller) -- [Quickbooks](https://pipedream.com/apps/quickbooks) -- [Rebrandly](https://pipedream.com/apps/rebrandly) -- [ReCharge](https://pipedream.com/apps/recharge) -- [Salesforce (REST API)](https://pipedream.com/apps/salesforce_rest_api) -- [Segment](https://pipedream.com/apps/segment) -- [SendinBlue](https://pipedream.com/apps/sendinblue) -- [ServiceNow](https://pipedream.com/apps/servicenow) -- [ShipStation](https://pipedream.com/apps/shipstation) -- [Shopify](https://pipedream.com/apps/shopify) -- [Snowflake](https://pipedream.com/apps/snowflake) -- [Stripe](https://pipedream.com/apps/stripe) -- [Twilio SendGrid](https://pipedream.com/apps/sendgrid) -- [WhatsApp Business](https://pipedream.com/apps/whatsapp-business) -- [WooCommerce](https://pipedream.com/apps/woocommerce) -- [Xero Accounting](https://pipedream.com/apps/xero_accounting_api) -- [Zendesk](https://pipedream.com/apps/zendesk) -- [Zoom Admin](https://pipedream.com/apps/zoom_admin) -- [Zoho Books](https://pipedream.com/apps/zoho_books) -- [Zoho CRM](https://pipedream.com/apps/zoho_crm) -- [Zoho People](https://pipedream.com/apps/zoho_people) -- [Zoho SalesIQ](https://pipedream.com/apps/zoho_salesiq) - - -Missing an integration? -If we don't have an integration for an app that you'd like to see, please [let us know](https://pipedream.com/support) or [contribute it to the source available Pipedream registry](/components/contributing/). - - -**Check out the full list of integrated apps [here](https://pipedream.com/apps).** \ No newline at end of file diff --git a/docs-v2/pages/apps/oauth-clients.mdx b/docs-v2/pages/apps/oauth-clients.mdx deleted file mode 100644 index e0846b39db168..0000000000000 --- a/docs-v2/pages/apps/oauth-clients.mdx +++ /dev/null @@ -1,57 +0,0 @@ -import Callout from '@/components/Callout' -import ArcadeEmbed from '@/components/ArcadeEmbed' -import { Steps } from 'nextra/components' - -# OAuth Clients -By default, OAuth apps in Pipedream use our official OAuth client. When you connect an account for these apps, you grant Pipedream the requested permissions (scopes) on OAuth authorization. - -Pipedream apps solve for a broad range of use cases, which means the scopes our OAuth client requests may include a different set than your specific use case. To define the exact scope of access you'd like to grant, you can configure a custom OAuth client. - -## Configuring custom OAuth clients - - - - - -### Create an OAuth client in the relevant app -For example, if you want to use a custom OAuth client for GitHub, you'll need to locate [their documentation](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app) and create an OAuth app in your developer settings. - -### Navigate to the OAuth Clients page in Pipedream -Open the [OAuth Clients page in your Pipedream account](https://pipedream.com/@/accounts/oauth-clients) and click **New OAuth Client**. - -### Select the app -Choose the app you need. If you can't find what you're looking for, feel free to [submit an integration request](https://pipedream.com/support). - -### Enter the required fields -- **Name:** Give the OAuth client a name so it's easy to identify -- **Description:** Optionally add a brief description for additional context -- **Client ID and Secret**: Paste these values from the app's settings that you're configuring (the client secret is sensitive โ€“ we'll encrypt and hide it from the UI) -- **Redirect URI:** Copy this Redirect URI and paste it into the app's settings -- **Scopes:** We'll list the scopes from Pipedream's official OAuth client by default. Add or remove scopes as needed based on your use case. - -And finally, click **Save**. - - -Make sure to include all the scopes you need based on your use case. You can modify the scopes later (you'll need to reconnect your account for changes to take effect). Refer to the app's API documentation for information on what scopes you'll need. - - - - -## Connecting your account with with a custom OAuth client -Once you've created the OAuth client, anyone in your workspace can connect their account: - -
- - - - -Now you're ready to use the connected account in any workflow, just like any other account in Pipedream: - -![Connected accounts with OAuth client labels](https://res.cloudinary.com/pipedreamin/image/upload/v1717104725/oauth-clients-dropdown-labels_zzmycx.png) - -### Limitations -- The vast majority of OAuth apps in Pipedream support custom OAuth clients. However, due to the unique integration requirements for certain apps, custom OAuth clients are not supported in **triggers** for these apps (custom OAuth clients work in actions and code steps): [Discord](https://pipedream.com/apps/discord/), [Dropbox](https://pipedream.com/apps/dropbox/), [Slack](https://pipedream.com/apps/slack/), and [Zoom](https://pipedream.com/apps/zoom/). \ No newline at end of file diff --git a/docs-v2/pages/components/_meta.tsx b/docs-v2/pages/components/_meta.tsx deleted file mode 100644 index 751b3c794f6a2..0000000000000 --- a/docs-v2/pages/components/_meta.tsx +++ /dev/null @@ -1,4 +0,0 @@ -export default { - "index": "Overview", - "contributing": "Contributing", -} as const diff --git a/docs-v2/pages/components/contributing/_meta.tsx b/docs-v2/pages/components/contributing/_meta.tsx deleted file mode 100644 index bcb33dce05358..0000000000000 --- a/docs-v2/pages/components/contributing/_meta.tsx +++ /dev/null @@ -1,9 +0,0 @@ -export default { - "index": "Overview", - "api": "Component API", - "actions-quickstart": "Quickstart โ€” Actions", - "sources-quickstart": "Quickstart โ€” Sources", - "guidelines": "Guidelines", - "typescript": "TypeScript components", - "cli": "CLI", -} as const diff --git a/docs-v2/pages/components/contributing/actions-quickstart.mdx b/docs-v2/pages/components/contributing/actions-quickstart.mdx deleted file mode 100644 index 1c7e570fc502d..0000000000000 --- a/docs-v2/pages/components/contributing/actions-quickstart.mdx +++ /dev/null @@ -1,491 +0,0 @@ -import Callout from '@/components/Callout' - -# Quickstart: Action Development - - - -## Overview - -This document is intended for developers who want to author and edit [Pipedream Actions](/components/contributing/#actions). After completing this quickstart, you'll understand how to: - -- Develop Pipedream components -- Publish private actions and use them in workflows -- Use props to capture user input -- Update an action -- Use npm packages -- Use Pipedream managed auth for a 3rd party app - - -If you previously developed actions using Pipedream's UI, we recommend reviewing our [migration guide](/components/contributing/migrating/) after completing this quickstart. - - -## Prerequisites - -- Create a free account at [https://pipedream.com](https://pipedream.com) -- Download and install the [Pipedream CLI](/components/contributing/cli/install/) -- Once the CLI is installed, [link your Pipedream account](/components/contributing/cli/login/#existing-pipedream-account) to the CLI by running `pd login` in your terminal - -> **NOTE:** See the [CLI reference](/components/contributing/cli/reference/) for detailed usage and examples beyond those covered below. - -## Walkthrough - -We recommend that you complete the examples below in order. - -**hello world! (~5 minutes)** - -- Develop a `hello world!` action -- Publish it (private to your account) using the Pipedream CLI -- Add it to a workflow and run it - -**hello [name]! (~5 minutes)** - -- Capture user input using a `string` prop -- Publish a new version of your action -- Update the action in your workflow - -**Use an npm Package (~5 mins)** - -- Require the `axios` npm package -- Make a simple API request -- Export data returned by the API from your action - -**Use Managed Auth (~10 mins)** - -- Use Pipedream managed OAuth for Github with the `octokit` npm package -- Connect your Github account to the action in a Pipedream workflow -- Retrieve details for a repo and return them from the action - -### hello world! - -The following code represents a simple component that can be published as an action ([learn more](/components/contributing/api/) about the component structure). When used in a workflow, it will export `hello world!` as the return value for the step. - -```javascript -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.1", - type: "action", - props: {}, - async run() { - return `hello world!`; - }, -}; -``` - -To get started, save the code to a local `.js` file (e.g., `action.js`) and run the following CLI command: - -```bash -pd publish action.js -``` - -The CLI will publish the component as an action in your account with the key `action_demo`. **The key must be unique across all components in your account (sources and actions). If it's not unique, the existing component with the matching key will be updated.** - -The CLI output should look similar to this: - -```bash -sc_v4iaWB Action Demo 0.0.1 just now action_demo -``` - -To test the action: - -1. Open Pipedream in your browser - -2. Create a new workflow with a **Schedule** trigger - -3. Click the **+** button to add a step to your workflow - -4. Click on **My Actions** and then select the **Action Demo** action to add it to your workflow. - ![Click on the My Actions button to show all of your privately published actions](/images/components/v3/using-private-actions.png) -5. Deploy your workflow - -6. Click **RUN NOW** to execute your workflow and action - -You should see `hello world!` returned as the value for `steps.action_demo.$return_value`. - -![image-20210411165443563](https://res.cloudinary.com/pipedreamin/image/upload/v1618550730/docs/components/image-20210411165443563_d6drvo.png) - -Keep the browser tab open. We'll return to this workflow in the rest of the examples as we update the action. - -### hello [name]! - -Next, let's update the component to capture some user input. First, add a `string` [prop](/components/contributing/api/#props) called `name` to the component. - -```java -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.1", - type: "action", - props: { - name: { - type: "string", - label: "Name", - } - }, - async run() { - return `hello world!` - }, -} -``` - -Next, update the `run()` function to reference `this.name` in the return value. - -```javascript -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.1", - type: "action", - props: { - name: { - type: "string", - label: "Name", - }, - }, - async run() { - return `hello ${this.name}!`; - }, -}; -``` - -Finally, update the component version to `0.0.2`. If you fail to update the version, the CLI will throw an error. - -```javascript -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.2", - type: "action", - props: { - name: { - type: "string", - label: "Name", - }, - }, - async run() { - return `hello ${this.name}!`; - }, -}; -``` - -Save the file and run the `pd publish` command again to update the action in your account. - -```bash -pd publish action.js -``` - -The CLI will update the component in your account with the key `action_demo`. You should see something like this: - -```bash -sc_Egip04 Action Demo 0.0.2 just now action_demo -``` - -Next, let's update the action in the workflow from the previous example and run it. - -1. Hover over the action in your workflow โ€”ย you should see an update icon at the top right. Click the icon to update the action to the latest version and then save the workflow. If you don't see the icon, verify that the CLI successfully published the update or try refreshing the page. - - ![image-20210411164514490](https://res.cloudinary.com/pipedreamin/image/upload/v1618550730/docs/components/image-20210411164514490_qghbzf.png) - -2. After saving the workflow, you should see an input field appear. Enter a value for the `Name` input (e.g., `foo`). - ![image-20210411165053922](https://res.cloudinary.com/pipedreamin/image/upload/v1618550730/docs/components/image-20210411165053922_pckn5y.png) -3. Deploy the workflow and click **RUN NOW** - -You should see `hello foo!` (or the value you entered for `Name`) as the value returned by the step. - -### Use an npm Package - -Next, we'll update the component to get data from the Star Wars API using the `axios` npm package. To use the `axios` package, just `import` it. - -```javascript -import { axios } from "@pipedream/platform"; - -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.2", - type: "action", - props: { - name: { - type: "string", - label: "Name", - }, - }, - async run() { - return `hello ${this.name}!`; - }, -}; -``` - - -To use most npm packages on Pipedream, just `import` or `require` them โ€” there is no `package.json` or `npm install` required. - - -Then, update the `run()` method to: - -- Make a request to the following endpoint for the Star Wars API: `https://swapi.dev/api/people/1/` -- Reference the `name` field of the payload returned by the API - -```javascript -import { axios } from "@pipedream/platform"; - -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.2", - type: "action", - props: { - name: { - type: "string", - label: "Name", - }, - }, - async run({ $ }) { - const data = await axios($, { - url: "https://swapi.dev/api/people/1/", - }); - return `hello ${data.name}!`; - }, -}; -``` - -Next, remove the `name` prop since we're no longer using it. - -```javascript -import { axios } from "@pipedream/platform"; - -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.2", - type: "action", - props: {}, - async run({ $ }) { - const data = await axios($, { - url: "https://swapi.dev/api/people/1/", - }); - return `hello ${data.name}!`; - }, -}; -``` - -Finally, update the version to `0.0.3`. If you fail to update the version, the CLI will throw an error. - -```javascript -import { axios } from "@pipedream/platform"; - -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.3", - type: "action", - props: {}, - async run({ $ }) { - const data = await axios($, { - url: "https://swapi.dev/api/people/1/", - }); - return `hello ${data.name}!`; - }, -}; -``` - -Save the file and run the `pd publish` command again to update the action in your account. - -```bash -pd publish action.js -``` - -The CLI will update the component in your account with the key `action_demo`. You should see something like this: - -```bash -sc_ZriKEn Action Demo 0.0.3 1 second ago action_demo -``` - -Follow the steps in the previous example to update and run the action in your workflow. You should see `hello Luke Skywalker!` as the return value for the step. - -### Use Managed Auth - -For the last example, we'll use Pipedream managed auth to retrieve and emit data from the Github API (which uses OAuth for authentication). First, remove the line that imports `axios` and clear the `run()` function from the last example. Your code should look like this: - -```javascript -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.3", - type: "action", - async run() {}, -}; -``` - -Next, import Github's `octokit` npm package - -```javascript -import { Octokit } from "@octokit/rest"; - -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.3", - type: "action", - async run() {}, -}; -``` - -Then add an [app prop](/components/contributing/api/#app-props) to use Pipedream managed auth with this component. For this example, we'll add an app prop for Github: - -```javascript -import { Octokit } from "@octokit/rest"; - -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.3", - type: "action", - props: { - github: { - type: "app", - app: "github", - }, - }, - async run() {}, -}; -``` - - -The value for the `app` property is the name slug for the app in Pipedream. This is not currently discoverable, but it will be in the near future on app pages in the [Pipedream Marketplace](https://pipedream.com/explore). For the time being, if you want to know how to reference an app, please please [reach out](https://pipedream.com/community). - - -Next, update the `run()` method to get a repo from Github and return it. For this example, we'll pass static values to get the `pipedreamhq/pipedream` repo. Notice that we're passing the `oauth_access_token` in the authorization header by referencing the `$auth` property of the app prop โ€” `this.github.$auth.oauth_access_token`. You can discover how to reference auth tokens in the **Authentication Strategy** section for each app in the [Pipedream Marketplace](https://pipedream.com/explore). - -```javascript -import { Octokit } from "@octokit/rest"; - -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.3", - type: "action", - props: { - github: { - type: "app", - app: "github", - }, - }, - async run() { - const octokit = new Octokit({ - auth: this.github.$auth.oauth_access_token, - }); - - return ( - await octokit.rest.repos.get({ - owner: `pipedreamhq`, - repo: `pipedream`, - }) - ).data; - }, -}; -``` - -In order to help users understand what's happening with each action step, we recommend surfacing a brief summary with `$summary` ([read more](/components/contributing/api/#actions) about exporting data using `$.export`). - -```javascript -import { Octokit } from "@octokit/rest"; - -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.3", - type: "action", - props: { - github: { - type: "app", - app: "github", - }, - }, - async run({ $ }) { - const octokit = new Octokit({ - auth: this.github.$auth.oauth_access_token, - }); - - const { data } = await octokit.rest.repos.get({ - owner: `pipedreamhq`, - repo: `pipedream`, - }); - - $.export("$summary", `Successfully fetched info for \`${data.full_name}\``); - - return data; - }, -}; -``` - -Finally, update the version to `0.0.4`. If you fail to update the version, the CLI will throw an error. - -```javascript -import { Octokit } from "@octokit/rest"; - -export default { - name: "Action Demo", - description: "This is a demo action", - key: "action_demo", - version: "0.0.4", - type: "action", - props: { - github: { - type: "app", - app: "github", - }, - }, - async run({ $ }) { - const octokit = new Octokit({ - auth: this.github.$auth.oauth_access_token, - }); - - const { data } = await octokit.rest.repos.get({ - owner: `pipedreamhq`, - repo: `pipedream`, - }); - - $.export("$summary", `Successfully fetched info for \`${data.full_name}\``); - - return data; - }, -}; -``` - -Save the file and run the `pd publish` command again to update the action in your account. - -```bash -pd publish action.js -``` - -The CLI will update the component in your account with the key `action_demo`. You should see something like this: - -```bash -sc_k3ia53 Action Demo 0.0.4 just now action_demo -``` - -Follow the steps in the earlier example to update the action in your workflow (you may need to save your workflow after refreshing the action). You should now see a prompt to connect your Github account to the step: -![image-20210411114410883](https://res.cloudinary.com/pipedreamin/image/upload/v1618550730/docs/components/image-20210411114410883_cngxm4.png) - -Select an existing account or connect a new one, and then deploy your workflow and click **RUN NOW**. You should see the results returned by the action: - -![image-20210411114522610](https://res.cloudinary.com/pipedreamin/image/upload/v1618550730/docs/components/image-20210411114522610_dokk3b.png) - -## What's Next? - -You're ready to start authoring and publishing actions on Pipedream! You can also check out the [detailed component reference](/components/contributing/api/#component-api) at any time! - -If you have any questions or feedback, please [reach out](https://pipedream.com/community)! diff --git a/docs-v2/pages/components/contributing/api.mdx b/docs-v2/pages/components/contributing/api.mdx deleted file mode 100644 index 6eeb275a44334..0000000000000 --- a/docs-v2/pages/components/contributing/api.mdx +++ /dev/null @@ -1,1212 +0,0 @@ -import Callout from '@/components/Callout' - -# Component API Reference - - -Our TypeScript component API is in **beta**. If you're interested in developing TypeScript components and providing feedback, [see our TypeScript docs](/components/contributing/typescript/). - - -This document was created to help developers author and use [Pipedream components](/components/contributing/). Not only can you develop [sources](/components/contributing/sources-quickstart/) (workflow triggers) and [actions](/components/contributing/actions-quickstart/) using the component API, but you can also develop [Node.js steps](/workflows/building-workflows/code/nodejs/) right in your workflows - without leaving your browser! You can publish components to your account for private use, or [contribute them to the Pipedream registry](/components/contributing/) for anyone to run. - -While sources and actions share the same core component API, they differ in both how they're used and written, so certain parts of the component API apply only to one or the other. [This section of the docs](#differences-between-sources-and-actions) explains the core differences. When this document uses the term "component", the corresponding feature applies to both sources and actions. If a specific feature applies to only sources _or_ actions, the correct term will be used. - -If you have any questions about component development, please reach out [in our community](https://pipedream.com/community/c/dev/11). - -## Overview - -### What is a component? - -Components are Node.js modules that run on Pipedream's serverless infrastructure. - -- Trigger Node.js code on HTTP requests, timers, cron schedules, or manually -- Emit data on each event to inspect it. Trigger Pipedream hosted workflows or access it outside of Pipedream via API -- Accept user input on deploy via [CLI](/components/contributing/cli/reference/#pd-deploy), [API](/workflows/rest-api), or [UI](https://pipedream.com/sources) -- Connect to [{process.env.PUBLIC_APPS}+ apps](https://pipedream.com/apps) using Pipedream managed auth -- Use most npm packages with no `npm install` or `package.json` required -- Store and retrieve state using the [built-in key-value store](#db) - -### Quickstarts - -To help you get started, we created a step-by-step walkthrough for developing both [sources](/components/contributing/sources-quickstart/) and [actions](/components/contributing/actions-quickstart/). We recommend starting with those docs and using the API reference below as you develop. - -### Differences between sources and actions - -Sources and actions share the same component API. However, certain features of the API only apply to one or the other: - -- Actions are defined with `type: action` ([see the docs on the `type` property](#component-structure)). Sources require no `type` property be set. Components without a `type` are considered sources. - -- Sources emit events [using `this.$emit`](#emit), which trigger linked workflows. Any features associated with emitting events (e.g., [dedupe strategies](#dedupe-strategies)) can only be used with sources. Actions [return data using `return` or `$.export`](#returning-data-from-steps), which is made available to future steps of the associated workflow. - -- Sources have access to [lifecycle hooks](#lifecycle-hooks), which are often required to configure the source to listen for new events. Actions do not have access to these lifecycle hooks. - -- Actions have access to [a special `$` variable](#actions), passed as a parameter to the `run` method. This variable exposes functions that allow you to send data to destinations, export data from the action, return HTTP responses, and more. - -- Sources can be developed iteratively using `pd dev`. Actions currently cannot (please follow [this issue](https://github.com/PipedreamHQ/pipedream/issues/1437) to be notified of updates). - -- You use `pd deploy` to deploy sources to your account. You use `pd publish` to publish actions, making them available for use in workflows. - -- You can attach [interfaces](#interface-props) (like HTTP endpoints, or timers) to sources. This defines how the source is invoked. Actions do not have interfaces, since they're run step-by-step as a part of the associated workflow. - -### Getting Started with the CLI - -Several examples below use the Pipedream CLI. To install it, [follow the instructions for your OS / architecture](/components/contributing/cli/install/). - -See the [CLI reference](/components/contributing/cli/reference/) for detailed usage and examples beyond those covered below. - -### Example Components - -You can find hundreds of example components in the `components/` directory of the [`PipedreamHQ/pipedream` repo](https://github.com/PipedreamHQ/pipedream). - -## Component API - -### Component Structure - -Pipedream components export an object with the following properties: - -```javascript -export default { - name: "", - key: "", - type: "", - version: "", - description: "", - props: {}, - methods: {}, - hooks: { - async activate() {}, - async deactivate() {}, - async deploy() {}, - }, - dedupe: "", - async run(event) { - this.$emit(event); - }, -}; -``` - -| Property | Type | Required? | Description | -| ------------- | -------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | `string` | required | The name of the component, a string which identifies components deployed to users' accounts. This name will show up in the Pipedream UI, in CLI output (for example, from `pd list` commands), etc. It will also be converted to a unique slug on deploy to reference a specific component instance (it will be auto-incremented if not unique within a user account). | -| `key` | `string` | recommended | The `key` uniquely identifies a component within a namespace. The default namespace for components is your account.

When publishing components to the Pipedream registry, the `key` must be unique across registry components and should follow the pattern:

`app_name_slug`-`slugified-component-name` | -| `type` | `string` | required | When publishing an action, `type: "action"` is required. When publishing a source, use `type: "source"`. | -| `version` | `string` | required | The component version. There are no constraints on the version, but [semantic versioning](https://semver.org/) is required for any components published to the [Pipedream registry](/components/contributing/guidelines/). | -| `description` | `string` | recommended | The description will appear in the Pipedream UI to aid in discovery and to contextualize instantiated components | -| `props` | `object` | optional | [Props](#props) are custom attributes you can register on a component. When a value is passed to a prop attribute, it becomes a property on that component instance. You can reference these properties in component code using `this` (e.g., `this.propName`). | -| `methods` | `object` | optional | Define component methods for the component instance. They can be referenced via `this` (e.g., `this.methodName()`). | -| `hooks` | `object` | optional (sources only) | [Hooks](#hooks) are functions that are executed when specific component lifecycle events occur. | -| `dedupe` | `string` | optional (sources only) | You may specify a [dedupe strategy](#dedupe-strategies) to be applied to emitted events | -| `run` | `method` | required | Each time a component is invoked (for example, via HTTP request), [its `run` method](#run) is called. The event that triggered the component is passed to `run`, so that you can access it within the method. Events are emitted using `this.$emit()`. | - -### Props - -Props are custom attributes you can register on a component. When a value is passed to a prop attribute, it becomes a property on that component instance. You can reference these properties in component code using `this` (e.g., `this.propName`). - -| Prop Type | Description | -| ------------------------------- | --------------------------------------------------------------------------------------------- | -| [User Input](#user-input-props) | Enable components to accept input on deploy | -| [Interface](#interface-props) | Attaches a Pipedream interface to your component (e.g., an HTTP interface or timer) | -| [Service](#service-props) | Attaches a Pipedream service to your component (e.g., a key-value database to maintain state) | -| [App](#app-props) | Enables managed auth for a component | -| [Data Store](/workflows/data-management/data-stores/#using-data-stores-in-code-steps) | Provides access to a Pipedream [data store](/workflows/data-management/data-stores/) | -| [HTTP Request](#http-request-prop)| Enables components to execute HTTP requests based on user input | -| [Alert](#alert-prop)| Renders an informational alert in the prop form to help users configure the source or action | - -#### User Input Props - -User input props allow components to accept input on deploy. When deploying a component, users will be prompted to enter values for these props, setting the behavior of the component accordingly. - -##### General - -**Definition** - -```javascript -props: { - myPropName: { - type: "", - label: "", - description: "", - options: [], // OR async options() {} to return dynamic options - optional: true || false, - propDefinition: [], - default: "", - secret: true || false, - min: , - max: , - disabled: true || false, - hidden: true || false - }, -}, -``` - -| Property | Type | Required? | Description | -| ---------------- | ------------------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `type` | `string` | required | Value must be set to a valid `PropType` (see below). Suffix with `[]` (e.g. `string[]`) to denote array of that type (if supported). | -| `label` | `string` | optional | A friendly label to show to user for this prop. If a label is not provided, the `propName` is displayed to the user. | -| `description` | `string` | optional | Displayed near the prop input. Typically used to contextualize the prop or provide instructions to help users input the correct value. Markdown is supported. | -| `options` | `string[]` or `object[]` or `method` | optional | Provide an array to display options to a user in a drop down menu.
 
**`[]` Basic usage**
Array of strings. E.g.,
`['option 1', 'option 2']`
 
**`object[]` Define Label and Value**
`[{ label: 'Label 1', value: 'label1'}, { label: 'Label 2', value: 'label2'}]`
 
**`method` Dynamic Options**
You can generate options dynamically (e.g., based on real-time API requests with pagination). See configuration details below. | -| `useQuery` | `boolean` | optional | Use in conjunction with **Dynamic Options**. If set to `true`, the prop accepts a real-time query that can be used by the `options` method to obtain results according to that query. | -| `optional` | `boolean` | optional | Set to `true` to make this prop optional. Defaults to `false`. | -| `propDefinition` | `[]` | optional | Re-use a prop defined in an app file. When you include a prop definition, the prop will inherit values for all the properties listed here. However, you can override those values by redefining them for a given prop instance. See **propDefinitions** below for usage. | -| `default` | `string` | optional | Define a default value if the field is not completed. Can only be defined for optional fields (required fields require explicit user input). | -| `secret` | `boolean` | optional | If set to `true`, this field will hide your input in the browser like a password field, and its value will be encrypted in Pipedream's database. The value will be decrypted when the component is run in [the execution environment](/privacy-and-security/#execution-environment). Defaults to `false`. Only allowed for `string` props. | -| `min` | `integer` | optional | Minimum allowed integer value. Only allowed for `integer` props.. | -| `max` | `integer` | optional | Maximum allowed integer value . Only allowed for `integer` props. | -| `disabled` | `boolean` | optional | Set to `true` to disable usage of this prop. Defaults to `false`. | -| `hidden` | `boolean` | optional | Set to `true` to hide this field. Defaults to `false`. | - -**Prop Types** - -| Prop Type | Array Supported | Supported in Sources? | Supported in Actions? | Custom properties | -| ------------------- | --------------- | --------------------- | --------------------- | :---------------------------------------------------------------------------------------------------------- | -| `app` | | โœ“ | โœ“ | See [App Props](#app-props) below | -| `boolean` | โœ“ | โœ“ | โœ“ | -| `integer` | โœ“ | โœ“ | โœ“ | - `min` (`integer`): Minimum allowed integer value.
- `max` (`integer`): Maximum allowed integer value. | -| `string` | โœ“ | โœ“ | โœ“ | - `secret` (`boolean`): Whether to treat the value as a secret. | -| `object` | | โœ“ | โœ“ | -| `any` | | | โœ“ | -| `$.interface.http` | | โœ“ | | -| `$.interface.timer` | | โœ“ | | -| `$.service.db` | | โœ“ | | -| `data_store` | | | โœ“ | -| `http_request` | | | โœ“ | -| `alert` | | โœ“ | โœ“ | See [Alert Prop](#alert-prop) below - -**Usage** - -| Code | Description | Read Scope | Write Scope | -| ----------------- | ---------------------------------------- | ------------------------- | --------------------------------------------------------------------------------------- | -| `this.myPropName` | Returns the configured value of the prop | `run()` `hooks` `methods` | n/a (input props may only be modified on component deploy or update via UI, CLI or API) | - -**Example** - -Following is an example source that demonstrates how to capture user input via a prop and emit it on each event: - -```javascript -export default { - name: "User Input Prop Example", - version: "0.1", - props: { - msg: { - type: "string", - label: "Message", - description: "Enter a message to `console.log()`", - }, - }, - async run() { - this.$emit(this.msg); - }, -}; -``` - -To see more examples, explore the [curated components in Pipedream's GitHub repo](#example-components). - -##### Advanced Configuration - -##### Async Options ([example](https://github.com/PipedreamHQ/pipedream/blob/master/components/github/github.app.mjs)) - -Async options allow users to select prop values that can be programmatically-generated (e.g., based on a real-time API response). - -```javascript -async options({ - page, - prevContext, - query, -}) {}, -``` - -| Property | Type | Required? | Description | -| ------------- | --------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `options()` | `method` | optional | Typically returns an array of values matching the prop type (e.g., `string`) or an array of object that define the `label` and `value` for each option. The `page` and `prevContext` input parameter names are reserved for pagination (see below).
 
When using `prevContext` for pagination, it must return an object with an `options` array and a `context` object with a `nextPageToken` key. E.g., `{ options, context: { nextPageToken }, }` | -| `page` | `integer` | optional | Returns a `0` indexed page number. Use with APIs that accept a numeric page number for pagination. | -| `prevContext` | `string` | optional | Returns a string representing the context for the previous `options` execution. Use with APIs that accept a token representing the last record for pagination. | -| `query` | `string` | optional | Returns a string with the user input if the prop has the `useQuery` property set to `true`. Use with APIs that return items based on a query or search parameter. | - -Following is an example source demonstrating the usage of async options: - -```javascript -export default { - name: "Async Options Example", - version: "0.1", - props: { - msg: { - type: "string", - label: "Message", - description: "Select a message to `console.log()`", - async options() { - // write any node code that returns a string[] or object[] (with label/value keys) - return ["This is option 1", "This is option 2"]; - }, - }, - }, - async run() { - this.$emit(this.msg); - }, -}; -``` - -##### Prop Definitions ([example](https://github.com/PipedreamHQ/pipedream/blob/master/components/github/sources/new-commit/new-commit.mjs)) - -Prop definitions enable you to reuse props that are defined in another object. A common use case is to enable re-use of props that are defined for a specific app. - -```javascript -props: { - myPropName: { - propDefinition: [ - app, - "propDefinitionName", - inputValues - ] - }, -}, - -``` - -| Property | Type | Required? | Description | -| -------------------- | -------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `propDefinition` | `array` | optional | An array of options that define a reference to a `propDefinitions` within the `propDefinitions` for an `app` | -| `app` | `object` | required | An app object | -| `propDefinitionName` | `string` | required | The name of a specific `propDefinition` defined in the corresponding `app` object | -| `inputValues` | `object` | optional | Values to pass into the prop definition. To reference values from previous props, use an arrow function. E.g.,:
 
`c => ({ variableName: c.previousPropName })`

[See these docs](#referencing-values-from-previous-props) for more information. | - -Following is an example source that demonstrates how to use `propDefinitions`. - -```javascript -const rss = { - type: "app", - app: "rss", - propDefinitions: { - urlDef: { - type: "string", - label: "RSS URL", - description: "Enter a URL for an RSS feed.", - }, - }, -}; - -export default { - name: "Prop Definition Example", - description: `This component captures an RSS URL and logs it`, - version: "0.1", - props: { - rss, - url: { propDefinition: [rss, "urlDef"] }, - }, - async run() { - console.log(this.url); - }, -}; -``` - -##### Referencing values from previous props - -When you define a prop in an app file, and that prop depends on the value of another prop, you'll need to pass the value of the previous props in a special way. Let's review an example from [Trello](https://trello.com), a task manager. - -You create Trello _boards_ for new projects. Boards contain _lists_. For example, this **Active** board contains two lists: - -![Trello board example](/images/components/trello-board-example.png) - -In Pipedream, users can choose from lists on a specific board: - -![Trello board and lists props](/images/components/trello-props.png) - -Both **Board** and **Lists** are defined in the Trello app file: - -```javascript -board: { - type: "string", - label: "Board", - async options(opts) { - const boards = await this.getBoards(this.$auth.oauth_uid); - const activeBoards = boards.filter((board) => board.closed === false); - return activeBoards.map((board) => { - return { label: board.name, value: board.id }; - }); - }, -}, -lists: { - type: "string[]", - label: "Lists", - optional: true, - async options(opts) { - const lists = await this.getLists(opts.board); - return lists.map((list) => { - return { label: list.name, value: list.id }; - }); - }, -} -``` - -In the `lists` prop, notice how `opts.board` references the board. You can pass `opts` to the prop's `options` method when you reference `propDefinitions` in specific components: - -```javascript -board: { propDefinition: [trello, "board"] }, -lists: { - propDefinition: [ - trello, - "lists", - (configuredProps) => ({ board: configuredProps.board }), - ], -}, -``` - -`configuredProps` contains the props the user previously configured (the board). This allows the `lists` prop to use it in the `options` method. - -##### Dynamic props - -Some prop definitions must be computed dynamically, after the user configures another prop. We call these **dynamic props**, since they are rendered on-the-fly. This technique is used in [the Google Sheets **Add Single Row** action](https://github.com/PipedreamHQ/pipedream/blob/master/components/google_sheets/actions/add-single-row/add-single-row.mjs), which we'll use as an example below. - -First, determine the prop whose selection should render dynamic props. In the Google Sheets example, we ask the user whether their sheet contains a header row. If it does, we display header fields as individual props: - -![Google Sheets Additional props example - header columns loading as props](https://res.cloudinary.com/pipedreamin/image/upload/v1654129371/docs/additional-props_lx5jtv.gif) - -To load dynamic props, the header prop must have the `reloadProps` field set to `true`: - -```javascript -hasHeaders: { - type: "string", - label: "Does the first row of the sheet have headers?", - description: "If the first row of your document has headers we'll retrieve them to make it easy to enter the value for each column.", - options: [ - "Yes", - "No", - ], - reloadProps: true, -}, -``` - -When a user chooses a value for this prop, Pipedream runs the `additionalProps` component method to render props: - -```javascript -async additionalProps() { - const sheetId = this.sheetId?.value || this.sheetId; - const props = {}; - if (this.hasHeaders === "Yes") { - const { values } = await this.googleSheets.getSpreadsheetValues(sheetId, `${this.sheetName}!1:1`); - if (!values[0]?.length) { - throw new ConfigurationError("Cound not find a header row. Please either add headers and click \"Refresh fields\" or adjust the action configuration to continue."); - } - for (let i = 0; i < values[0]?.length; i++) { - props[`col_${i.toString().padStart(4, "0")}`] = { - type: "string", - label: values[0][i], - optional: true, - }; - } - } else if (this.hasHeaders === "No") { - props.myColumnData = { - type: "string[]", - label: "Values", - description: "Provide a value for each cell of the row. Google Sheets accepts strings, numbers and boolean values for each cell. To set a cell to an empty value, pass an empty string.", - }; - } - return props; -}, -``` - -The signature of this function is: - -```javascript -async additionalProps(previousPropDefs) -``` - -where `previousPropDefs` are the full set of props (props merged with the previous `additionalProps`). When the function is executed, `this` is bound similar to when the `run` function is called, where you can access the values of the props as currently configured, and call any `methods`. The return value of `additionalProps` will replace any previous call, and that return value will be merged with props to define the final set of props. - -Following is an example that demonstrates how to use `additionalProps` to dynamically change a prop's `disabled` and `hidden` properties: - -```javascript -async additionalProps(previousPropDefs) { - if (this.myCondition === "Yes") { - previousPropDefs.myPropName.disabled = true; - previousPropDefs.myPropName.hidden = true; - } else { - previousPropDefs.myPropName.disabled = false; - previousPropDefs.myPropName.hidden = false; - } - return previousPropDefs; -}, -``` - -Dynamic props can have any one of the following prop types: - -- `app` -- `boolean` -- `integer` -- `string` -- `object` -- `any` -- `$.interface.http` -- `$.interface.timer` -- `data_store` -- `http_request` - -#### Interface Props - -Interface props are infrastructure abstractions provided by the Pipedream platform. They declare how a source is invoked โ€” via HTTP request, run on a schedule, etc. โ€” and therefore define the shape of the events it processes. - -| Interface Type | Description | -| --------------- | --------------------------------------------------------------- | -| [Timer](#timer) | Invoke your source on an interval or based on a cron expression | -| [HTTP](#http) | Invoke your source on HTTP requests | - -#### Timer - -To use the timer interface, declare a prop whose value is the string `$.interface.timer`: - -**Definition** - -```javascript -props: { - myPropName: { - type: "$.interface.timer", - default: {}, - }, -} -``` - -| Property | Type | Required? | Description | -| --------- | -------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | `string` | required | Must be set to `$.interface.timer` | -| `default` | `object` | optional | **Define a default interval**
`{ intervalSeconds: 60, },`
 
**Define a default cron expression**
`{ cron: "0 0 * * *", },` | - -**Usage** - -| Code | Description | Read Scope | Write Scope | -| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------- | ------------------------------------------------------------------------------------------- | -| `this.myPropName` | Returns the type of interface configured (e.g., `{ type: '$.interface.timer' }`) | `run()` `hooks` `methods` | n/a (interface props may only be modified on component deploy or update via UI, CLI or API) | -| `event` | Returns an object with the execution timestamp and interface configuration (e.g., `{ "timestamp": 1593937896, "interval_seconds": 3600 }`) | `run(event)` | n/a (interface props may only be modified on source deploy or update via UI, CLI or API) | - -**Example** - -Following is a basic example of a source that is triggered by a `$.interface.timer` and has default defined as a cron expression. - -```javascript -export default { - name: "Cron Example", - version: "0.1", - props: { - timer: { - type: "$.interface.timer", - default: { - cron: "0 0 * * *", // Run job once a day - }, - }, - }, - async run() { - console.log("hello world!"); - }, -}; -``` - -Following is an example source that's triggered by a `$.interface.timer` and has a `default` interval defined. - -```javascript -export default { - name: "Interval Example", - version: "0.1", - props: { - timer: { - type: "$.interface.timer", - default: { - intervalSeconds: 60 * 60 * 24, // Run job once a day - }, - }, - }, - async run() { - console.log("hello world!"); - }, -}; -``` - -##### HTTP - -To use the HTTP interface, declare a prop whose value is the string `$.interface.http`: - -```javascript -props: { - myPropName: { - type: "$.interface.http", - customResponse: true, // optional: defaults to false - }, -} -``` - -**Definition** - -| Property | Type | Required? | Description | -| --------- | -------- | --------- | ------------------------------------------------------------------------------------------------------------ | -| `type` | `string` | required | Must be set to `$.interface.http` | -| `respond` | `method` | required | The HTTP interface exposes a `respond()` method that lets your component issue HTTP responses to the client. | - -**Usage** - -| Code | Description | Read Scope | Write Scope | -| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `this.myPropName` | Returns an object with the unique endpoint URL generated by Pipedream (e.g., `{ endpoint: 'https://abcde.m.pipedream.net' }`) | `run()` `hooks` `methods` | n/a (interface props may only be modified on source deploy or update via UI, CLI or API) | -| `event` | Returns an object representing the HTTP request (e.g., `{ method: 'POST', path: '/', query: {}, headers: {}, bodyRaw: '', body: {}, }`) | `run(event)` | The shape of `event` corresponds with the the HTTP request you make to the endpoint generated by Pipedream for this interface | -| `this.myPropName.respond()` | Returns an HTTP response to the client (e.g., `this.http.respond({status: 200})`). | n/a | `run()` | - -###### Responding to HTTP requests - -The HTTP interface exposes a `respond()` method that lets your source issue HTTP responses. You may run `this.http.respond()` to respond to the client from the `run()` method of a source. In this case you should also pass the `customResponse: true` parameter to the prop. - -| Property | Type | Required? | Description | -| --------- | -------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------ | -| `status` | `integer` | required | An integer representing the HTTP status code. Return `200` to indicate success. Standard status codes range from `100` - `599` | -| `headers` | `object` | optional | Return custom key-value pairs in the HTTP response | -| `body` | `string` `object` `buffer` | optional | Return a custom body in the HTTP response. This can be any string, object, or Buffer. | - -###### HTTP Event Shape - -Following is the shape of the event passed to the `run()` method of your source: - -```javascript -{ - method: 'POST', - path: '/', - query: {}, - headers: {}, - bodyRaw: '', - body: -} -``` - -**Example** - -Following is an example source that's triggered by `$.interface.http` and returns `{ 'msg': 'hello world!' }` in the HTTP response. On deploy, Pipedream will generate a unique URL for this source: - -```javascript -export default { - name: "HTTP Example", - version: "0.0.1", - props: { - http: { - type: "$.interface.http", - customResponse: true, - }, - }, - async run(event) { - this.http.respond({ - status: 200, - body: { - msg: "hello world!", - }, - headers: { - "content-type": "application/json", - }, - }); - console.log(event); - }, -}; -``` - -#### Service Props - -| Service | Description | -| ------- | ---------------------------------------------------------------------------------------------------- | -| _DB_ | Provides access to a simple, component-specific key-value store to maintain state across executions. | - -##### DB - -**Definition** - -```javascript -props: { - myPropName: "$.service.db", -} -``` - -**Usage** - -| Code | Description | Read Scope | Write Scope | -| ----------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------- | -------------------------------------- | -| `this.myPropName.get('key')` | Method to get a previously set value for a key. Returns `undefined` if a key does not exist. | `run()` `hooks` `methods` | Use the `set()` method to write values | -| `this.myPropName.set('key', value)` | Method to set a value for a key. Values must be JSON-serializable data. | Use the `get()` method to read values | `run()` `hooks` `methods` | - -#### App Props - -App props are normally defined in an [app file](/components/contributing/guidelines/#app-files), separate from individual components. See [the `components/` directory of the pipedream GitHub repo](https://github.com/PipedreamHQ/pipedream/tree/master/components) for example app files. - -**Definition** - -```javascript -props: { - myPropName: { - type: "app", - app: "", - propDefinitions: {} - methods: {}, - }, -}, -``` - -| Property | Type | Required? | Description | -| ----------------- | -------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | `string` | required | Value must be `app` | -| `app` | `string` | required | Value must be set to the name slug for an app registered on Pipedream. [App files](/components/contributing/guidelines/#app-files) are programmatically generated for all integrated apps on Pipedream. To find your app's slug, visit the `components` directory of [the Pipedream GitHub repo](https://github.com/PipedreamHQ/pipedream/tree/master/components), find the app file (the file that ends with `.app.mjs`), and find the `app` property at the root of that module. If you don't see an app listed, please [open an issue here](https://github.com/PipedreamHQ/pipedream/issues/new?assignees=&labels=app%2C+enhancement&template=app---service-integration.md&title=%5BAPP%5D). | -| `propDefinitions` | `object` | optional | An object that contains objects with predefined user input props. See the section on User Input Props above to learn about the shapes that can be defined and how to reference in components using the `propDefinition` property | -| `methods` | `object` | optional | Define app-specific methods. Methods can be referenced within the app object context via `this` (e.g., `this.methodName()`) and within a component via `this.myAppPropName` (e.g., `this.myAppPropName.methodName()`). | - -**Usage** - -| Code | Description | Read Scope | Write Scope | -| --------------------------------- | ------------------------------------------------------------------------------------------------ | ----------------------------------------------- | ----------- | -| `this.$auth` | Provides access to OAuth tokens and API keys for Pipedream managed auth | **App Object:** `methods` | n/a | -| `this.myAppPropName.$auth` | Provides access to OAuth tokens and API keys for Pipedream managed auth | **Parent Component:** `run()` `hooks` `methods` | n/a | -| `this.methodName()` | Execute a common method defined for an app within the app definition (e.g., from another method) | **App Object:** `methods` | n/a | -| `this.myAppPropName.methodName()` | Execute a common method defined for an app from a component that includes the app as a prop | **Parent Component:** `run()` `hooks` `methods` | n/a | - -> **Note:** The specific `$auth` keys supported for each app will be published in the near future. - -#### HTTP Request Prop - -**Usage** - -| Code | Description | Read Scope | Write Scope | -| --------------------------------- | ------------------------------------------------------------------------------------------------ | ----------------------------------------------- | ----------- | -| `this.myPropName.execute()` | Execute an HTTP request as configured | n/a | `run()` `methods` | - -**Example** - -Following is an example action that demonstrates how to accept an HTTP request configuration as input and execute the request when the component is run: - -```javascript -export default { - name: "HTTP Request Example", - version: "0.0.1", - props: { - httpRequest: { - type: "http_request", - label: "API Request", - default: { - method: "GET", - url: "https://jsonplaceholder.typicode.com/posts", - } - }, - }, - async run() { - const { data } = await this.httpRequest.execute(); - return data; - }, -}; -``` - -For more examples, see the [docs on making HTTP requests with Node.js](/workflows/building-workflows/code/nodejs/http-requests/#send-a-get-request-to-fetch-data). - - -#### Alert Prop - -Sometimes you may need to surface contextual information to users within the prop form. This might be information that's not directly related to a specific prop, so it doesn't make sense to include in a prop description, but rather, it may be related to the overall configuration of the prop form. - -**Usage** - -| Property | Type | Required? | Description | -| - | - | - | - | -| `type` | `string` | required | Set to `alert` | -| `alertType` | `string` | required | Determines the color and UI presentation of the alert prop. Can be one of `info`, `neutral`, `warning`, `error`. | -| `content` | `string` | required | Determines the text that is rendered in the alert. Both plain text and markdown are supported. | - -```javascript -export default defineComponent({ - props: { - alert: { - type: "alert", - alertType: "info", - content: "Admin rights on the repo are required in order to register webhooks. In order to continue setting up your source, configure a polling interval below to check for new events.", - } - }, -}) -``` - -Refer to GitHub's component sources in the `pipedream` repo for an [example implementation](https://github.com/PipedreamHQ/pipedream/blob/b447d71f658d10d6a7432e8f5153bbda56ba9810/components/github/sources/common/common-flex.mjs#L27). - -![Info alert prop in GitHub source](/images/components/info-alert-prop-github.png) - -#### Limits on props - -When a user configures a prop with a value, it can hold at most {process.env.CONFIGURED_PROPS_SIZE_LIMIT} data. Consider this when accepting large input in these fields (such as a base64 string). - -The {process.env.CONFIGURED_PROPS_SIZE_LIMIT} limit applies only to static values entered as raw text. In workflows, users can pass expressions (referencing data in a prior step). In that case the prop value is simply the text of the expression, for example `{{steps.nodejs.$return_value}}`, well below the limit. The value of these expressions is evaluated at runtime, and are subject to [different limits](/workflows/limits/). - -### Methods - -You can define helper functions within the `methods` property of your component. You have access to these functions within the [`run` method](#run), or within other methods. - -Methods can be accessed using `this.`. For example, a `random` method: - -```javascript -methods: { - random() { - return Math.random() - }, -} -``` - -can be run like so: - -```javascript -const randomNum = this.random(); -``` - -### Hooks - -```javascript -hooks: { - async deploy() {}, - async activate() {}, - async deactivate() {}, -}, -``` - -| Property | Type | Required? | Description | -| ------------ | -------- | --------- | ----------------------------------------------------- | -| `deploy` | `method` | optional | Executed each time a component is deployed | -| `activate` | `method` | optional | Executed each time a component is deployed or updated | -| `deactivate` | `method` | optional | Executed each time a component is deactivated | - -### Dedupe Strategies - -> **IMPORTANT:** To use a dedupe strategy, you must emit an `id` as part of the event metadata (dedupe strategies are applied to the submitted `id`) - -| Strategy | Description | -| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `unique` | Pipedream maintains a cache of 100 emitted `id` values. Events with `id` values that are not in the cache are emitted, and the `id` value is added to the cache. After 100 events, `id` values are purged from the cache based on the order received (first in, first out). A common use case for this strategy is an RSS feed which typically does not exceed 100 items | -| `greatest` | Pipedream caches the largest `id` value (must be numeric). Only events with larger `id` values are emitted, and the cache is updated to match the new, largest value.. | -| `last` | Pipedream caches the ID associated with the last emitted event. When new events are emitted, only events after the matching `id` value will be emitted as events. If no `id` values match, then all events will be emitted. | - -### Run - -Each time a component is invoked, its `run` method is called. Sources are invoked by their [interface](#interface-props) (for example, via HTTP request). Actions are run when their parent workflow is triggered. - -You can reference `this` within the `run` method. `this` refers to the component, and provides access to [props](#props), [methods](#methods), and more. - -#### Sources - -When a source is invoked, the event that triggered the source is passed to `run`, so that you can access it within the method: - -```javascript -async run(event) { - console.log(event) -} -``` - -##### \$emit - -`this.$emit()` is a method in scope for the `run` method of a source - -```javascript -this.$emit(event, { - id, - name, - summary, - ts, -}); -``` - -| Property | Type | Required? | Description | -| --------- | ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `event` | JSON serializable data | optional | The data to emit as the event | -| `id` | `string` or `number` | Required if a dedupe strategy is applied | A value to uniquely identify this event. Common `id` values may be a 3rd party ID, a timestamp, or a data hash | -| `name` | `string` | optional | The name of the "channel" you'd like to emit the event to. By default, events are emitted to the `default` channel. If you set a different channel here, listening sources or workflows can subscribe to events on this channel, running the source or workflow only on events emitted to that channel. | -| `summary` | `string` | optional | Define a summary to customize the data displayed in the events list to help differentiate events at a glance | -| `ts` | `integer` | optional | Accepts an epoch timestamp in **milliseconds**. If you submit a timestamp, events will automatically be ordered and emitted from oldest to newest. If using the `last` dedupe strategy, the value cached as the `last` event for an execution will correspond to the event with the newest timestamp. | - -Following is a basic example that emits an event on each component execution. - -```javascript -export default { - name: "this.$emit() example", - description: "Deploy and run this component manually via the Pipedream UI", - async run() { - this.$emit({ message: "hello world!" }); - }, -}; -``` - -##### Logs - -You can view logs produced by a source's `run` method in the **Logs** section of the [Pipedream source UI](https://pipedream.com/sources), or using the `pd logs` CLI command: - -```bash -pd logs -``` - -##### Events - -If the `run` method emits events using `this.$emit`, you can access the events in the **EVENTS** section of the Pipedream UI for the component, or using the `pd events` CLI command: - -```bash -pd events -``` - -#### Actions - -When an action is run in a workflow, Pipedream passes an object with a `$` variable that gives you access to special functions, outlined below: - -```javascript -async run({ $ }) { - // You have access to $ within your action -} -``` - -##### Returning data from steps - -By default, variables declared within an action are scoped to that action. To return data from a step, you have two options: 1) use the `return` keyword, or 2) use `$.export` to return a named export from a step. - -**`return`** - -Use `return` to return data from an action: - -```javascript -async run({ $ }) { - return "data" -} -``` - -When you use return, the exported data will appear at `steps.[STEP NAME].$return_value`. For example, if you ran the code above in a step named `nodejs`, you'd reference the returned data using `steps.nodejs.$return_value`. - -**`$.export`** - -You can also use `$.export` to return named exports from an action. `$.export` takes the name of the export as the first argument, and the value to export as the second argument: - -```javascript -async run({ $ }) { - $.export("name", "value") -} -``` - -When your workflow runs, you'll see the named exports appear below your step, with the data you exported. You can reference these exports in other steps using `steps.[STEP NAME].[EXPORT NAME]`. - -##### Returning HTTP responses with `$.respond` - -`$.respond` lets you issue HTTP responses from your workflow. [See the full `$.respond` docs for more information](/workflows/building-workflows/triggers/#customizing-the-http-response). - -```javascript -async run({ $ }) { - $.respond({ - status: 200, - body: "hello, world" - }) -} -``` - -##### Ending steps early with `return $.flow.exit` - -`return $.flow.exit` terminates the entire workflow. It accepts a single argument: a string that tells the workflow why the workflow terminated, which is displayed in the Pipedream UI. - -```javascript -async run({ $ }) { - return $.flow.exit("reason") -} -``` - -##### `$.summary` - -`$.summary` is used to surface brief, user-friendly summaries about what happened when an action step succeeds. For example, when [adding items to a Spotify playlist](https://github.com/PipedreamHQ/pipedream/blob/master/components/spotify/actions/add-items-to-playlist/add-items-to-playlist.mjs#L51): - -![Spotify example with $summary](/images/components/spotify-$summary-example.png) - -Example implementation: - -```javascript -const data = [1, 2]; -const playlistName = "Cool jams"; -$.export( - "$summary", - `Successfully added ${data.length} ${ - data.length == 1 ? "item" : "items" - } to "${playlistName}"` -); -``` - -##### `$.send` - -`$.send` allows you to send data to [Pipedream destinations](/workflows/data-management/destinations/). - -**`$.send.http`** - -[See the HTTP destination docs](/workflows/data-management/destinations/http/#using-sendhttp-in-component-actions). - -**`$.send.email`** - -[See the Email destination docs](/workflows/data-management/destinations/email/#using-sendemail-in-component-actions). - -**`$.send.s3`** - -[See the S3 destination docs](/workflows/data-management/destinations/s3/#using-sends3-in-component-actions). - -**`$.send.emit`** - -[See the Emit destination docs](/workflows/data-management/destinations/emit/#using-sendemit-in-component-actions). - -**`$.send.sse`** - -[See the SSE destination docs](/workflows/data-management/destinations/sse/#using-sendsse-in-component-actions). - -##### `$.context` - -`$.context` exposes [the same properties as `steps.trigger.context`](/workflows/building-workflows/triggers/#stepstriggercontext), and more. Action authors can use it to get context about the calling workflow and the execution. - -All properties from [`steps.trigger.context`](/workflows/building-workflows/triggers/#stepstriggercontext) are exposed, as well as: - -| Property | Description | -| ---------- | :-----------------------------------------------------------------------------------------------------------------------------------------------------: | -| `deadline` | An epoch millisecond timestamp marking the point when the workflow is configured to [timeout](/workflows/limits/#time-per-execution). | -| `JIT` | Stands for "just in time" (environment). `true` if the user is testing the step, `false` if the step is running in production. | -| `run` | An object containing metadata about the current run number. See [the docs on `$.flow.rerun`](/workflows/building-workflows/triggers/#stepstriggercontext) for more detail. | - -### Environment variables - -[Environment variables](/workflows/environment-variables/) are not accessible within sources or actions directly. Since components can be used by anyone, you cannot guarantee that a user will have a specific variable set in their environment. - -In sources, you can use [`secret` props](#props) to reference sensitive data. - -In actions, you'll see a list of your environment variables in the object explorer when selecting a variable to pass to a step: - -### Using npm packages - -To use an npm package in a component, just require it. There is no `package.json` or `npm install` required. - -```javascript -import axios from "axios"; -``` - -When you deploy a component, Pipedream downloads the latest versions of these packages and bundles them with your deployment. - -Some packages that rely on large dependencies or on unbundled binaries โ€” may not work on Pipedream. Please [reach out](https://pipedream.com/support) if you encounter a specific issue. - -#### Referencing a specific version of a package - -_This currently applies only to sources_. - -If you'd like to use a _specific_ version of a package in a source, you can add that version in the `require` string, for example: `require("axios@0.19.2")`. Moreover, you can pass the same version specifiers that npm and other tools allow to specify allowed [semantic version](https://semver.org/) upgrades. For example: - -- To allow for future patch version upgrades, use `require("axios@~0.20.0")` -- To allow for patch and minor version upgrades, use `require("axios@^0.20.0")` - -## Managing Components - -Sources and actions are developed and deployed in different ways, given the different functions they serve in the product. - -- [Managing Sources](#managing-sources) -- [Managing Actions](#managing-actions) - -### Managing Sources - -#### CLI - Development Mode - ---- - -The easiest way to develop and test sources is with the `pd dev` command. `pd dev` deploys a local file, attaches it to a component, and automatically updates the component on each local save. To deploy a new component with `pd dev`, run: - -```bash -pd dev -``` - -To attach to an existing deployed component, run: - -```bash -pd dev --dc -``` - -#### CLI - Deploy - -##### From Local Code - -To deploy a source via CLI, use the `pd deploy` command. - -```bash -pd deploy -``` - -E.g., - -```bash -pd deploy my-source.js -``` - -##### From Pipedream Github Repo - -You can explore the components available to deploy in [Pipedream's GitHub repo](https://github.com/PipedreamHQ/pipedream/tree/master/components). - -```bash -pd deploy -``` - -E.g., - -```bash -pd deploy http-new-requests -``` - -##### From Any URL - -```bash -pd deploy -``` - -E.g., - -```bash -pd deploy https://raw.githubusercontent.com/PipedreamHQ/pipedream/master/components/http/sources/new-requests/new-requests.js -``` - -#### CLI - Update - -View the [CLI command reference](/components/contributing/cli/reference/#command-reference). - -#### CLI - Delete - -View the [CLI command reference](/components/contributing/cli/reference/#command-reference). - -#### UI - Deploy - -You can find and deploy curated components at [https://pipedream.com/sources/new](https://pipedream.com/sources/new), or you can deploy code via the UI using following URL patterns. - -##### From Pipedream Github Repo - -```bash -https://pipedream.com/sources?action=create&key= -``` - -E.g., - -```bash -https://pipedream.com/sources?action=create&key=http-new-requests -``` - -##### From Any URL - -```bash -https://pipedream.com/sources?action=create&url= -``` - -E.g., - -```bash -https://pipedream.com/sources?action=create&url=https%3A%2F%2Fraw.githubusercontent.com%2FPipedreamHQ%2Fpipedream%2Fmaster%2Fcomponents%2Fhttp%2Fhttp.js -``` - -#### UI - Update - -You can update the code and props for a component from the **Configuration** tab for a source in the Pipedream UI. - -#### UI - Delete - -You can delete a component via the UI at [https://pipedream.com/sources](https://pipedream.com/sources). - -#### API - -See the [REST API docs](/rest-api/). - -### Managing Actions - -#### CLI - Publish - -To publish an action, use the `pd publish` command. - -```bash -pd publish FILENAME -``` - -E.g., - -```bash -pd publish my-action.js -``` - -## Source Lifecycle - -### Lifecycle hooks - -Pipedream sources support the following hooks. The code for these hooks are defined within the component. Learn more about the [component structure](#component-structure) and [hook usage](#hooks). - -#### `deploy` - -The `deploy()` hook is automatically invoked by Pipedream when a source is deployed. A common use case for the deploy hook is to create webhook subscriptions when the source is deployed, but you can run any Node.js code within the `deploy` hook. To learn more about the `deploy()` hook, refer to the [API documentation](#hooks). - -#### `activate` - -The `activate()` hook is automatically invoked by Pipedream when a source is deployed or updated. For example, this hook will be run when users update component props, so you can run code here that handles those changes. To learn more about defining a custom `activate()` hook, refer to the [API documentation](#hooks). - -#### `deactivate` - -The `deactivate()` hook is automatically invoked by Pipedream when a source is updated or deleted. A common use case for the deactivate hook is to automatically delete a webhook subscription when a component is deleted, but you can run any Node.js code within the `deactivate` hook. To learn more about the `deactivate()` hook, refer to the [API documentation](#hooks). - -### States - -#### Saved Component - -A saved component is non-instantiated component code that has previously been deployed to Pipedream. Each saved component has a unique saved component ID. Saved components cannot be invoked directly โ€”ย they must first be deployed. - -#### Deployed Component - -A deployed component is an instance of a saved component that can be invoked. Deployed components can be active or inactive. On deploy, Pipedream instantiates a saved component and invokes the `activate()` hook. - -#### Deleted Component - -On delete, Pipedream invokes the `deactivate()` hook and then deletes the deployed component instance. - -### Operations - -#### Deploy - -On deploy, Pipedream creates an instance of a saved component and invokes the optional `deploy()` and `activate()` hooks. A unique deployed component ID is generated for the component. - -You can deploy a component via the CLI, UI or API. - -#### Update - -On update, Pipedream, invokes the optional `deactivate()` hook, updates the code and props for a deployed component, and then invokes the optional `activate()` hook. The deployed component ID is not changed by an update operation. - -#### Delete - -On delete, Pipedream invokes the optional `deactivate()` hook and deletes the component instance. - -## Source Event Lifecycle - -The event lifecycle applies to deployed sources. Learn about the [source lifecycle](#source-lifecycle). - -### Diagram - -![Pipedream Components Event Lifecycle Diagram](https://res.cloudinary.com/pipedreamin/image/upload/v1683089643/d0iiggokfkwnmt4kckb5.png) - -### Triggering Sources - -Sources are triggered when you manually run them (e.g., via the **RUN NOW** button in the UI) or when one of their [interfaces](#interface-props) is triggered. Pipedream sources currently support **HTTP** and **Timer** interfaces. - -When a source is triggered, the `run()` method of the component is executed. Standard output and errors are surfaced in the **Logs** tab. - -### Emitting Events from Sources - -Sources can emit events via `this.$emit()`. If you define a [dedupe strategy](#dedupe-strategies) for a source, Pipedream automatically dedupes the events you emit. - -> **TIP:** if you want to use a dedupe strategy, be sure to pass an `id` for each event. Pipedream uses this value for deduping purposes. - -### Consuming Events from Sources - -Pipedream makes it easy to consume events via: - -- The UI -- Workflows -- APIs -- CLI - -#### UI - -When you navigate to your source [in the UI](https://pipedream.com/sources), you'll be able to select and inspect the most recent 100 events (i.e., an event bin). For example, if you send requests to a simple HTTP source, you will be able to inspect the events (i.e., a request bin). - -#### Workflows - -[Trigger hosted Node.js workflows](/workflows/building-workflows/) on each event. Integrate with {process.env.PUBLIC_APPS}+ apps including Google Sheets, Discord, Slack, AWS, and more! - -#### API - -Events can be retrieved using the [REST API](/rest-api/) or [SSE stream tied to your component](/workflows/data-management/destinations/sse/). This makes it easy to retrieve data processed by your component from another app. Typically, you'll want to use the [REST API](/rest-api/) to retrieve events in batch, and connect to the [SSE stream](/workflows/data-management/destinations/sse/) to process them in real time. - -#### CLI - -Use the `pd events` command to retrieve the last 10 events via the CLI: - -```bash -pd events -n 10 -``` diff --git a/docs-v2/pages/components/contributing/cli/_meta.tsx b/docs-v2/pages/components/contributing/cli/_meta.tsx deleted file mode 100644 index 4047d022328b2..0000000000000 --- a/docs-v2/pages/components/contributing/cli/_meta.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default { - "reference": "CLI Reference", - "install": "Install", - "login": "Login", -} as const diff --git a/docs-v2/pages/components/contributing/cli/install.mdx b/docs-v2/pages/components/contributing/cli/install.mdx deleted file mode 100644 index 77fde2ed28bbc..0000000000000 --- a/docs-v2/pages/components/contributing/cli/install.mdx +++ /dev/null @@ -1,80 +0,0 @@ -import Callout from '@/components/Callout' -import VideoPlayer from '@/components/VideoPlayer' - -# Installing the CLI - - - -## macOS - -### Homebrew - -```bash -brew tap pipedreamhq/pd-cli -brew install pipedreamhq/pd-cli/pipedream -``` - -### From source - -Run the following command: - -```bash -curl https://cli.pipedream.com/install | sh -``` - -This will automatically download and install the `pd` CLI to your Mac. You can also [download the macOS build](https://cli.pipedream.com/darwin/amd64/latest/pd.zip), unzip that archive, and place the `pd` binary somewhere in [your `PATH`](https://opensource.com/article/17/6/set-path-linux). - -If this returns a permissions error, you may need to run: - -```bash -curl https://cli.pipedream.com/install | sudo sh -``` - - -If you encounter the error `bad CPU type in executable: pd`, you will need to install Rosetta 2 on your Mac by running the following command: - -```bash -softwareupdate --install-rosetta -``` - - -## Linux - -Download the [CLI build](#cli-builds) for your architecture below. Unzip that archive, and place the `pd` binary somewhere in [your `PATH`](https://opensource.com/article/17/6/set-path-linux). - -## Windows (native) - -[Download the CLI build for Windows](https://cli.pipedream.com/windows/amd64/latest/pd.zip). Unzip that archive, save `pd.exe` in Program Files, and [add its file path to `Path` in your system environment variables](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/). Use `pd.exe` in a terminal that supports ANSI colors, like the [Windows Terminal](https://github.com/microsoft/terminal). - -## Windows (WSL) - -Download the appropriate [Linux CLI build](#cli-builds) for your architecture. Unzip that archive, and place the `pd` binary somewhere in [your `PATH`](https://opensource.com/article/17/6/set-path-linux). - -## CLI Builds - -Pipedream publishes the following builds of the CLI. If you need to use the CLI on another OS or architecture, [please reach out](https://pipedream.com/support/). - -| Operating System | Architecture | link | -| ---------------- | ------------ | ----------------------------------------------------------------- | -| Linux | amd64 | [download](https://cli.pipedream.com/linux/amd64/latest/pd.zip) | -| Linux | 386 | [download](https://cli.pipedream.com/linux/386/latest/pd.zip) | -| Linux | arm | [download](https://cli.pipedream.com/linux/arm/latest/pd.zip) | -| Linux | arm64 | [download](https://cli.pipedream.com/linux/arm64/latest/pd.zip) | -| macOS | amd64 | [download](https://cli.pipedream.com/darwin/amd64/latest/pd.zip) | -| Windows | amd64 | [download](https://cli.pipedream.com/windows/amd64/latest/pd.zip) | - -## Community Libraries - - -Please note that Pipedream does not verify the correctness or security of these community libraries. Use them at your own risk. - - -### [Nix](https://nixos.org/) - -The `pd` binary is available via Nix flake [here](https://github.com/planet-a-ventures/pipedream-cli) - -## Help - -Run `pd` to see a list of all commands, or `pd help ` to display help docs for a specific command. - -See the [CLI reference](/components/contributing/cli/reference/) for detailed usage and examples for each command. diff --git a/docs-v2/pages/components/contributing/cli/login.mdx b/docs-v2/pages/components/contributing/cli/login.mdx deleted file mode 100644 index c82ac076e3492..0000000000000 --- a/docs-v2/pages/components/contributing/cli/login.mdx +++ /dev/null @@ -1,57 +0,0 @@ -# Logging into the CLI - -To start using the Pipedream CLI, you'll need to link it to your Pipedream account. If you don't have a Pipedream account, you can sign up from the CLI. - - - -## Existing Pipedream account - -If you already have a Pipedream account, run - -``` -pd login -``` - -This will open up a new window in your default browser. If you're already logged into your Pipedream account in this browser, this will immediately link the CLI to your account, writing your API key for that account to your [`pd` config file](/components/contributing/cli/reference/#cli-config-file). - -Otherwise, you'll be asked to login. - -Once you're done, go back to your shell and you should see confirmation that your account is linked: - -``` -> pd login -Logged in as dylburger (dylan@pipedream.com) -``` - -Then [follow this guide](/components/contributing/cli/reference/#creating-a-profile-for-a-workspace) to learn how to find your workspace ID and associate it with a `pd` profile. - -## Signing up for Pipedream via the CLI - -If you haven't signed up for a Pipedream account, you can create an account using the CLI: - -``` -pd signup -``` - -This will open up a new window in your default browser. You'll be asked to sign up for Pipedream here. Once you do, your account will be linked to the CLI, writing your API key for that account to your [`pd` config file](/components/contributing/cli/reference/#cli-config-file). - -Once you're done, go back to your shell and you should see confirmation that your account is linked: - -``` -> pd signup -Logged in as dylburger (dylan@pipedream.com) -``` - -## Logging out of the CLI - -You can log out of the CLI by running: - -``` -pd logout -``` - -This will remove your API key from the [`pd` config file](/components/contributing/cli/reference/#cli-config-file). - -## Using the CLI to manage multiple accounts - -If you have multiple Pipedream accounts, you can use [profiles](/components/contributing/cli/reference/#profiles) to ensure the CLI can manage resources for each. diff --git a/docs-v2/pages/components/contributing/cli/reference.mdx b/docs-v2/pages/components/contributing/cli/reference.mdx deleted file mode 100644 index 59827af4a8aaa..0000000000000 --- a/docs-v2/pages/components/contributing/cli/reference.mdx +++ /dev/null @@ -1,354 +0,0 @@ -# CLI Reference - -## Installing the CLI - -[See the CLI installation docs](/components/contributing/cli/install/) to learn how to install the CLI for your OS / architecture. - -## Command Reference - -Run `pd` to see a list of all commands with basic usage info, or run `pd help ` to display help docs for a specific command. - -We've also documented each command below, with usage examples for each. - -### General Notes - -Everywhere you can refer to a specific component as an argument, you can use the component's ID _or_ its name slug. For example, to retrieve details about a specific source using `pd describe`, you can use either of the following commands: - -```bash -> pd describe dc_abc123 - - id: dc_abc123 - name: http - endpoint: https://myendpoint.m.pipedream.net - -> pd describe http -Searching for sources matching http - - id: dc_abc123 - name: http - endpoint: https://myendpoint.m.pipedream.net -``` - -### `pd delete` - -Deletes an event source. Run: - -```bash -pd delete -``` - -Run `pd list so` to display a list of your event sources. - -### `pd deploy` - -Deploy an event source from local or remote code. - -Running `pd deploy`, without any arguments, brings up an interactive menu asking you select a source. This list of sources is retrieved from the registry of public sources [published to Github](https://github.com/PipedreamHQ/pipedream/tree/master/components). - -When you select a source, we'll deploy it and start listening for new events. - -You can also deploy a specific source via the source's `key` (defined in the component file for the source): - -```bash -pd deploy http-new-requests -``` - -or author a component locally and deploy that local file: - -```bash -pd deploy http.js -``` - -[Read more about authoring your own event sources](/components/contributing/quickstart/nodejs/sources/). - -### `pd describe` - -Display the details for a source: its id, name, and other configuration details: - -```bash -pd describe SOURCE_ID_OR_NAME -``` - -### `pd dev` - -`pd dev` allows you to interactively develop a source from a local file.`pd dev` will link your local file with the deployed component and watch your local file for changes. When you save changes to your local file, your component will automatically be updated on Pipedream. - -```bash -pd dev FILE_OR_NAME -``` - -If you quit `pd dev` and want to link the same deployed source to your local file, you can pass the deployed component ID using the `--dc` flag: - -```bash -pd dev --dc SOURCE_ID FILE_OR_NAME -``` - -### `pd events` - -Returns historical events sent to a source, and streams emitted events directly to the CLI. - -```bash -pd events SOURCE_ID -``` - -By default, `pd events` prints (up to) the last 10 events sent to your source. - -```bash -pd events -n 100 SOURCE_ID_OR_NAME -``` - -`pd events -n N` retrieves the last `N` events sent to your source. We store the last 100 events sent to a source, so you can retrieve a max of 100 events using this command. - -```bash -pd events -f SOURCE_ID_OR_NAME -``` - -`pd events -f` connects to the [SSE stream tied to your source](/workflows/data-management/destinations/sse/) and displays events as the source produces them. - -```bash -pd events -n N -f SOURCE_ID_OR_NAME -``` - -You can combine the `-n` and `-f` options to list historical events _and_ follow the source for new events. - -### `pd help` - -Displays help for any command. Run `pd help events`, `pd help describe`, etc. - -### `pd init` - -Generate new app and component files from templates. - -#### `pd init app` - -Creates a directory and [an app file](/components/contributing/guidelines/#app-files) from a template - -```bash -# Creates google_calendar/ directory and google_calendar.mjs file -pd init app google_calendar -``` - -#### `pd init action` - -Creates a new directory and [a component action](/components/contributing/#actions) from a template. - -```bash -# Creates add-new-event/ directory and add-new-event.mjs file -pd init action add-new-event -``` - -#### `pd init source` - -Creates a new directory and [an event source](/workflows/building-workflows/triggers/) from a template. - -```bash -# Creates cancelled-event/ directory and cancelled_event.mjs file -pd init source cancelled-event -``` - -You can attach [database](/components/contributing/api/#db), [HTTP](/components/contributing/api/#http), or [Timer](/components/contributing/api/#timer) props to your template using the following flags: - -| Prop type | Flag | -| --------- | --------- | -| Database | `--db` | -| HTTP | `--http` | -| Timer | `--timer` | - -For example, running: - -```bash -pd init source cancelled-event --db --http --timer -``` - -will include the following props in your new event source: - -```javascript -props: { - db: "$.service.db", - http: "$.interface.http", - timer: "$.interface.timer", -} -``` - -### `pd list` - -Lists Pipedream sources running in your account. Running `pd list` without any arguments prompts you to select the type of resource you'd like to list. - -You can also list specific resource types directly: - -```bash -pd list components -``` - -```bash -pd list streams -``` - -`sources` and `streams` have shorter aliases, too: - -```bash -pd list so -``` - -```bash -pd list st -``` - -### `pd login` - -Log in to Pipedream CLI and persist API key locally. See [Logging into the CLI](/components/contributing/cli/login/) for more information. - -### `pd logout` - -Unsets the local API key tied to your account. - -Running `pd logout` without any arguments removes the default API key from your [config file](/components/contributing/cli/reference/#cli-config-file). - -You can remove the API key for a specific profile by running: - -```bash -pd logout -p PROFILE -``` - -### `pd logs` - -Event sources produce logs that can be useful for troubleshooting issues with that source. `pd logs` displays logs for a source. - -Running `pd logs ` connects to the [SSE logs stream tied to your source](/workflows/building-workflows/triggers/), displaying new logs as the source produces them. - -Any errors thrown by the source will also appear here. - -### `pd publish` - -To publish an action, use the `pd publish` command. - -```bash -pd publish -``` - -For example: - -```bash -pd publish my-action.js -``` - -### `pd signup` - -Sign up for Pipedream via the CLI and persist your API key locally. See the docs on [Signing up for Pipedream via the CLI](/components/contributing/cli/login/#signing-up-for-pipedream-via-the-cli) for more information. - -### `pd unpublish` - -Unpublish a component you've published to your account. If you publish a source or action that you no longer need, you can unpublish it by component `key`: - -``` -pd unpublish component -``` - -### `pd update` - -Updates the code, props, or metadata for an event source. - -If you deployed a source from Github, for example, someone might publish an update to that source, and you may want to run the updated code. - -```bash -pd update SOURCE_ID_OR_NAME \ - --code https://github.com/PipedreamHQ/pipedream/blob/master/components/http/sources/new-requests/new-requests.js -``` - -You can change the name of a source: - -```bash -pd update SOURCE_ID_OR_NAME --name NEW_NAME -``` - -You can deactivate a source if you want to stop it from running: - -```bash -pd update SOURCE_ID_OR_NAME --deactivate -``` - -or activate a source you previously deactivated: - -```bash -pd update SOURCE_ID_OR_NAME --activate -``` - -## Profiles - -Profiles allow you to work with multiple, named Pipedream accounts via the CLI. - -### Creating a new profile - -When you [login to the CLI](/components/contributing/cli/login/), the CLI writes the API key for that account to your config file, in the `api_key` field: - -```bash -api_key = abc123 -``` - -You can set API keys for other, named profiles, too. Run - -```bash -pd login -p -``` - -`` can be any string of shell-safe characters that you'd like to use to identify this new profile. The CLI opens up a browser asking you to login to your target Pipedream account, then writes the API key to a section of the config file under this profile: - -```bash -[your_profile] -api_key = def456 -``` - -You can also run `pd signup -p ` if you'd like to sign up for a new Pipedream account via the CLI and set a named profile for that account. - -### Creating a profile for a workspace - -If you're working with resources in an [workspace](/workspaces/), you'll need to add an `org_id` to your profile. - -1. [Retrieve your workspaces's ID](/workspaces/#finding-your-workspaces-id) -2. Open up your [Pipedream config file](#cli-config-file) and create a new [profile](#profiles) with the following information: - -```bash -[profile_name] -api_key = -org_id = -``` - -When using the CLI, pass `--profile ` when running any command. For example, if you named your profile `workspace`, you'd run this command to publish a component: - -```bash -pd publish file.js --profile workspace -``` - -### Using profiles - -You can set a profile on any `pd` command by setting the `-p` or `--profile` flag. For example, to list the sources in a specific account, run: - -```bash -pd list sources --profile PROFILE -``` - -## Version - -To get the current version of the `pd` CLI, run - -```bash -pd --version -``` - -## Auto-upgrade - -The CLI is configured to check for new versions automatically. This ensures you're always running the most up-to-date version. - -## CLI config file - -The `pd` config file contains your Pipedream API keys (tied to your default account, or other [profiles](#profiles)) and other configuration used by the CLI. - -If the `XDG_CONFIG_HOME` env var is set, the config file will be found in `$XDG_CONFIG_HOME/pipedream`. - -Otherwise, it will be found in `$HOME/.config/pipedream`. - -## Analytics - -Pipedream tracks CLI usage data to report errors and usage stats. We use this data exclusively for the purpose of internal analytics (see [our privacy policy](https://pipedream.com/privacy) for more information). - -If you'd like to opt-out of CLI analytics, set the `PD_CLI_DO_NOT_TRACK` environment variable to `true` or `1`. diff --git a/docs-v2/pages/components/contributing/guidelines.mdx b/docs-v2/pages/components/contributing/guidelines.mdx deleted file mode 100644 index 79d58d3794d2d..0000000000000 --- a/docs-v2/pages/components/contributing/guidelines.mdx +++ /dev/null @@ -1,909 +0,0 @@ -import Callout from '@/components/Callout' - -# Components Guidelines & Patterns - -For a component to be accepted into the Pipedream registry, it should follow -these guidelines below. These guidelines help ensure components are high -quality, are intuitive for both Pipedream users and component developers to use -and extend. - - -Questions about best practices? - -Join the discussion with fellow Pipedream component developers at the -[#contribute channel](https://pipedream-users.slack.com/archives/C01E5KCTR16) in -Slack or [on Discourse](https://pipedream.com/community/c/dev/11). - - - -## Local Checks - -When submitting pull requests, the new code will run through a series of -automated checks like linting the code. If you want to run those checks locally -for quicker feedback you must have [pnpm](https://pnpm.io/) installed and run -the following commands at the root of the project: - -1. To install all the project's dependencies (only needed once): - - ```shell - pnpm install - ``` - -2. To install all required dependencies: - - ```shell - npx pnpm install -r - ``` - -3. To run the linter checks against your code (assuming that your changes are - located at `components/foo` for example): - - ```shell - npx eslint components/foo - ``` - -4. Optionally, you can automatically fix any linter issues by running the - following command: - - ```shell - npx eslint --fix components/foo - ``` - -Keep in mind that not all issues can be automatically fixed by the linter since -they could alter the behaviour of the code. - -## General - -### Components Should Be ES Modules - -The Node.js community has started publishing -[ESM-only](https://flaviocopes.com/es-modules/) packages that do not work with -[CommonJS -modules](https://nodejs.org/docs/latest/api/modules.html#modules_modules_commonjs_modules). -This means you must `import` the package. You can't use `require`. - -You also cannot mix ESM with CJS. This will **not** work: - -```javascript -// ESM -import axios from "axios"; - -// CommonJS - this should be `export default` -module.exports = { - // ... -} -``` - -Therefore, all components should be written as ES modules: - -```javascript -import axios from "axios"; - -export default { - //... -} -``` - -**You'll need to use [the `.mjs` file -extension](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#aside_%E2%80%94_.mjs_versus_.js) -for any components written as ES modules**. - -You'll notice that many of the existing components are written as CommonJS -modules. Please fix these and submit a pull request as you refactor related -code. For example, if you're developing new Spotify actions, and you notice the -existing event sources use CommonJS, change them to ESM: - -1. Rename the file extension from `.js` to `.mjs` using `git mv` (e.g. `git mv - source.js source.mjs`). -2. Change all `require` statements to `import`s. -3. Change instances of `module.exports` to `export default`. - -### Component Scope - -Create components to address specific use cases whenever possible. For example, -when a user subscribes to a Github webhook to listen for โ€œstarโ€ activity, events -can be generated when users star or unstar a repository. The โ€œNew Starโ€ source -filters events for only new star activity so the user doesn't have to. - -There may be cases where it's valuable to create a generic component that -provides users with broad latitude (e.g., see the [custom -webhook](https://github.com/PipedreamHQ/pipedream/blob/master/components/github/sources/custom-webhook-events) -event source for GitHub). However, as a general heuristic, we found that tightly -scoped components are easier for users to understand and use. - -### Required Metadata - -Registry [components](/components/contributing/api/#component-structure) require a unique -`key` and `version`, and a friendly `name` and `description`. Action components -require a `type` field to be set to `action` (sources will require a type to be -set in the future). Action components require the description to include a link to the -relevant documentation in the following format: \[See the documentation\](https://public-api.com) - -```javascript -export default { - key: "google_drive-new-shared-drive", - name: "New Shared Drive", - description: "Emits a new event any time a shared drive is created.", - version: "0.0.1", -}; -``` - -### Component Key Pattern - -When publishing components to the Pipedream registry, the `key` must be unique -across registry components and should follow the pattern: - -`app_name_slug`-`slugified-component-name` - -**Source** keys should use past tense verbs that describe the event that -occurred (e.g., `linear_app-issue-created-instant`). For **action** keys, use -active verbs to describe the action that will occur, (e.g., -`linear_app-create-issue`). - -### Versioning - -When you first publish a component to the registry, set its version to `0.0.1`. - -Pipedream registry components try to follow [semantic -versioning](https://semver.org/). From their site: - -Given a version number `MAJOR.MINOR.PATCH`, increment the: - -1. `MAJOR` version when you make incompatible API changes, -2. `MINOR` version when you add functionality in a backwards compatible manner, - and -3. `PATCH` version when you make backwards compatible bug fixes. - -When you're developing actions locally, and you've incremented the version in -your account multiple times, make sure to set it to the version it should be at -in the registry prior to submitting your PR. For example, when you add an action -to the registry, the version should be `0.0.1`. If the action was at version -`0.1.0` and you've fixed a bug, change it to `0.1.1` when committing your final -code. - -If you update a file, you must increment the versions of all components that -import or are affected by the updated file. - -### Folder Structure - -Registry components are organized by app in the `components` directory of the -`pipedreamhq/pipedream` repo. - -```text -/components - /[app-name-slug] - /[app-name-slug].app.mjs - /actions - /[action-name-slug] - /[action-name-slug].mjs - /sources - /[source-name-slug] - /[source-name-slug].mjs -``` - -- The name of each app folder corresponds with the name slug for each app -- The app file should be in the root of the app folder (e.g., - `/components/[app_slug]/[app_slug].app.mjs`) -- Components for each app are organized into `/sources` and `/actions` - subfolders -- Each component should be placed in its own subfolder (with the name of the - folder and the name of the `js` file equivalent to the slugified component - name). For example, the path for the "Search Mentions" source for Twitter is - `/components/twitter/sources/search-mentions/search-mentions.mjs`. -- Aside from `app_slug`, words in folder and file names are separated by dashes - (-) (i.e., in kebab case) -- Common files (e.g., `common.mjs`, `utils.mjs`) must be placed within a common - folder: `/common/common.mjs`. - -You can explore examples in the [components -directory](https://github.com/PipedreamHQ/pipedream/tree/master/components). - -#### Using APIs vs Client Libraries - -If the app has a well-supported [Node.js client -library](/components/contributing/api/#using-npm-packages), feel free to use that instead of -manually constructing API requests. - -### `package.json` - -Each app should have a `package.json` in its root folder. If one doesn't exist, -run `npm init` in the app's root folder and customize the file using [this -`package.json`](https://github.com/PipedreamHQ/pipedream/blob/55236b3aa993cbcb545e245803d8654c6358b0a2/components/stripe/package.json) -as a template. - -Each time you change the code for an app file, or change the dependencies for -any app component, modify the package `version`. - -Save any dependencies in the component app directory: - -```bash -npm i --save package -npm i --save-dev package -``` - -#### Error-Handling and Input Validation - -When you use the SDK of a popular API, the SDK might raise clear errors to the -user. For example, if the user is asked to pass an email address, and that email -address doesn't validate, the library might raise that in the error message. - -But other libraries will _not_ raise clear errors. In these cases, you may need -to `throw` your own custom error that wraps the error from the API / lib. [See -the Airtable -components](https://github.com/PipedreamHQ/pipedream/blob/9e4e400cda62335dfabfae384d9224e04a585beb/components/airtable/airtable.app.js#L70) -for an example of custom error-handling and input validation. - -In general, **imagine you are a user troubleshooting an issue. Is the error -easy-to-understand? If not, `throw` a better error**. - -### `README` files - -New actions and sources should include `README.md` files within the same -directory to describe how to use the action or source to users. - -Here's an example `README.md` structure: - -```markdown - -# Overview - -# Example Use Cases - -# Getting Started - -# Troubleshooting - -``` - -These sections will appear within the correponding app, source and action page, -along with any subheadings and content. - -Here's an example of an [app `README.md` within the `discord` component on the -Pipedream -registry](https://github.com/PipedreamHQ/pipedream/blob/master/components/discord/README.md). -That same content is rendered within the [Pipedream integration page for the -Discord app](https://pipedream.com/apps/discord). - -You can add additional subheadings to each of the top level `Overview`, `Example -Use Cases`, `Getting Started` and `Troubleshooting` headings: - -```markdown -# Overview - -## Limitations - -Perhaps there are some limitations about the API that users should know about. - -# Example Use Cases - -1. Sync data in real time -2. Automate tedious actions -3. Introduce A.I. into the workflow - -# Getting Started - -## Generating an API Key - -Instructions on how to generate an API key from within the service's dashboard. - -# Troubleshooting - -## Required OAuth Scopes - -Please take note, you'll need to have sufficient privileges in order to complete -authentication. -``` - - -Only these three top level headings `Overview`, `Getting Starting` and -`Troubleshooting` will appear within the corresponding App Marketplace page. All -other headings will be ignored. - - -#### Pagination - -When making API requests, handle pagination to ensure all data/events are -processed. Moreover, if the underlying account experiences and/or generates too -much data paginating through the entire collection of records, it might cause -out-of-memory or timeout issues (or both!), so as a rule of thumb the pagination -logic should: - -- Be encapsulated as a [generator](https://mzl.la/37z6Sh6) so that the component - can start processing records after the very first API call. As an example, you - can check the [Microsoft OneDrive - methods](https://github.com/PipedreamHQ/pipedream/tree/master/components/microsoft_onedrive/microsoft_onedrive.app.mjs) - to list files. -- Accept a "next token/page/ID" whenever possible, so that API calls do not - retrieve the entire collection of records during every execution but rather - from a recent point in time. The `scanDeltaItems` generator method in the - example above follows this pattern. -- Persist the last page number, token or record ID right after processing, so - that following executions of the component process new records to minimize the - amount of duplicate events, execution time and delayed events. Following the - same Microsoft OneDrive example, check the `processEvent` method [in this - component](https://github.com/PipedreamHQ/pipedream/tree/master/components/microsoft_onedrive/sources/new-file/new-file.mjs) - for an example. - -#### Capturing Sensitive Data - -If users are required to enter sensitive data, always use -[secret](/components/contributing/api/#general) props. - -### Promoting Reusability - -#### App Files - -App files contain components that declare the app and include prop definitions -and methods that may be reused across components. App files should adhere to the -following naming convention: `[app_name_slug].app.mjs`. If an app file does not -exist for your app, please [reach -out](https://pipedream.com/community/c/dev/11). - -##### Prop Definitions - -Whenever possible, reuse existing [prop -definitions](/components/contributing/api/#prop-definitions-example). - -If a prop definition does not exist and you are adding an app-specific prop that -may be reused in future components, add it as a prop definition to the app file. -Prop definitions will also be surfaced for apps the Pipedream marketplace. - -##### Methods - -Whenever possible, reuse [methods](/components/contributing/api/#methods) defined in the app -file. If you need to use an API for which a method is not defined and it may be -used in future components, define a new method in the app file. - -Use the [JS Docs](https://jsdoc.app/about-getting-started.html) pattern for -lightweight documentation of each method in the app file. Provide a description -and define @params and @returns block tags (with default values if applicable โ€” -e.g., `[foo=bar]`). This data will both help with reusability and will be -surfaced in documentation for apps in the Pipedream marketplace. For example: - -```javascript -export default { - methods: { - /** - * Get the most recently liked Tweets for a user - * - * @params {Object} opts - An object representing the configuration options - * for this method - * @params {String} opts.screenName - The user's Twitter screen name (e.g., - * `pipedream`) - * @params {String} [opts.count=200] - The maximum number of Tweets to - * return - * @params {String} [opts.tweetMode=extended] - Use the default of - * `extended` to return non-truncated Tweets - * @returns {Array} Array of most recent Tweets liked by the specified user - */ - async getLikedTweets(opts = {}) { - const { screenName, count = 200, tweetMode = "extended" } = opts; - const { data } = await this._makeRequest({ - url: "https://api.twitter.com/1.1/favorites/list.json", - params: { - screen_name: screenName, - count, - tweet_mode: tweetMode, - }, - }); - return data; - }, - }, -}; -``` - -#### Testing - -Pipedream does not currently support unit tests to validate that changes to app -files are backwards compatible with existing components. Therefore, if you make -changes to an app file that may impact other sources, you must currently test -potentially impacted components to confirm their functionality is not negatively -affected. We expect to support a testing framework in the future. - -### Common Files (Optional) - -An optional pattern to improve reusability is to use a `common` module to -abstract elements that are used across to multiple components. The trade-off -with this approach is that it increases complexity for end-users who have the -option of customizing the code for components within Pipedream. When using this -approach, the general pattern is: - -- The `.app.mjs` module contains the logic related to making the actual API calls - (e.g. calling `axios.get`, encapsulate the API URL and token, etc). -- The `common.mjs` module contains logic and structure that is not specific to - any single component. Its structure is equivalent to a component, except that - it doesn't define attributes such as `version`, `dedupe`, `key`, `name`, etc - (those are specific to each component). It defines the main logic/flow and - relies on calling its methods (which might not be implemented by this - component) to get any necessary data that it needs. In OOP terms, it would be - the equivalent of a base abstract class. -- The component module of each action would inherit/extend the `common.mjs` - component by setting additional attributes (e.g. `name`, `description`, `key`, - etc) and potentially redefining any inherited methods. -- Common files (e.g., `common.mjs`, `utils.mjs`) must be placed within a common - folder: `/common/common.mjs`. - -See [Google -Drive](https://github.com/PipedreamHQ/pipedream/tree/master/components/google_drive) -for an example of this pattern. When using this approach, prop definitions -should still be maintained in the app file. - -Please note that the name `common` is just a convention and depending on each -case it might make sense to name any common module differently. For example, the -[AWS -sources](https://github.com/PipedreamHQ/pipedream/tree/master/components/aws) -contains a `common` directory instead of a `common.mjs` file, and the directory -contains several modules that are shared between different event sources. - -## Props - -As a general rule of thumb, we should strive to incorporate all -relevant options from a given API as props. - -### Labels - -Use [prop](/components/contributing/api/#user-input-props) labels to customize the name of a -prop or propDefinition (independent of the variable name in the code). The label -should mirror the name users of an app are familiar with; i.e., it should mirror -the equivalent label in the appโ€™s UI. This applies to usage in labels, -descriptions, etc. E.g., the Twitter API property for search keywords is โ€œqโ€, -but its label is set to โ€œSearch Termโ€. - -### Descriptions - -Include a description for [props](/components/contributing/api/#user-input-props) to help -the user understand what they need to do. Use Markdown as appropriate to improve -the clarity of the description or instructions. When using Markdown: - -- Enclose sample input values in backticks (`` ` ``) -- Refer to other props using **bold** by surrounding with double asterisks (\*) -- Use Markdown links with descriptive text rather than displaying a full URL. -- If the description isn't self-explanatory, link to the API docs of the - relevant method to further clarify how the prop works. When the value of the - prop is complex (for example, an object with many properties), link to the - section of the API docs that include details on this format. Users may pass - values from previous steps using expressions, so they'll need to know how to - structure the input data. - -Examples: - -- The async option to select an Airtable Base is self-explanatory so includes no - description: - - ![image-20210326151557417](https://res.cloudinary.com/pipedreamin/image/upload/v1672810770/ixb3aozdijmz0zfqxmvy.png) - -- The โ€œSearch Termโ€ prop for Twitter includes a description that helps the user - understand what values they can enter, with specific values highlighted using - backticks and links to external content. - - ![image-20210326151706682](/images/components/image-20210326151706682.png) - -### Optional vs Required Props - -Use optional [props](/components/contributing/api/#user-input-props) whenever possible to -minimize the input fields required to use a component. - -For example, the Twitter search mentions source only requires that a user -connect their account and enter a search term. The remaining fields are optional -for users who want to filter the results, but they do not require any action to -activate the source: - -![image-20210326151930885](/images/components/image-20210326151930885.png) - -### Default Values - -Provide [default values](/components/contributing/api/#user-input-props) whenever possible. -NOTE: the best default for a source doesnโ€™t always map to the default -recommended by the app. For example, Twitter defaults search results to an -algorithm that balances recency and popularity. However, the best default for -the use case on Pipedream is recency. - -### Async Options - -Avoid asking users to enter ID values. Use [async -options](/components/contributing/api/#async-options-example) (with label/value definitions) -so users can make selections from a drop down menu. For example, Todoist -identifies projects by numeric IDs (e.g., 12345). The async option to select a -project displays the name of the project as the label, so thatโ€™s the value the -user sees when interacting with the source (e.g., โ€œMy Projectโ€). The code -referencing the selection receives the numeric ID (12345). - -Async options should also support -[pagination](/components/contributing/api/#async-options-example) (so users can navigate -across multiple pages of options for long lists). See -[Hubspot](https://github.com/PipedreamHQ/pipedream/blob/a9b45d8be3b84504dc22bb2748d925f0d5c1541f/components/hubspot/hubspot.app.mjs#L136) -for an example of offset-based pagination. See -[Twitter](https://github.com/PipedreamHQ/pipedream/blob/d240752028e2a17f7cca1a512b40725566ea97bd/components/twitter/twitter.app.mjs#L200) -for an example of cursor-based pagination. - -### Dynamic Props - -[Dynamic props](/components/contributing/api/#dynamic-props) can improve the user experience -for components. They let you render props in Pipedream dynamically, based on the -value of other props, and can be used to collect more specific information that -can make it easier to use the component. See the Google Sheets example in the -linked component API docs. - -### Interface & Service Props - -In the interest of consistency, use the following naming patterns when defining -[interface](/components/contributing/api/#interface-props) and -[service](/components/contributing/api/#service-props) props in source components: - -| Prop | **Recommended Prop Variable Name** | -| ------------------- | ---------------------------------- | -| `$.interface.http` | `http` | -| `$.interface.timer` | `timer` | -| `$.service.db` | `db` | - -Use getters and setters when dealing with `$.service.db` to avoid potential -typos and leverage encapsulation (e.g., see the [Search -Mentions](https://github.com/PipedreamHQ/pipedream/blob/master/components/twitter/sources/search-mentions/search-mentions.mjs#L83-L88) -event source for Twitter). - -## Source Guidelines - -These guidelines are specific to [source](/workflows/building-workflows/triggers/) development. - -### Webhook vs Polling Sources - -Create subscription webhooks sources (vs polling sources) whenever possible. -Webhook sources receive/emit events in real-time and typically use less compute -time from the userโ€™s account. Note: In some cases, it may be appropriate to -support webhook and polling sources for the same event. For example, Calendly -supports subscription webhooks for their premium users, but non-premium users -are limited to the REST API. A webhook source can be created to emit new -Calendly events for premium users, and a polling source can be created to -support similar functionality for non-premium users. - -### Source Name - -Source name should be a singular, title-cased name and should start with "New" -(unless emits are not limited to new items). Name should not be slugified and -should not include the app name. NOTE: Pipedream does not currently distinguish -real-time event sources for end-users automatically. The current pattern to -identify a real-time event source is to include โ€œ(Instant)โ€ in the source name. -E.g., โ€œNew Search Mentionโ€ or โ€œNew Submission (Instant)โ€. - -### Source Description - -Enter a short description that provides more detail than the name alone. -Typically starts with "Emit new". E.g., โ€œEmit new Tweets that matches your -search criteriaโ€. - -### Emit a Summary - -Always [emit a summary](/components/contributing/api/#emit) for each event. For example, the -summary for each new Tweet emitted by the Search Mentions source is the content -of the Tweet itself. - -If no sensible summary can be identified, submit the event payload in string -format as the summary. - -### Deduping - -Use built-in [deduping strategies](/components/contributing/api/#dedupe-strategies) whenever -possible (`unique`, `greatest`, `last`) vs developing custom deduping code. -Develop custom deduping code if the existing strategies do not support the -requirements for a source. - -### Surfacing Test Events - -In order to provide users with source events that they can immediately reference -when building their workflow, we should implement 2 strategies whenever -possible: - -#### Emit Events on First Run - -- Polling sources should always emit events on the first run (see the [Spotify: - New - Playlist](https://github.com/PipedreamHQ/pipedream/blob/master/components/spotify/sources/new-playlist/new-playlist.mjs) - source as an example) -- Webhook-based sources should attempt to fetch existing events in the - `deploy()` hook during source creation (see the [Jotform: New - Submission](https://github.com/PipedreamHQ/pipedream/blob/master/components/jotform/sources/new-submission/new-submission.mjs) - source) - -_Note โ€“ make sure to emit the most recent events (considering pagination), and -limit the count to no more than 50 events._ - -#### Include a Static Sample Event - -There are times where there may not be any historical events available (think -about sources that emit less frequently, like "New Customer" or "New Order", -etc). In these cases, we should include a static sample event so users can see -the event shape and reference it while building their workflow, even if it's -using fake data. - -To achieve this, follow these steps: - -1. Copy the JSON output from the source's emit (what you get from - `steps.trigger.event`) and **make sure to remove or scrub any sensitive or - personal data** (you can also copy this from the app's API docs) -2. Add a new file called `test-event.mjs` in the same directory as the component - source and export the JSON event via `export default` - ([example](https://github.com/PipedreamHQ/pipedream/blob/master/components/jotform/sources/new-submission/test-event.mjs)) -3. In the source component code, make sure to import that file as `sampleEmit` - ([example](https://github.com/PipedreamHQ/pipedream/blob/master/components/jotform/sources/new-submission/new-submission.mjs#L2)) -4. And finally, export the `sampleEmit` object - ([example](https://github.com/PipedreamHQ/pipedream/blob/master/components/jotform/sources/new-submission/new-submission.mjs#L96)) - -This will render a "Generate Test Event" button in the UI for users to emit that -sample event: - -![generate-sample-event](https://res.cloudinary.com/pipedreamin/image/upload/v1690488844/generate-test-event_drjykm.gif) - -### Polling Sources - -#### Default Timer Interval - -As a general heuristic, set the default timer interval to 15 minutes. However, -you may set a custom interval (greater or less than 15 minutes) if appropriate -for the specific source. Users may also override the default value at any time. - -For polling sources in the Pipedream registry, the default polling interval is -set as a global config. Individual sources can access that default within the -props definition: - -``` javascript -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; - -export default { - props: { - timer: { - type: "$.interface.timer", - default: { - intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, - }, - }, - }, - // rest of component... -} -``` - -#### Rate Limit Optimization - -When building a polling source, cache the most recently processed ID or -timestamp using `$.service.db` whenever the API accepts a `since_id` or "since -timestamp" (or equivalent). Some apps (e.g., Github) do not count requests that -do not return new results against a userโ€™s API quota. - -If the service has a well-supported Node.js client library, it'll often build in -retries for issues like rate limits, so using the client lib (when available) -should be preferred. In the absence of that, -[Bottleneck](https://www.npmjs.com/package/bottleneck) can be useful for -managing rate limits. 429s should be handled with exponential backoff (instead -of just letting the error bubble up). - -### Webhook Sources - -#### Hooks - -[Hooks](/components/contributing/api/#hooks) are methods that are automatically invoked by -Pipedream at different stages of the [component -lifecycle](/components/contributing/api/#source-lifecycle). Webhook subscriptions are -typically created when components are instantiated or activated via the -`activate()` hook, and deleted when components are deactivated or deleted via -the `deactivate()` hook. - -#### Helper Methods - -Whenever possible, create methods in the app file to manage [creating and -deleting webhook subscriptions](/components/contributing/api/#hooks). - -| **Description** | **Method Name** | -| --------------------------------------- | --------------- | -| Method to create a webhook subscription | `createHook()` | -| Method to delete a webhook subscription | `deleteHook()` | - -#### Storing the 3rd Party Webhook ID - -After subscribing to a webhook, save the ID for the hook returned by the 3rd -party service to the `$.service.db` for a source using the key `hookId`. This ID -will be referenced when managing or deleting the webhook. Note: some apps may -not return a unique ID for the registered webhook (e.g., Jotform). - -#### Signature Validation - -Subscription webhook components should always validate the incoming event -signature if the source app supports it. - -#### Shared Secrets - -If the source app supports shared secrets, implement support transparent to the -end user. Generate and use a GUID for the shared secret value, save it to a -`$.service.db` key, and use the saved value to validate incoming events. - -## Action Guidelines - -### Action Name - -Like [source name](#source-name), action name should be a singular, title-cased -name, should not be slugified, and should not include the app name. - -As a general pattern, articles are not included in the action name. For example, -instead of "Create a Post", use "Create Post". - -#### Use `@pipedream/platform` axios for all HTTP Requests - -By default, the standard `axios` package doesn't return useful debugging data to -the user when it `throw`s errors on HTTP 4XX and 5XX status codes. This makes it -hard for the user to troubleshoot the issue. - -Instead, [use `@pipedream/platform` axios](/workflows/building-workflows/http/#platform-axios). - -#### Return JavaScript Objects - -When you `return` data from an action, it's exposed as a [step -export](/workflows/#step-exports) for users to reference in future steps -of their workflow. Return JavaScript objects in all cases, unless there's a -specific reason not to. - -For example, some APIs return XML responses. If you return XML from the step, -it's harder for users to parse and reference in future steps. Convert the XML to -a JavaScript object, and return that, instead. - -### "List" Actions - -#### Return an Array of Objects - -To simplify using results from "list"/"search" actions in future steps of a -workflow, return an array of the items being listed rather than an object with a -nested array. [See this example for -Airtable](https://github.com/PipedreamHQ/pipedream/blob/cb4b830d93e1495d8622b0c7dbd80cd3664e4eb3/components/airtable/actions/common-list.js#L48-L63). - -#### Handle Pagination - -For actions that return a list of items, the common use case is to retrieve all -items. Handle pagination within the action to remove the complexity of needing -to paginate from users. We may revisit this in the future and expose the -pagination / offset params directly to the user. - -In some cases, it may be appropriate to limit the number of API requests made or -records returned in an action. For example, some Twitter actions optionally -limit the number of API requests that are made per execution (using a -[`maxRequests` -prop](https://github.com/PipedreamHQ/pipedream/blob/cb4b830d93e1495d8622b0c7dbd80cd3664e4eb3/components/twitter/twitter.app.mjs#L52)) -to avoid exceeding Twitter's rate limits. [See the Airtable -components](https://github.com/PipedreamHQ/pipedream/blob/e2bb7b7bea2fdf5869f18e84644f5dc61d9c22f0/components/airtable/airtable.app.js#L14) -for an example of using a `maxRecords` prop to optionally limit the maximum -number of records to return. - -### Use `$.summary` to Summarize What Happened - -[Describe what happened](/components/contributing/api/#returning-data-from-steps) when an -action succeeds by following these guidelines: - -- Use plain language and provide helpful and contextually relevant information - (especially the count of items) -- Whenever possible, use names and titles instead of IDs -- Basic structure: _Successfully [action performed (like added, removed, - updated)] โ€œ[relevant destination]โ€_ - -### Don't Export Data You Know Will Be Large - -Browsers can crash when users load large exports (many MBs of data). When you -know the content being returned is likely to be large โ€“ย e.g. files โ€”ย don't -export the full content. Consider writing the data to the `/tmp` directory and -exporting a reference to the file. - -## Miscellaneous - -- Use camelCase for all props, method names, and variables. - -## Database Components - -Pipedream supports a special category of apps called ["databases"](/workflows/data-management/databases/), -such as -[MySQL](https://github.com/PipedreamHQ/pipedream/tree/master/components/mysql), -[PostgreSQL](https://github.com/PipedreamHQ/pipedream/tree/master/components/postgresql), -[Snowflake](https://github.com/PipedreamHQ/pipedream/tree/master/components/snowflake), -etc. Components tied to these apps offer unique features _as long as_ they -comply with some requirements. The most important features are: - -1. A built-in SQL editor that allows users to input a SQL query to be run - against their DB -2. Proxied execution of commands against a DB, which guarantees that such - requests are always being made from the same range of static IPs (see the - [shared static IPs docs](/workflows/data-management/databases#send-requests-from-a-shared-static-ip)) - -When dealing with database components, the Pipedream runtime performs certain -actions internally to make these features work. For this reason, these -components must implement specific interfaces that allows the runtime to -properly interact with their code. These interfaces are usually defined in the -[`@pipedream/platform`](https://github.com/PipedreamHQ/pipedream/tree/master/platform) -package. - -### SQL Editor - -This code editor is rendered specifically for props of type `sql`, and it uses -(whenever possible) the underlying's database schema information to provide -auto-complete suggestions. Each database engine not only has its own SQL -dialect, but also its own way of inspecting the schemas and table information it -stores. For this reason, each app file must implement the logic that's -applicable to the target engine. - -To support the schema retrieval, the app file must implement a method called -`getSchema` that takes no parameters, and returns a data structure with a format -like this: - -```javascript -{ - users: { // The entries at the root correspond to table names - metadata: { - rowCount: 100, - }, - schema: { - id: { // The entries under `schema` correspond to column names - columnDefault: null, - dataType: "number", - isNullable: false, - tableSchema: "public", - }, - email: { - columnDefault: null, - dataType: "varchar", - isNullable: false, - tableSchema: "public", - }, - dateOfBirth: { - columnDefault: null, - dataType: "varchar", - isNullable: true, - tableSchema: "public", - }, - }, - }, -} -``` - -The -[`lib/sql-prop.ts`](https://github.com/PipedreamHQ/pipedream/blob/master/platform/lib/sql-prop.ts) -file in the `@pipedream/platform` package define the schema format and the -signature of the `getSchema` method. You can also check out existing examples in -the -[MySQL](https://github.com/PipedreamHQ/pipedream/blob/master/components/mysql/mysql.app.mjs), -[PostgreSQL](https://github.com/PipedreamHQ/pipedream/blob/master/components/postgresql/postgresql.app.mjs) -and -[Snowflake](https://github.com/PipedreamHQ/pipedream/blob/master/components/snowflake/snowflake.app.mjs) -components. - -### Shared Static IPs - -When a user runs a SQL query against a database, the request is proxied through -a separate internal service that's guaranteed to always use the same range of -static IPs when making outbound requests. This is important for users that have -their databases protected behind a firewall, as they can whitelist these IPs to -allow Pipedream components to access their databases. - -To make this work, the app file must implement the interface defined in the -[`lib/sql-proxy.ts`](https://github.com/PipedreamHQ/pipedream/blob/master/platform/lib/sql-proxy.ts) -file in the `@pipedream/platform` package. This interface defines the following -methods: - -1. **`getClientConfiguration`**: This method takes no parameters and returns an - object that can be fed directly to the database's client library to - initialize/establish a connection to the database. This guarantees that both - the component and the proxy service use the same connection settings, **so - make sure the component uses this method when initializing the client**. -2. **`executeQuery`**: This method takes a query object and returns the result - of executing the query against the database. The Pipedream runtime will - replace this method with a call to the proxy service, so **every component - must make use of this method in order to support this feature**. -3. **`proxyAdapter`**: This method allows the proxy service to take the - arguments passed to the `executeQuery` method and transform them into a - "generic" query object that the service can then use. The expected format - looks something like this: - ```javascript - { - query: "SELECT * FROM users WHERE id = ?", - params: [42], - } - ``` - -You can check out these example pull requests that allowed components to support -this proxy feature: - -- [#11201 (MySQL)](https://github.com/PipedreamHQ/pipedream/pull/11201) -- [#11202 (PostgreSQL)](https://github.com/PipedreamHQ/pipedream/pull/11202) -- [#12511 (Snowflake)](https://github.com/PipedreamHQ/pipedream/pull/12511) diff --git a/docs-v2/pages/components/contributing/index.mdx b/docs-v2/pages/components/contributing/index.mdx deleted file mode 100644 index 9e7186241471e..0000000000000 --- a/docs-v2/pages/components/contributing/index.mdx +++ /dev/null @@ -1,99 +0,0 @@ -import Callout from '@/components/Callout' -import { FileTree } from 'nextra/components' - -# Pipedream Registry - -When developing workflows with pre-built actions and triggers, under the hood you're using [components](/components/contributing/) from the [Pipedream Registry Github Repository](https://github.com/PipedreamHQ/pipedream). - -Components contributed to the [Pipedream Registry Github Repository](https://github.com/PipedreamHQ/pipedream) are published to the [Pipedream marketplace](https://pipedream.com/apps) and are listed in -the Pipedream UI when building workflows. - - -What is a component? - -If you haven't yet, we recommend starting with our Component Development Quickstart Guides for [sources](/components/contributing/quickstart/nodejs/sources/) -and [actions](/components/contributing/actions-quickstart/) to learn how to build components and privately publish them to your account. - - -## Registry Components Structure - -All Pipedream registry components live in [this GitHub repo](https://github.com/PipedreamHQ/pipedream) under the [`components`](https://github.com/PipedreamHQ/pipedream/tree/master/components) directory. - -Every integrated app on Pipedream has a corresponding directory that defines the actions and sources available for that app. Below is a simplified version of the [Airtable app directory](https://github.com/PipedreamHQ/pipedream/tree/master/components/airtable) within the registry: - - - - - - - - - - - - - - - - - - - - - - -In the example above, the `components/airtable/actions/get-record/get-record.mjs` component is published as the **Get Record** action under the **Airtable** app within the workflow builder in Pipedream. - - -The repository is missing the app directory I'd like to add components for - -You can request to have new apps integrated into Pipedream. - -Once the Pipedream team integrates the app, we'll create a directory for the app in the [`components`](https://github.com/PipedreamHQ/pipedream/tree/master/components) directory of the GitHub repo. - - -## Contribution Process - -Anyone from the community can build [sources](/workflows/building-workflows/triggers/) and [actions](/components/contributing/#actions) for integrated apps. - -To submit new components or update existing components: - -1. Fork the public [Pipedream Registry Github Repository](https://github.com/PipedreamHQ/pipedream). -2. Create a new component within the corresponding app's directory within the `components` directory (if applicable). -3. [Create a PR for the Pipedream team to review](https://github.com/PipedreamHQ/pipedream/compare). -4. Address any feedback provided by Pipedream based on the best practice [Component Guidelines & Patterns](/components/contributing/guidelines/). -5. Once the review is complete and approved, Pipedream will merge the PR to the `master` branch -6. The component will be available for use within workflows for all Pipedream developers! ๐ŸŽ‰ - -### Component Development Discussion - -Join the discussion with other Pipedream component developers at the [#contribute channel](https://pipedream-users.slack.com/archives/C01E5KCTR16) in Slack or [on Discourse](https://pipedream.com/community/c/dev/11). - - -Not sure what to build? - -Need inspiration? Check out [sources](https://github.com/PipedreamHQ/pipedream/issues?q=is%3Aissue+is%3Aopen+%5BSOURCE%5D+in%3Atitle) -and [actions](https://github.com/PipedreamHQ/pipedream/issues?q=is%3Aissue+is%3Aopen+%5BACTION%5D+in%3Atitle+) requested by the community! - - -## Reference Components - -The following components are references for developing sources and -actions for Pipedream's registry. - -### Reference Sources - -| Name | App | Type | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------------------------------- | -| [New Card](https://github.com/PipedreamHQ/pipedream/blob/master/components/trello/sources/new-card/new-card.mjs) | Trello | Webhook | -| [New or Modified Files](https://github.com/PipedreamHQ/pipedream/blob/master/components/google_drive/sources/new-or-modified-files/new-or-modified-files.mjs) | Google Drive | Webhook + Polling | -| [New Submission](https://github.com/PipedreamHQ/pipedream/blob/master/components/jotform/sources/new-submission/new-submission.mjs) | Jotform | Webhook (with no unique hook ID) | - -### Reference Actions - -| Name | App | -| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -| [Add Multiple Rows](https://github.com/PipedreamHQ/pipedream/blob/master/components/google_sheets/actions/add-multiple-rows/add-multiple-rows.mjs) | Google Sheets | -| [Send Message](https://github.com/PipedreamHQ/pipedream/blob/master/components/discord_bot/actions/send-message/send-message.mjs) | Discord | -| [Append Text](https://github.com/PipedreamHQ/pipedream/blob/master/components/google_docs/actions/append-text/append-text.mjs) | Google Docs | -| [`GET` request](https://github.com/PipedreamHQ/pipedream/blob/master/components/http/actions/get-request/get-request.mjs) | HTTP | diff --git a/docs-v2/pages/components/contributing/sources-quickstart.mdx b/docs-v2/pages/components/contributing/sources-quickstart.mdx deleted file mode 100644 index 25d8c88bccab0..0000000000000 --- a/docs-v2/pages/components/contributing/sources-quickstart.mdx +++ /dev/null @@ -1,684 +0,0 @@ -# Quickstart: Source Development - -This document is intended for a technical audience (including those interested in learning how to author and edit components). After completing this quickstart, you will understand how to: - -- Deploy components to Pipedream using the CLI -- Invoke a component manually, or on a schedule or HTTP request -- Maintain state across component executions -- Emit deduped events using the `unique` and `greatest` strategies -- Use Pipedream managed OAuth for an app -- Use npm packages in components - -We recommend that you execute the examples in order โ€” each one builds on the concepts and practices of earlier examples. - -## Quickstart Examples - -**Hello World! (~10 minutes)** - -- Deploy a `hello world!` component using the Pipedream CLI and invoke it manually -- Use `$.service.db` to maintain state across executions -- Use `$.interface.timer` to invoke a component on a schedule -- Use `$.interface.http` to invoke code on HTTP requests - -**Emit new RSS items on a schedule (~10 mins)** - -- Use the `rss-parser` npm package to retrieve an RSS feed and emit each item -- Display a custom summary for each emitted item in the event list -- Use the `unique` deduping strategy so we only emit new items from the RSS feed -- Add a timer interface to run the component on a schedule - -**Poll for new Github issues (~10 mins)** - -- Use Pipedream managed OAuth with Github's API to retrieve issues for a repo -- Use the `greatest` deduping strategy to only emit new issues - -## Prerequisites - -**Step 1.** Create a free account at [https://pipedream.com](https://pipedream.com). Just sign in with your Google or Github account. - -**Step 2.** [Download and install the Pipedream CLI](/components/contributing/cli/install/). - -**Step 3.** Once the CLI is installed, [link your Pipedream account to the CLI](/components/contributing/cli/login/#existing-pipedream-account): - -```bash -pd login -``` - -See the [CLI reference](/components/contributing/cli/reference/) for detailed usage and examples beyond those covered below. - -## CLI Development Mode - -The examples in this guide use the `pd dev` command. This command will deploy your code in "development mode". What that means is that the CLI will attach to the deployed component and watch your local file for changes โ€”ย when you save changes to your local file, your component will automatically be updated on Pipedream (the alternative is to `pd deploy` and run `pd update` for each change). - -If your `pd dev` session is terminated and you need to re-attach to a deployed component, run the following command. - -```bash -pd dev [--dc ] -``` - -For example, if you're building a new source at `components/sources/my-source.mjs`, then pass the fully qualified path to `pd dev`: - -```bash -pd dev components/sources/my-source.mjs -``` -If you need to update a deployed instance of a source, pass it's ID to the `dc` argument to update it with new source code: - -```bash -pd dev --dc dc_123456 components/sources/my-source.mjs -``` - -See the [CLI reference](/components/contributing/cli/reference/) for detailed usage and examples beyond those covered below. - -## Hello World! - -Here is a simple component that will emit an event with a payload of `{ message: "hello world!" }` on each execution. - -```javascript -export default { - name: "Source Demo", - description: "This is a demo source", - async run() { - this.$emit({ message: "hello world!" }); - }, -}; -``` - -To deploy and run it, save the code to a local `.js` file (e.g., `source.js`) and run the following CLI command: - -```bash -pd dev source.js -``` - -The CLI will deploy your code in development mode (the CLI will attach to the deployed component and watch your local file for changes โ€”ย when you save changes to your local file, your component will automatically be updated on Pipedream). - -You should see the following output: - -```bash -$ pd dev source.js -watch:add | source.js -Configuring props... -Deploying... -Attached to deployed component: https://pipedream.com/sources/dc_v3uXKz/configuration -Ready for updates! -``` - -Open the URL returned by the CLI (`https://pipedream.com/sources/dc_v3uXKz` in the sample output above) to view your source in Pipedream's UI. - -Then click **RUN NOW** to invoke your source. Your event will appear in real-time, and you can select it to inspect the emitted data. - -![source](/images/components/quickstart/hello-world-1.gif) - -### Maintain state across executions - -Next, we'll use Pipedream's `db` service to track the number of times the component is invoked. - -First, we'll assign `$.service.db` to a prop so we can reference it in our code via `this`. - -```javascript -props: { - db: "$.service.db", -}, -``` - -Then we'll update the `run()` method to: - -- Retrieve the value for the `count` key (using the `get()` method of `$.service.db`) -- Display the count in the event summary (event summaries are displayed in the event list next to the event time) -- Increment `count` and save the updated value to `$.service.db` using the `set()` method - -```javascript -let count = this.db.get("count") || 1; - -this.$emit( - { message: "hello world!" }, - { - summary: `Execution #${count}`, - } -); - -this.db.set("count", ++count); -``` - -Here's the updated code: - -```javascript -export default { - name: "Source Demo", - description: "This is a demo source", - props: { - db: "$.service.db", - }, - async run() { - let count = this.db.get("count") || 1; - - this.$emit( - { message: "hello world!" }, - { - summary: `Execution #${count}`, - } - ); - - this.db.set("count", ++count); - }, -}; -``` - -Save the changes to your local file. Your component on Pipedream should automatically update. Return to the Pipedream UI and press **RUN NOW** โ€”ย you should see the execution count appear in the event list. - -![source](/images/components/quickstart/hello-world-2.gif) - -### Invoke your code on a schedule - -Next, we'll update our component so it runs on a schedule. To do that, we'll use Pipedream's `timer` interface and we'll set the default execution interval to 15 minutes by adding the following code to props: - -``` -timer: { - type: "$.interface.timer", - default: { - intervalSeconds: 15 * 60, - }, -}, -``` - -Here's the updated code: - -```javascript -export default { - name: "Source Demo", - description: "This is a demo source", - props: { - db: "$.service.db", - timer: { - type: "$.interface.timer", - default: { - intervalSeconds: 15 * 60, - }, - }, - }, - async run() { - let count = this.db.get("count") || 1; - - this.$emit( - { message: "hello world!" }, - { - summary: `Execution #${count}`, - } - ); - - this.db.set("count", ++count); - }, -}; -``` - -Save the changes to your file (your component on Pipedream should automatically update). and then, return to the Pipedream UI and **reload the page**. You should now see the timer settings in the summary and a countdown to the next execution (you can still run your component manually). Your component will now run every 15 minutes. - -![source](/images/components/quickstart/hello-world-3.gif) - -**Note**: if you'd like to change the schedule of your deployed component, visit the **Configuration** tab in the Pipedream UI and change the schedule accordingly. Changing the value of `intervalSeconds` within the component's code will not change the schedule of the running instance of the component. You can also set one value as the default `intervalSeconds` in the component's code, but run - -```bash -pd dev --prompt-all -``` - -to set a different schedule than the default specified in the code. - -### Invoke your code on HTTP requests - -Next, we'll update our component to run on HTTP requests instead of a timer. To do that, we'll just replace the `timer` interface with an `http` interface. - -```javascript -http: { - type: "$.interface.http", - customResponse: true - }, -``` - -In addition, we'll update the function signature to pass in the HTTP event so we can reference it in our code: - -```javascript -async run(event) { } -``` - -Finally, let's update the `run()` method to use `event` to both echo back the request body in the HTTP response and emit it as the event payload. - -```javascript -this.http.respond({ - status: 200, - body: event.body, - headers: { - "Content-Type": event.headers["Content-Type"], - }, -}); - -this.$emit(event.body, { - summary: `Execution #${count}`, -}); -``` - -Here's the updated code: - -```javascript -export default { - name: "Source Demo", - description: "This is a demo source", - props: { - db: "$.service.db", - http: { - type: "$.interface.http", - customResponse: true, - }, - }, - async run(event) { - let count = this.db.get("count") || 1; - - this.http.respond({ - status: 200, - body: event.body, - headers: { - "Content-Type": event.headers["Content-Type"], - }, - }); - - this.$emit(event.body, { - summary: `Execution #${count}`, - }); - - this.db.set("count", ++count); - }, -}; -``` - -Save the changes to your file and your component on Pipedream should automatically update. - -Return to the Pipedream UI and refresh the page. Instead of the countdown timer, you will now see a unique URL generated by Pipedream. Copy the URL and update and execute the CURL command below to invoke your component. This command passes `{ message: "hello world!" }` as the request body. `{ message: "hello world!" }` will be emitted as the event similar to the earlier examples, and it will also be echoed back in the HTTP response. - -``` -curl -d '{ "message": "hello world!" }' \ - -H "Content-Type: application/json" \ - "INSERT-YOUR-ENDPOINT-URL-HERE" -``` - -![source](/images/components/quickstart/hello-world-4.gif) - -## Emit new RSS items on a schedule (~10 mins) - -Next, let's cover some real-world examples starting with RSS. Continue editing the same file, but start with the following scaffolding for this example. - -```javascript -export default { - name: "Source Demo", - description: "This is a demo source", - async run() {}, -}; -``` - -### Emit items in an RSS Feed - -> **Note:** The code for the examples below was adapted from the samples provided in the readme for the `rss-parser` package at https://www.npmjs.com/package/rss-parser. To use most npm packages on Pipedream, just `import` them โ€” there is no `package.json` or `npm install` required. - -To parse the RSS feed, we'll use the `rss-parser` npm package. - -```javascript -import Parser from "rss-parser"; -let parser = new Parser(); -``` - -Then, update the `run()` method to: - -- Parse the feed at `https://lorem-rss.herokuapp.com/feed` (it's important you use this feed -- a new item is added every minute, so it will help us test deduplication) -- Loop through the array of returned RSS items and emit each one - -```javascript -let feed = await parser.parseURL("https://lorem-rss.herokuapp.com/feed"); -feed.items.forEach((item) => { - this.$emit(item); -}); -``` - -Here's the updated code: - -```javascript -import Parser from "rss-parser"; -let parser = new Parser(); - -export default { - name: "Source Demo", - description: "This is a demo source", - async run() { - let feed = await parser.parseURL("https://lorem-rss.herokuapp.com/feed"); - feed.items.forEach((item) => { - this.$emit(item); - }); - }, -}; -``` - -Save the changes to your file, and then refresh your source in the Pipedream UI and click **RUN NOW**. You should see 10 events emitted. Each event corresponds with an RSS item. You can select each event to inspect it. - -### Add an optional summary for each emitted event - -Next, we'll add a summary for each event. The summary is displayed in the event list and makes it easy to differentiate events at a glance in the list. For this example, let's emit the `title` as the summary for each RSS item. To do that, we add a metadata object to `this.$emit()`. - -Add summary to emit metadata... - -```javascript -this.$emit(item, { - summary: item.title, -}); -``` - -Here's the updated code: - -```javascript -import Parser from "rss-parser"; -let parser = new Parser(); - -export default { - name: "Source Demo", - description: "This is a demo source", - async run() { - let feed = await parser.parseURL("https://lorem-rss.herokuapp.com/feed"); - feed.items.forEach((item) => { - this.$emit(item, { - summary: item.title, - }); - }); - }, -}; -``` - -Save the changes to your file and then click **RUN NOW** in the Pipedream UI. You should again see 10 events emitted, but this time each event should have a corresponding summary in the event list. - -### Only emit new items in the RSS Feed - -In the previous examples, we always emit any data that is returned. However, we are emitting duplicate events -- e.g., if you run invoke the component twice, you will see the same events emitted twice. - -Pipedream provides built-in deduplication strategies to make it easy to emit new events only. For this example, we'll use the `unique` strategy. This strategy caches the last 100 event `id` values, and only emits events with `id` values that are not contained in that cache. - -To dedupe with the `unique` strategy, we need to first declare it: - -```javascript -dedupe: "unique", -``` - -And then we need to pass an `id` value in the metadata for `this.$emit()` for Pipedream to use for deduping: - -```javascript -this.$emit(item, { - summary: item.title, - id: item.guid, -}); -``` - -Here's the updated code: - -```javascript -import Parser from "rss-parser"; -let parser = new Parser(); - -export default { - name: "Source Demo", - description: "This is a demo source", - dedupe: "unique", - async run() { - let feed = await parser.parseURL("https://lorem-rss.herokuapp.com/feed"); - feed.items.forEach((item) => { - this.$emit(item, { - summary: item.title, - id: item.guid, - }); - }); - }, -}; -``` - -Save the changes to your file and then click **RUN NOW** in the Pipedream UI. Similar to previous executions, you should see 10 events emitted. Now, run the component **again**. You should see a maximum of **one, if any** events emitted (the reason one event may be emitted is if a new item was added to the RSS feed). If no new events were emitted, wait for ~1 minute and try again. - -### Add a timer interface to invoke the component on a schedule - -Now we're ready to add a timer to our component to check for new RSS items automatically. Similar to the **hello world!** example above, we'll add a timer prop, and we'll set the default interval to 5 minutes: - -```javascript -props: { - timer: { - type: "$.interface.timer", - default: { - intervalSeconds: 60 * 5, - }, - }, -}, -``` - -Here's the updated code: - -```javascript -import Parser from "rss-parser"; -let parser = new Parser(); - -export default { - name: "Source Demo", - description: "This is a demo source", - props: { - timer: { - type: "$.interface.timer", - default: { - intervalSeconds: 60 * 5, - }, - }, - }, - dedupe: "unique", - async run() { - let feed = await parser.parseURL("https://lorem-rss.herokuapp.com/feed"); - feed.items.forEach((item) => { - this.$emit(item, { - id: item.guid, - summary: item.title, - }); - }); - }, -}; -``` - -**Save** your component then return to the UI and reload the page. You should see the updated configuration on your summary card and a countdown to the next execution. You can still click **RUN NOW** to execute your source manually. - -## Use managed auth to pull data from Github (~10 mins) - -In the last example, we were able to retrieve data to emit without any authentication. Now we'll use Pipedream managed auth to retrieve and emit data from the Github API (which uses OAuth for authentication). Similar to the last example, continue editing the same file, but start with the following scaffolding: - -```javascript -export default { - name: "Source Demo", - description: "This is a demo source", - async run() {}, -}; -``` - -### Get issues for a repo - -First, import `axios` so we can make a request to the Github REST API: - -```javascript -import { axios } from "@pipedream/platform"; -``` - -Next, let's add an **app prop**, which will enable us to use Pipedream managed auth with this component. For this example, we'll add Github: - -```javascript -props: { - github: { - type: "app", - app: "github", - }, -}, -``` - -**IMPORTANT: The CLI will prompt you to select a connected account (or connect a new one) when you deploy (or update) this component.** - -> **Note:** The value for the `app` property is the name slug for the app in Pipedream. This is not currently discoverable, but it will be in the near future. For the time being, if you want to know how to reference an app, please reach out on our public Slack. - -Finally, we'll update the `run()` method to fetch issues from Github using `axios` and emit them. Notice that we're passing the `oauth_access_token` in the authorization header by referencing the app prop `this.github.$auth.oauth_access_token`. Again, it's important that you stick with the `pddemo/demo` repo shown in the below example so you can test the next dedupe strategy. - -```javascript -async run() { - const data = await axios(this, { - method: 'get', - headers: { - Authorization: `Bearer ${this.github.$auth.oauth_access_token}`, - }, - url: `https://api.github.com/repos/pddemo/demo/issues` - }) - data.forEach(issue => { - this.$emit(issue) - }) -} -``` - -Here's the updated code. - -```javascript -import { axios } from "@pipedream/platform"; - -export default { - name: "Source Demo", - description: "This is a demo source", - props: { - github: { - type: "app", - app: "github", - }, - }, - async run() { - const data = await axios(this, { - method: "get", - headers: { - Authorization: `Bearer ${this.github.$auth.oauth_access_token}`, - }, - url: `https://api.github.com/repos/pddemo/demo/issues`, - }); - data.forEach((issue) => { - this.$emit(issue); - }); - }, -}; -``` - -Next save your changes and go to the terminal where you ran `pd dev` **โ€”ย follow the CLI prompts to select a connected account for Github (or connect a new one)**. Then load the Pipedream UI, and click **RUN NOW**. Your component should emit 30 issues. - -### Dedupe the events - -In the RSS example, we deduped the emitted events based on the `unique` strategy. The limitation of the unique strategy is that it will only maintain uniqueness for 100 items. Since Github issues have increasing numeric IDs, we can use the `greatest` strategy to filter for new issues. - -To use this strategy, we first have to declare it. - -```javascript -dedupe: "greatest". -``` - -Then, we need to pass the numeric ID for each issue to `this.$emit()`. We can also add a summary and a timestamp (based on the date/time when the issue was created). Note: when you add a timestamp, Pipedream will automatically emit events from oldest to newest. - -```javascript -response.data.forEach((issue) => { - this.$emit(issue, { - id: issue.id, - summary: `ISSUE ${issue.number}: ${issue.title}`, - ts: issue.created_at && +new Date(issue.created_at), - }); -}); -``` - -Here is the updated code. - -```javascript -import { axios } from "@pipedream/platform"; - -export default { - name: "Source Demo", - description: "This is a demo source", - props: { - github: { - type: "app", - app: "github", - }, - }, - dedupe: "greatest", - async run() { - const data = await axios(this, { - method: "get", - headers: { - Authorization: `Bearer ${this.github.$auth.oauth_access_token}`, - }, - url: `https://api.github.com/repos/pddemo/demo/issues`, - }); - data.forEach((issue) => { - this.$emit(issue, { - id: issue.id, - summary: `ISSUE ${issue.number}: ${issue.title}`, - ts: issue.created_at && +new Date(issue.created_at), - }); - }); - }, -}; -``` - -Save, load the Pipedream UI, and click **RUN NOW**. You should see 30 issues emitted, now with summaries. When you click **RUN NOW** again, only new issues will be emitted (if there are any). - -### Add a timer to run on a schedule - -As the final step of this walk-through, we'll update our component to check for new issues every 15 minutes. To do that, we'll add a timer prop. - -```javascript -timer: { - type: "$.interface.timer", - default: { - intervalSeconds: 15 * 60, - }, -}, -``` - -Here's the updated code. - -```javascript -import { axios } from "@pipedream/platform"; - -export default { - name: "Source Demo", - description: "This is a demo source", - props: { - github: { - type: "app", - app: "github", - }, - timer: { - type: "$.interface.timer", - default: { - intervalSeconds: 15 * 60, - }, - }, - }, - dedupe: "greatest", - async run() { - const data = await axios(this, { - method: "get", - headers: { - Authorization: `Bearer ${this.github.$auth.oauth_access_token}`, - }, - url: `https://api.github.com/repos/pddemo/demo/issues`, - }); - data.forEach((issue) => { - this.$emit(issue, { - id: issue.id, - summary: `ISSUE ${issue.number}: ${issue.title}`, - ts: issue.created_at && +new Date(issue.created_at), - }); - }); - }, -}; -``` - -Save and reload your source in the Pipedream UI. You should now see a countdown timer to the next execution. - -## What's Next? - -You're ready to start authoring and deploying components on Pipedream! You can also check out the [detailed component reference](/components/contributing/api/) at any time! - -If you have any questions or feedback, please join our [public Slack](https://pipedream.com/support). diff --git a/docs-v2/pages/components/contributing/typescript.mdx b/docs-v2/pages/components/contributing/typescript.mdx deleted file mode 100644 index 47f5b60810dac..0000000000000 --- a/docs-v2/pages/components/contributing/typescript.mdx +++ /dev/null @@ -1,101 +0,0 @@ -import Callout from '@/components/Callout' - -# TypeScript components - - -๐ŸŽ‰ Calling all TypeScript developers ๐ŸŽ‰ - -TypeScript components are in **beta**, and we're looking for feedback. Please see our list of [known issues](#known-issues), start writing TypeScript components, and give us feedback in [our community](https://pipedream.com/support). - -During the beta, the `@pipedream/types` package and other TypeScript configuration in the `pipedream` repo is subject to change. - - - - -## Why TypeScript? - -Most Pipedream components in [the registry](https://github.com/PipedreamHQ/pipedream) are written in Node.js. Writing components in TypeScript can reduce bugs and speed up development, with very few changes to your code. - -If you haven't written TypeScript, start with [this tutorial](https://www.typescriptlang.org/docs/handbook/typescript-from-scratch.html). - -## Quickstart - - -If you've never developed Pipedream components before, [start here](/components/contributing/). - - -### Developing TypeScript components in the `PipedreamHQ/pipedream` registry - -1. [Fork and clone the repo](https://github.com/PipedreamHQ/pipedream). - -2. Run `pnpm install` to install dependencies. - -3. See [the RSS sources and actions](https://github.com/PipedreamHQ/pipedream/tree/master/components/rss) for example `tsconfig.json` configuration and TypeScript components. If the app you're working with doesn't yet have a `tsconfig.json` file, copy the file from the RSS component directory and modify accordingly. - -4. In the RSS examples, you'll see how we use the `defineApp`, `defineAction`, and `defineSource` methods from the `@pipedream/types` package. This lets us strictly-type `this` in apps and components. See [the TypeScript docs on `ThisType`](https://www.typescriptlang.org/docs/handbook/utility-types.html#thistypetype) for more detail on this pattern. - -5. Before you publish components to Pipedream, you'll need to compile your TypeScript to JavaScript. Run: - -```bash -npm run build -``` - -The build process should print the compiled JS files to your console and produce them at the `/dist` directory. - -For example, if you compile a TypeScript file at `pipedream/components/rss/sources/new-item-in-feed/new-item-in-feed.ts`, the corresponding JS file will be produced at `pipedream/components/rss/dist/sources/new-item-in-feed/new-item-in-feed.js`. - -6. Use [the Pipedream CLI](/components/contributing/cli/reference/) to `pd publish` or `pd dev` the JavaScript components emitted by step 5 by the full path to the file. - -```bash -pd publish pipedream/components/rss/dist/sources/new-item-in-feed/new-item-in-feed.js -``` - - -Don't forget to use the dist directory - -If you attempt to deploy the TypeScript component directly, you'll receive a 500 error from the publish endpoint. Instead deploy the JavaScript file produced within the `/dist` directory as described in step 5. - - -7. If it doesn't exist in the app directory, add a `.gitignore` file that ignores the following files. Commit only `ts` files to Git, not compiled `*js` files. - -``` -*.js -*.mjs -dist -``` - -### Developing TypeScript components in your own application - -First, install the `@pipedream/types` package: - -```bash -# npm -npm i --save-dev @pipedream/types -# yarn -yarn add --dev @pipedream/types -``` - -You'll need a minimal configuration to compile TypeScript components in your application. In the Pipedream registry, we use this setup: - -- The `tsconfig.json` in the root of the repo contains [references](https://www.typescriptlang.org/docs/handbook/project-references.html) to component app directories. For example, the root config provides a reference to the `components/rss` directory, which contains its own `tsconfig.json` file. -- `npm run build` compiles the TypeScript in all directories in `references`. -- The `tsconfig.json` in each component app directory contains the app-specific TypeScript configuration. -- The GitHub actions in `.github/workflows` compile and publish our components. - -See [the RSS sources and actions](https://github.com/PipedreamHQ/pipedream/tree/master/components/rss) for an example app configuration. - -## Known issues - -We welcome PRs in [the `PipedreamHQ/pipedream` repo](https://github.com/PipedreamHQ/pipedream), where we store all sources and actions, the `@pipedream/types` package, these docs, and other Pipedream code. Here are a few known issues durin the **beta**: - -- `this` is strictly-typed within `methods`, `run`, `hooks`, and everywhere you have access to `this` in [the component API](/components/contributing/api/). But this typing can be improved. For example, we don't yet map props to their appropriate TypeScript type (everything is typed with `any`). -- The compile -> publish lifecycle hasn't been fully-automated when you're developing in the `pipedream` repo. Currently, you have to run `npm run build` from the repo root, then use the `pd` CLI to publish components after compilation. It would be nice to run `tsc-watch` and have that compile and publish the new version of the component using the `--onSuccess` flag, publishing any sources or actions accordingly. -- We should add a linter (like `dtslint`) to all TypeScript components). Currently, `dtslint` is configured only for the `@pipedream/types` package. - -## `@pipedream/types` - -See the `types` directory of [the `PipedreamHQ/pipedream` repo](https://github.com/PipedreamHQ/pipedream) for Pipedream types. We welcome PRs! - -## Giving feedback during the beta - -We welcome any feedback, bug reports, or improvements. Please reach out or submit PRs [in our Slack, Discourse and GitHub communities](https://pipedream.com/support). diff --git a/docs-v2/pages/components/index.mdx b/docs-v2/pages/components/index.mdx deleted file mode 100644 index ca34ed37dc1ec..0000000000000 --- a/docs-v2/pages/components/index.mdx +++ /dev/null @@ -1,140 +0,0 @@ -import Callout from '@/components/Callout' -import VideoPlayer from '@/components/VideoPlayer' - -# Overview - -## What are Components? - -Components are [Node.js modules](/components/contributing/api/#component-structure) that run on Pipedream's serverless infrastructure. They can use Pipedream managed auth for [{process.env.PUBLIC_APPS}+ apps](https://pipedream.com/explore) (for both OAuth and key-based APIs) and [use most npm packages](/components/contributing/api/#using-npm-packages) with no `npm install` or `package.json` required. - -Components are most commonly used as the building blocks of Pipedream workflows, but they can also be used like typical serverless functions. You can explore curated components for popular apps in Pipedream's [Marketplace](https://pipedream.com/explore) and [GitHub repo](https://github.com/PipedreamHQ/pipedream/tree/master/components) or you can author and share your own. - - -Our TypeScript component API is in **beta**. If you're interested in developing TypeScript components and providing feedback, [see our TypeScript docs](/components/contributing/typescript/). - - -## Component Types - -Pipedream supports two types of components โ€” [sources](#sources) and [actions](#actions). - -### Sources - -[Sources](/workflows/building-workflows/triggers/) must be instantiated and they run as independent resources on Pipedream. They are commonly used as workflow triggers (but can also be used as standalone serverless functions). - -**Capabilities** - -- Accept user input on deploy via `props` -- [Trigger](/components/contributing/api/#interface-props) on HTTP requests, timers, cron schedules, or manually -- Emit events that can be inspected, trigger Pipedream [workflows](/workflows/building-workflows/) and that can be consumed in your own app via [API](/rest-api/) -- Store and retrieve state using the [built-in key-value store](/components/contributing/api/#db) -- Use any of Pipedream's built-in [deduping strategies](/components/contributing/api/#dedupe-strategies) -- Deploy via Pipedream's UI, CLI or API - -**Example** - -The [New Files (Instant)](https://github.com/PipedreamHQ/pipedream/blob/master/components/google_drive/sources/new-files-instant/new-files-instant.mjs) source forย Google Drive is a prebuilt component in Pipedream's registry that can be deployed in seconds and emits an event every time a new file is added to the user's Google Drive, and can also be configured to watch for changes to a specific folder within that drive. Each new event that is emitted can be used to trigger a workflow. - -### Actions - -Actions are components that may be used as steps in a workflow. Unlike sources, actions cannot run independently (outside of a workflow). - -**Capabilities** - -- Accept user input via `props` -- May `return` JSON serializable data - -**Example** - -The Add Single Row action for Google Sheets is a prebuilt component in Pipedream's registry that can be added to a workflow and configured in seconds. Users can configure it in seconds and send workflow data to Google Sheets without having to learn the Google Sheets API. - -## Using Components - -Components may be instantiated or added to workflows via Pipedream's UI. - -- Sources may be instantiated and consumed via [UI](https://pipedream.com/sources/new), [CLI](/components/contributing/cli/reference/#pd-deploy) or API -- Actions may be added to [workflows](https://pipedream.com/new) - -### Using Private Actions - -Private action components published from the [CLI](/components/contributing/cli/reference/#pd-publish) or from a [Node.js Code Step](/workflows/building-workflows/code/nodejs/sharing-code/) are available for use across your workflows. - -To use a published action, add a new step to your workflow and click **My Actions**. Your privately published action components will appear in this list. - -![Use the "My Actions" section in a new step to include your private actions](/images/components/v3/using-private-actions.png) - -### Using Private Sources - -Private source components deployed from your account via the [CLI](/components/contributing/cli/reference/#pd-deploy) will automatically create a new Source in your account with the prop configuration you specified. - -Then in the workflow builder, when creating the trigger, select the *Existing* sources tab in the upper right corner to select your deployed source: - -![Selecting a pre-exisiting deployed source as the trigger for the workflow](/images/components/v3/using-private-sources.png) - -You can also deploy new instances of a source from the [Components dashboard](https://res.cloudinary.com/pipedreamin/image/upload/v1618550730/docs/components/image-20210411165325045_ia5sd5.png). To deploy a new instance of a source, click the menu on the right hand side and select **Create source**. - -![Creating a source from the Component dashboard](https://res.cloudinary.com/pipedreamin/image/upload/v1666106571/docs/CleanShot_2022-10-18_at_11.22.02_ajjopm.gif) - -## Developing Components - -Develop components locally using your preferred code editor (and maintain your code in your own GitHub repo) and deploy or publish using Pipedream's [CLI](/components/contributing/cli/reference/#pd-deploy). - -- Sources may be deployed directly from local code or published to your account and instantiated via Pipedream's UI -- Actions may only be published โ€” published actions may be added to workflows via Pipedream's UI - -Published components are only available to your own account by default. If published to a team account, the component (source or action) may be discovered and selected by any member of the team. - -### Prerequisites - -- A free [Pipedream](https://pipedream.com) account -- A free [GitHub](https://github.com) account -- Basic proficiency with Node.js or Javascript -- Pipedream [CLI](/components/contributing/cli/reference/) - -Finally, the target app must be integrated with Pipedream. You can explore all apps supported by Pipedream in the [marketplace](https://pipedream.com/explore). If your app is not listed, please [create a GitHub issue](https://github.com/PipedreamHQ/pipedream/issues/new?assignees=&labels=app%2C+enhancement&template=app---service-integration.md&title=%5BAPP%5D) to request it and [reach out](https://pipedream.com/community/c/dev/11) to our team to let us know that you're blocked on source or action development. - -### Quickstart Guides - -- [Sources](/components/contributing/sources-quickstart/) -- [Actions](/components/contributing/actions-quickstart/) - -### Component API Reference - -After getting familiar with source/action development using the quickstart guides, check out [the Component API Reference](/components/contributing/api/) and [examples on GitHub](https://github.com/PipedreamHQ/pipedream/tree/master/components) to learn more. - -## Managing Privately Published Components - -Components published to your workspace are available in the [Components](https://pipedream.com/components) section of the dashboard. - -Your private components published from the CLI or from Node.js code steps are listed here. - -### Unpublishing Privately Published Components - - - -To unpublish components belonging to your workspace, open the menu on the right hand side of the component details and select **Unpublish Component**. - -A prompt will open to confirm the action, click **Confirm** to unpublish your action. - -![Unpublish a component from your account by opening the menu on the right hand side](https://res.cloudinary.com/pipedreamin/image/upload/v1666103082/docs/components/CleanShot_2022-10-18_at_10.22.45_vdhoq7.gif) - - -Unpublishing a component is a permanent action, please be careful to ensure you still have access to the source code. - - -## Sharing Components - -Contribute to the Pipedream community by publishing and sharing new components, and contributing to the maintenance of existing components. - -### Verified Components - -Pipedream maintains a source-available registry of components (sources and actions) that have been curated for the community. Registered components are verified by Pipedream through the [GitHub PR process](/components/contributing/#contribution-process) and: - -- Can be trusted by end users -- Follow consistent patterns for usability -- Are supported by Pipedream if issues arise - -Registered components also appear in the Pipedream marketplace and are listed in Pipedream's UI when building workflows. - -### Community Components - -Developers may create, deploy and share components that do not conform to these guidelines, but they will not be eligible to be listed in the curated registry (e.g., they may be hosted in a Github repo). If you develop a component that does not adhere to these guidelines, but you believe there is value to the broader community, please [reach out in our community forum](https://pipedream.com/community/c/dev/11). diff --git a/docs-v2/pages/connect/_meta.tsx b/docs-v2/pages/connect/_meta.tsx deleted file mode 100644 index 60567f020b21e..0000000000000 --- a/docs-v2/pages/connect/_meta.tsx +++ /dev/null @@ -1,13 +0,0 @@ -export default { - "index": "Pipedream Connect", - "use-cases": "Use Cases", - "managed-auth": "Managed Auth", - "components": "Tool Use", - "mcp": "MCP", - "api-proxy": "API Proxy", - "workflows": "Workflows", - "api": "API & SDK Reference", - "migrating-from-project-keys-to-oauth": { - "display": "hidden", - }, -} as const diff --git a/docs-v2/pages/connect/api-proxy.mdx b/docs-v2/pages/connect/api-proxy.mdx deleted file mode 100644 index de509c094b0f9..0000000000000 --- a/docs-v2/pages/connect/api-proxy.mdx +++ /dev/null @@ -1,267 +0,0 @@ -import { Tabs } from 'nextra/components' -import Callout from '@/components/Callout' - -# Connect API Proxy - -Pipedream Connect provides a proxy API that you can use to send authenticated requests to any integrated API on behalf of your users. This is useful in a few scenarios: - -1. You need code-level control and you want to use [Pipedream's OAuth](/connect/managed-auth/oauth-clients/#using-pipedream-oauth) instead of [your own OAuth client](/connect/managed-auth/oauth-clients/#using-a-custom-oauth-client) -2. There isn't a [pre-built tool](/connect/components/) (action) for the app, or you need to modify the request -3. You want to avoid storing end user credentials in your app - -## Overview - -The Connect proxy enables you to interface with any integrated API and make authenticated requests on behalf of your users, without dealing with OAuth or storing end user credentials. - -1. You send a request to the proxy and identify the end user you want to act on behalf of -2. The proxy sends the request to the upstream API and dynamically inserts your end user's auth credentials -3. The proxy returns the response from the upstream API back to you - -![Connect API proxy visualization](https://res.cloudinary.com/pipedreamin/image/upload/v1741638299/connect-proxy-visual_nnccdk.png) - - -Before getting started with the Connect proxy, make sure you've already gone through the [managed auth quickstart](/connect/managed-auth/quickstart/) for Pipedream Connect. - - -## Getting started - -You can send requests to the Connect proxy using either the Pipedream SDK with a fetch-style interface or the Pipedream REST API. - -### Prerequisites - -- A [Pipedream OAuth client](/rest-api/auth/#oauth) to make authenticated requests to Pipedream's API -- Connect [environment](/connect/managed-auth/environments/) (ex, `production` or `development`) -- The [external user ID](/connect/api/#external-users) for your end user (ex, `abc-123`) -- The [account ID](/connect/api/#accounts) for your end user's connected account (ex, `apn_1234567`) - -Refer to the full Connect API [here](/connect/api/). - -### Authenticating on behalf of your users - -One of the core benefits of using the Connect API Proxy is not having to deal with storing or retrieving sensitive credentials for your end users. - -Since Pipedream has {process.env.PUBLIC_APPS}+ integrated apps, we know how the upstream APIs are expecting to receive access tokens or API keys. When you send a request to the proxy, Pipedream will look up the corresponding connected account for the relevant user, and **automatically insert the authorization credentials in the appropriate header or URL param**. - -### Sending requests - -When making requests to the Connect Proxy, you must provide the following parameters: - -#### Request parameters - -**URL** - -- The URL of the API you want to call (ex, `https://slack.com/api/chat.postMessage`) -- When using the REST API, this should be a URL-safe Base64 encoded string (ex, `aHR0cHM6Ly9zbGFjay5jb20vYXBpL2NoYXQucG9zdE1lc3NhZ2U`) - - -**For apps with dynamic domains** (like Zendesk, Zoho, GitLab), you should use relative paths in your proxy requests. Pipedream automatically resolves the correct domain based on the user's connected account. See [When to use relative vs full URLs](#when-to-use-relative-vs-full-urls) for details. - - -**HTTP method** - -- Use the HTTP method required by the upstream API - -**Body** - -- Optionally include a body to send to the upstream API - -**Headers** - -- If using the REST API, include the `Authorization` header with your Pipedream OAuth access token (`Bearer {access_token}`) -- Headers that contain the prefix `x-pd-proxy` will get forwarded to the upstream API - -#### Examples - - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: {development | production}, - projectId: {your_pipedream_project_id}, - credentials: { - clientId: {your_oauth_client_id}, - clientSecret: {your_oauth_client_secret} - }, -}); - - -const resp = await pd.makeProxyRequest( - { - searchParams: { - account_id: "{account_id}", // The account ID for your end user (ex, apn_1234567) - external_user_id: "{external_user_id}", // The external user ID for your end user - } - }, - { - url: "https://slack.com/api/chat.postMessage", // Include any query params you need; no need to Base64 encode the URL if using the SDK - options: { - method: "POST", - headers: { - hello: "world!" // Include any headers you need to send to the upstream API - }, - body: { - text: "hello, world", - channel: "C03NA8B4VA9" - }, - }, - } -) - -// Parse and return the data you need -console.log(resp); -``` - - -```bash -# First, obtain an OAuth access token to authenticate to the Pipedream API - -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{your_oauth_client_id}", - "client_secret": "{your_oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. - -curl -X POST "https://api.pipedream.com/v1/connect/{your_project_id}/proxy/{url_safe_base64_encoded_url}?external_user_id={external_user_id}&account_id={apn_xxxxxxx}" \ - -H "Authorization: Bearer {access_token}" \ - -H "x-pd-environment: {development | production}" \ - -d '{ - "text": "hello, world", - "channel": "C03NA8B4VA9" - }' - -# Parse and return the data you need -``` - - - -## Allowed domains - -The vast majority of apps in Pipedream work with the Connect Proxy. To check if an app is supported and what domains are allowed, use `pd.getApps()` or the [`/apps` REST API](/rest-api/#list-apps). - -### Understanding the Connect object - -Each app in the `/apps` API response includes a `connect` object: - -```json -{ - "id": "app_1Z2hw1", - "name_slug": "gitlab", - "name": "GitLab", - // ...other fields... - "connect": { - "proxy_enabled": true, - "allowed_domains": ["gitlab.com"], - "base_proxy_target_url": "https://{{custom_fields.base_api_url}}" - } -} -``` - -| Field | Description | -|-------|--------------| -| `proxy_enabled` | Whether the app supports the Connect Proxy | -| `allowed_domains` | Domains you can send requests to when using full URLs | -| `base_proxy_target_url` | The base URL for proxy requests, may contain placeholders for account-specific values | - -### When to use relative vs full URLs - -The format of `base_proxy_target_url` determines whether you should use a relative path or full URL: - -#### Apps with static domains - -If `base_proxy_target_url` is a standard URL (e.g., `https://slack.com`), you can use either: -- **Full URL**: `https://slack.com/api/chat.postMessage` -- **Relative path**: `/api/chat.postMessage` - -#### Apps with dynamic domains - -If `base_proxy_target_url` contains placeholders like `{{custom_fields.base_api_url}}`, you **must** use relative paths. This applies to: -- Self-hosted instances (GitLab) -- Apps with account-specific subdomains (Zendesk, Zoho) - -For these apps, Pipedream resolves the actual domain from the user's connected account at runtime. - -### Examples - - - -```javascript -// Both work -await pd.makeProxyRequest({...}, { - url: "https://slack.com/api/chat.postMessage" -}) - -await pd.makeProxyRequest({...}, { - url: "/api/chat.postMessage" -}) -``` - - -```javascript -// Must use relative path -await pd.makeProxyRequest({...}, { - url: "/api/v4/projects" // Pipedream resolves to the end user's GitLab instance -}) -``` - - - -### Discovering app support programmatically - - - -```javascript -const apps = await pd.getApps() - -// Filter for apps that support the proxy -const proxyEnabledApps = apps.filter(app => app.connect?.proxy_enabled) -``` - - -```bash -curl https://api.pipedream.com/v1/apps \ - -H "Authorization: Bearer " -``` - -Filter the response for apps where `connect.proxy_enabled` is `true`. - - - -## Restricted headers - -The following headers are not allowed when making requests through the Connect API Proxy. Requests that include these headers will be rejected with a `400` error: - -- `ACCEPT-ENCODING` -- `ACCESS-CONTROL-REQUEST-HEADERS` -- `ACCESS-CONTROL-REQUEST-METHOD` -- `CONNECTION` -- `CONTENT-LENGTH` -- `COOKIE` -- `DATE` -- `DNT` -- `EXPECT` -- `HOST` -- `KEEP-ALIVE` -- `ORIGIN` -- `PERMISSIONS-POLICY` -- `REFERER` -- `TE` -- `TRAILER` -- `TRANSFER-ENCODING` -- `UPGRADE` -- `VIA` -- `NOTE` -- Headers starting with `PROXY-` -- Headers starting with `SEC-` - -## Limits - -- The Connect Proxy limits API requests to 1,000 requests per 5 minutes per project. Requests that surpass this limit will receive a `429` response. -- The maximum timeout for a request is 30 seconds. Requests that take longer than 30 seconds will be terminated, and Pipedream will return a `504` error to the caller. - -Please [let us know](https://pipedream.com/support) if you need higher limits. diff --git a/docs-v2/pages/connect/api.mdx b/docs-v2/pages/connect/api.mdx deleted file mode 100644 index a679a71850e27..0000000000000 --- a/docs-v2/pages/connect/api.mdx +++ /dev/null @@ -1,3730 +0,0 @@ -import Callout from '@/components/Callout' -import { Tabs } from 'nextra/components' - -# Connect API & SDK reference - -Pipedream provides a TypeScript SDK and a REST API to interact with the Connect service. You'll find examples using the SDK and the REST API in multiple languages below. - -## REST API base URL - -Pipedream Connect resources are scoped to [projects](/projects/), so you'll need to pass [the project's ID](/projects/#finding-your-projects-id) as a part of the base URL: - -``` -https://api.pipedream.com/v1/connect/{project_id} -``` - -## Installing the TypeScript SDK - -Pipedream's SDK will work in any browser or server that can run JavaScript. - -### npm - -To install [the SDK](https://www.npmjs.com/package/@pipedream/sdk) from npm, run: - -```bash -npm i --save @pipedream/sdk -``` - -### ` -``` - -or a specific version: - -```html - -``` - -## Authentication - -See the [REST API Authentication docs](/rest-api/auth/). - -### TypeScript SDK (server) - -Most of your interactions with the Connect API will happen on the server, to protect API requests and user credentials. You'll use the SDK in [your frontend](#typescript-sdk-browser) to let users connect accounts. Once connected, you'll use the SDK on the server to retrieve credentials, invoke workflows on their behalf, and more. - -[Create a Pipedream OAuth client](/rest-api/auth/#oauth) and instantiate the SDK with your client ID and secret: - -```typescript -import { createBackendClient } from "@pipedream/sdk/server"; - -// These secrets should be saved securely and passed to your environment -const pd = createBackendClient({ - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - } -}); - -// The `pd` client provides methods to interact with the Connect API โ€”ย see below -``` - -### TypeScript SDK (browser) - -You'll primarily use the browser SDK to let your users securely connect apps from your frontend. Here, you - -1. [Create a short-lived token on your server](#create-token) -2. Initiate auth with that token to securely connect an account for a specific user - -Here's a Next.js example [from our quickstart](/connect/managed-auth/quickstart/): - -```typescript -import { createFrontendClient } from "@pipedream/sdk/browser" -// Example from our Next.js app -import { serverConnectTokenCreate } from "./server" - -const { token, expires_at } = await serverConnectTokenCreate({ - external_user_id: externalUserId // The end user's ID in your system -}); - -export default function Home() { - const pd = createFrontendClient() - function connectAccount() { - pd.connectAccount({ - app: appSlug, // Pass the app name slug of the app you want to integrate - oauthAppId: appId, // For OAuth apps, pass the OAuth app ID; omit this param to use Pipedream's OAuth client or for key-based apps - token, // The token you received from your server above - onSuccess: ({ id: accountId }) => { - console.log(`Account successfully connected: ${accountId}`) - } - }) - } - - return ( -
- -
- ) -} -``` - -## Environment - -Some API endpoints accept an [environment](/connect/managed-auth/environments/) parameter. This lets you specify the environment (`production` or `development`) where resources will live in your project. - -Always set the environment when you create the SDK client: - -```typescript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "your-oauth-client-id", - clientSecret: "your-oauth-client-secret", - } -}); -``` - -or pass the `X-PD-Environment` header in HTTP requests: - -```bash -curl -X POST https://api.pipedream.com/v1/connect/{project_id}/tokens \ - -H "Content-Type: application/json" \ - -H "X-PD-Environment: development" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "external_user_id": "your-external-user-id" - }' -``` - -## External users - -When you use the Connect API, you'll pass an `external_user_id` parameter when initiating account connections and retrieving credentials. This is your user's ID, in your system โ€” whatever you use to uniquely identify them. - -Pipedream associates this ID with user accounts, so you can retrieve credentials for a specific user, and invoke workflows on their behalf. - -External User IDs are limited to 250 characters. - -## Rate limits - -### Pipedream rate limits - -| API Endpoint | Rate Limit | -|----------------------------|------------------------------------------------------| -| `POST /token` | 100 requests per minute per `external_user_id` | -| `/accounts/*` | 100 requests per minute per project | -| `POST /components/*` | 100 requests per minute per project* | -| `GET /components/*` | 3000 requests per 5 minutes per project* | -| `/proxy` | 1000 requests per 5 minutes per project | - -\* This includes requests to, `/components`, `/actions`, `/triggers`. - -If you need higher rate limits, please [reach out](https://pipedream.com/support). - -### Developer rate limits - -- You can optionally set rate limits for your users to control their usage of the Connect API from within your application, to prevent runaway use or abuse. -- Specify a time window in seconds and how many requests to allow in that window. The API will give you a `rate_limit_token` that you'll need to include in future `/connect/` requests: - -``` -POST /rate_limits -``` - -**Body parameters** - -`window_size_seconds` **integer** - -Define the size of the time window in seconds. - ---- - -`requests_per_window` **integer** - -Define the number of requests you want to allow per time window. - -**Example request** - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# Define the rate limit parameters - -curl -X POST https://api.pipedream.com/v1/connect/rate_limits \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "window_size_seconds": 10, - "requests_per_window": 1000 - }' -``` - -**Example response** -```json -{ - "token": "CiKpqRdTmNwLfhzSvYxBjAkMnVbXuQrWeZyHgPtJsDcEvFpLnE" -} -``` - -**Example usage** - -```bash -# The response will include a rate limit token. -# Pass it as a header in your downstream requests to the Connect API. -# Below is an example request that runs the "List Commits" action for the Gitlab app. - -curl -X POST "https://api.pipedream.com/v1/connect/{your_project_id}/actions/run" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -H "x-pd-rate-limit: {rate_limit_token}" \ # Pass the rate limit token in the header - -d '{ - "external_user_id": "jverce", - "id": "gitlab-list-commits", - "configured_props": { - "gitlab": { - "authProvisionId": "apn_kVh9AoD" - }, - "projectId": 45672541, - "refName": "main" - }, - "stash_id": "" - }' -``` - -## API Reference - -### Tokens - -Your app will initiate the account connection flow for your end users in your frontend. To securely scope connection to a specific end user, on your server, **you retrieve a short-lived token for that user**, and return that token to your frontend. - -See [the Connect tokens docs](/connect/tokens/) for more information. - -#### Create token - -``` -POST /{project_id}/tokens -``` - -##### Path parameters - -`project_id` **string** - -[The project's ID](/projects/#finding-your-projects-id) - -##### Body parameters - -`external_user_id` **string** - -The ID of your end user. Use whatever ID uniquely identifies the user in your system. - ---- - -`allowed_origins` **string array** - -When using the Connect API to make requests from a client environment like a browser, you must specify the allowed origins for the token. Otherwise, this field is optional. This is a list of URLs that are allowed to make requests with the token. For example: - -```json -{ - "allowed_origins": ["http://localhost:3000", "https://example.com"] -} -``` ---- - -`success_redirect_uri` **string** (_optional_) - -When using [Connect Link](/connect/connect-link/), you can optionally redirect your end user to the `success_redirect_uri` on successful completion of the auth flow. - ---- - -`error_redirect_uri` **string** (_optional_) - -When using [Connect Link](/connect/connect-link/), you can optionally redirect your end user to the `error_redirect_uri` on any errors in the auth flow. This lets you handle errors in whatever way you want in your own app. - ---- - -`webhook_uri` **string** (_optional_) - -Pipedream will send events on successful auth, or any errors, to this URL via webhook. [See the webhooks docs](/connect/webhooks/) for more information. - -##### Examples - -To create a short-lived token via TypeScript / JavaScript SDK, you'll need to create a Pipedream API client and call the `createConnectToken` method. In our example app, this code is in `app/server.ts`. - -In other languages, you'll need to make an HTTP POST request to the `/tokens` endpoint to create a token, then return the token to your frontend. Click into other tabs to see examples in additional languages. - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type ConnectAPIResponse, - type ConnectTokenCreateOpts, - type ConnectTokenResponse, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -const requestOpts: ConnectTokenCreateOpts = { - // The end user's ID in your system - external_user_id: "{your_external_user_id}", - // The allowed origins for the token (required for client-side requests) - allowed_origins: ["http://localhost:3000", "https://example.com"], -}; -const response: ConnectTokenResponse = await pd.createConnectToken(requestOpts); - -const { - token, // The token you'll pass to the frontend - expires_at, // The token's expiration date - connect_link_url, // The URL to redirect the user to for the Connect Link flow -}: { - token: string, - expires_at: string, - connect_link_url: string, -} = response; -``` - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -const { token, expires_at } = await pd.createConnectToken({ - external_user_id: "{your_external_user_id}", // The end user's ID in your system - allowed_origins: ["http://localhost:3000", "https://example.com"], // The allowed origins for the token (required for client-side requests) -}); -``` - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. - -curl -X POST https://api.pipedream.com/v1/connect/{project_id}/tokens \ - -H "Content-Type: application/json" \ - -H "X-PD-Environment: development" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "external_user_id": "{your_external_user_id}", - "allowed_origins": [ - "http://localhost:3000", - "https://example.com" - ], - }' -``` - - - -### Accounts - -#### List All Accounts - -List all connected accounts for all external users within a project. - -``` -GET /{project_id}/accounts/ -``` - -##### Path parameters - -`project_id` **string** - -[The project's ID](/projects/#finding-your-projects-id) - -##### Query parameters - -`app` **string** (_optional_) - -The ID or name slug the app you'd like to retrieve. For example, Slack's unique app ID is `app_OkrhR1`, and its name slug is `slack`. - -You can find the app's ID in the response from the [List apps](/rest-api/#list-apps) endpoint, and the name slug under the **Authentication** section of any [app page](https://pipedream.com/apps). - ---- - -`oauth_app_id` **string** (_optional_) - -The ID of the [OAuth app](/connect/managed-auth/quickstart/#create-a-pipedream-oauth-client) you'd like to retrieve accounts for. - ---- - -`external_user_id` **string** (_optional_) - -[The external user ID](/connect/api/#external-users) in your system that you want to retrieve accounts for. - ---- - -`include_credentials` **boolean** (_optional_) - -Pass `include_credentials=true` as a query-string parameter to include the account credentials in the response. - - -Never return user credentials to the client - - - -To retrieve credentials for a connected account for **OAuth** apps (Slack, Google Sheets, etc), the connected account must be using [your own OAuth client](/connect/managed-auth/oauth-clients/#using-a-custom-oauth-client). - - -##### Examples - - - -```typescript -import { - createBackendClient, - type Account, - type BackendClientOpts, - type BackendClient, - type GetAccountOpts, - type GetAccountsResponse, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -const requestOpts: GetAccountOpts = { - app: "github", // optional, filter by app - external_user_id: "user-abc-123", // optional, filter by external user ID - include_credentials: true, // optional, set to true to include credentials -}; -const response: GetAccountsResponse = await pd.getAccounts(requestOpts); - -// These may contain credentials, which you should never return to the client -const { - data -}: { - data: Account[] -} = response; -``` - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -const accounts = await pd.getAccounts({ - app: "github", // optional, filter by app - external_user_id: "user-abc-123", // optional, filter by external user ID - include_credentials: true, // optional, set to true to include credentials -}); - -// Parse and return the data you need. These may contain credentials, -// which you should never return to the client -``` - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. - -curl -X GET \ - -G \ - "https://api.pipedream.com/v1/connect/{project_id}/accounts" \ - -H "Authorization: Bearer {access_token}" \ - -d "app=github" \ # optional, filter by app - -d "external_user_id=user-abc-123" \ # optional, filter by external user ID - -d "include_credentials=true" # optional, include credentials - - -# Parse and return the data you need. These may contain credentials, -# which you should never return to the client -``` - - - -##### Example response (without credentials) - -```json -{ - "page_info": { - "total_count": 5, - "count": 5, - "start_cursor": "YXBuX0JtaEJKSm0", - "end_cursor": "YXBuX1YxaE1lTE0", - }, - "data": { - "accounts": [ - { - "id": "apn_XehyZPr", - "name": null, - "external_id": "user-abc-123", - "healthy": true, - "dead": false, - "app": { - "id": "app_OkrhR1", - "name": "Slack" - }, - "created_at": "2024-07-30T22:52:48.000Z", - "updated_at": "2024-08-01T03:44:17.000Z" - }, - { - "id": "apn_b6h9QDK", - "name": null, - "external_id": "user-abc-123", - "healthy": true, - "dead": false, - "app": { - "id": "app_OrZhaO", - "name": "GitHub" - }, - "created_at": "2024-07-31T02:49:18.000Z", - "updated_at": "2024-08-01T03:58:17.000Z" - }, - { - "id": "apn_0WhJYxv", - "name": null, - "external_id": "user-abc-123", - "healthy": true, - "dead": false, - "app": { - "id": "app_OrZhaO", - "name": "GitHub" - }, - "created_at": "2024-07-31T20:28:16.000Z", - "updated_at": "2024-08-01T03:47:30.000Z" - }, - { - "id": "apn_kVh9PJx", - "name": null, - "external_id": "user-abc-123", - "healthy": true, - "dead": false, - "app": { - "id": "app_OrZhaO", - "name": "GitHub" - }, - "created_at": "2024-07-31T21:17:03.000Z", - "updated_at": "2024-08-01T03:43:23.000Z" - }, - { - "id": "apn_WYhMlrz", - "name": null, - "external_id": "user-abc-123", - "healthy": true, - "dead": false, - "app": { - "id": "app_XBxhAl", - "name": "Airtable" - }, - "created_at": "2024-08-01T04:04:03.000Z", - "updated_at": "2024-08-01T04:04:03.000Z" - } - ] - } -} -``` - -##### Example response (with credentials) - -```json -{ - "page_info": { - "total_count": 1, - "count": 1, - "start_cursor": "YXBuX0JtaEJKSm0", - "end_cursor": "YXBuX1YxaE1lTE0", - }, - "data": { - "accounts":[ - { - "id": "apn_MGhvgnX", - "name": "gcostanza", - "external_id": "user-abc-123", - "healthy": true, - "dead": null, - "app": { - "id": "oa_aPXiQd", - "name_slug": "github", - "name": "GitHub", - "auth_type": "oauth", - "description": "Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHubโ€”the largest and most advanced development platform in the world.", - "img_src": "https://assets.pipedream.net/s.v0/app_OrZhaO/logo/orig", - "custom_fields_json": "[]", - "categories": [ - "Developer Tools" - ] - }, - "created_at": "2024-12-03T04:26:38.000Z", - "updated_at": "2024-12-11T17:59:28.000Z", - "credentials": { - "oauth_client_id": "xyz789...", - "oauth_access_token": "xxx_abc123...", - "oauth_uid": "123456789" - }, - "expires_at": null, - "error": null, - "last_refreshed_at": "2024-12-11T17:59:28.000Z", - "next_refresh_at": "2024-12-11T18:56:28.000Z" - } - ] - } -} -``` - -#### Retrieve Account Details by ID - -Retrieve the account details for a specific account based on the account ID - -``` -GET /{project_id}/accounts/{account_id} -``` - -##### Path parameters - -`project_id` **string** - -[The project's ID](/projects/#finding-your-projects-id) - ---- - -`account_id` **string** - -The ID of the account you want to retrieve - -##### Parameters - -`include_credentials` **boolean** (_optional_) - -Pass `include_credentials=true` as a query-string parameter to include the account credentials in the response. - - -Never return user credentials to the client - - - -To retrieve credentials for a connected account for **OAuth** apps (Slack, Google Sheets, etc), the connected account must be using [your own OAuth client](/connect/managed-auth/oauth-clients/#using-a-custom-oauth-client). - - -##### Examples - - - -```typescript -import { - createBackendClient, - type Account, - type BackendClient, - type BackendClientOpts, - type GetAccountOpts, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -const accountId: string = "{account_id}"; // Replace with your account ID -const requestOpts: GetAccountOpts = { - include_credentials: true, // optional, set to true to include credentials -}; -// These may contain credentials, which you should never return to the client. -const account: Account = await pd.getAccountById(accountId, requestOpts); -``` - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -const accountId = "{account_id}"; // Replace with your account ID - -const account = await pd.getAccountById(accountId, { - include_credentials: true, // optional, set to true to include credentials -}); - -// Parse and return the data you need. These may contain credentials, -// which you should never return to the client -``` - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. - -curl -X GET \ - -G \ - "https://api.pipedream.com/v1/connect/{project_id}/accounts/{account_id}" \ - -H "Authorization: Bearer {access_token}" \ - -d "app=github" \ # optional, filter by app - -d "external_user_id=user-abc-123" \ # optional, filter by external user ID - -d "include_credentials=true" # optional, include credentials - -# Parse and return the data you need. These may contain credentials, -# which you should never return to the client -``` - - - -##### Example response (without account credentials) - -```json -{ - "data": { - "id": "apn_WYhMlrz", - "name": null, - "external_id": "user-abc-123", - "healthy": true, - "dead": false, - "app": { - "id": "oa_aw4ib2", - "name_slug": "airtable_oauth", - "name": "Airtable", - "auth_type": "oauth", - "description": "Airtable is a low-code platform to build next-gen apps. Move beyond rigid tools, operationalize your critical data, and reimagine workflows with AI.", - "img_src": "https://assets.pipedream.net/s.v0/app_XBxhAl/logo/orig", - "custom_fields_json": "[]", - "categories": ["Productivity"] - }, - "created_at": "2024-08-01T04:04:03.000Z", - "updated_at": "2024-08-01T04:04:03.000Z" - } -} -``` - -##### Example response (with `include_credentials=true`) - -```json -{ - "data": { - "id": "apn_WYhMlrz", - "name": null, - "external_id": "user-abc-123", - "healthy": true, - "dead": false, - "app": { - "id": "app_XBxhAl", - "name": "Airtable" - }, - "created_at": "2024-08-01T04:04:03.000Z", - "updated_at": "2024-08-01T04:04:03.000Z", - "credentials": { - "oauth_client_id": "dd7a26ca-ba11-4f80-8667-xxxxxxxx", - "oauth_access_token": "oaaLa2Ob1umiregWa.v1.xxxxxxxx.xxxxxxxx", - "oauth_refresh_token": "oaaLa2Ob1umiregWa.v1.refresh.xxxxxxxx", - "oauth_uid": "usrnbIhrxxxxxxxx" - }, - "expires_at": "2024-08-01T05:04:03.000Z", - "project_id": 279440, - "user_id": "gcostanza", - "error": null, - "last_refreshed_at": null, - "next_refresh_at": "2024-08-01T04:17:33.000Z" - } -} -``` - -#### Delete Connected Account - -Delete a specific connected account for an external user, and any deployed triggers. - -``` -DELETE /{project_id}/accounts/{account_id} -``` - -##### Path parameters - -`project_id` **string** - -[The project's ID](/projects/#finding-your-projects-id) - ---- - -`account_id` **string** - -##### Examples - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -const accountId: string = "{account_id}"; // Replace with your account ID -await pd.deleteAccount(accountId); - -// You can return a message or handle any post-deletion logic here. -``` - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -const accountId = "{account_id}"; // Replace with your account ID -await pd.deleteAccount(accountId); - -// You can return a message or handle any post-deletion logic here. -``` - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. - -curl -X DELETE "https://api.pipedream.com/v1/connect/{project_id}/accounts/{account_id}" \ - -H "Authorization: Bearer {access_token}" -``` - - - -##### Response - -Pipedream returns a `204 No Content` response on successful account deletion - -#### Delete All Connected Accounts for an App - -Delete all connected accounts for a specific app - -``` -DELETE /{project_id}/apps/{app_id}/accounts -``` - -##### Path parameters - -`project_id` **string** - -[The project's ID](/projects/#finding-your-projects-id) - ---- - -`app_id` **string** - -The app ID for which you want to delete all connected accounts. `app_id` can be `oauth_app_id` for [OAuth apps](/connect/managed-auth/quickstart/#create-a-pipedream-oauth-client) or name slug for key-based apps, which you can find under the **Authentication** section of any [app page](https://pipedream.com/apps) - -##### Examples - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -const appId: string = "{app_id}"; // Replace with the app ID -await pd.deleteAccountsByApp(appId); - -// You can return a message or handle any post-deletion logic here. -``` - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -const appId = "{app_id}"; // Replace with the app ID -await pd.deleteAccountsByApp(appId); - -// You can return a message or handle any post-deletion logic here. -``` - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. - -curl -X DELETE "https://api.pipedream.com/v1/connect/{project_id}/accounts/{account_id}" \ - -H "Authorization: Bearer {access_token}" -``` - - - -##### Response - -Pipedream returns a `204 No Content` response on successful account deletion - -#### Delete External User - -Delete an external user, all their connected accounts, and any deployed triggers. - -``` -DELETE /{project_id}/users/{external_user_id} -``` - -##### Path parameters - -`project_id` **string** - -[The project's ID](/projects/#finding-your-projects-id) - ---- - -`external_user_id` **string** - -[The external user ID](#external-users) in your system - -##### Examples - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -const externalId: string = "{external_user_id}"; // Replace with your external user ID -await pd.deleteExternalUser(externalId); - -// You can return a message or handle any post-deletion logic here. -``` - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -const externalId = "{external_user_id}"; // Replace with your external user ID -await pd.deleteExternalUser(externalId); - -// You can return a message or handle any post-deletion logic here. -``` - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. - -curl -X DELETE "https://api.pipedream.com/v1/connect/{project_id}/users/{external_user_id}" \ - -H "Authorization: Bearer {access_token}" -``` - - - -##### Response - -Pipedream returns a `204 No Content` response on successful account deletion - - -### Components - -#### List Components - -List all the components in the Pipedream registry. - -``` -GET /{component_type} -``` - -##### Path parameters - -`component_type` **string** - -Either `triggers`, `actions`, or `components`. - -##### Query parameters - -`app` **string** (_optional_) - -The ID or name slug the app you'd like to retrieve. For example, Slack's unique -app ID is `app_OkrhR1`, and its name slug is `slack`. - -You can find the app's ID in the response from the [List -apps](/rest-api/#list-apps) endpoint, and the name slug under the -**Authentication** section of any [app page](https://pipedream.com/apps). - ---- - -`q` **string** (_optional_) - -A search query to filter the components by key (see the [component structure -table](/components/contributing/api/#component-structure)). - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type GetComponentsOpts, - type GetComponentsResponse, - type V1Component, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// Retrieve components containing the word "issue" in their name, belonging to -// the Gitlab app -const requestOpts: GetComponentsOpts = { - app: "gitlab", - q: "issue", -}; -const response: GetComponentsResponse = await pd.getComponents(requestOpts); - -const { - data // The list of components for the Gitlab app and query `q` -}: { - data: Omit[]; -} = response; -``` - - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// Retrieve components containing the word "issue" in their name, belonging to -// the Gitlab app -const { data: components } = await pd.getComponents({ - app: "gitlab", - q: "issue", -}); - -// Parse and return the data you need -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will fetch the first 3 components for the Gitlab app that contain -# the word "issue" in their name -curl -X GET "https://api.pipedream.com/v1/connect/{your_project_id}/components?app=gitlab&limit=3&q=issue" \ - -H "Authorization: Bearer {access_token}" -``` - - - - -##### Example response -```json -{ - "page_info": { - "total_count": 5, - "count": 3, - "start_cursor": "c2NfM3ZpanpRcg", - "end_cursor": "c2NfQjVpTkJBcA" - }, - "data": [ - { - "name": "New Issue (Instant)", - "version": "0.1.2", - "key": "gitlab-new-issue" - }, - { - "name": "Update Issue", - "version": "0.0.2", - "key": "gitlab-update-issue" - }, - { - "name": "Search Issues", - "version": "0.0.3", - "key": "gitlab-search-issues" - } - ] -} -``` - - -#### Retrieve Component - -Retrieve a specific component from the Pipedream registry. - -``` -GET /{component_type}/{component_key} -``` - -##### Path parameters - -`component_type` **string** - -Either `triggers`, `actions`, or `components`. - ---- - -`component_key` **string** - -The key that identifies the component (see the [component structure -table](/components/contributing/api/#component-structure)). - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type GetComponentOpts, - type GetComponentResponse, - type V1Component, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// Retrieve the "New Issue (Instant)" component for the Gitlab app -const requestOpts: GetComponentOpts = { - key: "gitlab-new-issue", -}; -const response: GetComponentResponse = await pd.getComponent(requestOpts); - -const { - data // The "New Issue (Instant)" component for the Gitlab app -}: { - data: V1Component; -} = response; -``` - - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// Retrieve the "New Issue (Instant)" component for the Gitlab app -const { data: component } = await pd.getComponent({ key: "gitlab-new-issue" }); - -// Parse and return the data you need -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will fetch the "New Issue (Instant)" component for the Gitlab app. -curl -X GET "https://api.pipedream.com/v1/connect/{your_project_id}/components/gitlab-new-issue" \ - -H "Authorization: Bearer {access_token}" -``` - - - -##### Example response - -```json -{ - "data": { - "name": "New Issue (Instant)", - "version": "0.1.2", - "key": "gitlab-new-issue", - "configurable_props": [ - { - "name": "gitlab", - "type": "app", - "app": "gitlab" - }, - { - "name": "db", - "type": "$.service.db" - }, - { - "name": "http", - "type": "$.interface.http", - "customResponse": true - }, - { - "name": "projectId", - "type": "integer", - "label": "Project ID", - "description": "The project ID, as displayed in the main project page", - "remoteOptions": true - } - ] - } -} -``` - - - - -#### Configure Component - -Configure the a component's prop, based on the current component's -configuration. This endpoint will use the component's configuration to retrieve -the list of options that can be used to configure the prop indicated in the -request. - -```text -POST /{component_type}/configure -``` - -##### Path parameters - -`component_type` **string** - -Either `triggers`, `actions`, or `components`. - -##### Body parameters - -`configured_props` **object** - -The props that have already been configured for the component. This is a -JSON-serializable object with the prop names as keys and the configured values -as values. - ---- - -`external_user_id` **string** - -[The external user ID](/connect/api/#external-users) in your system that you -want to retrieve accounts for. - ---- - -`id` **string** - -The key that identifies the component (see the [component structure -table](/components/contributing/api/#component-structure)). - ---- - -`prop_name` **string** - -The name of the component's prop to configure. - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type ConfigureComponentOpts, - type ConfigureComponentResponse, - type PropOption, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// Retrieve the configuration options for the "projectId" prop of the "List -// Commits" component for the Gitlab app. -const requestOpts: ConfigureComponentOpts = { - componentId: "gitlab-list-commits", - configuredProps: { - gitlab: { - authProvisionId: "apn_kVh9AoD", - }, - }, - externalUserId: "jverce", - propName: "projectId", -}; -const response: ConfigureComponentResponse = await pd.configureComponent(requestOpts); - -const { - options, // The list of options for the "projectId" prop - stringOptions, // The list of string options for the "projectId" prop - errors, // Any errors that occurred during the configuration -}: { - options: PropOption[]; - stringOptions: string[]; - errors: string[]; -} = response; -``` - - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// Retrieve the configuration options for the "projectId" prop of the "List -// Commits" component for the Gitlab app. -const { options } = await pd.configureComponent({ - componentId: "gitlab-list-commits", - configuredProps: { - gitlab: { - authProvisionId: "apn_kVh9AoD", - }, - }, - externalUserId: "jverce", - propName: "projectId", -}); - -// Parse and return the data you need -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will fetch the configuration options for the "projectId" prop of -# the "List Commits" component for the Gitlab app. - -echo '{ - "external_user_id": "jverce", - "id": "gitlab-list-commits", - "prop_name": "projectId", - "configured_props": { - "gitlab": { - "authProvisionId": "apn_kVh9AoD" - } - } -}' > data.json - -curl -X POST "https://api.pipedream.com/v1/connect/{your_project_id}/components/configure" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -d @data.json -``` - - - - -##### Example response - -```json -{ - "observations": [], - "context": null, - "options": [ - { - "label": "jverce/foo-massive-10231-1", - "value": 45672541 - }, - { - "label": "jverce/foo-massive-10231", - "value": 45672514 - }, - { - "label": "jverce/foo-massive-14999-2", - "value": 45672407 - }, - { - "label": "jverce/foo-massive-14999-1", - "value": 45672382 - }, - { - "label": "jverce/foo-massive-14999", - "value": 45672215 - }, - { - "label": "jverce/gitlab-development-kit", - "value": 21220953 - }, - { - "label": "jverce/gitlab", - "value": 21208123 - } - ], - "errors": [], - "timings": { - "api_to_sidekiq": 1734043172355.1042, - "sidekiq_received": 1734043172357.867, - "sidekiq_to_lambda": 1734043172363.6812, - "sidekiq_done": 1734043173461.6406, - "lambda_configure_prop_called": 1734043172462, - "lambda_done": 1734043173455 - }, - "stringOptions": null -} -``` - -#### Reload Component Props - -Reload the component's props after configuring a dynamic prop, based on the -current component's configuration. This endpoint will use the component's -configuration to retrieve a new list of props depending on the value of the -props that were configured so far. See the [Dynamic -Props](/connect/components/#configure-dynamic-props-optional) section for more information. - -```text -POST /{component_type}/props -``` - -##### Path parameters - -`component_type` **string** - -Either `triggers`, `actions`, or `components`. - -##### Body parameters - -`configured_props` **object** - -The props that have already been configured for the component. This is a -JSON-serializable object with the prop names as keys and the configured values -as values. - ---- - -`external_user_id` **string** - -[The external user ID](/connect/api/#external-users) in your system that you -want to retrieve accounts for. - ---- - -`id` **string** - -The key that identifies the component (see the [component structure -table](/components/contributing/api/#component-structure)). - ---- - -`dynamic_props_id` **string** (_optional_) - -The ID of the last prop reconfiguration (or none when reconfiguring the props -for the first time). - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type ConfigurableProps, - type ReloadComponentPropsOpts, - type ReloadComponentPropsResponse, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// Retrieve the configuration options for the "Add Single Row" component for -// the Google Sheets app. Note that the `sheetId` prop is a dynamic prop. -const requestOpts: ReloadComponentPropsOpts = { - componentId: "google_sheets-add-single-row", - configuredProps: { - googleSheets: { - authProvisionId: "apn_V1hMoE7", - }, - sheetId: "1BfWjFF2dTW_YDiLISj5N9nKCUErShgugPS434liyytg", - }, - externalUserId: "jay", -}; -const response: ReloadComponentPropsResponse = await pd.reloadComponentProps(requestOpts); - -const { - configurableProps, // The new set of props - id: dynamicPropsId, // The ID of the last prop reconfiguration -}: { - configurableProps: ConfigurableProps, - id: string, -} = response.dynamicProps; -``` - - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// Retrieve the configuration options for the "Add Single Row" component for -// the Google Sheets app. Note that the `sheetId` prop is a dynamic prop. -const { dynamicProps } = await pd.reloadComponentProps({ - componentId: "google_sheets-add-single-row", - configuredProps: { - googleSheets: { - authProvisionId: "apn_V1hMoE7", - }, - sheetId: "1BfWjFF2dTW_YDiLISj5N9nKCUErShgugPS434liyytg", - }, - externalUserId: "jay", -}); - -const { - configurableProps, // The new set of props - id: dynamicPropsId, // The ID of the last prop reconfiguration -} = dynamicProps; - -// Parse and return the data you need -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will fetch the new set of props for the "Add Single Row" component -# for the Google Sheets app. Note that the `sheetId` prop is a dynamic prop. - -echo '{ - "external_user_id": "jay", - "id": "google_sheets-add-single-row", - "configured_props": { - "googleSheets": { - "authProvisionId": "apn_V1hMoE7" - }, - "sheetId": "1BfWjFF2dTW_YDiLISj5N9nKCUErShgugPS434liyytg" - } -}' > data.json - -curl -X POST "https://api.pipedream.com/v1/connect/{your_project_id}/components/props" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -d @data.json -``` - - - - -##### Example response - -```json -{ - "observations": [], - "errors": [], - "dynamicProps": { - "id": "dyp_6xUyVgQ", - "configurableProps": [ - { - "name": "googleSheets", - "type": "app", - "app": "google_sheets" - }, - { - "name": "drive", - "type": "string", - "label": "Drive", - "description": "Defaults to `My Drive`. To select a [Shared Drive](https://support.google.com/a/users/answer/9310351) instead, select it from this list.", - "optional": true, - "default": "My Drive", - "remoteOptions": true - }, - { - "name": "sheetId", - "type": "string", - "label": "Spreadsheet", - "description": "The Spreadsheet ID", - "useQuery": true, - "remoteOptions": true, - "reloadProps": true - }, - { - "name": "worksheetId", - "type": "string[]", - "label": "Worksheet(s)", - "description": "Select a worksheet or enter a custom expression. When referencing a spreadsheet dynamically, you must provide a custom expression for the worksheet.", - "remoteOptions": true, - "reloadProps": true - }, - { - "name": "hasHeaders", - "type": "boolean", - "label": "Does the first row of the sheet have headers?", - "description": "If the first row of your document has headers, we'll retrieve them to make it easy to enter the value for each column. Note: When using a dynamic reference for the worksheet ID (e.g. `{{steps.foo.$return_value}}`), this setting is ignored.", - "reloadProps": true - }, - { - "name": "myColumnData", - "type": "string[]", - "label": "Values", - "description": "Provide a value for each cell of the row. Google Sheets accepts strings, numbers and boolean values for each cell. To set a cell to an empty value, pass an empty string." - } - ] - } -} -``` - -#### Invoke Action - -Invoke an action component for a Pipedream Connect user in a project. - -```text -POST /actions/run -``` - -##### Body parameters - -`id` **string** - -The key that identifies the action component (see the [component structure -table](/components/contributing/api/#component-structure)). - ---- - -`configured_props` **object** - -The props that have already been configured for the component. This is a -JSON-serializable object with the prop names as keys and the configured values -as values. - ---- - -`external_user_id` **string** - -[The external user ID](/connect/api/#external-users) in your system on behalf of -which you want to execute the action. - ---- - -`dynamic_props_id` **string** (_optional_) - -The ID of the last prop reconfiguration (if applicable). - ---- - -`stash_id` **string|boolean** (_optional_) - -When passed, this parameter enables [File Stash](/connect/components/files), which syncs files from the `/tmp` directory with a Pipedream File Store. This makes files accessible outside of the execution environment via presigned URLs. - -You can pass one of the following values: -- An empty string (`""`) to generate a new stash ID -- `"NEW"` to generate a new stash ID -- `true` to generate a new stash ID -- A previously created stash ID to reference existing files - -See the [File Stash docs](/connect/components/files) for more details. - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type RunActionOpts, - type RunActionResponse, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// Run the "List Commits" action for the Gitlab app -const requestOpts: RunActionOpts = { - actionId: "gitlab-list-commits", - configuredProps: { - gitlab: { - authProvisionId: "apn_kVh9AoD", - }, - projectId: 45672541, - refName: "main" - }, - externalUserId: "jverce", - stashId: "", // Optional: Pass an empty string to generate a new stash ID, "NEW", true, or a previously created stash ID -}; -const response: RunActionResponse = await pd.runAction(requestOpts); - -const { - exports, // The named exports produced by the action - os, // The observations produced by the action - ret, // The value returned by the action -}: { - exports: unknown, - os: unknown[], - ret: unknown, -} = response; -``` - - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// Run the "List Commits" action for the Gitlab app -const { - exports, // The named exports produced by the action - os, // The observations produced by the action - ret, // The value returned by the action -} = await pd.runAction({ - actionId: "gitlab-list-commits", - configuredProps: { - gitlab: { - authProvisionId: "apn_kVh9AoD", - }, - projectId: 45672541, - refName: "main" - }, - externalUserId: "jverce", - stashId: "", // Optional: Pass an empty string to generate a new stash ID, "NEW", true, or a previously created stash ID -}); - -// Parse and return the data you need -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will run the "List Commits" action for the Gitlab app. - -echo '{ - "external_user_id": "jverce", - "id": "gitlab-list-commits", - "configured_props": { - "gitlab": { - "auth_provision_id": "apn_kVh9AoD" - }, - "project_id": 45672541, - "ref_name": "main" - }, - "stash_id": "" -}' > data.json - -curl -X POST "https://api.pipedream.com/v1/connect/{your_project_id}/actions/run" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -d @data.json -``` - - - - -##### Example response - -```json -{ - "exports": { - "$summary": "Retrieved 1 commit" - }, - "os": [], - "ret": [ - { - "id": "387262aea5d4a6920ac76c1e202bc9fd0841fea5", - "short_id": "387262ae", - "created_at": "2023-05-03T03:03:25.000+00:00", - "parent_ids": [], - "title": "Initial commit", - "message": "Initial commit", - "author_name": "Jay Vercellone", - "author_email": "nope@pipedream.com", - "authored_date": "2023-05-03T03:03:25.000+00:00", - "committer_name": "Jay Vercellone", - "committer_email": "nope@pipedream.com", - "committed_date": "2023-05-03T03:03:25.000+00:00", - "trailers": {}, - "extended_trailers": {}, - "web_url": "https://gitlab.com/jverce/foo-massive-10231-1/-/commit/387262aea5d4a6920ac76c1e202bc9fd0841fea5" - } - ] -} -``` - -#### Deploy Trigger - - -See [here](/connect/components/#deploying-triggers) for more info on supported trigger types with example payloads - - -Deploy a trigger component that will emit events to a webhook or workflow for a Pipedream Connect user. - -```text -POST /triggers/deploy -``` - -##### Body parameters - -`id` **string** - -The key that identifies the action component (see the [component structure -table](/components/contributing/api/#component-structure)). - ---- - -`configured_props` **object** - -The props that have already been configured for the component. This is a -JSON-serializable object with the prop names as keys and the configured values -as values. - ---- - -`external_user_id` **string** - -[The external user ID](/connect/api/#external-users) in your system on behalf of -which you want to execute the action. - ---- - -`webhook_url` **string** (_optional_) - -The URL to which the trigger will send events. - ---- - -`workflow_id` **string** (_optional_) - -The Pipedream workflow ID to which you want to emit events (ex, `p_1234567`). - - -The workflow must be in the same Pipedream project as the trigger. - - ---- - -`dynamic_props_id` **string** (_optional_) - -The ID of the last prop reconfiguration (if applicable). - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type DeployTriggerOpts, - type DeployTriggerResponse, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// Deploy the "New Issue (Instant)" trigger for the Gitlab app -const requestOpts: DeployTriggerOpts = { - triggerId: "gitlab-new-issue", - configuredProps: { - gitlab: { - authProvisionId: "apn_kVh9AoD", - }, - projectId: 45672541, - }, - externalUserId: "jverce", - webhookUrl: "https://events.example.com/gitlab-new-issue", -}; -const response: DeployTriggerResponse = await pd.deployTrigger(requestOpts); - -const { - id: triggerId, // The unique ID of the deployed trigger - name: triggerName, // The name of the deployed trigger - owner_id: userId, // The unique ID in Pipedream of your user -}: { - id: string, - name: string, - owner_id: string, -} = response.data; -``` - - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// Deploy the "New Issue (Instant)" trigger for the Gitlab app -const { data: deployedTrigger } = await pd.deployTrigger({ - triggerId: "gitlab-new-issue", - configuredProps: { - gitlab: { - authProvisionId: "apn_kVh9AoD", - }, - projectId: 45672541, - }, - externalUserId: "jverce", - webhookUrl: "https://events.example.com/gitlab-new-issue", -}); - -const { - id: triggerId, // The unique ID of the deployed trigger - name: triggerName, // The name of the deployed trigger - owner_id: userId, // The unique ID in Pipedream of your user -} = deployedTrigger; - -// Parse and return the data you need -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will deploy the "New Issue (Instant)" trigger for the Gitlab app. - -echo '{ - "external_user_id": "jverce", - "id": "gitlab-new-issue", - "configured_props": { - "gitlab": { - "authProvisionId": "apn_kVh9AoD" - }, - "projectId": 45672541, - }, - "webhook_url": "https://events.example.com/gitlab-new-issue" -}' > data.json - -curl -X POST "https://api.pipedream.com/v1/connect/{your_project_id}/triggers/deploy" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -d @data.json -``` - - - - -##### Example response - -```json -{ - "data": { - "id": "dc_dAuGmW7", - "owner_id": "exu_oedidz", - "component_id": "sc_3vijzQr", - "configurable_props": [ - { - "name": "gitlab", - "type": "app", - "app": "gitlab" - }, - { - "name": "db", - "type": "$.service.db" - }, - { - "name": "http", - "type": "$.interface.http", - "customResponse": true - }, - { - "name": "projectId", - "type": "integer", - "label": "Project ID", - "description": "The project ID, as displayed in the main project page", - "remoteOptions": true - } - ], - "configured_props": { - "gitlab": { - "authProvisionId": "apn_kVh9AoD" - }, - "db": { - "type": "$.service.db" - }, - "http": { - "endpoint_url": "https://xxxxxxxxxx.m.pipedream.net" - }, - "projectId": 45672541 - }, - "active": true, - "created_at": 1734028283, - "updated_at": 1734028283, - "name": "My first project - exu_oedidz", - "name_slug": "my-first-project---exu-oedidz-2" - } -} -``` - -#### List Deployed Triggers - -List all of the deployed triggers for a given user. - -```text -GET /deployed-triggers/{emitter_type} -``` - -##### Path parameters - -`emitter_type` **string** (optional) - -Specify the type of emitter to retrieve deployed triggers from one of these options: -- `source`: default if no other `emitter_type` is specified, includes any app-based event source -- `http`: native HTTP webhook trigger -- `timer`: native schedule trigger -- `email`: native email trigger - -[See here](/connect/components/#deploying-triggers) for more info on source types. - -##### Query parameters - -`external_user_id` **string** - -[The external user ID](/connect/api/#external-users) in your system on behalf of -which you want to deploy the trigger. - - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type GetTriggersOpts, - type GetTriggersResponse, - type V1DeployedComponent, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// List all deployed triggers for the specified user -const requestOpts: GetTriggersOpts = { - externalUserId: "jverce", -}; -const response: GetTriggersResponse = await pd.getTriggers(requestOpts); - -const { - data: triggers, // The list of deployed triggers -}: { - data: V1DeployedComponent[], -} = response; -``` - - - -```javascript -import { - createBackendClient, -} from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// List all deployed triggers for the specified user -const { data: triggers } = await pd.getTriggers({ - externalUserId: "jverce" -}); - -// Parse and return the data you need -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will list all deployed triggers for the specified user. - -curl -X GET \ - -G \ - "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-triggers" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -H "x-pd-environment: development" \ - -d "external_user_id={external_user_id}" -``` - - - -##### Example response - -```json -{ - "page_info": { - "total_count": 2, - "count": 2, - "start_cursor": "ZGNfZ3p1bUsyZQ", - "end_cursor": "ZGNfdjN1QllYZw" - }, - "data": [ - { - "id": "dc_gzumK2e", - "owner_id": "exu_2LniLm", - "component_id": "sc_r1ixBpL", - "configurable_props": [ - { - "name": "googleDrive", - "type": "app", - "app": "google_drive" - }, - { - "name": "db", - "type": "$.service.db" - }, - { - "name": "http", - "type": "$.interface.http" - }, - { - "name": "drive", - "type": "string", - "label": "Drive", - "description": "Defaults to My Drive. To select a [Shared Drive](https://support.google.com/a/users/answer/9310351) instead, select it from this list.", - "optional": false, - "default": "My Drive", - "remoteOptions": true - }, - { - "name": "timer", - "label": "Push notification renewal schedule", - "description": "The Google Drive API requires occasional renewal of push notification subscriptions. **This runs in the background, so you should not need to modify this schedule**.", - "type": "$.interface.timer", - "static": { - "intervalSeconds": 82080 - } - }, - { - "name": "folders", - "type": "string[]", - "label": "Folders", - "description": "(Optional) The folders you want to watch. Leave blank to watch for any new file in the Drive.", - "optional": true, - "default": [], - "remoteOptions": true - } - ], - "configured_props": { - "googleDrive": { - "authProvisionId": "apn_V1hMeLM" - }, - "db": { - "type": "$.service.db" - }, - "http": { - "endpoint_url": "https://xxxxxxxxxx.m.pipedream.net" - }, - "drive": "My Drive", - "timer": { - "cron": null, - "interval_seconds": 82080 - } - }, - "active": true, - "created_at": 1733512889, - "updated_at": 1733512889, - "name": "Danny Connect - exu_2LniLm", - "name_slug": "danny-connect---exu-2-lni-lm-3" - }, - { - "id": "dc_K0u2OEQ", - "owner_id": "exu_2LniLm", - "component_id": "sc_ogiRveN", - "configurable_props": [ - { - "name": "app", - "type": "app", - "app": "basecamp" - }, - { - "name": "db", - "type": "$.service.db" - }, - { - "name": "accountId", - "type": "string", - "label": "Account Id", - "description": "The ID of the account.", - "remoteOptions": true - }, - { - "name": "projectId", - "type": "string", - "label": "Project Id", - "description": "The ID of the project.", - "remoteOptions": true - }, - { - "name": "http", - "type": "$.interface.http" - } - ], - "configured_props": { - "app": { - "authProvisionId": "apn_EOh4dP0" - }, - "db": { - "type": "$.service.db" - }, - "accountId": { - "__lv": { - "label": "Pipedream", - "value": 5871996 - } - }, - "projectId": { - "__lv": { - "label": "Getting Started", - "value": 39996142 - } - }, - "http": { - "endpoint_url": "https://xxxxxxxxxx.m.pipedream.net" - } - }, - "active": true, - "created_at": 1733198039, - "updated_at": 1733198039, - "name": "Danny Connect - exu_2LniLm", - "name_slug": "danny-connect---exu-2-lni-lm-1" - } - ] -} -``` - -#### Retrieve Deployed Trigger - -Retrieve a single deployed trigger for a given user. - -```text -GET /deployed-triggers/{deployed_trigger_id}/ -``` - -##### Path parameters - -`deployed_trigger_id` **string** - -The deployed trigger ID for the trigger you'd like to retrieve (ex, `dc_xxxxxxx`, `hi_xxxxxxx`, `ti_xxxxxxx`, or `ei_xxxxxxx`). - -##### Query parameters - -`external_user_id` **string** - -[The external user ID](/connect/api/#external-users) in your system on behalf of -which you want to deploy the trigger. - - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type GetTriggerOpts, - type GetTriggerResponse, - type V1DeployedComponent, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// Retrieve the deployed trigger for the specified user -const requestOpts: GetTriggerOpts = { - id: "dc_gzumK2e", - externalUserId: "jverce", -}; -const response: GetTriggerResponse = await pd.getTrigger(requestOpts); - -const { - data: trigger, // The deployed trigger -}: { - data: V1DeployedComponent, -} = response; -``` - - - -```javascript -import { - createBackendClient, -} from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// Retrieve the deployed trigger for the specified user -const { data: trigger } = await pd.getTrigger({ - id: "dc_gzumK2e", - externalUserId: "jverce" -}); - -// Parse and return the data you need -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will list all deployed triggers for the specified user. - -curl -X GET \ - -G \ - "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-triggers/{deployed_trigger_id}/" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -H "x-pd-environment: development" \ - -d "external_user_id={external_user_id}" -``` - - - -##### Example response - -```json -{ - "id": "dc_gzumK2e", - "owner_id": "exu_2LniLm", - "component_id": "sc_r1ixBpL", - "configurable_props": [ - { - "name": "googleDrive", - "type": "app", - "app": "google_drive" - }, - { - "name": "db", - "type": "$.service.db" - }, - { - "name": "http", - "type": "$.interface.http" - }, - { - "name": "drive", - "type": "string", - "label": "Drive", - "description": "Defaults to My Drive. To select a [Shared Drive](https://support.google.com/a/users/answer/9310351) instead, select it from this list.", - "optional": false, - "default": "My Drive", - "remoteOptions": true - }, - { - "name": "timer", - "label": "Push notification renewal schedule", - "description": "The Google Drive API requires occasional renewal of push notification subscriptions. **This runs in the background, so you should not need to modify this schedule**.", - "type": "$.interface.timer", - "static": { - "intervalSeconds": 82080 - } - }, - { - "name": "folders", - "type": "string[]", - "label": "Folders", - "description": "(Optional) The folders you want to watch. Leave blank to watch for any new file in the Drive.", - "optional": true, - "default": [], - "remoteOptions": true - } - ], - "configured_props": { - "googleDrive": { - "authProvisionId": "apn_V1hMeLM" - }, - "db": { - "type": "$.service.db" - }, - "http": { - "endpoint_url": "https://xxxxxxxxxx.m.pipedream.net" - }, - "drive": "My Drive", - "timer": { - "cron": null, - "interval_seconds": 82080 - } - }, - "active": true, - "created_at": 1733512889, - "updated_at": 1733512889, - "name": "Danny Connect - exu_2LniLm", - "name_slug": "danny-connect---exu-2-lni-lm-3" -} -``` - -#### Delete Deployed Trigger - -Delete deployed trigger for a given user. - -```text -DELETE /deployed-triggers/{deployed_trigger_id}/ -``` - -##### Path parameters - -`deployed_trigger_id` **string** - -The deployed trigger ID for the trigger you'd like to retrieve (ex, `dc_xxxxxxx`, `hi_xxxxxxx`, `ti_xxxxxxx`, or `ei_xxxxxxx`). - -##### Query parameters - -`external_user_id` **string** - -[The external user ID](/connect/api/#external-users) in your system on behalf of -which you want to deploy the trigger. - - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type DeleteTriggerOpts, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// Delete the deployed trigger for the specified user. -const requestOpts: DeleteTriggerOpts = { - id: "dc_gzumK2e", - externalUserId: "jverce", -}; - -// The method doesn't return any data. -await pd.deleteTrigger(requestOpts); -``` - - - -```javascript -import { - createBackendClient, -} from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// Delete the deployed trigger for the specified user. The method doesn't return -// any data. -await pd.deleteTrigger({ - id: "dc_gzumK2e", - externalUserId: "jverce" -}); -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will list all deployed triggers for the specified user. - -curl -X DELETE \ - -G \ - "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-triggers/{deployed_trigger_id}/" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -H "x-pd-environment: development" \ - -d "external_user_id={external_user_id}" -``` - - - -##### Response - -Pipedream returns a `204 No Content` response on successful deletion - -#### Update Deployed Trigger - -Update a deployed trigger for a given user. - -```text -PUT /deployed-triggers/{deployed_trigger_id}/ -``` - - -Configured props you define when updating a deployed trigger will **overwrite** previously configured props. - - -##### Path parameters - -`deployed_trigger_id` **string** - -The deployed trigger ID for the trigger you'd like to update (ex, `dc_xxxxxxx`). - -##### Query parameters - -`external_user_id` **string** - -[The external user ID](/connect/api/#external-users) in your system on behalf of -which you want to update the trigger. - -##### Body parameters - -`active` **boolean** (_optional_) - -The state to which the trigger should be updated. - -`configured_props` **object** (_optional_) - -The new configuration props for the trigger. - -`name` **string** (_optional_) - -The new name of the trigger. - -##### Examples - - - - -```typescript -import { - createBackendClient, - type GetTriggerResponse, - type V1DeployedComponent, - type BackendClient, - type BackendClientOpts, - type UpdateTriggerOpts, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// Update the deployed trigger for the specified user -const requestOpts: UpdateTriggerOpts = { - id: "dc_gzumK2e", - externalUserId: "jverce", - active: true, - name: "My Updated Trigger", - configuredProps: { - gitlab: { - authProvisionId: "apn_kVh9AoD", - }, - projectId: 45672542, - }, -}; -const response: GetTriggerResponse = await pd.updateTrigger(requestOpts); - -const { - data: trigger, // The updated deployed trigger -}: { - data: V1DeployedComponent, -} = response; -``` - - - -```javascript -import { - createBackendClient, -} from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// Update the deployed trigger for the specified user -const requestOpts = { - id: "dc_gzumK2e", - externalUserId: "jverce", - active: true, - name: "My Updated Trigger", - configuredProps: { - gitlab: { - authProvisionId: "apn_kVh9AoD", - }, - projectId: 45672542, - }, -}; -const { data: deployedTrigger } = await pd.updateTrigger(requestOpts); - -// Parse and return the data you need -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will update the deployed trigger for the specified user. - -curl -X PUT "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-triggers/{deployed_trigger_id}/" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -H "x-pd-environment: development" \ - -d '{ - "external_user_id": "jverce", - "active": true, - "configured_props": { - "gitlab": { - "authProvisionId": "apn_kVh9AoD" - }, - "projectId": 45672542, - }, - "name": "My Updated Trigger" - }' -``` - - - -##### Example response - -```json -{ - "data": { - "id": "dc_dAuGmW7", - "owner_id": "exu_oedidz", - "component_id": "sc_3vijzQr", - "configurable_props": [ - { - "name": "gitlab", - "type": "app", - "app": "gitlab" - }, - { - "name": "db", - "type": "$.service.db" - }, - { - "name": "http", - "type": "$.interface.http", - "customResponse": true - }, - { - "name": "projectId", - "type": "integer", - "label": "Project ID", - "description": "The project ID, as displayed in the main project page", - "remoteOptions": true - } - ], - "configured_props": { - "gitlab": { - "authProvisionId": "apn_kVh9AoD" - }, - "db": { - "type": "$.service.db" - }, - "http": { - "endpoint_url": "https://xxxxxxxxxx.m.pipedream.net" - }, - "projectId": 45672542 - }, - "active": true, - "created_at": 1734028283, - "updated_at": 1734038486, - "name": "My Updated Trigger", - "name_slug": "my-updated-trigger" - } -} -``` - -#### Retrieve Events Emitted by Deployed Trigger - -Retrieve a list of the last events that a deployed trigger emitted. - -```text -GET /deployed-triggers/{deployed_trigger_id}/events/ -``` - -##### Path parameters - -`deployed_trigger_id` **string** - -The deployed trigger ID for the trigger you'd like to retrieve (ex, `dc_xxxxxxx`, `hi_xxxxxxx`, `ti_xxxxxxx`, or `ei_xxxxxxx`). - -##### Query parameters - -`external_user_id` **string** - -[The external user ID](/connect/api/#external-users) in your system on behalf of -which you want to deploy the trigger. - -`n` **number** (_optional_) - -The number of events to retrieve. Defaults to 10, and it's capped at 100. - - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type GetTriggerEventsOpts, - type GetTriggerEventsResponse, - type V1EmittedEvent, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// List the last 10 events emitted by the deployed trigger of the specified user -const requestOpts: GetTriggerEventsOpts = { - id: "dc_gzumK2e", - externalUserId: "jverce", -}; -const response: GetTriggerEventsResponse = await pd.getTriggerEvents(requestOpts); - -const { - data: events, // The list of events emitted by the trigger -}: { - data: V1EmittedEvent[], -} = response; -``` - - - -```javascript -import { - createBackendClient, -} from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// List the last 10 events emitted by the deployed trigger of the specified user -const { data: events } = await pd.getTriggerEvents({ - id: "dc_gzumK2e", - externalUserId: "jverce" -}); - -// Parse and return the data you need -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will list all events emitted by the specified deployed trigger. - -curl -X GET \ - -G \ - "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-triggers/{deployed_trigger_id}/events" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -H "x-pd-environment: development" \ - -d "external_user_id={external_user_id}" -``` - - - -##### Example response - -```json -{ - "data": [ - { - "e": { - "method": "PUT", - "path": "/", - "query": {}, - "client_ip": "127.0.0.1", - "url": "http://6c367a3dcffce4d01a7b691e906f8982.m.d.pipedream.net/", - "headers": { - "host": "6c367a3dcffce4d01a7b691e906f8982.m.d.pipedream.net", - "connection": "close", - "user-agent": "curl/8.7.1", - "accept": "*/*" - } - }, - "k": "emit", - "ts": 1737155977519, - "id": "1737155977519-0" - }, - { - "e": { - "method": "PUT", - "path": "/", - "query": {}, - "client_ip": "127.0.0.1", - "url": "http://6c367a3dcffce4d01a7b691e906f8982.m.d.pipedream.net/", - "headers": { - "host": "6c367a3dcffce4d01a7b691e906f8982.m.d.pipedream.net", - "connection": "close", - "user-agent": "curl/8.7.1", - "accept": "*/*" - } - }, - "k": "emit", - "ts": 1737062972013, - "id": "1737062972013-0" - }, - { - "e": { - "method": "POST", - "path": "/", - "query": {}, - "client_ip": "127.0.0.1", - "url": "http://6c367a3dcffce4d01a7b691e906f8982.m.d.pipedream.net/", - "headers": { - "host": "6c367a3dcffce4d01a7b691e906f8982.m.d.pipedream.net", - "connection": "close", - "user-agent": "curl/8.7.1", - "accept": "*/*" - } - }, - "k": "emit", - "ts": 1737047546217, - "id": "1737047546217-0" - }, - { - "e": { - "method": "GET", - "path": "/", - "query": {}, - "client_ip": "127.0.0.1", - "url": "http://6c367a3dcffce4d01a7b691e906f8982.m.d.pipedream.net/", - "headers": { - "host": "6c367a3dcffce4d01a7b691e906f8982.m.d.pipedream.net", - "connection": "close", - "user-agent": "curl/8.7.1", - "accept": "*/*" - } - }, - "k": "emit", - "ts": 1736985883016, - "id": "1736985883016-0" - } - ] -} -``` - -#### Retrieve Webhooks Listening to Deployed Trigger - -Retrieve the list of webhook URLs listening to a deployed trigger. - -```text -GET /deployed-triggers/{deployed_trigger_id}/webhooks/ -``` - -##### Path parameters - -`deployed_trigger_id` **string** - -The deployed trigger ID for the trigger you'd like to retrieve (ex, `dc_xxxxxxx`, `hi_xxxxxxx`, `ti_xxxxxxx`, or `ei_xxxxxxx`). - -##### Query parameters - -`external_user_id` **string** - -[The external user ID](/connect/api/#external-users) in your system on behalf of -which you want to deploy the trigger. - - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type GetTriggerWebhooksOpts, - type GetTriggerWebhooksResponse, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// Retrieve the list of webhook URLs listening to the deployed trigger for the -// specified user -const requestOpts: GetTriggerWebhooksOpts = { - id: "dc_gzumK2e", - externalUserId: "jverce", -}; -const response: GetTriggerWebhooksResponse = await pd.getTriggerWebhooks(requestOpts); - -const { - webhook_urls: urls, // The list of webhook URLs listening to the deployed trigger -}: { - webhook_urls: string[], -} = response; -``` - - - -```javascript -import { - createBackendClient, -} from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// Retrieve the list of webhook URLs listening to the deployed trigger for the -// specified user -const { webhook_urls: urls } = await pd.getTriggerWebhooks({ - id: "dc_gzumK2e", - externalUserId: "jverce" -}); -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will list all webhook URLs listening to the specified deployed trigger. - -curl -X GET \ - -G \ - "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-triggers/{deployed_trigger_id}/webhooks/" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -H "x-pd-environment: development" \ - -d "external_user_id={external_user_id}" -``` - - - -##### Example response - -```json -{ - "webhook_urls": [ - "https://events.example.com/gitlab-new-issue", - ] -} -``` - -#### Update Webhooks Listening to Deployed Trigger - -Update the list of webhook URLs that will listen to a deployed trigger. - -```text -PUT /deployed-triggers/{deployed_trigger_id}/webhooks/ -``` - -##### Path parameters - -`deployed_trigger_id` **string** - -The deployed trigger ID for the trigger you'd like to retrieve (ex, `dc_xxxxxxx`, `hi_xxxxxxx`, `ti_xxxxxxx`, or `ei_xxxxxxx`). - -##### Query parameters - -`external_user_id` **string** - -[The external user ID](/connect/api/#external-users) in your system on behalf of -which you want to deploy the trigger. - -##### Body parameters - -`webhook_urls` **string[]** - -The list of webhook URLs that will listen to the deployed trigger. - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type UpdateTriggerWebhooksOpts, - type UpdateTriggerWebhooksResponse, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// The new list of webhook URLs that will listen to the deployed trigger -const webhookUrls: string[] = [ - "https://events.example.com/gitlab-new-issue", -]; - -const requestOpts: UpdateTriggerWebhooksOpts = { - id: "dc_gzumK2e", - externalUserId: "jverce", - webhookUrls, -}; - -// Update the list of webhook URLs listening to the deployed trigger -const response: UpdateTriggerWebhooksResponse = await pd.updateTriggerWebhooks(requestOpts); - -// `webhookUrls` will match `confirmedUrls` if the update was successful -const { - webhook_urls: confirmedUrls, -}: { - webhook_urls: string[], -} = response; -``` - - - -```javascript -import { - createBackendClient, -} from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// The new list of webhook URLs that will listen to the deployed trigger -const webhookUrls = [ - "https://events.example.com/gitlab-new-issue", -]; - -// Update the list of webhook URLs listening to the deployed trigger -const { webhook_urls: confirmedUrls } = await pd.updateTriggerWebhooks({ - id: "dc_gzumK2e", - externalUserId: "jverce", - webhookUrls, -}); - -// `webhookUrls` will match `confirmedUrls` if the update was successful -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will update the list of webhook URLs listening to the specified deployed trigger. - -curl -X PUT \ - "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-triggers/{deployed_trigger_id}/webhooks/" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -H "x-pd-environment: development" \ - -d '{"external_user_id": "{external_user_id}", "webhook_urls": ["https://events.example.com/gitlab-new-issue"]}' -``` - - - -##### Example response - -```json -{ - "webhook_urls": [ - "https://events.example.com/gitlab-new-issue", - ] -} -``` - -#### Retrieve Workflows Listening to Deployed Trigger - -Retrieve the list of workflow IDs listening to a deployed trigger. - -```text -GET /deployed-triggers/{deployed_trigger_id}/workflows/ -``` - -##### Path parameters - -`deployed_trigger_id` **string** - -The deployed trigger ID for the trigger you'd like to retrieve (ex, `dc_xxxxxxx`, `hi_xxxxxxx`, `ti_xxxxxxx`, or `ei_xxxxxxx`). - -##### Query parameters - -`external_user_id` **string** - -[The external user ID](/connect/api/#external-users) in your system on behalf of -which you want to deploy the trigger. - - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type GetTriggerWorkflowsOpts, - type GetTriggerWorkflowsResponse, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// Retrieve the list of workflow IDs listening to the deployed trigger for the -// specified user -const requestOpts: GetTriggerWorkflowsOpts = { - id: "dc_gzumK2e", - externalUserId: "jverce", -}; -const response: GetTriggerWorkflowsResponse = await pd.getTriggerWorkflows(requestOpts); - -const { - workflow_ids: ids, // The list of workflow IDs listening to the deployed trigger -}: { - workflow_ids: string[], -} = response; -``` - - - -```javascript -import { - createBackendClient, -} from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// Retrieve the list of workflow IDs listening to the deployed trigger for the -// specified user -const { workflow_ids: ids } = await pd.getTriggerWorkflows({ - id: "dc_gzumK2e", - externalUserId: "jverce" -}); -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will list all workflow IDs listening to the specified deployed trigger. - -curl -X GET \ - -G \ - "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-triggers/{deployed_trigger_id}/workflows/" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -H "x-pd-environment: development" \ - -d "external_user_id={external_user_id}" -``` - - - -##### Example response - -```json -{ - "workflow_ids": [ - "p_ERRCzw", - "p_2LniLm", - ] -} -``` - -#### Update Workflows Listening to Deployed Trigger - -Update the list of workflows that will listen to a deployed trigger. - -```text -PUT /deployed-triggers/{deployed_trigger_id}/workflows/ -``` - -##### Path parameters - -`deployed_trigger_id` **string** - -The deployed trigger ID for the trigger you'd like to retrieve (ex, `dc_xxxxxxx`, `hi_xxxxxxx`, `ti_xxxxxxx`, or `ei_xxxxxxx`). - -##### Query parameters - -`external_user_id` **string** - -[The external user ID](/connect/api/#external-users) in your system on behalf of -which you want to deploy the trigger. - -##### Body parameters - -`workflow_ids` **string[]** - -The list of workflow IDs that will listen to the deployed trigger. - -##### Examples - - - - -```typescript -import { - createBackendClient, - type BackendClient, - type BackendClientOpts, - type UpdateTriggerWorkflowsOpts, - type UpdateTriggerWorkflowsResponse, -} from "@pipedream/sdk/server"; - -const clientOpts: BackendClientOpts = { - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}", -}; -const pd: BackendClient = createBackendClient(clientOpts); - -// The new list of workflow IDs that will listen to the deployed trigger -const workflowIds: string[] = [ - "p_ERRCzw", - "p_2LniLm", -]; -const requestOpts: UpdateTriggerWorkflowsOpts = { - id: "dc_gzumK2e", - externalUserId: "jverce", - workflowIds, -}; - -// Update the list of workflows listening to the deployed trigger -const response: UpdateTriggerWorkflowsResponse = await pd.updateTriggerWorkflows(requestOpts); - -// `workflowIds` will match `confirmedIds` if the update was successful -const { - workflow_ids: confirmedIds, -}: { - workflow_ids: string[], -} = response; -``` - - - -```javascript -import { - createBackendClient, -} from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -// The new list of workflow IDs that will listen to the deployed trigger -const workflowIds = [ - "p_ERRCzw", - "p_2LniLm", -]; - -// Update the list of workflows listening to the deployed trigger -const { workflow_ids: confirmedIds } = await pd.updateTriggerWorkflows({ - id: "dc_gzumK2e", - externalUserId: "jverce", - workflowIds, -}); - -// `workflowIds` will match `confirmedIds` if the update was successful -``` - - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. -# This request will update the list of webhook URLs listening to the specified deployed trigger. - -curl -X PUT \ - "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-triggers/{deployed_trigger_id}/webhooks/" \ - -H "Authorization: Bearer {access_token}" \ - -H "Content-Type: application/json" \ - -H "x-pd-environment: development" \ - -d '{"external_user_id": "{external_user_id}", "workflow_ids": ["p_ERRCzw", "p_2LniLm"]}' -``` - - - -##### Example response - -```json -{ - "workflow_ids": [ - "p_ERRCzw", - "p_2LniLm", - ] -} -``` - -### Workflows - -#### Invoke workflows - -You can use the SDK to [invoke workflows on behalf of any end user](/connect/workflows/). **Write one workflow, run it for all of your users**. diff --git a/docs-v2/pages/connect/components/_meta.tsx b/docs-v2/pages/connect/components/_meta.tsx deleted file mode 100644 index 556cb4fd656d9..0000000000000 --- a/docs-v2/pages/connect/components/_meta.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default { - "index": "Overview", - "files": "Working with Files", - "custom-tools": "Custom Tools", -} as const diff --git a/docs-v2/pages/connect/components/custom-tools.mdx b/docs-v2/pages/connect/components/custom-tools.mdx deleted file mode 100644 index 7ead508f9e720..0000000000000 --- a/docs-v2/pages/connect/components/custom-tools.mdx +++ /dev/null @@ -1,101 +0,0 @@ -import Callout from '@/components/Callout' - -# Using Custom Tools - -You can write and publish your own components to your Pipedream workspace to use with Connect. This complements the public actions available in Pipedream's global registry. - -## Overview - -Custom tools are Node.js modules that you develop using the [Pipedream Components API](/components/contributing/api/) and publish to your Pipedream workspace. Once published, they become available across [all Connect APIs](/connect/api/#components), including the list, retrieve, run endpoints, etc. - - -Publishing custom tools is available to Pipedream customers on the [Business plan](https://pipedream.com/pricing?plan=Enterprise). - - -## Creating custom tools - -Custom tools use the same development workflow as standard Pipedream components: - -1. **Write your component** using the [Pipedream Components API](/components/contributing/api/) -2. **Follow component guidelines** outlined in the [component development docs](/components/contributing/guidelines/) -3. **Use the Pipedream CLI** to publish your component with a Connect-specific flag - - -Custom tools are [actions](/components/contributing/actions-quickstart/). Check out the actions quickstart guide for step-by-step development instructions. Support for custom sources (triggers) is coming soon. - - -## Publishing for Connect - -To make your custom components available in Connect, use the [`pd publish`](/components/contributing/cli/reference/#pd-publish) command with the `--connect-environment` flag: - - -```bash -pd publish my-custom-action.mjs --connect-environment development -``` - -### Environments - -The `--connect-environment` flag accepts two values: - -- **`development`**: makes the component available to your Pipedream workspace in Connect in development -- **`production`**: makes the component available to your Pipedream workspace in Connect in production - - -Components published to `development` will only be available in the development environment, and vice versa for `production`. - - -## Using custom tools - -Once published, your custom tools appear alongside public components in Connect APIs: - -- **List endpoints**: Custom tools are included in component listing responses -- **Retrieve endpoints**: You can fetch details about your custom components -- **Run endpoints**: Execute your custom tools with the same API calls used for public components - -### Referencing custom tools - -Custom tools are identified with a `~/` prefix in their component ID. For example, if you publish a component with the key `google_sheets-update-file`, it will appear in Connect APIs as `~/google_sheets-update-file`. - -When making API calls to list, retrieve, or run custom tools, use the prefixed ID: - -```bash -# List all components (includes custom tools with ~/ prefix) -GET /v1/components - -# Retrieve a specific custom tool -GET /v1/components/~/google_sheets-update-file - -# Run a custom tool -POST /v1/components/~/google_sheets-update-file/run -``` - -The Connect API treats custom tools identically to public components, ensuring a consistent integration experience. - -### Custom tools in MCP - -Custom actions that you publish are automatically exposed as tools in the [Pipedream MCP server](/connect/mcp/developer-tools) for the relevant app. - -## Example workflow - -Here's a typical workflow for creating and using a custom tool: - -1. **Develop locally** using your preferred editor -2. **Test your component** using local testing for actions -3. **Publish to Connect** with the appropriate environment flag -4. **Integrate via Connect APIs** in your application - - -Test your custom tools in your application directly or [run Pipedream's SDK playground](https://github.com/PipedreamHQ/pipedream-connect-examples/tree/master/connect-react-demo#pipedream-components-demo-react) locally with your Pipedream credentials. - - -## Best practices - -- **Follow naming conventions**: Use clear, descriptive names for your tools -- **Include proper documentation**: Add helpful descriptions and prop labels for easier configuration -- **Test thoroughly**: Validate your components work as expected before publishing to production -- **Version management**: Update [component versions](/components/contributing/guidelines/#versioning) when making changes -- **Environment separation**: Use development environment for testing, production for live integrations - -## Getting help - -For component development questions, visit the [Pipedream Support](https://pipedream.com/support). For Connect-specific integration help, refer to the [Connect docs](/connect/api). \ No newline at end of file diff --git a/docs-v2/pages/connect/components/files.mdx b/docs-v2/pages/connect/components/files.mdx deleted file mode 100644 index be028b66e1487..0000000000000 --- a/docs-v2/pages/connect/components/files.mdx +++ /dev/null @@ -1,237 +0,0 @@ -import { Tabs } from "nextra/components"; -import Callout from '@/components/Callout'; - -# Working with Files - -Pipedream provides a file storage system, File Stash, that allows you to store and retrieve files from tool executions via Connect. When a trigger or action downloads files to the `/tmp` directory in Pipedream's execution environment, you can sync these files with File Stash, making them accessible outside of Pipedream. - -## File Stash - -When you execute an action via Connect that downloads files to the `/tmp` directory, those files normally only exist within Pipedream's execution environment. With File Stash syncing, you can now make these files available via presigned URLs that can be accessed from anywhere. - -### How it works - -1. Files created in `/tmp` during execution are synced with File Stash when you pass `stashId` in the action execution payload -2. Each file is assigned a presigned URL that remains valid for 30 minutes -3. These URLs allow anyone with the link to download the file directly - -## When to use stashId - -You should pass the `stashId` parameter when: - -1. You're working with actions that download or generate files in `/tmp`, such as actions with "file", "upload", or "download" in their name -2. You're working with actions that have a `filePath` or `filename` prop -3. You want to make files accessible outside of Pipedream's execution environment - -To generate a new stash ID, you can pass: -- An empty string (`""`) -- The string `"NEW"` -- Boolean `true` - -To reuse an existing stash ID (valid for 24 hours), pass the previously returned `stashId` value. This allows you to reference multiple files from the same stash. - - -Avoid passing `stashId` unnecessarily as it will slightly increase response time. - - -## API Reference - -### Running actions with File Stash - -To enable File Stash when running an action, use the `stash_id` parameter in your request: - -| Parameter | Type | Description | -| --- | --- | --- | -| `stash_id` | string | (Optional) The key that identifies the external user-specific File Stash. If set to `""` (or `"NEW"` or `true`), Pipedream will generate a stash ID for you. If omitted, Pipedream will not sync files in `/tmp` with File Stash. | - - - -```javascript -const resp = await pd.actionRun({ - externalUserId: "abc-123", - actionId: "google_drive-download-file", - configuredProps: { - googleDrive: { - authProvisionId: "apn_gyhLaz3" - }, - fileId: { - "__lv": { - "label": "important files > mcp-hot.jpg", - "value": "16nlbFcgtgZkxLLMT2DcnBrEeQXQSriLs" - } - }, - filePath: "/tmp/mcp-hot.jpg" - }, - stashId: "" // An empty string will generate a new stash ID -}); - -// The response contains file URLs in $filestash_uploads -console.log(resp.exports.$filestash_uploads); -``` - - -```bash -curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \ - -H "Content-Type: application/json" \ - -H "X-PD-Environment: {environment}" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "external_user_id": "abc-123", - "id": "google_drive-download-file", - "configured_props": { - "googleDrive": { - "authProvisionId": "apn_jyhKbx4" - }, - "fileId": { - "__lv": { - "label": "important files > mcp-hot.jpg", - "value": "16nlbFcgtgZkxLLMT2DcnBrEeQXQSriLw" - } - }, - "filePath": "/tmp/mcp.png" - }, - "stash_id": "" - }' -``` - - - -### Response - -The response includes a `stashId` and a `$filestash_uploads` export with information about the files that were downloaded to `/tmp` and then synced to File Stash: - -```json -{ - "exports": { - "$summary": "Successfully downloaded the file, \"mcp.png\"", - "$filestash_uploads": [ - { - "localPath": "/tmp/mcp.png", - "s3Key": "1day/proj_lgsqAAJ/exu_x1iK86/d4ffb5b1081d3aacd2929f23f270268c/u/mcp.png", - "get_url": "https://pipedream-file-stash-production.s3.us-east-1.amazonaws.com/1day/proj_lgsqAAJ/exu_x1iK86/d4ffb5b1081d3aacd2929f23f270267d/u/mcp.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA7H7CJKGDWMN4VXXZ%2F20250606%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250606T204541Z&X-Amz-Expires=1800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEK4%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMiJIMEYCIQE3PJZwefZb%2Gp6tWNV8JJtZXG4%2FE%2BOQrFzcdkbPtk6iDwIhBPyFmL9yztlGE0Ub4QFMJzLf2ln2%2C3CYu4r%2FlHsnikmiKsAEDHaQBxoNOTA2MDM3MTgyNzIxIhyHFEjyyQ4ssQm4e5JqoATBID6Ipfe91co6nOiB18cTsrrCi4GyxWW6seujHJ0UmvSrsagD%2FJzyoirNNYdX1pwk9anJkCFEGUSz61DPgZfYGsjIC6jMWD6es%2Gvn3z%2FKFJxIaCVlDJTSkmzOOZcyzFwzGNgqKarSD1P63vySsH7LfsocM4GQKfH1KbHYKkX4GIIEAcL9T9JYU7j3zQcOE2uNpF%2BZ1fVQ8Yg0stYhMIUzSy1fLNS1CRHvejU793PSgJoKrZq8zICQFz3yL5ZxWqfrT%2BxGSZKsSH0iEOKVKq7MK0cdxrVJJsgyzl6ixiIsDKhwgmA0PhT6kvZOof0XyozdJjPAN33v2XSx%2F4BD3MrDonk4d%2F8vweQubfrOwangOPG8USZo31PXvdf8AXnx5rqVmFUL3etUsdPO2NzF6K%2B8bXNHfwgROMVG54tVGhxAX80OuflLN9lhPq%2B0%2BKS0cIC%2BpG9RNk4iToz1IFP9OWQaJPgOjOf90cPQgYfOV%2F%2FqIR9133NtKBzksB%2F%2F%2Bu1M6HS8MAfhF%2BAf9vpT%2FjvTlJhcvtiqyCzGz4TqJzxzIlFRv1dSyS08U82C7rVgOKpNWwDDqB1IjqeAZFap6tFP3s5apixPvipUERd8c8%2F9izz4%2Bz%2BD0f3Gn%2BQIRuToKQpPp%2FKfJZ15g4Mu6H4s7s7Nsr4znzdT2SOlWGi%2Bw%2FrIKi47vJfA4MKwTlW9K8e%2FsmhzHkB9LEqU7Km%2Fk36Qw8KaNwgY6nAFw%2BP4e8vTHE2MyMAZ2GiwvdlE4%2BNPtJAX4L%2BrabrgxnAHgqR0xB%2B3rNI5b62zaMrUZCm7T28Fec%2BA2x16PFLw4yUUv8UksV3r0H3J9dO6%2FrORTxYz0UYq8aiARGvg8kcjOGJ72Q5wv%2B48Up8r39coHlyACOQdd6Lg4HsohStWgeDJV0LKXru6RkNmM3FJWcWUqOy8oZxgaWe%2F%2BBAo%3D&X-Amz-Signature=c9hd88df7hfg40dh5060e47gcde639h5c3615gf77f60e9bgc90d44dh095636f" - } - ] - }, - "os": [], - "ret": { - "fileMetadata": { - "name": "mcp.png", - "mimeType": "image/png" - }, - "filePath": "/tmp/mcp.png" - }, - "stashId": "d4ffb5b1081d3aacd2929f23f270237d" -} -``` - -Each file in the `$filestash_uploads` array includes: - -- `localPath`: The path to the file in the `/tmp` directory where it was downloaded or created -- `s3Key`: The unique key for the file in the Pipedream File Stash after being synced from `/tmp` -- `get_url`: A presigned URL that allows downloading the file for 30 minutes - -## Usage Examples - -### Reusing a stash ID - -You can reuse a stash ID across multiple action runs to maintain a reference to previously downloaded files. This is particularly useful when you need to: - -- Process multiple files across different actions in a sequence -- Keep a reference to files for later use in your app or agent -- Build a collection of files over time -- Ensure files downloaded in one action are accessible in subsequent actions - -To reuse a stash ID, simply pass the same `stashId` value to subsequent action runs: - - - -```javascript -// First action run - download a file from Google Drive -const firstResponse = await pd.actionRun({ - externalUserId: "abc-123", - actionId: "google_drive-download-file", - configuredProps: { - googleDrive: { - authProvisionId: "apn_gyhLaz3" - }, - fileId: "1xyz123", - filePath: "/tmp/report1.pdf" - }, - stashId: "" // Generate a new stash ID -}); - -const stashId = firstResponse.stashId; - -// Second action run - use the same file in another action (e.g., upload to Dropbox) -const secondResponse = await pd.actionRun({ - externalUserId: "abc-123", - actionId: "dropbox-upload-file", - configuredProps: { - dropbox: { - authProvisionId: "apn_mmhHPgj" - }, - path: "/", - name: "uploaded-report.pdf", - filePath: "/tmp/report1.pdf" // Same file path as in the first action - }, - stashId: stashId // Reuse the stash ID to maintain access to the file -}); - -// The file downloaded in the first action is available to the second action -``` - - -```bash -# First request with new stash -curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "external_user_id": "abc-123", - "id": "google_drive-download-file", - "configured_props": { - "googleDrive": { - "authProvisionId": "apn_gyhLaz3" - }, - "fileId": "1W6ZssXLvVE-YN8rRbQlqggCpdIF-gdh1", - "filePath": "/tmp/myfile.txt" - }, - "stash_id": "NEW" - }' - -# Get the stash_id from the response (e.g., "abcd1234") - -# Second request using the same stash -curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "external_user_id": "abc-123", - "id": "dropbox-upload-file", - "configured_props": { - "dropbox": { - "authProvisionId": "apn_mmhHPgj" - }, - "path": "/", - "name": "my-upload.txt", - "filePath": "/tmp/myfile.txt" - }, - "stash_id": "abcd1234" - }' -``` - - - -### Common multi-action file workflows - -A typical workflow involving files across multiple actions might look like: - -1. Download a file from an external service to `/tmp` -2. Process or transform the file -3. Upload the file to another service - -For this to work reliably, you need to use the same `stashId` across all actions to ensure that files downloaded or created in one action remain accessible to subsequent actions, even though each action runs in its own isolated environment. - -## File Storage Duration - -Files in File Stash are automatically deleted after 24 hours. The presigned URLs remain valid for 30 minutes from the time they are generated. diff --git a/docs-v2/pages/connect/components/index.mdx b/docs-v2/pages/connect/components/index.mdx deleted file mode 100644 index 79e3812692908..0000000000000 --- a/docs-v2/pages/connect/components/index.mdx +++ /dev/null @@ -1,1278 +0,0 @@ -import { Steps, Tabs } from 'nextra/components' -import Callout from '@/components/Callout' - -# Pre-built tools for your app or agent - -Pipedream Connect provides APIs to embed pre-built tools ([triggers and actions](/components/contributing/)) directly in your application -or AI agent, enabling access to 10,000+ built-in API operations. Enable [your end users](/connect/api/#external-users) to -configure, deploy, and invoke Pipedream triggers and actions for more than {process.env.PUBLIC_APPS} APIs. - -## What are triggers and actions? - -In Pipedream, we call triggers and actions [components](/components/contributing/), which are self-contained executable units of code. Your end users configure the inputs and these components produce a -result that's exported as output. These components are developed and maintained by Pipedream -and our community and their source code is available in our [public Github repo](https://github.com/PipedreamHQ/pipedream/tree/master/components). - -## Implementation - - -Check out the [SDK playground](https://pipedream.com/connect/demo) to see the SDK in action. You can also [run it locally and explore the code](https://github.com/PipedreamHQ/pipedream-connect-examples/tree/master/connect-react-demo). - - -### Use Pipedream's server SDK with your own frontend -- See below to get started with Pipedream's server SDK or REST API -- Refer to the [full API reference](/connect/api/#components) for additional info - -### Use Pipedream's frontend React SDK -- Pipedream provides a frontend React SDK to enable your users to configure and run triggers and actions in your app's UI -- Style the UI components however you want to match the design of your app, and you can also fork the SDK -- Refer to the [SDK](https://github.com/PipedreamHQ/pipedream/blob/master/packages/connect-react/README.md) to get started - -## Getting started - - -Refer to the [Connect API docs](/connect/api/) for the full API reference. Below is a quickstart with a few specific examples. - -You can skip steps 1 and 2 if you already know the component you want to use or if you'd prefer to [pass a natural language prompt to Pipedream's component search API](/rest-api/#search-for-registry-components). - - - - -### Authenticate to the Pipedream API - -Before sending requests to the API, make sure to [authenticate using a Pipedream OAuth client](/rest-api/auth/#oauth): - - - -```javascript -// Initialize the Pipedream SDK client - -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development | production", - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); -``` - - -```bash -# Get an access token for the REST API - -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{your_oauth_client_id}", - "client_secret": "{your_oauth_client_secret}" - }' -``` - - - - -All subsequent examples assume that you've either initialized the SDK client or have a valid access token. - - -### Find the app you want to use - -To find the right trigger or action to configure and run, first find the app. In this example, we'll search for `gitlab`. - - - -```javascript -const apps = await pd.getApps({ q: "gitlab" }); - -// Parse and return the data you need -``` - - -```bash -curl -X https://api.pipedream.com/v1/apps?q=gitlab \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer {access_token}" - -# Parse and return the data you need -``` - - - -Here's the response: - -```json -{ - "page_info": { - "total_count": 1, - "count": 1, - "start_cursor": "Z2l0bGFi", - "end_cursor": "Z2l0bGFi" - }, - "data": [ - { - "id": "app_1Z2hw1", - "name_slug": "gitlab", - "name": "GitLab", - "auth_type": "oauth", - "description": "GitLab is the most comprehensive AI-powered DevSecOps Platform.", - "img_src": "https://assets.pipedream.net/s.v0/app_1Z2hw1/logo/orig", - "custom_fields_json": "[{\"name\":\"base_api_url\",\"label\":\"Base API URL\",\"description\":\"The Base API URL defaults to `gitlab.com`. If you are using self-hosted Gitlab, enter your base url here, e.g. `gitlab.example.com`\",\"default\":\"gitlab.com\",\"optional\":null}]", - "categories": [ - "Developer Tools" - ], - "featured_weight": 5000, - "connect": { - "proxy_enabled": true, - "allowed_domains": ["gitlab.com"], - "base_proxy_target_url": "https://{{custom_fields.base_api_url}}" - } - } - ] -} -``` - -### List the available components for the app - -Once you have the app you want to use, now you can list the triggers and/or actions for that app. We'll list the actions for Gitlab and we'll pass the `name_slug` `gitlab` as the `app`. - - - -```javascript -const components = await pd.getComponents({ q: "gitlab" }); - -// Parse and return the data you need -``` - - -```bash -curl -X https://api.pipedream.com/v1/connect/{project_id}/actions?app=gitlab \ - -H "Content-Type: application/json" \ - -H "X-PD-Environment: {environment}" \ - -H "Authorization: Bearer {access_token}" - -# Parse and return the data you need -``` - - - -Here's the response: - -```json -{ - "page_info": { - "total_count": 20, - "count": 10, - "start_cursor": "c2NfbHlpRThkQQ", - "end_cursor": "c2NfQjVpTkJBTA" - }, - "data": [ - { - "name": "List Commits", - "version": "0.0.2", - "key": "gitlab_developer_app-list-commits" - }, - { - "name": "Update Issue", - "version": "0.0.1", - "key": "gitlab_developer_app-update-issue" - }, - { - "name": "Update Epic", - "version": "0.0.1", - "key": "gitlab_developer_app-update-epic" - }, - { - "name": "Search Issues", - "version": "0.0.1", - "key": "gitlab_developer_app-search-issues" - }, - { - "name": "List Repo Branches", - "version": "0.0.1", - "key": "gitlab_developer_app-list-repo-branches" - }, - { - "name": "Get Repo Branch", - "version": "0.0.1", - "key": "gitlab_developer_app-get-repo-branch" - }, - { - "name": "Get Issue", - "version": "0.0.1", - "key": "gitlab_developer_app-get-issue" - }, - { - "name": "Create issue", - "version": "0.0.1", - "key": "gitlab_developer_app-create-issue" - }, - { - "name": "Create Epic", - "version": "0.0.1", - "key": "gitlab_developer_app-create-epic" - }, - { - "name": "Create Branch", - "version": "0.0.1", - "key": "gitlab_developer_app-create-branch" - } - ] -} -``` -### Retrieve the component's definition - -To configure and run a component for your end users, you need to understand -the component's definition. Now that you have the component's key from the previous step, -you can retrieve its structure from the Pipedream API. See the [component -structure](/components/contributing/api/#component-structure) section in our docs for more -details. - -As an example, the following API call will return the structure of the **List -Commits** action for Gitlab: - - - -```javascript -const component = await pd.getComponent({ key: "gitlab-list-commits" }); - -// Parse and return the data you need -``` - - -```bash -curl -X https://api.pipedream.com/v1/connect/{project_id}/components/gitlab-list-commits \ - -H "Content-Type: application/json" \ - -H "X-PD-Environment: {environment}" \ - -H "Authorization: Bearer {access_token}" - -# Parse and return the data you need -``` - - - -The response will contain the component's structure, including its user-friendly name, -version, and most importantly, the configuration options the component accepts -(also known as [props](/components/contributing/api/#props) or "properties"). -Here's an example of the response for the component in the example above: - -```json -{ - "data": { - "name": "List Commits", - "version": "0.0.3", - "key": "gitlab-list-commits", - "configurable_props": [ - { - "name": "gitlab", - "type": "app", - "app": "gitlab" - }, - { - "name": "projectId", - "type": "integer", - "label": "Project ID", - "description": "The project ID, as displayed in the main project page", - "remoteOptions": true - }, - { - "name": "refName", - "type": "string", - "label": "Branch Name", - "description": "The name of the branch", - "remoteOptions": true, - "optional": true - }, - { - "name": "max", - "type": "integer", - "label": "Max Results", - "description": "Max number of results to return. Default value is `100`", - "optional": true, - "default": 100 - } - ] - } -} -``` - -Using this information, you can now drive the configuration of the component for -your end users, as described in the next section. - -### Configure the component - -Component execution on behalf of your end users requires a few preliminary -steps, focused on getting the right input parameters (aka -[props](/workflows/building-workflows/using-props/)) to the component. - -Configuring each prop for a component often involves an API call to retrieve the possible values, -unless the values that a prop can take are static or free-form. The endpoint is accessible at: - -``` -POST /v1/connect/{project_id}/components/configure -``` - -Typically, the options for a prop are linked to a specific user's account. Each -of these props implements an `options` method that retrieves the necessary -options from the third-party API, formats them, and sends them back in the -response for the end user to select. Examples are listing Slack channels, Google Sheets, etc. - -The payload for the configuration API call must contain the following fields: - -1. `external_user_id`: the ID of your user on your end -2. `id`: the component's unique ID (aka **key**) -3. `prop_name`: the name of the prop you want to configure -4. `configured_props`: an object containing the props that have already been - configured. The initial configuration call must contain the ID of the account - (aka `authProvisionId`) that your user has connected to the target app (see - [this section](/connect/managed-auth/quickstart) for - more details on how to create these accounts). - -We'll use the [**List Commits** component for -Gitlab](https://github.com/PipedreamHQ/pipedream/blob/master/components/gitlab/actions/list-commits/list-commits.mjs#L4) -as an example, to illustrate a call that retrieves the options for the -`projectId` prop of that component: - - - -```javascript -const { options } = await pd.configureComponent({ - externalUserId: "abc-123", - componentId: "gitlab-list-commits", - propName: "projectId", - configuredProps: { - gitlab: { - authProvisionId: "apn_kVh9AoD", - } - } -}); - -// Parse and return the data you need -``` - - -```bash -curl -X POST https://api.pipedream.com/v1/connect/{project_id}/components/configure \ - -H "Content-Type: application/json" \ - -H "X-PD-Environment: {environment}" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "external_user_id": "abc-123", - "id": "gitlab-list-commits", - "prop_name": "projectId", - "configured_props": { - "gitlab": { - "authProvisionId": "apn_kVh9AoD" - } - } - }' -# Parse and return the data you need -``` - - - - -The response contains the possible values (and their human-readable labels -when applicable) for the prop, as well as any possible errors that might have -occurred. The response for the request above would look like this: - -```json -{ - "observations": [], - "context": null, - "options": [ - { - "label": "jverce/foo-massive-10231-1", - "value": 45672541 - }, - { - "label": "jverce/foo-massive-10231", - "value": 45672514 - }, - { - "label": "jverce/foo-massive-14999-2", - "value": 45672407 - }, - { - "label": "jverce/foo-massive-14999-1", - "value": 45672382 - }, - { - "label": "jverce/foo-massive-14999", - "value": 45672215 - }, - { - "label": "jverce/gitlab-development-kit", - "value": 21220953 - }, - { - "label": "jverce/gitlab", - "value": 21208123 - } - ], - "errors": [], - "timings": { - "api_to_sidekiq": 1734043172355.1042, - "sidekiq_received": 1734043172357.867, - "sidekiq_to_lambda": 1734043172363.6812, - "sidekiq_done": 1734043173461.6406, - "lambda_configure_prop_called": 1734043172462, - "lambda_done": 1734043173455 - }, - "stringOptions": null -} -``` - - - -Fields inside `configured_props` are written in camel case since they refer to -the names of props as they appear in the component's code, they are not -attributes that the API itself consumes. - - - -You configure props one-by-one, making a call to the component configuration API -for each new prop. Subsequent prop configuration calls will be identical to the -one above: - -1. Add the prop you currently want to configure as the `prop_name` -2. Include the names and values of all previously-configured props in the - `configured_props` object. Keep this object in your app's local state, add a - prop once you or the end user selects a value, and pass it to the - `configured_props` API param. - -For example, to retrieve the configuration options for the `refName` prop: - -```json -{ - "async_handle": "IyvFeE5oNpYd", - "external_user_id": "demo-34c13d13-a31e-4a3d-8b63-0ac954671095", - "id": "gitlab-list-commits", - "prop_name": "refName", - "configured_props": { - "gitlab": { - "authProvisionId": "apn_oOhaBlD" - }, - "projectId": 21208123 - } -} -``` - -### Configure dynamic props - -The set of props that a component can accept might not be static, and may change -depending on the values of prior props. Props that behave this way are called -[dynamic props](/components/contributing/api/#dynamic-props), and they need to be configured -in a different way. Props that are dynamic will have a `reloadProps` attribute -set to `true` in the component's definition. - -After configuring a dynamic prop, the set of subsequent props must be recomputed -(or reloaded), which is possible using the following API call: - -```text -POST /v1/connect/components/props -``` - -The payload is similar to the one used for the configuration API, but it -excludes the `prop_name` field since the goal of this call is to reload and -retrieve the new set of props, not to configure a specific one. - -Using the [Add Single Row action for Google Sheets](https://pipedream.com/apps/google-sheets/actions/add-single-row) as an example, the -request payload would look like this: - -```json -{ - "async_handle": "PL41Yf3PuX61", - "external_user_id": "demo-25092fa8-86c0-4d46-86c9-9dc9bde3b964", - "id": "google_sheets-add-single-row", - "configured_props": { - "googleSheets": { - "authProvisionId": "apn_V1hMoE7" - }, - "sheetId": "1BfWjFF2dTW_YDiLISj5N9nKCUErShgugPS434liyytg" - } -} -``` - -In this case, the `sheetId` prop is dynamic, and so after configuring it, the -set of props must be reloaded. The response will contain the new set of props -and their definition, similar to when the [component information was first -retrieved](#retrieving-a-components-definition). The response will also contain -an ID that can be used to reference the new set of props in subsequent -configuration calls. If this is ID is not provided, the set of props will be -based on the definition of the component that was retrieved initially. - -To illustrate, the response for the request above would look like this: - -```json -{ - "observations": [], - "errors": [], - "dynamicProps": { - "id": "dyp_6xUyVgQ", - "configurableProps": [ - { - "name": "googleSheets", - "type": "app", - "app": "google_sheets" - }, - { - "name": "drive", - "type": "string", - "label": "Drive", - "description": "Defaults to `My Drive`. To select a [Shared Drive](https://support.google.com/a/users/answer/9310351) instead, select it from this list.", - "optional": true, - "default": "My Drive", - "remoteOptions": true - }, - { - "name": "sheetId", - "type": "string", - "label": "Spreadsheet", - "description": "The Spreadsheet ID", - "useQuery": true, - "remoteOptions": true, - "reloadProps": true - }, - { - "name": "worksheetId", - "type": "string[]", - "label": "Worksheet(s)", - "description": "Select a worksheet or enter a custom expression. When referencing a spreadsheet dynamically, you must provide a custom expression for the worksheet.", - "remoteOptions": true, - "reloadProps": true - }, - { - "name": "hasHeaders", - "type": "boolean", - "label": "Does the first row of the sheet have headers?", - "description": "If the first row of your document has headers, we'll retrieve them to make it easy to enter the value for each column. Note: When using a dynamic reference for the worksheet ID (e.g. `{{steps.foo.$return_value}}`), this setting is ignored.", - "reloadProps": true - }, - { - "name": "myColumnData", - "type": "string[]", - "label": "Values", - "description": "Provide a value for each cell of the row. Google Sheets accepts strings, numbers and boolean values for each cell. To set a cell to an empty value, pass an empty string." - } - ] - } -} -``` - -### Execution - -Once all the props have been configured, the component can be invoked. Pipedream -supports two types of components: [actions](/components/contributing/api/#actions) and -[sources](/components/contributing/api/#sources) (aka triggers). - -Actions are components that perform a task by taking an input either during -[configuration](#configure-the-component) and/or during invocation (usually both), and -produces a result. Sources are very similar, but the difference is that they are -not invoked directly by end users directly, but rather by events that happen on a -third-party service. For example, the "New File" source for Google Drive will be -triggered every time a new file is created in a specific folder in Google Drive, -then will emit an event for you to consume. - -All this means is that actions can be invoked manually on demand, while sources -are instead deployed and run automatically when the event they are listening for -occurs. - -#### Invoking an action - -At the end of the configuration process for an action, you'll end up with a -payload that you can use to invoke the action. The payload is similar to the one -used for configuring a prop, with the exception of the `prop_name` attribute -(because we're not configuring any props at this point): - -```json -{ - "async_handle": "xFfBakdTGTkI", - "external_user_id": "abc-123", - "id": "gitlab-list-commits", - "configured_props": { - "gitlab": { - "authProvisionId": "apn_kVh9AoD" - }, - "projectId": 45672541, - "refName": "main" - } -} -``` - -To run the action with this configuration, simply send it as the request payload -to the following endpoint: - - - -```javascript -const resp = await pd.runAction({ - externalUserId: "abc-123", - actionId: "gitlab-list-commits", - configuredProps: { - gitlab: { - authProvisionId: "apn_kVh9AoD", - }, - projectId: 45672541, - refName: "main" - } -}); - -// Parse and return the data you need -``` - - -```bash -curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \ - -H "Content-Type: application/json" \ - -H "X-PD-Environment: {environment}" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "external_user_id": "abc-123", - "id": "gitlab-list-commits", - "configured_props": { - "gitlab": { - "authProvisionId": "apn_kVh9AoD" - }, - "projectId": 45672541, - } - }' - -# Parse and return the data you need -``` - - - -The output of executing the action will be a JSON object containing the -following fields: - -1. `exports`: all the named exports produced by the action, like when calling - [`$.export` in a Node.js](/workflows/building-workflows/code/nodejs/#using-export) component. -2. `os`: a list of observations produced by the action (e.g. logs, errors, etc). -3. `ret`: the return value of the action, if any. -4. When using [File Stash](/connect/components/files) to sync local files, the response will also include a `stash` property with file information. - -The following (abbreviated) example shows the output of running the action -above: - -```json -{ - "exports": { - "$summary": "Retrieved 1 commit" - }, - "os": [], - "ret": [ - { - "id": "387262aea5d4a6920ac76c1e202bc9fd0841fea5", - "short_id": "387262ae", - "created_at": "2023-05-03T03:03:25.000+00:00", - "parent_ids": [], - "title": "Initial commit", - "message": "Initial commit", - "author_name": "Jay Vercellone", - "author_email": "nope@pipedream.com", - "authored_date": "2023-05-03T03:03:25.000+00:00", - "committer_name": "Jay Vercellone", - "committer_email": "nope@pipedream.com", - "committed_date": "2023-05-03T03:03:25.000+00:00", - "trailers": {}, - "extended_trailers": {}, - "web_url": "https://gitlab.com/jverce/foo-massive-10231-1/-/commit/387262aea5d4a6920ac76c1e202bc9fd0841fea5" - } - ] -} -``` - -#### Deploying a source - -Because sources are exercised by events that happen on a third-party service, -their semantics are different from actions. Once a source is configured, it must -be deployed to start listening for events. When deploying a source, you -can define either a webhook URL or a Pipedream workflow ID to consume those events. - -Deploying a source is done by sending a payload similar to the one used for -running an action, with the addition of the webhook URL or workflow ID. Using -the **New Issue (Instant)** source for Gitlab as an example, the payload would -look something like this: - -```json -{ - "external_user_id": "abc-123", - "id": "gitlab-new-issue", - "prop_name": "http", - "configured_props": { - "gitlab": { - "authProvisionId": "apn_kVh9AoD" - }, - "projectId": 45672541 - }, - "webhook_url": "https://events.example.com/gitlab-new-issue" -} -``` - -Deploy a source for your users: - - - -```javascript -const { data: deployedTrigger } = await pd.deployTrigger({ - externalUserId: "abc-123", - triggerId: "gitlab-new-issue", - configuredProps: { - gitlab: { - authProvisionId: "apn_kVh9AoD", - }, - projectId: 45672541, - }, - webhookUrl: "https://events.example.com/gitlab-new-issue" -}); - -const { - id: triggerId, // The unique ID of the deployed trigger - name: triggerName, // The name of the deployed trigger - owner_id: userId, // The unique ID in Pipedream of your user -} = deployedTrigger; - -// Parse and return the data you need -``` - - -```bash -curl -X POST https://api.pipedream.com/v1/connect/{project_id}/components/triggers/deploy \ - -H "Content-Type: application/json" \ - -H "X-PD-Environment: {environment}" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "external_user_id": "abc-123", - "id": "gitlab-new-issue", - "configured_props": { - "gitlab": { - "authProvisionId": "apn_kVh9AoD" - }, - "projectId": 45672541, - }, - "webhook_url": "https://events.example.com/gitlab-new-issue" - }' -# Parse and return the data you need -``` - - - -If the source deployment succeeds, the response will contain the information -regarding the state of the source, including all the component's props metadata, -as well as their values. It will also contain its name, creation date, owner, -and most importantly its unique ID, which can be used to manage the source in -the future (e.g. delete it). The response for the request above would look like -this: - -```json -{ - "data": { - "id": "dc_dAuGmW7", - "owner_id": "exu_oedidz", - "component_id": "sc_3vijzQr", - "configurable_props": [ - { - "name": "gitlab", - "type": "app", - "app": "gitlab" - }, - { - "name": "db", - "type": "$.service.db" - }, - { - "name": "http", - "type": "$.interface.http", - "customResponse": true - }, - { - "name": "projectId", - "type": "integer", - "label": "Project ID", - "description": "The project ID, as displayed in the main project page", - "remoteOptions": true - } - ], - "configured_props": { - "gitlab": { - "authProvisionId": "apn_kVh9AoD" - }, - "db": { - "type": "$.service.db" - }, - "http": { - "endpoint_url": "https://xxxxxxxxxx.m.pipedream.net" - }, - "projectId": 45672541 - }, - "active": true, - "created_at": 1734028283, - "updated_at": 1734028283, - "name": "My first project - exu_oedidz", - "name_slug": "my-first-project---exu-oedidz-2" - } -} -``` - -In the example above, the source ID is `dc_dAuGmW7`, which can be used to delete, -retrieve, or update the source in the future. - -Refer to the [full Connect API reference](/connect/api#components) for questions and additional examples. - - - -## Deploying triggers - -These are 2 categories of triggers you can deploy on behalf of your end users: -- [App-based event sources](#app-based-event-sources) -- [Native triggers](#native-triggers) - - -Refer to the [full Connect API reference](/connect/api/#deploy-trigger) to list, retrieve, delete, and manage triggers for your user. - - -### App-based event sources -- Listen for events that occur in other systems: for example, when [a new file is added to Google Drive](https://pipedream.com/apps/google-drive/triggers/new-files-instant) or when [a new contact is created in HubSpot](https://pipedream.com/apps/hubspot/triggers/new-or-updated-contact) -- Deploying these triggers requires that your customers first connect their account using [Pipedream Connect Managed Auth](/connect/managed-auth/quickstart), since the triggers are deployed on their behalf using account -- Refer to the [quickstart above](#deploying-a-source) to get started - -#### Handling test events -- Many event sources attempt to retrieve a small set of historical events on deploy to provide visibility into the event shape for end users and developers -- Exposing real test events make it easier to consume the event in downstream systems without requiring users to trigger real events ([more info](/components/contributing/guidelines/#surfacing-test-events)) -- However, this results in emitting those events to the listening webhook immediately, which may not always be ideal, depending on your use case -- If you'd like to avoid emitting historical events, you can deploy a trigger without defining a `webhook_url`, then [update the listening webhooks for the deployed trigger](/connect/api/#update-webhooks-listening-to-deployed-trigger) after roughly a minute - - -### Native triggers -- You can also deploy native triggers, which don't require any authentication from your end users, so **you should skip the account connection process when configuring these triggers** -- Because these triggers don't use a connected account from your end users, APIs to deploy and manage them are slightly different (see below) - -#### HTTP Webhook -Generate a unique HTTP webhook URL for your end users to configure in any other upstream service. - - - -```javascript -const { data: deployedTrigger } = await pd.deployTrigger({ - externalUserId: "abc-123", - triggerId: "http-new-requests", - webhookUrl: "https://events.example.com/http-new-requests" -}); - -const { - id: triggerId, // The unique ID of the deployed trigger - endpoint_url: endpointUrl, // The endpoint URL to return to the user -} = deployedTrigger; - -// Parse and return the data you need -``` - - -```bash -curl -X POST https://api.pipedream.com/v1/connect/{project_id}/components/triggers/deploy \ - -H "Content-Type: application/json" \ - -H "X-PD-Environment: {environment}" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "external_user_id": "abc-123", - "id": "http-new-requests", - "webhook_url": "https://events.example.com/http-new-requests" - }' - -# Parse and return the data you need -``` - - - -##### Example response - -```json -{ - "id": "hi_zbGHMx", - "key": "xxxxxxxxxx", - "endpoint_url": "http://xxxxxxxxxx.m.pipedream.net", - "custom_response": true, - "created_at": 1744508049, - "updated_at": 1744508049 -} -``` - -#### Schedule -Deploy a timer to act as a cron job that will emit an event on a custom schedule you or your users define. - -##### Configured props - -`cron` (**object**) - -When defining schedules, you can pass one of the following: -- `intervalSeconds`: Define the frequency in seconds -- `cron`: Define a custom cron schedule and optionally define the `timezone`. For example: - -```json -"cron": { - "cron": "0 * * * *", - "timezone": "America/Los_Angeles" // optional, defaults to UTC -} -``` - - - -```javascript -const { data: deployedTrigger } = await pd.deployTrigger({ - externalUserId: "abc-123", - triggerId: "schedule-custom-interval", - configuredProps: { - "cron": { - "intervalSeconds": 900 - } - }, - webhookUrl: "https://events.example.com/schedule-custom-interval" -}); - -const { - id: triggerId, // The unique ID of the deployed trigger -} = deployedTrigger; - -// Parse and return the data you need -``` - - -```bash -curl -X POST https://api.pipedream.com/v1/connect/{project_id}/components/triggers/deploy \ - -H "Content-Type: application/json" \ - -H "X-PD-Environment: {environment}" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "external_user_id": "abc-123", - "id": "schedule-custom-interval", - "configured_props": { - "cron": { - "intervalSeconds": 900 - } - }, - "webhook_url": "https://events.example.com/schedule-custom-interval" - }' - -# Parse and return the data you need -``` - - - -##### Example response - -```json -{ - "id": "ti_aqGTJ2", - "interval_seconds": 900, - "cron": null, - "timezone": "UTC", - "schedule_changed_at": 1744508391, - "created_at": 1744508391, - "updated_at": 1744508391 -} -``` - -#### New emails received -Generate a unique email address for your customers to emit events to - - - -```javascript -const { data: deployedTrigger } = await pd.deployTrigger({ - externalUserId: "abc-123", - triggerId: "email-new-email", - webhookUrl: "https://events.example.com/email-new-email" -}); - -const { - id: triggerId, // The unique ID of the deployed trigger - email_address: emailAddress, // The unique email address to return to the user -} = deployedTrigger; - -// Parse and return the data you need -``` - - -```bash -curl -X POST https://api.pipedream.com/v1/connect/{project_id}/components/triggers/deploy \ - -H "Content-Type: application/json" \ - -H "X-PD-Environment: {environment}" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "external_user_id": "abc-123", - "id": "email-new-email", - "webhook_url": "https://events.example.com/email-new-email" - }' - -# Parse and return the data you need -``` - - - -##### Example response - -```json -{ - "id": "ei_QaJTb0", - "email_address": "xxxxxxxxxx@upload.pipedream.net", - "created_at": 1744499847, - "updated_at": 1744499847 -} -``` - -## Special Prop Types - -### SQL Prop - -The `sql` prop is a specialized prop type used for interacting with SQL databases. It enables developers to build applications that can: - -- Execute custom SQL queries -- Introspect database schemas -- Support prepared statements - -This prop type is used by these database actions: - -- `postgresql-execute-custom-query` -- `snowflake-execute-sql-query` -- `mysql-execute-raw-query` -- `microsoft_sql_server-execute-raw-query` -- `azure_sql-execute-raw-query` -- `turso-execute-query` - -#### Configuration - -When configuring these actions, you'll need to provide: - -1. Database app type and auth (e.g., `postgresql` in this example) -2. A `sql` prop with the following structure: - -```javascript -const configuredProps = { - postgresql: { - authProvisionId: "apn_xxxxxxx" - }, - sql: { - auth: { - app: "postgresql" // Database type -- must match the app prop name - }, - query: "select * from products limit 1", - params: [] // Optional array of parameters for prepared statements - } -} -``` - -#### Using prepared statements - -You can use prepared statements by including placeholders in your query and providing the parameter values in the `params` array. Different database systems use different placeholder syntax: - -- **PostgreSQL** uses `$1`, `$2`, `$3`, etc. for numbered parameters -- **Snowflake**, **MySQL, Azure SQL, Microsoft SQL Server, and Turso** use `?` for positional parameters - - - -```javascript -const configuredProps = { - postgresql: { - authProvisionId: "apn_xxxxxxx" - }, - sql: { - auth: { - app: "postgresql" - }, - query: "select * from products where name = $1 and price > $2 limit 1", - params: ["foo", 10.99] // Values to replace $1 and $2 placeholders - } -} -``` - - -```javascript -const configuredProps = { - mysql: { - authProvisionId: "apn_xxxxxxx" - }, - sql: { - auth: { - app: "mysql" - }, - query: "select * from products where name = ? and price > ? limit 1", - params: ["foo", 10.99] // Values to replace the ? placeholders - } -} -``` - - - - - -Using prepared statements helps prevent SQL injection attacks by separating the SQL command structure from the data values being used, and is strongly recommended. - - -#### Retrieving database schema information - -By retrieving the database schema, developers can: - -- Provide database structure to AI agents for accurate SQL generation -- Build native SQL editors with autocomplete for tables and columns -- Validate queries against the actual database schema before execution - -You can call `configureComponent` on the `sql` prop to retrieve database schema information: - -```javascript -const resp = await pd.configureComponent({ - externalUserId: externalUserId, - propName: "sql", - componentId: "postgresql-execute-custom-query", - configuredProps: { - postgresql: { - authProvisionId: accountId - }, - }, -}); -``` - -The response includes a `context.dbInfo` object containing detailed schema information for all tables in the database: - -```json -{ - "context": { - "dbInfo": { - "products": { - "metadata": {}, - "schema": { - "id": { - "tableName": "products", - "columnName": "id", - "isNullable": "NO", - "dataType": "integer", - "columnDefault": "nextval('products_id_seq'::regclass)" - }, - "name": { - "tableName": "products", - "columnName": "name", - "isNullable": "NO", - "dataType": "character varying", - "columnDefault": null - }, - "description": { - "tableName": "products", - "columnName": "description", - "isNullable": "YES", - "dataType": "text", - "columnDefault": null - }, - "price": { - "tableName": "products", - "columnName": "price", - "isNullable": "NO", - "dataType": "numeric", - "columnDefault": null - }, - "created_at": { - "tableName": "products", - "columnName": "created_at", - "isNullable": "YES", - "dataType": "timestamp with time zone", - "columnDefault": "CURRENT_TIMESTAMP" - } - } - } - } - } -} -``` - -## Troubleshooting - -### Referencing the app prop in configured props payload - -If you encounter an error like `Cannot read properties of undefined (reading 'oauth_access_token')`, it's likely related to an incorrect reference to the app prop in your configured_props payload. - -For example, using `google_sheets` instead of `googleSheets`, or `stripe` instead of `app`. Always use the exact app prop name as returned by the component definition. - -The app prop name can be found in the component's definition under `configurable_props`: - -```json -"configurable_props": [ - { - "name": "googleSheets", // Use this exact name in your payload - "type": "app", - "app": "google_sheets" - }, - ... -] -``` - -### Passing dynamic props ID - -When working with components that use dynamic props, you must track and pass the `dynamicPropsId` in your API calls. After calling the API to reload props as described in the [Configure dynamic props](#configure-dynamic-props) section, you'll receive a response containing a `dynamicProps.id` value that looks like `dyp_6xUyVgQ`. - -This ID must be included in subsequent API calls to `runAction` or `deployTrigger`. Failing to include it can result in errors like: - -```json -{ - "name": "Error", - "message": "undefined is not an array or an array-like" -} -``` - -or - -```json -{ - "title": "TypeError", - "detail": "Cannot read properties of undefined (reading 'endpoint')" -} -``` - -For example, after receiving the dynamic props ID from the reload props call, include it in your action execution: - -```javascript -// First, reload props for a component with dynamic props -const { dynamicProps } = await pd.reloadProps({ โ€ฆ }); - -// Then use the dynamicProps.id when running the action -const resp = await pd.runAction({ - externalUserId: "abc-123", - actionId: "google_sheets-add-single-row", - dynamicPropsId: dynamicProps.id, // Must include this - configuredProps: { - googleSheets: { - authProvisionId: account.id, - }, - sheetId: "1BfWjFF2dTW_YDiLISj5N9nKCUErShgugPS434liyytg", - worksheetId: "Sheet1", - // ... other configured props - } -}); -``` - -Remember to maintain this ID in your application state while the user is configuring the component, and include it in all subsequent API calls related to that particular configuration. - -### Checking source logs for deployed triggers - -If a deployed trigger isn't emitting events as expected, you can examine the source logs to get a better sense of what's happening. - -Use the following URL to access logs and view emitted events: - -``` -https://pipedream.com/sources/{dcid} -``` - -Replace `{dcid}` with your deployed component ID (e.g., `dc_dAuGmW7`). - -The sources UI contains three tabs: - -- **Events**: Lists emitted events from the deployed trigger that will be sent to the subscribed webhook or workflow. This helps you verify that events are being properly processed and understand their structure. - -- **Logs**: Displays execution history for the trigger. For polling sources, this shows each time the trigger checks for updates. For webhook-based instant sources, it shows each time the source receives an event from the upstream API. This tab is especially useful for troubleshooting when events aren't being emitted as expected. - -- **Configuration**: Provides a read-only view of the deployed source's code and configuration. While you can't modify settings for deployed triggers that belong to external users here, this tab offers insight into how the trigger is configured. - - -This UI view is currently in beta and has some limitations. Some UI elements may appear unpolished, and the configuration tab has limited functionality. - - diff --git a/docs-v2/pages/connect/index.mdx b/docs-v2/pages/connect/index.mdx deleted file mode 100644 index 77c4c7549054d..0000000000000 --- a/docs-v2/pages/connect/index.mdx +++ /dev/null @@ -1,74 +0,0 @@ -import Callout from '@/components/Callout' -import { Steps, Tabs } from 'nextra/components' -import Image from 'next/image' -import VideoPlayer from "@/components/VideoPlayer"; - -# Pipedream Connect - -**Connect provides a developer toolkit that lets you add {process.env.PUBLIC_APPS}+ integrations to your app or AI agent.** You can build AI agents, chatbots, workflow builders, [and much more](/connect/use-cases/), all in a few minutes. You have full, code-level control over how these integrations work in your app. You handle your product, Pipedream simplifies the integration. - -![Connect visualization](https://res.cloudinary.com/pipedreamin/image/upload/v1738731467/pd-connect-viz_cep0uq.png) - -## Demos - - -Check out [Pipedream MCP](/connect/mcp/developers) in our **[demo chat app](https://chat.pipedream.com)** or explore the [Connect SDK](/connect/components) in our **[playground](https://pipedream.com/connect/demo)**. - - -## Managed auth - -- Handle authorization or accept API keys on behalf of your users, for any of Pipedream's [{process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps) -- Use the [Client SDK](https://github.com/PipedreamHQ/pipedream/tree/master/packages/sdk) or [Connect Link](/connect/managed-auth/quickstart/#or-use-connect-link) to accept auth in minutes -- Ship new integrations quickly with Pipedream's approved OAuth clients, or use your own - - -## Make requests on behalf of your users - -- Use [Pipedream's MCP server](/connect/mcp/developers) to provide your AI agent 10,000+ tools from {process.env.PUBLIC_APPS}+ APIs -- Add our [entire registry](https://github.com/PipedreamHQ/pipedream/tree/master/components) of [pre-built tools and triggers](/connect/components) from {process.env.PUBLIC_APPS}+ APIs to your SaaS app or workflow builder -- Send custom API requests while still avoiding dealing with customer credentials with the [Connect proxy](/connect/api-proxy/) -- Develop and deploy complex multi-step [workflows](/connect/workflows/) in our best-in-class [visual builder](/workflows/building-workflows/) - -{/* Pipedream Connect overview */} - -## Use cases - -Pipedream Connect lets you build any API integration into your product in minutes. Our customers build: - -- **AI products**: Talk to any AI API or LLM, interacting with your users or running AI-driven asynchronous tasks -- **In-app messaging**: Send messages to Slack, Discord, Microsoft Teams, or any app directly from your product. -- **CRM syncs**: Sync data between your app and Salesforce, HubSpot, or any CRM -- **Spreadsheet integrations**: Sync data between your app and Google Sheets, Airtable, or any spreadsheet - -[and much more](/connect/use-cases/). - -## Getting started - -Visit [the managed auth quickstart](/connect/quickstart/) to build your first integration. - -## Plans and pricing - -**Connect is entirely free to get started and use in development mode**. Once you're ready to ship to production, check out our [pricing page](https://pipedream.com/pricing?plan=Connect) for the latest info. - -## Security - -Pipedream takes the security of our products seriously. See [details on Connect security](/privacy-and-security/#pipedream-connect) and [our general security docs](/privacy-and-security/). Please send us any questions or [suspected vulnerabilities](/privacy-and-security/#reporting-a-vulnerability). You can also get a copy of our [SOC 2 Type 2 report](/privacy-and-security/#soc-2), [sign HIPAA BAAs](/privacy-and-security/#hipaa), and get information on other practices and controls. - -### Storing user credentials, token refresh - -All credentials and tokens are sent to Pipedream securely over HTTPS, and encrypted at rest. [See our security docs on credentials](/privacy-and-security/#third-party-oauth-grants-api-keys-and-environment-variables) for more information. - -### How to secure your Connect apps - -- **Secure all secrets** โ€” Secure your Pipedream OAuth client credentials, and especially any user credentials. Never expose secrets in your client-side code. Make all requests to Pipedream's API and third-party APIs from your server-side code. -- **Use HTTPS** โ€” Always use HTTPS to secure your connections between your client and server. Requests to Pipedream's API will be automatically redirected to HTTPS. -- **Use secure, session-based auth between your client and server** โ€” authorize all requests from your client to your server using a secure, session-based auth mechanism. Use well-known identity providers with services like [Clerk](https://clerk.com/), [Firebase](https://firebase.google.com/), or [Auth0](https://auth0.com/) to securely generate and validate authentication tokens. The same follows for Pipedream workflows โ€” if you trigger Pipedream workflows from your client or server, validate all requests in the workflow before executing workflow code. -- **Secure your workflows** โ€” See our [standard security practices](/privacy-and-security/best-practices) for recommendations on securing your Pipedream workflows. - -## Glossary of terms - -- **App**: GitHub, Notion, Slack, Google Sheets, and more. The app is the API you want your users to connect to in your product. See the [full list here](https://pipedream.com/apps). -- **Developer**: This is probably you, the Pipedream customer who's developing an app and wants to use Connect to make API requests on behalf of your end users. -- **End User**: Your customer or user, whose data you want to access on their behalf. End users are identifed via the `external_user_id` param in the Connect SDK and API. -- **Connected Account**: The account your end user connects. [Read more about connected accounts](/apps/connected-accounts). -- **OAuth Client**: This is admittedly a bit of an overloaded term and refers both to [custom OAuth clients](/connect/managed-auth/oauth-clients/) you create in Pipedream to use when your end users authorize access to their account, as well as [OAuth clients to authenticate to Pipedream's API](/rest-api/auth/#oauth). diff --git a/docs-v2/pages/connect/managed-auth/_meta.tsx b/docs-v2/pages/connect/managed-auth/_meta.tsx deleted file mode 100644 index 2e217dee82d9e..0000000000000 --- a/docs-v2/pages/connect/managed-auth/_meta.tsx +++ /dev/null @@ -1,10 +0,0 @@ -export default { - "quickstart": "Quickstart", - "users": "Users", - "tokens": "Connect Tokens", - "connect-link": "Connect Link", - "oauth-clients": "OAuth Clients", - "environments": "Environments", - "webhooks": "Webhooks", - "customization": "Project Configuration", -} as const diff --git a/docs-v2/pages/connect/managed-auth/connect-link.mdx b/docs-v2/pages/connect/managed-auth/connect-link.mdx deleted file mode 100644 index 2ec0ac3ae19df..0000000000000 --- a/docs-v2/pages/connect/managed-auth/connect-link.mdx +++ /dev/null @@ -1,32 +0,0 @@ -# Connect Link - -Connect Link provides a Pipedream-hosted link that lets you connect third-party accounts without any frontend implementation in your app. - -## When to use Connect Link - -If you aren't able to execute JavaScript or open an iFrame in your frontend, or you want to send users a URL to connect accounts via email or SMS, use Connect Link. That URL opens a Pipedream-hosted page that guides the user through the account connection flow. The URL is scoped to the specific end user, and expires after 4 hours. - -## How to generate a link - -See [the Connect quickstart](/connect/managed-auth/quickstart/) for a full tutorial for getting Connect up and running. - -Here's a quick overview of how to generate a Connect Link URL: - -1. First, [generate a token](/connect/managed-auth/quickstart/#generate-a-short-lived-token) for your users. -2. Extract the `connect_link_url` from the token response. -3. Before returning the URL to your user, add an `app` parameter to the end of the query string: - -``` -https://pipedream.com/_static/connect.html?token={token}&connectLink=true&app={appSlug} -``` - -4. Redirect your users to this URL, or send it to them via email, SMS, and more. - -**To test this code, check out this workflow:** -[https://pipedream.com/new?h=tch_4RfjXN](https://pipedream.com/new?h=tch_4RfjXN) - -## Success and error redirect URLs - -To automatically redirect users somewhere after they complete the connection flow (or if an error occurs), define the `success_redirect_uri` and `error_redirect_uri` parameters during token creation. [See the API docs](/connect/api/#create-token) for details. - -In the absence of these URLs, Pipedream will redirect the user to a Pipedream-hosted success or error page at the end of the connection flow. diff --git a/docs-v2/pages/connect/managed-auth/customization.mdx b/docs-v2/pages/connect/managed-auth/customization.mdx deleted file mode 100644 index a87adc2ea8b7b..0000000000000 --- a/docs-v2/pages/connect/managed-auth/customization.mdx +++ /dev/null @@ -1,37 +0,0 @@ -import ArcadeEmbed from '@/components/ArcadeEmbed' -import Callout from '@/components/Callout' - -# Project Configuration - -By default, your end users will see a primarly Pipedream branded experience when they connect their account. To customize this screen to highlight your application, you can configure your [app's name](#application-name), [support email](#support-email), and [logo](#logo) in the Pipedream UI. - - - - -## Customizing your application details - -Open your project in the Pipedream UI: [https://pipedream.com/projects](https://pipedream.com/projects) - -1. Once you've opened your project, click the **Connect** tab in the left sidebar -2. From there, select the **Configuration** tab - -![Pipedream Connect Configuration](https://res.cloudinary.com/pipedreamin/image/upload/v1731045468/connect-app-config_th9fqo.png) - -### Application name -By default, your end users will see: ->We use Pipedream to connect your account - -Enter the name of your application that you'd like to show instead, so it reads: ->\{Application Name\} uses Pipedream to connect your account - -### Support email -In the case of any errors during the account connection flow, by default your users will see: ->Connection failed. Please retry or contact support. - -To give your end users an email address to seek support, enter your support email. We'll display it: ->Connection failed. Please retry or contact support [help@example.com](mailto:help@example.com). - -### Logo -By default we'll show Pipedream's logo alongside the app your user is connecting to. If you'd like to show your own logo instead, upload it here. \ No newline at end of file diff --git a/docs-v2/pages/connect/managed-auth/environments.mdx b/docs-v2/pages/connect/managed-auth/environments.mdx deleted file mode 100644 index 67af2fa4363db..0000000000000 --- a/docs-v2/pages/connect/managed-auth/environments.mdx +++ /dev/null @@ -1,68 +0,0 @@ -import Callout from '@/components/Callout' -import Image from 'next/image' - -# Environments - -Pipedream Connect projects support two environments: `development` and `production`. Connected accounts and credentials stored in one environment remain separate from the other. - - -You can use all of the Connect features in `development` mode **on any plan**. **[Visit the pricing page](https://pipedream.com/pricing?plan=Connect)** to select the right plan when you're ready to ship your app to production. - - -## Development mode - -Development mode provides access to all Connect features while you're building and testing your integration with the following constraints: - -- **Maximum of 10 external users**: The development environment is limited to 10 unique external user IDs. If you exceed this limit, you'll need to [delete some existing users](/connect/managed-auth/users/#deleting-users) before adding new ones. -- **Must be signed in to pipedream.com**: When connecting an account in development mode, you must be signed in to pipedream.com in the same browser where you're connecting your account. -- **Personal testing only**: Development mode is intended for your own accounts during testing and development, not for your real end users. - - -The `development` environment is not intended for production use with your customers. When you're ready to launch, you should transition to `production`. - - -
- -Connect in development mode - -## How to specify the environment - -You specify the environment when [creating a new Connect token](/connect/api/#create-token) with the Pipedream SDK or API. When users successfully connect their account, Pipedream saves the account credentials (API key, access token, etc.) for that `external_user_id` in the specified environment. - -Always set the environment when you create the SDK client: - -```typescript -import { createBackendClient } from "@pipedream/sdk/server"; - -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "your-oauth-client-id", - clientSecret: "your-oauth-client-secret", - }, - projectId: "proj_xxxxxxx" -}); -``` - -or pass the `x-pd-environment` header in HTTP requests: - -```bash -curl -X POST https://api.pipedream.com/v1/connect/{project_id}/tokens \ - -H "Content-Type: application/json" \ - -H "x-pd-environment: development" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "external_user_id": "your-external-user-id" - }' -``` - -## Shipping Connect to production - -When you're ready to ship to production: - -1. Visit the [pricing page](https://pipedream.com/pricing?plan=Connect) to enable production access -2. Update your environment to `production` in your SDK client configuration and / or API calls - - -Using Connect in production doesn't have any user limits and doesn't require that the end user is signed in to pipedream.com like the development environment does. - \ No newline at end of file diff --git a/docs-v2/pages/connect/managed-auth/oauth-clients.mdx b/docs-v2/pages/connect/managed-auth/oauth-clients.mdx deleted file mode 100644 index 22029c799c676..0000000000000 --- a/docs-v2/pages/connect/managed-auth/oauth-clients.mdx +++ /dev/null @@ -1,42 +0,0 @@ -import Image from 'next/image' -import Callout from '@/components/Callout' - -# OAuth Clients - -When connecting an account for any OAuth app via Pipedream Connect, we'll default to using Pipedream's official OAuth client, which enables you to quickly get up and running. [Read more about OAuth clients in Pipedream here](/apps/connected-accounts/oauth-clients). - -## Using Pipedream OAuth - -There are two types of apps in Pipedream: - -1. **Key-based**: These apps require static credentials, like API keys. Pipedream stores these credentials securely and exposes them via API. -2. **OAuth**: These apps require OAuth authorization. Pipedream manages the OAuth flow for these apps, ensuring you always have a fresh access token for requests. - - -For any OAuth app that supports it, **you can always use your own client.** Your ability to use Pipedream's OAuth clients in production depends on the use case. See below for details. - - -
- -
-| Operation | Details | OAuth Client | -|--------|---------|------------------------------| -| Retrieve user credentials | [Fetch the credentials](/connect/api#accounts) for your end user from Pipedream's API to use in your app | โŒ Pipedream
โœ… Custom | -| Invoke workflows | [Trigger any Pipedream workflow](/connect/workflows) and use the connected account of your end users | โŒ Pipedream
โœ… Custom | -| Embed prebuilt tools | [Run any action and deploy any trigger](/connect/components) directly from your AI agent or app | โœ… Pipedream
โœ… Custom | -| Proxy API requests | [Write custom code to interface with any integrated API](/connect/api-proxy) while avoiding dealing with user auth | โœ… Pipedream
โœ… Custom | -
- -## Using a custom OAuth client - -1. Follow the steps [here](/apps/oauth-clients#configuring-custom-oauth-clients) to create an OAuth client in Pipedream. -2. When connecting an account either via the [frontend SDK](/connect/managed-auth/quickstart/#use-the-pipedream-sdk-in-your-frontend), make sure to include the `oauthAppId` in `pd.connectAccount()`. -3. If using [Connect Link](/connect/managed-auth/quickstart/#or-use-connect-link), make sure to include the `oauthAppId` in the URL. - -### Finding your OAuth app ID - -[Create your OAuth client in Pipedream](https://pipedream.com/@/accounts/oauth-clients) then click the arrow to the left of the client name to expand the details. - -
- -Copy OAuth App ID diff --git a/docs-v2/pages/connect/managed-auth/quickstart.mdx b/docs-v2/pages/connect/managed-auth/quickstart.mdx deleted file mode 100644 index b63f389a81967..0000000000000 --- a/docs-v2/pages/connect/managed-auth/quickstart.mdx +++ /dev/null @@ -1,140 +0,0 @@ -import Callout from '@/components/Callout' -import { Steps } from 'nextra/components' -import Image from 'next/image' -import VideoPlayer from "@/components/VideoPlayer" -import { GlobalConnectProvider } from '@/components/GlobalConnectProvider' -import TokenGenerationDemo from '@/components/TokenGenerationDemo' -import AccountConnectionDemo from '@/components/AccountConnectionDemo' -import ConnectLinkDemo from '@/components/ConnectLinkDemo' - -# Managed Auth Quickstart - - - -Pipedream Connect is the easiest way for your users to connect to [over {process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps), **right in your product**. You can build in-app messaging, CRM syncs, AI agents, [and much more](/connect/use-cases/), all in a few minutes. - -## Visual overview - -Here's a high-level overview of how Connect works with your app: - -
-Pipedream Connect overview - -Here's how Connect sits in your frontend and backend, and communicates with Pipedream's API: - -
-Connect developer flow - -## Getting started - -We'll walk through these steps below with an interactive demo that lets you see an execute the code directly in the docs. - - - -### Configure your environment - -You'll need to do two things to add Pipedream Connect to your app: - -1. [Connect to the Pipedream API from your server](#generate-a-short-lived-token). This lets you make secure calls to the Pipedream API to initiate the account connection flow and retrieve account credentials. -2. [Add the Pipedream SDK to your frontend](#connect-your-users-account) or redirect your users to [a Pipedream-hosted URL](/connect/connect-link/) to start the account connection flow. - -If you're building your own app, you'll need to provide these credentials to the environment, or retrieve them from your secrets store: - -```bash -# Used to authorize requests to the Pipedream API -PIPEDREAM_CLIENT_ID=your_client_id -PIPEDREAM_CLIENT_SECRET=your_client_secret -PIPEDREAM_ENVIRONMENT=development -PIPEDREAM_PROJECT_ID=your_project_id -``` - -### Create a project in Pipedream - -1. Open an existing Pipedream project or create a new one at [pipedream.com/projects](https://pipedream.com/projects) -2. Click the **Settings** tab, then copy your **Project ID** - -### Create a Pipedream OAuth client - -Pipedream uses OAuth to authorize requests to the REST API. To create an OAuth client: - -1. Visit the [API settings](https://pipedream.com/settings/api) for your workspace -2. Create a new OAuth client and note the client ID and secret - -You'll need these when configuring the SDK and making API requests. - -### Generate a short-lived token - -To securely initiate account connections for your users, you'll need to generate a short-lived token for your users and use that in the [account connection flow](#connect-your-users-account). See [the docs on Connect tokens](/connect/tokens/) for a general overview of why we need to create tokens and scope them to end users. - -Check out the code below **try it yourself**: - -
- -
- -Once you have a token, return it to your frontend to start the account connection flow for the user, or redirect them to a Pipedream-hosted URL with [Connect Link](#or-use-connect-link). - - -Refer to the API docs for [full set of parameters you can pass](/connect/api/#create-token) in the `ConnectTokenCreate` call. - - -### Connect your user's account - -You have two options when connecting an account for your user: - -1. [Use the Pipedream SDK](#use-the-pipedream-sdk-in-your-frontend) in your frontend -2. [Use Connect Link](#or-use-connect-link) to deliver a hosted URL to your user - -#### Use the Pipedream SDK in your frontend - -Use this method when you want to handle the account connection flow yourself, in your app. For example, you might want to show a **Connect Slack** button in your app that triggers the account connection flow. - -First, install the [Pipedream SDK](https://www.npmjs.com/package/@pipedream/sdk) in your frontend: - -```bash -npm i --save @pipedream/sdk -``` - -When the user connects an account in your product, [pass the token from your backend](#generate-a-short-lived-token) and call `connectAccount`. This opens a Pipedream iFrame that guides the user through the account connection. - -Try the interactive demo below to connect an account after generating a token in the previous step: - -
- -
- -#### Or use Connect Link - -Use this option when you can't execute JavaScript or open an iFrame in your environment (e.g. mobile apps) and instead want to share a URL with your end users. - -The Connect Link URL opens a Pipedream-hosted page, guiding users through the account connection process. The URL is specific to the user and expires after 4 hours. - -After generating a token in the [step above](#generate-a-short-lived-token), you can use the resulting Connect Link URL. Try it below: - -
- -
- - -Make sure to add the `app` parameter to the end of the URL to specify the app. - -Check out the [full API docs](/connect/api/#create-token) for all parameters you can pass when creating tokens, including setting redirect URLs for success or error cases. - - -### Make authenticated requests - -Now that your users have connected an account, you can use their auth in one of a few ways: - -1. [Expose 10k+ tools](/connect/components/) to your AI app or agent and call them on behalf of your customers -2. [Send custom requests](/connect/api-proxy/) to any one of the 2500+ APIs using the Connect API proxy -3. [Use Pipedream's visual workflow builder](/connect/workflows/) to define complex logic to run on behalf of your users -4. [Embed Pipedream components directly in your app](/connect/components/) to run actions and triggers on their behalf - -### Deploy your app to production - -- Test end to end in [development](/connect/managed-auth/environments/) -- Ship to production! - -
- -
diff --git a/docs-v2/pages/connect/managed-auth/tokens.mdx b/docs-v2/pages/connect/managed-auth/tokens.mdx deleted file mode 100644 index 18b4860940115..0000000000000 --- a/docs-v2/pages/connect/managed-auth/tokens.mdx +++ /dev/null @@ -1,32 +0,0 @@ -import Callout from '@/components/Callout' - -# Connect Tokens - -When you initiate account connection for your end users, you must either: - -1. Generate a secure, short-lived token scoped to the end user, or -2. Use the [Connect Link](/connect/connect-link/) feature to generate a URL that guides the user through the account connection flow without any frontend work on your side. - -Here, we'll show you how to generate tokens for your users and return that to your frontend, passing that to the account connection flow. - -Use tokens when you want to handle the account connection flow yourself, in your app's UI. For example, you might want to show a **Connect Slack** button in your app that triggers the account connection flow for Slack, or launch the flow in a modal. - - -Connect tokens currently have a 4-hour expiry, and can only be used once. - - -## Creating a token - -See docs on [the `/tokens` endpoint](/connect/api/#create-token) to create new tokens. - -## Webhooks - -When you generate a token, you can specify a `webhook_uri` where Pipedream will deliver updates on the account connection flow. This is useful if you want to update your UI based on the status of the account connection flow, get a log of errors, and more. - -[See the webhooks docs](/connect/webhooks/) for more information. - -## Tokens are scoped to end users and environments - -When you [create a new Connect token](/connect/api/#create-token), you pass an `external_user_id` and an `environment`. See the docs on [environments](/connect/managed-auth/environments/) for more information on passing environment in the SDK and API. - -Tokens are scoped to this user and environment. When the user successfully connects an account with that token, it will be saved for that `external_user_id` in the specified environment. diff --git a/docs-v2/pages/connect/managed-auth/troubleshooting.mdx b/docs-v2/pages/connect/managed-auth/troubleshooting.mdx deleted file mode 100644 index c21c987b4a6a6..0000000000000 --- a/docs-v2/pages/connect/managed-auth/troubleshooting.mdx +++ /dev/null @@ -1,51 +0,0 @@ -import Callout from '@/components/Callout' - -# Troubleshooting - -Below are some common errors when connecting your users' accounts via Pipedream Connect. - -### Error creating a Connect token - ->Error creating token: Error: Failed to obtain OAuth token: Response Error: 401 Unauthorized - -Authorization to the Pipedream API failed when creating the Connect token. Double-check the client ID or secret for your [Pipedream OAuth client](/connect/api/#authentication). - -### Error connecting an account - -Most errors when connecting an account are related to the [Connect token](/connect/tokens/), which Pipedream validates from the Connect iFrame. - -#### Common errors - ->This link has expired. Please request a new one from the app developer. - ->This session has expired. Please refresh the page to try again. - -#### Troubleshooting steps - -Pipedream typically returns an explicit error message in the HTTP response of the token validation network call directly from the iFrame in the client. To check for errors, start the account connection flow in a browser and open the developer console to view the network requests. - -Filter for requests to - -``` -https://api.pipedream.com/v1/connect/tokens -``` - -and check the response for error messages. - -#### Token validation errors - ->The Pipedream Connect token is invalid. Please generate a new one and try again. - -Connect tokens expire, and are only able to be used once. Try generating a new token and try again. - ->App not found. Please check your app id. - -Double-check the app slug you're passing [when connecting your user's account](/connect/managed-auth/quickstart/#connect-your-users-account). - -### Connection failed. Please retry or contact support. - -The user may have closed the OAuth popup window without completing authorization. - - -If you're still have trouble or hitting an error that isn't listed here, [get in touch with us](https://pipedream.com/support). We'd love to help. - diff --git a/docs-v2/pages/connect/managed-auth/users.mdx b/docs-v2/pages/connect/managed-auth/users.mdx deleted file mode 100644 index c8cac54fd2273..0000000000000 --- a/docs-v2/pages/connect/managed-auth/users.mdx +++ /dev/null @@ -1,72 +0,0 @@ -import Callout from '@/components/Callout' - -# Users - -To view or delete your users' connected accounts: - -1. Open your project in Pipedream -2. Click the **Connect** tab on the left -3. Click the **Users** tab at the top - -You'll see a list of all users, their connected accounts, and the option to delete any accounts from the UI. You can also retrieve and delete all your users via the API ([see the docs for reference](/connect/api/)). - -## Connecting multiple accounts - -Users can connect multiple accounts for many different apps, or for the same app (e.g., I can connect my Notion and Gmail accounts, as well as accounts for multiple Slack workspaces). - -When retrieving account information [from the API](/connect/api/#accounts), you can filter by `external_user_id` and / or `app` to retrieve information for a specific user and / or app. - - -When running workflows on behalf of an end user, right now you can only use a single account for a given app. If there are multiple connected accounts for that app, **Pipedream will use the most recently created account**. See more info on running workflows for your users [here](/connect/workflows). - - -## Deleting accounts - -You can delete an individual connected account or an entire user and all associated accounts and resources from the UI or via the API. - -### Deleting individual connected accounts - -If you need more granular control, you can delete specific connected accounts instead of removing the entire user. - -#### From the UI -1. Open the project in Pipedream -2. Navigate to the **Users** tab under **Connect** -3. Find the user whose accounts you want to manage -4. View all connected accounts for that user in the expanded section -5. Click the **Delete** button next to the specific account you want to remove - -This allows for more granular control over which integrated services remain accessible to your users. - -#### Via the API -You can delete specific connected accounts programmatically: - -```bash -curl -X DELETE "https://api.pipedream.com/v1/connect/{project_id}/accounts/{account_id}" \ - -H "Authorization: Bearer {access_token}" -``` - -For complete API details including TypeScript and Node.js examples, [refer to the API reference](/connect/api/#delete-connected-account). - -### Deleting users - -When you delete a user, all of their connected accounts and deployed resources (if any) are permanently removed from Pipedream. There are two ways to delete users: - -#### From the UI -1. Open the project in Pipedream -2. Navigate to the **Users** tab under **Connect** -3. Locate the user you wish to delete -4. Click the **Delete User** button from the overlow menu at the end of the row - - -Deleting a user is permanent and cannot be undone. All connected accounts for this user will be permanently removed. - - -#### Via the API -You can delete a user programmatically using the Pipedream API: - -```bash -curl -X DELETE "https://api.pipedream.com/v1/connect/{project_id}/users/{external_user_id}" \ - -H "Authorization: Bearer {access_token}" -``` - -For complete API details including TypeScript and Node.js examples, see the [API reference](/connect/api/#delete-external-user). \ No newline at end of file diff --git a/docs-v2/pages/connect/managed-auth/webhooks.mdx b/docs-v2/pages/connect/managed-auth/webhooks.mdx deleted file mode 100644 index 51caf5c9e892f..0000000000000 --- a/docs-v2/pages/connect/managed-auth/webhooks.mdx +++ /dev/null @@ -1,54 +0,0 @@ -# Connect Webhooks - -When you [generate a Connect token](/connect/managed-auth/quickstart/#generate-a-short-lived-token), you can pass a `webhook_uri` parameter. Pipedream will send a POST request to this URL when the user completes the connection flow, or if an error occurs at any point. [See the API docs](/connect/api/#create-token) for details. - -## Webhook events - -- `CONNECTION_SUCCESS` - Sent when the user successfully connects their account -- `CONNECTION_ERROR` - Sent when an error occurs during the connection flow - -## Webhook payload - -### Successful connection - -Please note that user credentials are not sent in the webhook request. To retrieve credentials, use the [Connect API to fetch the account](/connect/api/#retrieve-account-details-by-id) using the `account.id` provided in the webhook payload. - -```json -{ - "event": "CONNECTION_SUCCESS", - "connect_token": "abc123", - "environment": "production", - "connect_session_id": 123, - "account": { - "id": "apn_abc123", - "name": "My Slack workspace", - "external_id": "U123456", - "healthy": true, - "dead": false, - "app": { - "id": "app_abc123", - "name_slug": "slack", - "name": "Slack", - "auth_type": "oauth", - "description": "Slack is a channel-based messaging platform", - "img_src": "https://assets.pipedream.net/icons/slack.svg", - "custom_fields_json": [], - "categories": "Communication", - }, - "created_at": "2021-09-01T00:00:00Z", - "updated_at": "2021-09-01T00:00:00Z", - } -} -``` - -### Error - -```json -{ - "event": "CONNECTION_ERROR", - "connect_token": "abc123", - "environment": "production", - "connect_session_id": 123, - "error": "You've hit your limit on the number of external users you can connect." -} -``` diff --git a/docs-v2/pages/connect/mcp/_meta.tsx b/docs-v2/pages/connect/mcp/_meta.tsx deleted file mode 100644 index dd772dd48299e..0000000000000 --- a/docs-v2/pages/connect/mcp/_meta.tsx +++ /dev/null @@ -1,6 +0,0 @@ -export default { - "index": "Overview", - "developers": "Developers", - "openai": "OpenAI", - "users": "Consumers", -} as const diff --git a/docs-v2/pages/connect/mcp/developers.mdx b/docs-v2/pages/connect/mcp/developers.mdx deleted file mode 100644 index fcdbecf68f6c7..0000000000000 --- a/docs-v2/pages/connect/mcp/developers.mdx +++ /dev/null @@ -1,434 +0,0 @@ -import { Callout, Steps, Tabs } from 'nextra/components' - -# Add Pipedream MCP to your app or agent - -Add Pipedream's MCP server to your application or agent to make tool calls on behalf of your users to {process.env.PUBLIC_APPS}+ APIs and 10,000+ tools. - - -Pipedream Connect includes built-in user authentication for [every MCP server](https://mcp.pipedream.com), which means you don't need to build any authorization flows or deal with token storage and refresh in order to make authenticated requests on behalf of your users. [Learn more here](/connect/mcp/developers/#user-account-connections). - - -## Overview - -Pipedream's MCP server code is [publicly available on GitHub](https://github.com/PipedreamHQ/pipedream/blob/master/modelcontextprotocol/README.md), and you have two options for using Pipedream's MCP server in your app: - -1. [Use Pipedream's remote MCP server](#use-pipedreams-remote-mcp-server) -2. [Self-host Pipedream's MCP server](#self-host-pipedreams-mcp-server) - - -**Try out Pipedream MCP in our demo app: [chat.pipedream.com](https://chat.pipedream.com)** - - -### Pipedream concepts to understand - -The MCP server accepts two route params: - -**`external_user_id`** - -- This is your userโ€™s ID, in your system: whatever you use to uniquely identify them -- Requests made for that user ID are coupled to that end user and their connected accounts ([learn more](/connect/api/#external-users)) - -**`app`** - -- The app's "name slug" (the unique identifier for the app) -- [See below](#discover-available-mcp-servers) for learn how to discover available apps - -## Getting started - -### Prerequisites - -To use either the remote or self-hosted MCP server, you'll need: - -1. A [Pipedream account](https://pipedream.com/auth/signup) -2. A [Pipedream project](/projects/#creating-projects). Accounts connected via MCP will be stored here. -3. [Pipedream OAuth credentials](/rest-api/auth/#oauth) - -#### Set up your environment - -Set the following environment variables: - -```bash -PIPEDREAM_CLIENT_ID=your_client_id -PIPEDREAM_CLIENT_SECRET=your_client_secret -PIPEDREAM_PROJECT_ID=your_project_id # proj_xxxxxxx -PIPEDREAM_ENVIRONMENT=development # development | production -``` - -Learn more about [environments in Pipedream Connect](/connect/managed-auth/environments). - -### Authentication - -#### Developer authentication - -Your application authenticates with Pipedream using client credential OAuth. [See below](#api-authentication) for details. - -#### User account connections - -One of the core features of Pipedream Connect and our MCP product is the ability for your users to easily connect their accounts without having to build any of the authorization flow or handle token storage. - -You can handle account connections in one of two ways in your app: - -##### Add a button in your UI -- Use Pipedream's [frontend SDK](/connect/managed-auth/quickstart/#use-the-pipedream-sdk-in-your-frontend) to let users connect their account directly in your UI -- You can see an example of this when you connect any account in [mcp.pipedream.com](https://mcp.pipedream.com) - -##### Return a link -- Use [Connect Link ](/connect/managed-auth/quickstart/#or-use-connect-link) to let your users open a Pipedream hosted page to connect their account -- There's no implementation required for this option since it's already handled by Pipedream's MCP server -- If a user doesn't have a connected account that's required for a given tool call, the server will return a URL in the tool call response: - -``` -https://pipedream.com/_static/connect.html?token=ctok_xxxxxxx&connectLink=true&app={appSlug} -``` - -### Discover available MCP servers - -Pipedream provides [{process.env.PUBLIC_APPS}+ APIs as MCP servers](https://mcp.pipedream.com). Each server corresponds to an app integration (like Notion, Gmail, or Slack) and has its own specific set of tools that you can expose to OpenAI. - - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -// Initialize the Pipedream SDK client -const pd = createBackendClient({ - environment: PIPEDREAM_ENVIRONMENT, - credentials: { - clientId: PIPEDREAM_CLIENT_ID, - clientSecret: PIPEDREAM_CLIENT_SECRET, - }, - projectId: PIPEDREAM_PROJECT_ID -}); - -// Get all available apps (paginated) -const apps = await pd.getApps(); - -// Each app has these key properties: -// - name_slug: Used in the MCP server URL (e.g., "notion", "gmail", "slack") -// - name: Display name (e.g., "Notion", "Gmail", "Slack") -``` - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -// Initialize the Pipedream SDK client -const pd = createBackendClient({ - environment: PIPEDREAM_ENVIRONMENT, - credentials: { - clientId: PIPEDREAM_CLIENT_ID, - clientSecret: PIPEDREAM_CLIENT_SECRET, - }, - projectId: PIPEDREAM_PROJECT_ID -}); - -// Search by app name -const notionApps = await pd.getApps({ q: "notion" }); -const gmailApps = await pd.getApps({ q: "gmail" }); -const slackApps = await pd.getApps({ q: "slack" }); -``` - - - - -### Use Pipedream's remote MCP server - - -The remote MCP server is in beta, and we're looking for feedback. During the beta, the API is subject to change. - - -#### Supported transport types - -The Pipedream MCP server supports both SSE and streamable HTTP transport types dynamically, with no configuration required by the developer or MCP client. - -#### Tool modes - -Pipedream MCP supports two methods for interacting with tools: - -1. [Sub-agent](#sub-agent-mode) (default) -2. [Tools only](#tools-only-mode) - -##### Sub-agent mode - -When using Pipedream MCP in sub-agent mode, all tools you expose to your LLM take a single input: **`instruction`**. - -The Pipedream MCP server passes the **`instruction`** to an LLM to handle the configuration of the main tool using a set of agents with narrowly scoped sets of instructions and additional tools to aid in the configuration and execution of the top-level tool. - -- The benefit with this approach is that sub-agent mode abstracts a lot of the complexity with handling things like [remote options](/connect/components/#configure-the-component) and [dynamic props](/connect/components/#configure-dynamic-props), especially for MCP clients that don't automatically [reload tools](https://modelcontextprotocol.io/docs/concepts/tools#tool-discovery-and-updates). -- However, one downside is that you hand over some of the control and observability to Pipedream in this model. - - -While in Beta, Pipedream eats the costs of the LLM tokens in sub-agent mode. We'll likely pass these costs on to the developer in the future. - - -
-View the schema for the `google_sheets-add-single-row` tool in **sub-agent mode** - -```javascript -{ - "name": "GOOGLE_SHEETS-ADD-SINGLE-ROW", - "description": "Add a single row of data to Google Sheets. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append)", - "inputSchema": { - "type": "object", - "properties": { - "instruction": { - "type": "string" - } - }, - "required": [ - "instruction" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - } -} -``` - -
- -##### Tools-only mode - -To handle all tool configuration and calling yourself, you should use `tools-only` mode. - -###### Configuring dynamic props - -- Tools that use [dynamic props](/connect/api/#reload-component-props) can't be configured in one shot, as the full prop definition isnโ€™t known until certain inputs are defined. -- For example, the full set of props for `google_sheets-add-single-row` aren't known until you configure the `hasHeaders` prop. Once we know if there's a header row, we can retrieve the column names from the header row and make them available as props that can be configured. -- As you call each tool, you should reload the available tools for the server, and we'll expose meta tools for configuration, such as `begin_configuration_google_sheets-add-single-row`, which causes the rest of the tools to be removed and only tools relevant to the configuration are exposed. - -{/* Need to add info for devs to step through async options */} -{/* Need to add more detailed info for devs to step through dynamic props */} - -
-View the schema for the `google_sheets-add-single-row` tool in **tools-only mode** - -```javascript -{ - "name": "google_sheets-add-single-row", - "description": "Add a single row of data to Google Sheets. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append)", - "inputSchema": { - "type": "object", - "properties": { - "drive": { - "anyOf": [ - { - "anyOf": [ - { - "not": {} - }, - { - "type": "string" - } - ] - }, - { - "type": "null" - } - ], - "description": "Defaults to `My Drive`. To select a [Shared Drive](https://support.google.com/a/users/answer/9310351) instead, select it from this list.\n\nYou can use the \"CONFIGURE_COMPONENT\" tool using these parameters to get the values. key: google_sheets-add-single-row, propName: drive" - }, - "sheetId": { - "type": "string", - "description": "Select a spreadsheet or provide a spreadsheet ID\n\nYou can use the \"CONFIGURE_COMPONENT\" tool using these parameters to get the values. key: google_sheets-add-single-row, propName: sheetId" - }, - "worksheetId": { - "type": "string", - "description": "Select a worksheet or enter a custom expression. When referencing a spreadsheet dynamically, you must provide a custom expression for the worksheet.\n\nYou can use the \"CONFIGURE_COMPONENT\" tool using these parameters to get the values. key: google_sheets-add-single-row, propName: worksheetId" - }, - "hasHeaders": { - "type": "boolean", - "description": "If the first row of your document has headers, we'll retrieve them to make it easy to enter the value for each column. Note: When using a dynamic reference for the worksheet ID (e.g. `{{steps.foo.$return_value}}`), this setting is ignored." - } - }, - "required": [ - "sheetId", - "worksheetId", - "hasHeaders" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - } -} -``` - -
- -{/* ![Tools-only mode](https://res.cloudinary.com/pipedreamin/image/upload/v1748583198/slack-mcp-tools-only_d1veqw.png) */} - -#### Base URL - -``` -https://remote.mcp.pipedream.net -``` - -#### API Authentication - -To authenticate requests to Pipedream's MCP server, you need to include an access token with every HTTP request. Here's how to get it: - - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -// Initialize the Pipedream SDK client -const pd = createBackendClient({ - environment: PIPEDREAM_ENVIRONMENT, - credentials: { - clientId: PIPEDREAM_CLIENT_ID, - clientSecret: PIPEDREAM_CLIENT_SECRET, - }, - projectId: PIPEDREAM_PROJECT_ID -}); - -// Get access token for MCP server auth -const accessToken = await pd.rawAccessToken(); - -console.log(accessToken); -``` - - -```bash -curl -s -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "'$PIPEDREAM_CLIENT_ID'", - "client_secret": "'$PIPEDREAM_CLIENT_SECRET'" - }' -``` - - - -#### Params - -- Below are params that you should send with every HTTP request to Pipedream's MCP server. -- To enable broad support for various MCP clients, you can pass most of these params via HTTP headers **or** as query params on the URL. - -
- -
-| Header | Query Param | Value | Required? | -|--------|---------|------------------------------|--------| -| `x-pd-project-id` | `projectId` | `proj_xxxxxxx` | Yes | -| `x-pd-environment` | `environment` | `development`, `production` | Yes | -| `x-pd-external-user-id` | `externalUserId` | `` | Yes | -| `x-pd-app-slug` | `app` | `linear`, `notion`, etc | Yes | -| `x-pd-tool-mode` | `toolMode` | `sub-agent`, `tools-only` | No
Defaults to `sub-agent` | -| `x-pd-oauth-app-id` | Must be passed as header | `oa_xxxxxxx`

More info [here](/connect/managed-auth/oauth-clients) | No | -| `x-pd-webhook-uri` | Must be passed as header | More info [here](/connect/managed-auth/webhooks) | No | -| `x-pd-error-redirect-uri` | Must be passed as header | More info [here](/connect/managed-auth/connect-link/#success-and-error-redirect-urls) | No | -| `x-pd-success-redirect-uri` | Must be passed as header | More info [here](/connect/managed-auth/connect-link/#success-and-error-redirect-urls) | No | -
- -#### Example request - -```javascript -import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"; -import { createBackendClient } from "@pipedream/sdk/server"; - -// Initialize the Pipedream SDK client -const pd = createBackendClient({ - environment: PIPEDREAM_ENVIRONMENT, - credentials: { - clientId: PIPEDREAM_CLIENT_ID, - clientSecret: PIPEDREAM_CLIENT_SECRET, - }, - projectId: PIPEDREAM_PROJECT_ID -}); - -// Retrieve your developer access token via the Pipedream SDK -const accessToken = await pd.rawAccessToken(); -const serverUrl = MCP_SERVER_URL || `https://remote.mcp.pipedream.net`; - -const transport = new StreamableHTTPClientTransport(new URL(serverUrl), { - requestInit: { - headers: { - "Authorization": `Bearer ${accessToken}`, - "x-pd-project-id": PIPEDREAM_PROJECT_ID, // proj_xxxxxxx - "x-pd-environment": PIPEDREAM_ENVIRONMENT, // development | production - "x-pd-external-user-id": EXTERNAL_USER_ID, // the user's ID from your system - "x-pd-app-slug": APP_SLUG, // notion, linear, gmail, etc - "x-pd-oauth-app-id": OAUTH_APP_ID, // oa_xxxxxxx, include if using a custom OAuth client - - } - } -}); -``` - -### Self-host Pipedream's MCP server - -Hosting the MCP server locally or in your app will expose these routes: - -- `GET /:external_user_id/:app`: app-specific connection endpoint -- `POST /:external_user_id/:app/messages`: app-specific message handler - -#### Using the `Dockerfile` - -You can build and run the container from the [reference implementation](https://github.com/PipedreamHQ/pipedream/blob/master/modelcontextprotocol/Dockerfile): - -```console -> docker build -t pipedream-connect . -> docker run -d --name pd-mcp -p 3010:3010 --env-file .env pipedream-connect:latest -``` - -#### Running the server using npx - -```bash -npx @pipedream/mcp sse -``` - - -The current npx package only supports the `sse` transport type, `http` is coming soon. - - -#### Running the server locally - -You can also run the server locally and even customize the MCP server for your specific requirements: - -```bash -# Clone the repo -git clone https://github.com/PipedreamHQ/pipedream -cd pipedream/modelcontextprotocol - -# Install dependencies -pnpm install - -# Start the server -pnpm dev:http -``` - -See the [MCP server README](https://github.com/PipedreamHQ/pipedream/blob/master/modelcontextprotocol/README.md) for detailed instructions on customization options. - -#### Debugging - -You can use the optional env var `PD_SDK_DEBUG` to print out all the requests and responses going to the Connect API: - -```bash -PD_SDK_DEBUG=true pnpm dev:http -``` - -### Using the MCP inspector - -The [MCP inspector](https://modelcontextprotocol.io/docs/tools/inspector) can be helpful when debugging tool calls. - -```bash -npx @modelcontextprotocol/inspector -``` - -Enter the server URL: - -If using Pipedream's remote server: - -``` -https://remote.mcp.pipedream.net/{external_user_id}/{app_slug} -``` - -If running locally: - -``` -http://localhost:3010/{external_user_id}/{app_slug} -``` - -## Using custom tools - -Publish [custom tools](/connect/components/custom-tools) to your workspace to use them in the Pipedream MCP server for the relevant app. This lets you add custom and unique functionality that may not be available in the public registry. diff --git a/docs-v2/pages/connect/mcp/index.mdx b/docs-v2/pages/connect/mcp/index.mdx deleted file mode 100644 index b5b119514c12c..0000000000000 --- a/docs-v2/pages/connect/mcp/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ -import Callout from '@/components/Callout' - -# MCP Servers - -Pipedream offers dedicated MCP ([Model Context Protocol](https://modelcontextprotocol.io/)) servers for all of our {process.env.PUBLIC_APPS}+ integrated apps. These servers enable AI assistants like Claude to securely access and interact with thousands of APIs through a standardized communication protocol, performing real-world tasks using your or your users' accounts. - -{/* ![MCP visualization](https://res.cloudinary.com/pipedreamin/image/upload/v1714074324/pd-mcp-illustration_y76lnt.webp) */} - -Pipedream's MCP servers are powered by [Pipedream Connect](https://pipedream.com/docs/connect) and include: - -- Access to {process.env.PUBLIC_APPS}+ apps and APIs through a consistent interface -- Over 10,000 pre-built tools -- Fully-managed OAuth and secure credential storage - - -User credentials are encrypted at rest and all requests are made through Pipedream's servers, never directly exposing credentials to AI models. Read more about how we protect user credentials [here](/privacy-and-security/#third-party-oauth-grants-api-keys-and-environment-variables). - - -## Available MCP servers - -Pipedream provides MCP servers for all our [supported apps](https://mcp.pipedream.com/). Each app has its own dedicated MCP server with tools specific to that API. For example: - -- **[Slack](https://mcp.pipedream.com/app/slack)**: Send messages, manage channels, create reminders, and more -- **[GitHub](https://mcp.pipedream.com/app/github)**: Create issues, manage pull requests, search repositories -- **[Google Sheets](https://mcp.pipedream.com/app/google-sheets)**: Read and write data, format cells, create charts - -Explore the full list of available MCP servers at [mcp.pipedream.com](https://mcp.pipedream.com). - -## Getting started - -You can use Pipedream's MCP servers in two ways: - -1. **[As an end user](/connect/mcp/users)**: Connect your accounts through our hosted MCP servers at [mcp.pipedream.com](https://mcp.pipedream.com) -2. **[As a developer](/connect/mcp/developers)**: Host your own MCP servers for your application or organization - - -**Try out Pipedream MCP in our demo app: [chat.pipedream.com](https://chat.pipedream.com)** - - -## Security - -Like the rest of Pipedream Connect, MCP servers follow strict security best practices: - -- **Credential isolation**: Each user's credentials are stored securely and isolated from other users -- **No credential exposure**: Credentials are never exposed to AI models or your client-side code -- **Revocable access**: Users can revoke access to their connected accounts at any time - -For more information on security, see our [security documentation](/privacy-and-security/). - -## Use cases - -Pipedream MCP enables AI assistants to perform a wide range of tasks: - -- **Productivity automation**: Schedule meetings, send emails, create documents -- **Data analysis**: Query databases, analyze spreadsheets, generate reports -- **Content creation**: Post social media updates, create marketing materials -- **Customer support**: Respond to inquiries, create tickets, update CRM records -- **Developer workflows**: Create issues, review code, deploy applications - -## Supported tools - -- Each MCP server provides tools specific to that app. Tools are automatically created based on Pipedream's [registry of pre-built actions](https://github.com/PipedreamHQ/pipedream/tree/master/components) -- You can find the supported tools for a given app on its MCP server page or search for specific actions here: [pipedream.com/expore](https://pipedream.com/explore#popular-actions) - -## Pricing - -- Anyone can use Pipedream's hosted MCP servers for their own use **for free** -- To deploy Pipedream's MCP servers to your own app or agent, you can get started for free in development mode -- [Visit the pricing page](https://pipedream.com/pricing?plan=Connect) when you're ready to ship to production - -## Additional resources - -- [Pipedream hosted MCP servers](https://mcp.pipedream.com) -- [MCP official spec](https://modelcontextprotocol.io/) -- [Pipedream MCP reference implementation](https://github.com/PipedreamHQ/pipedream/tree/master/modelcontextprotocol) -- [MCP inspector tool](https://modelcontextprotocol.io/docs/tools/inspector/) \ No newline at end of file diff --git a/docs-v2/pages/connect/mcp/openai.mdx b/docs-v2/pages/connect/mcp/openai.mdx deleted file mode 100644 index e3c7e3819c95c..0000000000000 --- a/docs-v2/pages/connect/mcp/openai.mdx +++ /dev/null @@ -1,180 +0,0 @@ -import { Callout, Tabs, Steps } from 'nextra/components' -import TemporaryTokenGenerator from '@/components/TemporaryTokenGenerator' -import AppSearchDemo from '@/components/AppSearchDemo' - -# Using Pipedream MCP with OpenAI - -Access {process.env.PUBLIC_APPS}+ APIs and 10,000+ tools in OpenAI using Pipedream Connect. MCP makes it easy to extend the capabilities of any LLM or agent, and Pipedream offers drop-in support for [calling tools in OpenAI](https://platform.openai.com/docs/guides/tools-remote-mcp). - - -Pipedream Connect includes built-in user authentication for [every MCP server](https://mcp.pipedream.com), which means you don't need to build any authorization flows or deal with token storage and refresh in order to make authenticated requests on behalf of your users. [Learn more here](/connect/mcp/developers/#user-account-connections). - - -## Testing in OpenAI's API Playground - -OpenAI provides an API playground for developers to test prompts and tool calling, which provides an easy way to test Pipedream MCP. Get started below. - -![OpenAI API Playground](https://res.cloudinary.com/pipedreamin/image/upload/v1748549832/CleanShot_2025-05-29_at_13.09.23_4_2x_yujxkt.png) - - - -#### Open the playground - -Navigate to [OpenAI's playground](https://platform.openai.com/playground/prompts?models=gpt-4.1) and sign in with your OpenAI account. - -#### Add Pipedream MCP - -Click the **Create** button in the **Tools** section, then select **Pipedream**. - -#### Enter your access token - - - -#### Select an app - - - -#### Click **Connect** - -Enter a prompt and start chatting! - - - - -Refer to the instructions below when you're ready to use Pipedream MCP in your app. - - -## Using Pipedream MCP in your app - - - -### Set up your environment - -To use Pipedream MCP with your own users, you need the following: - -1. A [Pipedream account](https://pipedream.com/auth/signup) -2. A [Pipedream project](/projects/#creating-projects) (accounts connected via MCP will be stored here) -3. [Pipedream OAuth credentials](/rest-api/auth/#oauth) - - -These are requirements for you, the developer. Your users do **not** need to sign up for Pipedream in order to connect their accounts in your app or agent. - - -Now set the following environment variables (learn more about environments in Pipedream Connect [here](/connect/managed-auth/environments/)): - -```bash -OPENAI_API_KEY=your_openai_api_key -PIPEDREAM_CLIENT_ID=your_client_id -PIPEDREAM_CLIENT_SECRET=your_client_secret -PIPEDREAM_PROJECT_ID=your_project_id # proj_xxxxxxx -PIPEDREAM_ENVIRONMENT=development # development | production -``` - -### Discover available MCP servers - -[See here](/connect/mcp/developers/#discover-available-mcp-servers) for guidance on discovering the apps Pipedream has available as MCP servers. - -### Generate a model response in OpenAI with Pipedream MCP - -Below is an end to end example showing how to: -1. Initialize the Pipedream SDK -2. Find the relevant MCP server -3. Send a prompt to OpenAI with the MCP server as a tool call - - - -```javascript -import OpenAI from 'openai'; -import { createBackendClient } from "@pipedream/sdk/server"; - -// Initialize the Pipedream SDK client -const pd = createBackendClient({ - environment: PIPEDREAM_ENVIRONMENT, - credentials: { - clientId: PIPEDREAM_CLIENT_ID, - clientSecret: PIPEDREAM_CLIENT_SECRET, - }, - projectId: PIPEDREAM_PROJECT_ID -}); - -// Find the app to use for the MCP server -// For this example, we'll use Notion -const apps = await pd.getApps({ q: "notion" }); -const appSlug = apps.data[0].name_slug; // e.g., "notion", - -// Get access token for MCP server auth -const accessToken = await pd.rawAccessToken(); - -// Send the unique ID that you use to identify this user in your system -const externalUserId = 'abc-123'; // Used in MCP URL to identify the user - -// Initialize OpenAI client -const client = new OpenAI(); - -// Make the OpenAI request with the MCP server -const response = await client.responses.create({ - model: 'gpt-4.1', - tools: [ - { - type: 'mcp', - server_label: appSlug, - server_url: `https://remote.mcp.pipedream.net`, - headers: { - Authorization: `Bearer ${accessToken}`, - "x-pd-project-id": PIPEDREAM_PROJECT_ID, - "x-pd-environment": PIPEDREAM_ENVIRONMENT, - "x-pd-external-user-id": externalUserId, - "x-pd-app-slug": appSlug, - }, - require_approval: 'never' - } - ], - input: 'Summarize my most recently created Notion doc for me and help draft an email to our customers' -}); - -console.log(response); -``` - - -```bash -# Step 1: Get access token from Pipedream -ACCESS_TOKEN=$(curl -s -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "'$PIPEDREAM_CLIENT_ID'", - "client_secret": "'$PIPEDREAM_CLIENT_SECRET'" - }' | jq -r .access_token) - -# Step 2: Find the app to use for MCP server -# Search for the Notion app -APP_SLUG=$(curl -s -X GET "https://api.pipedream.com/v1/apps?q=notion" \ - -H "Authorization: Bearer $ACCESS_TOKEN" | jq -r '.data[0].name_slug') - -# Step 3: Make request to OpenAI with MCP tool -curl -X POST https://api.openai.com/v1/responses \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer $OPENAI_API_KEY" \ - -d '{ - "model": "gpt-4.1", - "input": "Summarize my most recently created Notion doc for me and help draft an email to our customers", - "tools": [ - { - "type": "mcp", - "server_label": "Notion", - "server_url": "https://remote.mcp.pipedream.net", - "headers": { - "Authorization": "Bearer '"$ACCESS_TOKEN"'", - "x-pd-project-id": "'"$PIPEDREAM_PROJECT_ID"'", - "x-pd-environment": "'"$PIPEDREAM_ENVIRONMENT"'", - "x-pd-external-user-id": "abc-123", - "x-pd-app-slug": "'"$APP_SLUG"'" - }, - "require_approval": "never" - } - ] - }' -``` - - - \ No newline at end of file diff --git a/docs-v2/pages/connect/mcp/users.mdx b/docs-v2/pages/connect/mcp/users.mdx deleted file mode 100644 index b9405c55f852a..0000000000000 --- a/docs-v2/pages/connect/mcp/users.mdx +++ /dev/null @@ -1,38 +0,0 @@ - -import { Steps } from 'nextra/components' - -# Using Pipedream MCP as an end user - -Set up MCP servers to use with any compatible MCP client, like Claude Desktop, Windsurf, Cursor, and VS Code. - - - -#### Configure MCP servers and connect accounts - -- Navigate to [mcp.pipedream.com](https://mcp.pipedream.com) and sign in or create an account (this is a separate account from pipdream.com) -- Browse available MCP servers -- Follow the configuration instructions on the server page to add it to your preferred MCP client -- Connect your account (you can do this in the UI or the AI will prompt you when you first use a tool) - -#### Start chatting - -Ask the LLM or agent to perform tasks using your connected services. For example: - -- "Send a message to my team in Slack" -- "Create a new issue in GitHub" -- "Add data to my Google Sheet" - -The AI will refer to the configured tools available in its MCP servers to complete the task. - -#### Get things done - -With MCP-enabled AI, you can: - -- Send messages and manage communication -- Create and update documents -- Query and analyze data -- Automate workflows across your favorite tools - -All using your own connected accounts with full control and security. - - \ No newline at end of file diff --git a/docs-v2/pages/connect/migrating-from-project-keys-to-oauth.mdx b/docs-v2/pages/connect/migrating-from-project-keys-to-oauth.mdx deleted file mode 100644 index d7f1a2d254daf..0000000000000 --- a/docs-v2/pages/connect/migrating-from-project-keys-to-oauth.mdx +++ /dev/null @@ -1,103 +0,0 @@ -import Callout from '@/components/Callout' -import { Steps, Tabs } from 'nextra/components' - -# Migrating to the 1.0 SDK - - -This guide is only relevant if: - -- You used the `0.x` version of the JavaScript SDK -- You authenticated with the Pipedream API using project keys - - -## What changed - -- In the `0.x` version of the SDK and the original Connect API, you could authenticate with keys scoped to a specific project. In the `1.x` version of the SDK, you need to authenticate with [OAuth clients](/rest-api/auth/#oauth). -- The `createClient` method from both the browser and Node.js SDKs has been replaced with separate methods: `createFrontendClient` and `createBackendClient`, respectively. -- The `connectTokenCreate` method has been renamed `createConnectToken` -- New SDK methods: `projectInfo`, `invokeWorkflow`, and more - -## How to migrate - - - -### Create an OAuth client - -Follow the instructions [here](/rest-api/auth/#oauth) to create an OAuth client. - -### Update your SDK version - -Change the `@pipedream/sdk` version in your `package.json`: - -```json -{ - "dependencies": { - "@pipedream/sdk": "^1.0.0" - } -} -``` - -Then run - -```bash -npm install -``` - -### Update your project key references to use your OAuth client - -You may have been referencing project keys in environment variables or other config. Replace these with references to the OAuth client you created in step 1. - -For example, `process.env.PIPEDREAM_PROJECT_KEY` should be replaced with `process.env.PIPEDREAM_OAUTH_CLIENT_ID`, and `process.env.PIPEDREAM_PROJECT_SECRET` should be replaced with `process.env.PIPEDREAM_OAUTH_CLIENT_SECRET`. - -### Update your SDK code - -#### Frontend client - -You'll need to make two changes to your frontend client code: - -1. Replace references to `@pipedream/sdk/browser`. Instead, import directly from `@pipedream/sdk`. -2. Change the `createClient` method to `createFrontendClient`. - -```typescript -import { createFrontendClient } from "@pipedream/sdk/browser" -const pd = createFrontendClient() -``` - -#### Backend client - -You'll need to make three changes to your backend code: - -1. Change the `createClient` method to `createBackendClient`. -2. Pass your OAuth client ID and secret to the `createBackendClient` method, removing references to project keys. -3. Change any token create method references from `connectTokenCreate` to `createConnectToken`. - - - -```typescript -import { createBackendClient, HTTPAuthType } from "@pipedream/sdk/server"; - -// These secrets should be saved securely and passed to your environment -const pd = createBackendClient({ - credentials: { - clientId: "YOUR_CLIENT_ID", - clientSecret: "YOUR_CLIENT_SECRET", - }, -}); -``` - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -// These secrets should be saved securely and passed to your environment -const pd = createBackendClient({ - credentials: { - clientId: "YOUR_CLIENT_ID", - clientSecret: "YOUR_CLIENT_SECRET", - }, -}); -``` - - - - diff --git a/docs-v2/pages/connect/use-cases.mdx b/docs-v2/pages/connect/use-cases.mdx deleted file mode 100644 index 68b55a9f33527..0000000000000 --- a/docs-v2/pages/connect/use-cases.mdx +++ /dev/null @@ -1,41 +0,0 @@ -# Pipedream Connect use cases - -Developers use Pipedream Connect to build customer-facing API integrations into their products. It lets you build [in-app messaging](#in-app-messaging), [CRM syncs](#crm-syncs), [AI-driven products](#ai-products), and much more, all in a few minutes. - -## Core value to app developers - -In 20 years of building software, we've seen a common theme. No matter the product, your customers end up needing to connect your app to third-party APIs. - -You might build real-time notifications with messaging apps, export customer data to databases or spreadsheets, ingest data from CRMs, or connect to any of the thousands of APIs and SaaS services your customers are using. These features are often tied to large contracts and Enterprise customers. - -But it's hard to justify the engineering effort required for these integrations. They're a distraction from the core product. Once built, they're hard to maintain. You have to securely manage auth, learn the nuances of each API, and improve the integration as your customers ask for new features. Managing these integrations is a huge context switch for any engineer. Most teams have trouble scaling this. - -At Pipedream, our customers tell us a variant of this story every day. Pipedream Connect helps you build these features **in minutes**, for any app. - -Once you add the core integration UI to your app, non-technical employees can also help to manage [the workflows](/workflows/building-workflows/) that drive the backend logic. For example, if you're building [in-app messaging](#in-app-messaging), once you add the UI to let users connect Slack, Discord, and other tools, anyone on your team can build workflows that format and deliver messages to your customers. This is a huge plus for many orgs: you still get to build a bespoke UI, directly in your app, suited to your customer need. But anyone in the company can collaborate on the workflows that power it. - -## Value to your customers - -Shipping new customer-facing integrations can happen in minutes. - -## How customers are using Connect - -### In-app messaging - -Most apps build email notifications, since it's easy. But most teams work in Slack, Discord, Microsoft Teams, or a variety of other messaging apps. Sometimes you want to send messages via SMS or push notifications. It's hard to maintain integrations for all the apps your customers are using. Pipedream makes this simple. - -### CRM syncs - -Sync data between your app and Salesforce, HubSpot, or any CRM. Pipedream lets your customers connect their accounts directly from your UI, define the sync logic, and run it on Pipedream's infrastructure. Pull data from your customers' CRMs in real-time, or push data from your app. - -### AI products - -Talk to any AI API or LLM. Build chat apps or interact in real-time with your users. Or run asynchronous tasks in the background, like image classification, article summarization, or other tasks you want to offload to an AI agent. You can use built-in functions like [`$.flow.suspend`](/workflows/building-workflows/code/nodejs/rerun/#flowsuspend) to send a message to your team, or directly to the user, to approve specific actions. - -### Spreadsheet integrations - -Sync data between your app and Google Sheets, Airtable, or any spreadsheet. Pipedream Connect lets your users auth with any app, select the sheet, and define custom sync logic. - -### And much more - -Building an app with Pipedream and want to be profiled here (anonymously or otherwise)? Email connect@pipedream.com to let us know! diff --git a/docs-v2/pages/connect/workflows.mdx b/docs-v2/pages/connect/workflows.mdx deleted file mode 100644 index 09acdb19673cb..0000000000000 --- a/docs-v2/pages/connect/workflows.mdx +++ /dev/null @@ -1,434 +0,0 @@ -import { Steps, Tabs } from 'nextra/components' -import ArcadeEmbed from '@/components/ArcadeEmbed' -import Callout from '@/components/Callout' -import Image from 'next/image' - -# Running workflows for your end users - -Just like you can build and run internal [workflows](/workflows/building-workflows/) for your team, **you can run workflows for [your end users](/connect/api/#external-users), too**. - -Whether you're building well-defined integrations or autonomous AI agents, workflows provide a powerful set of tools for running [code](/workflows/building-workflows/code/) or [pre-defined actions](/workflows/building-workflows/actions/) on behalf of your users. Pipedream's UI makes it easy to build, test, and [debug](/workflows/building-workflows/inspect/) workflows. - -## What are workflows? - -
- -
- -Workflows are sequences of [steps](/workflows/#steps) [triggered by an event](/workflows/building-workflows/triggers/), like an HTTP request, or new rows in a Google sheet. - -You can use [pre-built actions](/workflows/building-workflows/actions/) or custom [Node.js](/workflows/building-workflows/code/nodejs/), [Python](/workflows/building-workflows/code/python/), [Golang](/workflows/building-workflows/code/go/), or [Bash](/workflows/building-workflows/code/bash/) code in workflows and connect to any of our {process.env.PUBLIC_APPS} integrated apps. - -Workflows also have built-in: - -- [Flow control](/workflows/building-workflows/control-flow/) -- [Concurrency and throttling](/workflows/building-workflows/settings/concurrency-and-throttling/) -- [Key-value stores](/workflows/data-management/data-stores/) -- [Error handling](/workflows/building-workflows/errors/) -- [VPCs](/workflows/vpc/) -- [And more](https://pipedream.com/pricing) - -Read [the quickstart](/quickstart/) to learn more. - -## Getting started - - - -### Create a workflow - -[Create a new workflow](/workflows/building-workflows/) or open an existing one. - -### Add an HTTP trigger - -To get started building workflows for your end users: - -1. Add an [HTTP trigger](/workflows/building-workflows/triggers/#http) to your workflow -2. Generate a test event with the required headers: - - `x-pd-environment: development` - - `x-pd-external-user-id: {your_external_user_id}` - -See the [Triggering your workflow](#triggering-your-workflow) section below for details on securing your workflow with OAuth and deploying triggers on behalf of your end users. - -### Configure accounts to use your end users' auth - -When you configure [pre-built actions](/workflows/building-workflows/actions/) or [custom code that connects to third-party APIs](/workflows/building-workflows/code/nodejs/auth/), you can link accounts in one of two ways: - -1. **Use your own account**: If you're connecting to an API that uses your own API key or developer account โ€” for example, a workflow that connects to the OpenAI API or a PostgreSQL database โ€” click the **Connect account** button to link your own, static account. - -
- -
- -2. **Use your end users' auth**: If you're building a workflow that connects to your end users' accounts โ€” for example, a workflow that sends a message with your user's Slack account โ€” you can select the option to **Use end user's auth via Connect**: - -
- -
- -When you trigger the workflow, Pipedream will look up the corresponding account for the end user whose user ID you provide [when invoking the workflow](#invoke-the-workflow). - -### Connect a test account - -To run an end-to-end test as an end user, you need to have users and connected accounts in your project. If you already have a **development** account linked, you can skip this step. - -If you don't, the fastest way to do this is [on the **Users** tab](/connect/managed-auth/users/) in your Pipedream project: -- You'll see there's a button to **Connect account** -- Go through the flow and make sure to create the account in **development** mode -- Note the **external user ID** of the account you just connected, you'll need it in the next step - - - - -### Generate a test request - -Test events are critical for developing workflows effectively. Without a test event, you won't be able to test your workflow end to end in the builder, see the shape of the event data that triggers the workflow, and the lookup to use your end user's auth won't work. - -To generate a test event, click **Send Test Event** in the trigger, and fill in the event data. This will trigger the workflow and allow you to test the workflow end to end in the builder. - - -Make sure to include these headers in your test request: -- `x-pd-environment: development` -- `x-pd-external-user-id: {your_external_user_id}` - - -
- -Invoke workflow headers - -### Deploy your workflow - -When you're done with the workflow, click **Deploy** at the top right. - -### Invoke the workflow - -If you're using TypeScript or a JavaScript runtime, [install the Pipedream SDK](/connect/api/#installing-the-typescript-sdk). Pipedream also provides an HTTP API for invoking workflows (see example below). - -```bash -npm i @pipedream/sdk -``` - -To invoke workflows, you'll need: - -1. The OAuth client ID and secret from your OAuth client in **step 2 above** (if configured) -2. Your [Project ID](/projects/#finding-your-projects-id) -3. Your workflow's HTTP endpoint URL -4. The [external user ID](/connect/api/#external-users) of the user you'd like to run the workflow for -5. The [Connect environment](/connect/managed-auth/environments/) tied to the user's account - -Then invoke the workflow like so: - - - -```typescript -import { createBackendClient, HTTPAuthType } from "@pipedream/sdk/server"; - -// These secrets should be saved securely and passed to your environment -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -await pd.invokeWorkflowForExternalUser( - "{your_endpoint_url}", // pass the endpoint ID or full URL here - "{your_external_user_id}" // The end user's ID in your system - { - method: "POST", - body: { - message: "Hello World" - } - }, - HTTPAuthType.OAuth // Will automatically send the Authorization header with a fresh token -) -``` - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -// These secrets should be saved securely and passed to your environment -const client = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}" - }, - projectId: "{your_project_id}" -}); - -const response = await client.invokeWorkflowForExternalUser( - "{your_endpoint_url}", // pass the endpoint ID or full URL here - "{your_external_user_id}" // The end user's ID in your system - { - method: "POST", - body: { - message: "Hello World" - } - } -) -``` - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. - -curl -X POST https://{your-endpoint-url} \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer {access_token}" \ - -H 'X-PD-External-User-ID: {your_external_user_id}' \ - -H 'X-PD-Environment: development' \ # 'development' or 'production' - -d '{ - "message": "Hello, world" - }' -``` - - -
- -## Configuring workflow steps - -When configuring a workflow that's using your end user's auth instead of your own, you'll need to define most configuration fields manually in each step. - -For example, normally when you connect your own Google Sheets account directly in the builder, you can dynamically list all of the available sheets from a dropdown. - -
- -
- -However, when running workflows on behalf of your end users, that UI configuration doesn't work, since the Google Sheets account to use is determined at the time of workflow execution. So instead, you'll need to configure these fields manually. - -- Either make sure to pass all required configuration data when invoking the workflow, or add a step to your workflow that retrieve it from your database, etc. For example: - -```bash -curl -X POST https://{your-endpoint-url} \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer {access_token}" \ - -H 'X-PD-External-User-ID: {your_external_user_id}' \ - -H 'X-PD-Environment: development' \ # 'development' or 'production' - -d '{ - "slackChannel": "#general", - "messageText": "Hello, world!", - "gitRepo": "AcmeOrg/acme-repo", - "issueTitle": "Test Issue" - }' \ -``` - -- Then in the Slack and GitHub steps, you'd reference those fields directly: - -
- -
- - -We plan to improve this interface in the future, and potentially allow developers to store end user metadata and configuration data alongside the connected account for your end users, so you won't need to pass the data at runtime. [Let us know](https://pipedream.com/support) if that's a feature you'd like to see. - - -## Testing - -To test a step using the connected account of one of your end users in the builder, you'll need a few things to be configured so that your workflow knows which account to use. - -**Make sure you have an external user with the relevant connected account(s) saved to your project:** -- Go to the **[Users tab](/connect/managed-auth/users/)** in the **Connect** section of your project to confirm -- If not, either connect one from your application or [directly in the UI](#connect-a-test-account) - -**Pass the environment and external user ID:** -1. Once you've added an HTTP trigger to the workflow, click **Generate test event** -Generate test event -2. Click on the **Headers** tab -3. Make sure `x-pd-environment` is set (you'll likely want to `development`) -4. Make sure to also pass `x-pd-external-user-id` with the external user ID of the user you'd like to test with - -Include required headers - -## Triggering your workflow - -You have two options for triggering workflows that run on behalf of your end users: - -1. [Invoke via HTTP webhook](#http-webhook) -2. [Deploy an event source](#deploy-an-event-source) (Slack, Gmail, etc.) - -### HTTP Webhook - -The most common way to trigger workflows is via HTTP webhook. We strongly recommend [creating a Pipedream OAuth client](/rest-api/auth#creating-an-oauth-client) and authenticating inbound requests to your workflows. - - -This section refers to authenticating requests to the Pipedream API. For info on how managed auth works for your end users, refer to the [managed auth quickstart](/connect/managed-auth/quickstart). - - -To get started, you'll need: - -- [OAuth client ID and secret](/rest-api/auth#creating-an-oauth-client) for authenticating with the Pipedream API -- Your [project ID](/projects/#finding-your-projects-id) -- Your workflow's HTTP endpoint URL -- The [external user ID](/connect/api/#external-users) of your end user -- The [Connect environment](/connect/managed-auth/environments/) - - - -```typescript -import { createBackendClient, HTTPAuthType } from "@pipedream/sdk/server"; - -// These secrets should be saved securely and passed to your environment -const pd = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, - projectId: "{your_project_id}" -}); - -await pd.invokeWorkflowForExternalUser( - "{your_endpoint_url}", // pass the endpoint ID or full URL here - "{your_external_user_id}" // The end user's ID in your system - { - method: "POST", - body: { - message: "Hello World" - } - }, - HTTPAuthType.OAuth // Will automatically send the Authorization header with a fresh token -) -``` - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -// These secrets should be saved securely and passed to your environment -const client = createBackendClient({ - environment: "development", // change to production if running for a test production account, or in production - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}" - }, - projectId: "{your_project_id}" -}); - -const response = await client.invokeWorkflowForExternalUser( - "{your_endpoint_url}", // pass the endpoint ID or full URL here - "{your_external_user_id}" // The end user's ID in your system - { - method: "POST", - body: { - message: "Hello World" - } - } -) -``` - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. - -curl -X POST https://{your-endpoint-url} \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer {access_token}" \ - -H 'X-PD-External-User-ID: {your_external_user_id}' \ - -H 'X-PD-Environment: development' \ # 'development' or 'production' - -d '{ - "message": "Hello, world" - }' -``` - - - -### Deploy an event source - -You can [programmatically deploy triggers via the API](/connect/api/#deploy-trigger) to have events from integrated apps (like [new Slack messages](https://pipedream.com/apps/slack/triggers/new-message-in-channels) or [new emails in Gmail](https://pipedream.com/apps/gmail/triggers/new-email-received)) trigger your workflow. This allows you to: - -- Deploy triggers for specific users from your application -- Configure trigger parameters per-user -- Manage deployed triggers via the API - -See the [API documentation](/connect/api/#deploy-trigger) for detailed examples of deploying and managing triggers. - -## OAuth client requirements - - -When using OAuth apps (like Google Drive, Slack, Notion, etc.) with your end users, you **must use your own custom OAuth clients**. - - -1. Register your own OAuth application with each third-party service (Google Drive, Slack, etc.) -2. [Add your OAuth client credentials to Pipedream](/apps/oauth-clients#configuring-custom-oauth-clients) -3. Make sure to include your `oauthAppId` when connecting accounts for your end users - -For detailed instructions, see the [OAuth Clients documentation](/connect/managed-auth/oauth-clients#using-a-custom-oauth-client). - -## Troubleshooting - -For help debugging issues with your workflow, you can return verbose error messages to the caller by configuring the HTTP trigger to **Return a custom response from your workflow**. - -Configure custom response - -With that setting enabled on the trigger, below is an example of [this](/connect/workflows/#required-account-not-found-for-external-user-id) error: - -```bash -curl -X POST https://{your-endpoint-url} \ - -H 'Content-Type: application/json' \ - -H 'Authorization: Bearer {access_token}' \ - -H "x-pd-environment: development" \ - -H "x-pd-external-user-id: abc-123" \ - -d '{ - "slackChannel": "#general", - "messageText": "Hello, world! (sent via curl)", - "hubSpotList": "prospects", - "contactEmail": "foo@example.com" - }' \ -Pipedream Connect Error: Required account for hubspot not found for external user ID abc-123 in development -``` - -### Common errors - -#### No external user ID passed, but one or more steps require it -- One or more steps in the workflow are configured to **Use end user's auth via Connect**, but no external user ID was passed when invoking the workflow. -- [Refer to the docs](#invoke-the-workflow) to make sure you're passing external user ID correctly when invoking the workflow. - -#### No matching external user ID -- There was an external user ID passed, but it didn't match any users in the project. -- Double-check that the external user ID that you passed when invoking the workflow matches one either [in the UI](/connect/managed-auth/users/) or [via the API](/connect/api/#accounts). - -#### Required account not found for external user ID -- The external user ID was passed when invoking the workflow, but the user doesn't have a connected account for one or more of the apps that are configured to use it in this workflow execution. -- You can check which connected accounts are available for that user [in the UI](/connect/managed-auth/users/) or [via the API](/connect/api/#accounts). - -#### Running workflows for your users in production requires a higher tier plan -- Anyone is able to run workflows for your end users in `development`. -- Visit the [pricing page](https://pipedream.com/pricing?plan=Connect) for the latest info on using Connect in production. - -## Known limitations - -#### Workflows can only use a single external user's auth per execution -- Right now you cannot invoke a workflow to loop through many external user IDs within a single execution. -- You can only run a workflow for a single external user ID at a time (for now). - -#### The external user ID to use during execution must be passed in the triggering event -- You can't run a workflow on a timer for example, and look up the external user ID to use at runtime. -- The external user ID must be passed in the triggering event, typically via [HTTP trigger](#invoke-the-workflow). - -#### Cannot use multiple accounts for the same app during a single execution -- If a user has multiple accounts for the same app (tied to a single external user), **Pipedream will use the most recently created account**. -- Learn about [managing connected accounts](/connect/managed-auth/users/) for your end users. \ No newline at end of file diff --git a/docs-v2/pages/deprecated/airtable/_meta.tsx b/docs-v2/pages/deprecated/airtable/_meta.tsx deleted file mode 100644 index 1d008b16d92f2..0000000000000 --- a/docs-v2/pages/deprecated/airtable/_meta.tsx +++ /dev/null @@ -1,6 +0,0 @@ -export default { - "oauth-migration-2024-02": { - display: "children", - }, -} as const - diff --git a/docs-v2/pages/deprecated/airtable/oauth-migration-2024-02/_meta.tsx b/docs-v2/pages/deprecated/airtable/oauth-migration-2024-02/_meta.tsx deleted file mode 100644 index 0f563ee9fd4e2..0000000000000 --- a/docs-v2/pages/deprecated/airtable/oauth-migration-2024-02/_meta.tsx +++ /dev/null @@ -1,6 +0,0 @@ -export default { - "index": { - "display": "hidden", - }, -} as const - diff --git a/docs-v2/pages/deprecated/airtable/oauth-migration-2024-02/index.mdx b/docs-v2/pages/deprecated/airtable/oauth-migration-2024-02/index.mdx deleted file mode 100644 index e8657ebf14970..0000000000000 --- a/docs-v2/pages/deprecated/airtable/oauth-migration-2024-02/index.mdx +++ /dev/null @@ -1,105 +0,0 @@ -# Update to the Airtable Integration on Pipedream (January 2024) - -Effective February 1st 2024, Airtable's API Key authentication method will be deprecated. To learn more about this change, please visit Airtableโ€™s [dedicated support page](https://support.airtable.com/docs/airtable-api-key-deprecation-notice). - -### How will this impact my workflows? - -Starting February 1st 2024, all Pipedream steps using the legacy Airtable (API Key) integration including triggers and actions will no longer be able to authenticate with Airtable. - -### What do I need to do? -
- -1. **Reconnect your Airtable account**: - -- Visit the [accounts page in Pipedream](https://pipedream.com/accounts) -- Search for Airtable and connect your account -- This newer Pipedream integration uses OAuth instead of an API Key - -![Airtable Account Connection](https://res.cloudinary.com/dpenc2lit/image/upload/v1704392183/Screenshot_2024-01-04_at_10.16.12_AM_le364k.png) - -You can determine which workflows are connected to the legacy Airtable (API Key) app by expanding the account row on your Airtable (API Key) account connection. -![Airtable Accounts](https://res.cloudinary.com/dpenc2lit/image/upload/v1704347928/Screenshot_2024-01-03_at_9.58.43_PM_haaqlb.png) - -2. **Update Your Workflows**: - -- After reconnecting to Airtable via OAuth, you'll need to update your existing workflows that use the legacy Airtable app. -- Remove any legacy Airtable sources and re-add the source using the new Airtable app -- Remove any legacy Airtable actions and re-add them using the new Airtable app - -
- -3. **If you're using Airtable in code:** - -- Change any of your code steps to reference `airtable_oauth` instead of `airtable`. -- Modify your authorization headers accordingly - -In Node.js, you would modify your authorization header from this: - - `"Authorization": ${this.airtable.$auth.api_key}` - - to - -``` Authorization: `Bearer ${this.airtable_oauth.$auth.oauth_access_token}` ``` - -This is what your Node.js code step may have looked like before: - -``` javascript -import { axios } from "@pipedream/platform" -export default defineComponent({ - props: { - airtable: { - type: "app", - app: "airtable", - } - }, - async run({steps, $}) { - return await axios($, { - url: `https://api.airtable.com/v0/meta/whoami`, - headers: { - "Authorization": `${this.airtable.$auth.api_key}`, - "Content-Type": `application/json`, - }, - }) - }, -}) - -``` - -And here's an example of the updated code step that uses the updated app, **`airtable_oauth`** instead with the updated authentication method: - -``` javascript -import { axios } from "@pipedream/platform" -export default defineComponent({ - props: { - airtable_oauth: { - type: "app", - app: "airtable_oauth", - } - }, - async run({steps, $}) { - return await axios($, { - url: `https://api.airtable.com/v0/meta/whoami`, - headers: { - Authorization: `Bearer ${this.airtable_oauth.$auth.oauth_access_token}`, - }, - }) - }, -}) - -``` - -In Python, here's a snippet of what your code step might have looked like before: -``` python -def handler(pd: "pipedream"): - headers = {"X-Airtable-Api-Key": f'{pd.inputs["airtable"]["$auth"]["api_key"]}'} -``` - -And here's the updated Python code step, with **`airtable_oauth`** and the appropriate token and authorization headers: -``` python -def handler(pd: "pipedream"): - token = f'{pd.inputs["airtable_oauth"]["$auth"]["oauth_access_token"]}' - authorization = f'Bearer {token}' - headers = {"Authorization": authorization} -``` - -3. **Test and redeploy your workflows.** \ No newline at end of file diff --git a/docs-v2/pages/deprecated/migrate-from-v1/_meta.tsx b/docs-v2/pages/deprecated/migrate-from-v1/_meta.tsx deleted file mode 100644 index 4705b04ff8795..0000000000000 --- a/docs-v2/pages/deprecated/migrate-from-v1/_meta.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default { - "index": { - "display": "hidden", - }, -} as const diff --git a/docs-v2/pages/deprecated/migrate-from-v1/index.mdx b/docs-v2/pages/deprecated/migrate-from-v1/index.mdx deleted file mode 100644 index 539bc50551368..0000000000000 --- a/docs-v2/pages/deprecated/migrate-from-v1/index.mdx +++ /dev/null @@ -1,353 +0,0 @@ -import Callout from '@/components/Callout' - -# Migrate from v1 - - -Never used Pipedream v1? You can skip this migration guide and read on about [Steps](/workflows/#steps). - - -We are excited to announce that we have launched a new version (v2) of Pipedream to all new and existing users! - -We have re-imagined the UX from the ground up, made the product much easier to use and have improved performance. In addition, we are introducing powerful new features including: - -- **Edit & test** your workflows in separate editing mode without impacting live workflows -- **Support for multiple languages** including [Node.js](/workflows/building-workflows/code/nodejs/), [Python](/workflows/building-workflows/code/python/), [Bash](/workflows/building-workflows/code/bash/) and [Go](/workflows/building-workflows/code/go/) -- **Granular testing** including the ability to test individual steps and more -- **Multiple triggers** are now supported per workflow -- **Improved** forms for easier configuration and streamlined building - -_Get Started_ - -- Read our [quickstart](/quickstart/), [docs](/), and/or [FAQ](#faq) -- Have questions? Ask here or on [Discourse](https://pipedream.com/community) -- As a reminder, all integration components are source-available and [hosted on GitHub](https://github.com/PipedreamHQ/pipedream). You can [contribute your own components](/components/contributing/) or improve existing ones. - -Watch a demo: - - - -And this is just the beginning โ€” we have an exciting roadmap planned for 2022 including workflow serialization and GitHub integration. - -## New Builder Overview - -Fundamentally, the new version of the workflow builder gives you the same abilities to build, test and deploy your workflows. However, you'll notice some differences in how to build workflows. - -### Building vs Inspecting - -In v1, building your workflow and inspecting past events were visible in the same view. The new v2 builder has improved this by separating the workflow **Builder** from the workflow events **Inspector**. - -Switch between these contexts using the menu in the top right of the workflow builder. - -![Switching between the Builder & Inspector contexts in the v2 workflow builder](/images/migrate-from-v1/new-builder-context-switcher.gif) - -When you first open a deployed workflow, you're presented with the **Inspector** version of the workflow. In this view you can see logs of past events, and select them to see the results of each step in the workflow. - -![Example of events listed in the Inspector](/images/migrate-from-v1/inspector-sample.png) - -To edit the workflow, click the **Edit** button in the top right hand corner. This will close the inspector and allow you to edit your workflow without the distraction of logs from the production flow. - -![Example of the new dedicated Builder mode](/images/migrate-from-v1/builder-mode-sample.png) - -### Testing Changes - -In the v1 workflow builder, you had to deploy the whole workflow to test changes to any step. To make changes to a deployed workflow, you had to made edits on the live version. - -We've improved this flow. Now you can test your changes with a new **Test** button without effecting the live version of the workflow. - -In addition to testing single steps, you can now selectively test portions of your workflow (e.g. all steps above or below the selected step): - -![Selectively pick testing your workflow above or below the current step is now available.](/images/migrate-from-v1/test-workflow-portions.png) - -#### Testing individual events - -Not only can you test portions of your workflow in isolation, but you can also select a specific event to run against your workflow. - -In the **Test Trigger** portion of your trigger, you can select a past event seen by the workflow and build your steps against it - without having to re-trigger it manually: - -![Test your workflow with a specific event](/images/migrate-from-v1/testing-individual-events.gif) - -### Deploying Changes - -After you're happy with your changes, **deploy** them to your production workflow. Just click the **Deploy** button in the top right hand corner of the screen. - -After deploying your changes, your workflow is now live, and any changes you made will run against incoming events. - -## Node.js Code Step Changes - -There are a few changes to the Node.js code steps that you should know about. Some functions have been renamed for more clarity, and we've aligned the Node.js code steps closer to the [Component API](/components/contributing/). - -### Code Scaffolding Format - -In v1, the Node.js steps would automatically scaffold new Node.js steps in this format: - -```javascript -async (event, steps) { - // your code could be entered in here -} -``` - -In v2, the new scaffolding is wrapped with a new `defineComponent` function: - -```javascript -defineComponent({ - async run({ steps, $ }) { - // your code can be entered here - }, -}); -``` - -1. The `event` from the trigger step is still available, but exposed in `steps.trigger.event` instead. -2. The `$` variable has been passed into the `run` function where your code is executed. - -You can think of the `$` as the entry point to built in Pipedream functions. In v1, this special functions included `$end`, `$respond`, etc. In v2, these have been remapped to `$.flow.exit` and `$.respond` respectively. - -These changes unify workflow development to the [Component API](/components/contributing/api/) used by pre-built actions and also allows the [defining of props](#params-vs-props) from within your code steps. - -### Using 3rd party packages - -In v1, you had to define your imports of 3rd party packages within the scaffolded function: - -```javascript -async (event, steps) { - const axios = require('axios'); - // your code could be entered in here -} -``` - -Now, in v2 workflows you can `import` your packages in the top of the step, just like a normal Node.js module: - -```javascript -import axios from "axios"; - -defineComponent({ - async run({ steps, $ }) { - // your code can be entered here - }, -}); -``` - -Allowing all of the scaffolding to be edited opens up the ability to [pass props](/workflows/building-workflows/code/nodejs/#passing-props-to-code-steps) into your Node.js code steps, which we'll cover later. - -### Step Exports - -In v1, you could assign arbitrary properties to `this` within a Node.js step and the properties would be available as step exports: - -```javascript -// this step's name is get_customer_data -async (event, steps) { - this.name = 'Dylan'; - // downstream steps could use steps.get_customer_data.name to retrieve 'Dylan' -} -``` - -In v2 you use $.export to export data, instead:: - -```javascript -// this step's name is get_customer_data -defineComponent({ - async run({ steps, $ }) { - $.export("name", "Dylan"); - // downstream steps can use steps.get_customer_data.name to retrieve 'Dylan' - }, -}); -``` - - -Using `return` to export data is the same from v1 to v2. You can still `return` data, and it will be available to other steps with `steps.[stepName].$return_value. - - -### Exiting a workflow early - -In v1, the `$end` function can be called to exit a flow early: - -```javascript -async (event, steps) { - $end('Exiting the whole workflow early'); - console.log('I will never run'); -} -``` - -In v2, this same function is available, but under `$.flow.exit`: - -```javascript -defineComponent({ - async run({ steps, $ }) { - return $.flow.exit("Exiting the workflow early"); - console.log("I will never run"); - }, -}); -``` - -### Params vs Props - -In the v1 builder, you could pass input to steps using `params`. In the v2 builder, you pass input using [props](/components/contributing/api/#component-api). - -You can still enter free text and select data from other steps in pre-built actions. Also can add your own custom props that accept input like strings, numbers and more just like in v1. - -#### Defining params - -In the v1 workflow builder, params could be structured or unstructured. The params schema builder allowed you to add your own custom params to steps. - -In v2, you can add your own custom props without leaving the code editor. - -```javascript -export default defineComponent({ - props: { - firstName: { - type: "string", - label: "Your first name", - }, - }, - async run({ steps, $ }) { - console.log(this.firstName); - }, -}); -``` - -In the example, you added a firstName string prop. The value assigned to this prop in the workflow builder. - -Additionally, Pipedream renders a visual component in the step **Configuration** to accept this input: - -![Custom props render in the Configuration portion of the code step.](/images/migrate-from-v1/custom-string-prop.png) - -### Connecting apps - -In the v2 builder, you can connect apps with your code using [props](/components/contributing/api/#props). - -Above the `run` function, define an app prop that your Node.js step integrates with: - -```javascript -import { axios } from "@pipedream/platform"; - -export default defineComponent({ - props: { - slack: { - type: "app", - app: "slack", - }, - }, - async run({ steps, $ }) { - return await axios($, { - url: `https://slack.com/api/users.profile.get`, - headers: { - Authorization: `Bearer ${this.slack.$auth.oauth_access_token}`, - }, - }); - }, -}); -``` - -After testing the step, you'll see the Slack app will appear in the **Configuration** section on the left hand side. In this section you can choose which Slack account you'd like to use in the step. - -![Example of adding an app connection to a v2 Node.js step](/images/migrate-from-v1/app-props-example.png) - -### HTTP Response - -You can still return an HTTP response from an HTTP-triggered workflow. - -Use [`$.respond`](/workflows/building-workflows/triggers/#http) to send a JSON or string response from the HTTP call that triggered the workflow. - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - $.respond({ - status: 200, - headers: {}, - body: { - message: "hello world!", - }, - }); - }, -}); -``` - -Please note, you'll also need to configure the HTTP trigger step to also allow custom responses. Use the dropdown in the **HTTP Response** section of the HTTP trigger to select the **Return a custom response from your workflow** option: - -![Select the option to allow your workflow to send it's own HTTP responses](/images/migrate-from-v1/custom-http-response-option.png) - -## Known Gaps & Limitations - -However, some features from the original builder are not currently available in v2. The Pipedream team is working to quickly address these items, but if you have feedback that isn't listed here, please [reach out](https://pipedream.com/support). - -### Sharing workflows - -At this time, sharing is not yet implemented in v2 of the workflow builder. As workaround, create your workflows in a organization which make workflows available to your team members. - -If you need assistance transferring workflows across accounts, [please contact us](https://pipedream.com/support). - -### `$checkpoint` - -The `$checkpoint` functionality to save data between workflow runs is not supported in v2, and has been replaced by [Data Stores](/workflows/building-workflows/code/nodejs/using-data-stores/). - -### Public workflows - -At this time, all v2 workflows are private. Unfortunately at this time there is no workaround. We'll announce when a workaround for this limitation is available. - -If you're working with Pipedream support to troubleshoot your workflow, you can share it with the support team under your workflow's **Settings**. - -### Rolling back a specific version - -In v2, you can test and save your progress on a workflow _without_ deploying it. - -However, after deploying it's not possible to rollback to a prior version of a deployed workflow. - -You can still edit a deployed workflow, just like in v1 but automatic version rollbacks are not currently possible. - -### Replaying production events - -In the v2 builder, you can still view individual events that trigger your v2 workflows in the **Inspector** events log. You can delete specific events or all of them in one click as well. - -To replay past events against your deploy v2 workflows, open the event's menu and click **Replay Event**. This will rerun your workflow with this same event. - -## FAQ - -### What are the benefits of the new (v2) workflow builder? - -- **Edit & test** your workflows in separate editing mode without impacting live workflows -- **Support for multiple languages** including Node, Python, Golang & bash -- **Granular testing** including the ability to test individual steps and more -- **Multiple triggers** are now supported per workflow -- **Improved** forms for easier configuration and streamlined building - -### What are the limitations of the new (v2) workflow builder? - -- `$checkpoint` has been removed from v2 workflows, but [Data Stores](/workflows/building-workflows/code/nodejs/using-data-stores/) provides a similar API. -- Sharing workflows is not supported -- Making workflows public is not supported - -### Are v2 workflows backwards compatible? - -No, v2 workflows are not currently compatible with the v1 builder. - -However, pre-built component actions are still compatible across both versions. If you do encounter a gap from v1 actions in the v2 builder, [reach out to us](https://pipedream.com/support). - -### Is the Component API changing as well? Will I need to rewrite Components? - -No. Any components in the public registry or any private components you have published in your account are compatible with v2. - -The v2 workflow builder utilizes the same Component API allowing you to create components from within your workflows, which was not possible in v1. - -### Will I still be able to open and edit v1 workflows? - -Yes, absolutely you will still be able to view and edit v1 workflows. There is no need to immediately change your workflows from v1 to v2. - -### How do I migrate v1 workflows to v2 workflows? - -At this time we do not have an automated process to change v1 to v2. To create a v2 equivalent workflow, you can recompose your v1 workflow in the v2 builder. - -However, if it uses custom Node.js code steps, be sure to [follow the changes we describe in the guide above](/deprecated/migrate-from-v1/#nodejs-code-step-changes). - -### When will the new (v2) workflow builder be the default builder for all customers? - -By default, existing users will still default to the v1 builder. You can create new v2 workflows from the dropdown menu next to the New workflow button. - -if you'd like to default to the v2 builder when creating new workflows, you can change the **Builder Version** in [your account settings](https://pipedream.com/settings/account). - -### When will I no longer be able to create v1 workflows? - -There is currently no deprecation date for v1 workflows. We will continue to support of v1 workflows until we have feature parity with v2. - -When this date becomes clear we will provide assistance to automatically and assist migrate v1 to v2 workflows for you. diff --git a/docs-v2/pages/deprecated/nodejs20-faq-2024-02/_meta.tsx b/docs-v2/pages/deprecated/nodejs20-faq-2024-02/_meta.tsx deleted file mode 100644 index 4705b04ff8795..0000000000000 --- a/docs-v2/pages/deprecated/nodejs20-faq-2024-02/_meta.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default { - "index": { - "display": "hidden", - }, -} as const diff --git a/docs-v2/pages/deprecated/nodejs20-faq-2024-02/index.mdx b/docs-v2/pages/deprecated/nodejs20-faq-2024-02/index.mdx deleted file mode 100644 index d17d579921228..0000000000000 --- a/docs-v2/pages/deprecated/nodejs20-faq-2024-02/index.mdx +++ /dev/null @@ -1,314 +0,0 @@ -import Callout from '@/components/Callout' - -# Update to the Node.js runtime on Pipedream (February 2024) - -Effective 2024-02-01, the Node.js runtime will no longer load Amazon-specific certificate authority (CA) certificates by default. - - - -### Will this impact my workflows? - -**Existing workflows that are not re-deployed will NOT be impacted.** - -Only workflow that meet all of following criteria will be impacted: - -- Is re-deployed or deployed after 2024-02-01 -- Connects to an [AWS RDS](https://aws.amazon.com/rds/)-managed database (e.g., PostgreSQL, MySQL, or Microsoft SQL Server) -- Has server identity verification enabled (e.g., the `rejectUnauthorized` connection option is set to `true`) - - -Workflows deployed on or after 2024-02-01 that do *not* integrate with AWS RDS will not be impacted. - - -### Why are Amazon-specific CA certificates no longer loaded by default? - -Pipedream's runtime, which is based on the [Amazon Web Services](https://aws.amazon.com/) (AWS) Lambda Node.js runtime, is being upgraded to support Node.js 20. Starting with Node.js 20, Lambda no longer loads and validates Amazon-specific CA certificates by default. This improves cold start performance. - -For more information, see [Amazon's blog post](https://aws.amazon.com/blogs/compute/node-js-20-x-runtime-now-available-in-aws-lambda/). - -### How will this impact my workflows? - -Starting 2024-02-01, relevant database connection attempts will return a message like this: - -![Missing CA Certificate](https://res.cloudinary.com/pipedreamin/image/upload/v1705428110/self-signed-cert-in-cert-chain-error_fkvph0.png) - -### What do I need to do? - -If you are not planning to update and re-deploy a workflow [impacted by this update](#will-this-impact-my-workflows), you do not need to do anything. - -Otherwise, to successfully connect to your database, you can disable server identity verification or include CA certificates for your database. - -For more information on secure connections and CAs, see the AWS docs: [Using SSL/TLS to encrypt a connection to a DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html) - -Below are instructions for updating a workflow that connects to a [**MySQL**](#mysql), [**PostgreSQL**](#postgresql), or [**Microsoft SQL Server**](#microsoft-sql-server) DB instance. - -#### MySQL - -**Using a Pipedream action**: - -- Option A: Disable server identity verification - 1. If given the option, update the action to the latest version by clicking the "Update" button in the workflow step. The lastest version of MySQL actions disable server identity verification by default. - - ![Update Action Button](https://res.cloudinary.com/pipedreamin/image/upload/v1705519878/update-action-button-mysql_fr549p.png) - -- Option B: Use the [MySQL (SSL)](https://pipedream.com/apps/mysql-ssl) app - 1. Replace your MySQL action with the corresponding MySQL (SSL) action. - 2. [Connect](/apps/connected-accounts/#connecting-accounts) your MySQL (SSL) account, specifying the `key`, `cert`, `ca`, and `rejectUnauthorized` connection options. - -**Using a custom code step**: - -- Option A: Disable server identity verification - 1. Set the `rejectUnauthorized` connection option to `false`. For example: - - ```javascript - const connection = await mysql.createConnection({ - host, - user, - password, - database, - ssl: { - rejectUnauthorized: false, - } - }); - ``` - -- Option B: Use the [MySQL (SSL)](https://pipedream.com/apps/mysql-ssl) app - 1. Replace the `mysql` app prop with a `mysql_ssl` app prop. - 2. Use the SSL connection options contained in the `$auth` object. - - Here's an example of an updated code step that uses the **`mysql_ssl`** app and the [`mysql2` npm package](https://www.npmjs.com/package/mysql2): - - ```javascript - import mysql from 'mysql2/promise'; - export default defineComponent({ - props: { - mysql: { - type: "app", - app: "mysql_ssl", - } - }, - async run({steps, $}) { - const { host, port, username, password, database, ca, cert, key, rejectUnauthorized } = this.mysql.$auth; - const connection = await mysql.createConnection({ - host, - port, - user: username, - password, - database, - ssl: { - rejectUnauthorized, - ca, - cert, - key, - } - }); - const [rows] = await connection.execute('SELECT NOW()'); - return rows; - }, - }) - ``` - -#### PostgreSQL - -**Using a Pipedream action**: - -1. If given the option, update the action to the latest version by clicking the "Update" button in the workflow step. - - ![Update Action Button](https://res.cloudinary.com/pipedreamin/image/upload/v1705519996/update-action-button-postgresql_aadmqm.png) - -2. Set the **Reject Unauthorized** field to `false`. - - ![Reject Unauthorized Field](https://res.cloudinary.com/pipedreamin/image/upload/v1705520053/postgresql-reject-unauthorized-field_ualjtm.png) - -**Using a custom code step**: - -- Option A: Disable server identity verification - 1. Set the `rejectUnauthorized` connection option to `false`. For example: - - ```javascript - const client = new Client({ - host, - database, - user, - password, - ssl: { - rejectUnauthorized: false, - }, - }); - ``` - -- Option B: Include all Amazon CA certificates - 1. Read the certificate file with all Amazon CA certificates located at `/var/runtime/ca-cert.pem`. - 2. Include the CA certificates in the database connection options. - - Here's an example code step that uses the [`pg` npm package](https://www.npmjs.com/package/pg): - - ```javascript - import { Client } from "pg"; - import fs from "fs"; - export default defineComponent({ - props: { - postgresql: { - type: "app", - app: "postgresql", - } - }, - async run({steps, $}) { - const { host, user, password, port, database } = this.postgresql.$auth; - const client = new Client({ - host, - database, - user, - password, - port, - ssl: { - rejectUnauthorized: true, - ca: fs.readFileSync("/var/runtime/ca-cert.pem") - }, - }); - await client.connect(); - const results = (await client.query("SELECT NOW()")).rows; - $.export("results", results); - await client.end(); - }, - }); - ``` - -- Option C: Include your region's certificate bundle - - 1. Download the [certificate bundle for your AWS region](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html#UsingWithRDS.SSL.RegionCertificates). - 2. Import the certificate bundle into your workflow using [the file store](/projects/file-stores). - 3. Include the CA certificates in the database connection options. - - Here's an example code step that uses the `pg` npm package: - - ```javascript - import { Client } from "pg"; - import fs from "fs"; - export default defineComponent({ - props: { - postgresql: { - type: "app", - app: "postgresql", - } - }, - async run({steps, $}) { - const { host, user, password, port, database } = this.postgresql.$auth; - const client = new Client({ - host, - database, - user, - password, - port, - ssl: { - rejectUnauthorized: true, - ca: fs.readFileSync(steps.trigger.context.attachments["-bundle.pem"]).toString(), - }, - }); - await client.connect(); - const results = (await client.query("SELECT NOW()")).rows; - $.export("results", results); - await client.end(); - }, - }); - ``` - -#### Microsoft SQL Server - -**Using a Pipedream action**: - -1. [Reconnect](/apps/connected-accounts/#reconnecting-an-account) your Microsoft SQL Server account, setting the **trustServerCertificate** field to `true`. - -**Using a custom code step**: - -- Option A: Disable server identity verification - 1. Set the `trustServerCertificate` connection option to `true`. For example: - - ```javascript - const config = { - server, - database, - user, - password, - options: { - trustServerCertificate: true, - }, - }; - ``` - -- Option B: Include all Amazon CA certificates - 1. Read the certificate file with all Amazon certificates located at `/var/runtime/ca-cert.pem`. - 2. Include the certificates in the database connection options. - - Here's an example code step that uses the [`mssql` npm package](https://www.npmjs.com/package/mssql): - - ```javascript - import sql from "mssql"; - import fs from "fs"; - export default defineComponent({ - props: { - microsoft_sql_server: { - type: "app", - app: "microsoft_sql_server", - } - }, - async run({steps, $}) { - const { host, username, password, port, database, encrypt, trustServerCertificate } = this.microsoft_sql_server.$auth; - const config = { - server: host, - port: parseInt(port, 10), - database, - user: username, - password, - options: { - encrypt, - trustServerCertificate, - cryptoCredentialsDetails: { - ca: fs.readFileSync("/var/runtime/ca-cert.pem").toString(), - }, - }, - }; - await sql.connect(config); - return await sql.query`SELECT GETDATE()`; - }, - }); - ``` - -- Option C: Include your region's certificate bundle - 1. Download the [certificate bundle for your AWS region](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html#UsingWithRDS.SSL.RegionCertificates). - 2. Import the certificate bundle into your workflow using [the file store](/projects/file-stores). - 3. Include the certificates in the database connection options. - - Here's an example code step that uses the `mssql` npm package: - - ```javascript - import sql from "mssql"; - import fs from "fs"; - export default defineComponent({ - props: { - microsoft_sql_server: { - type: "app", - app: "microsoft_sql_server", - } - }, - async run({steps, $}) { - const { host, username, password, port, database, encrypt, trustServerCertificate } = this.microsoft_sql_server.$auth; - const config = { - server: host, - port: parseInt(port, 10), - database, - user: username, - password, - options: { - encrypt, - trustServerCertificate, - cryptoCredentialsDetails: { - ca: fs.readFileSync(steps.trigger.context.attachments["-bundle.pem"]).toString(), - }, - }, - }; - await sql.connect(config); - return await sql.query`SELECT GETDATE()`; - }, - }) - ``` diff --git a/docs-v2/pages/deprecated/shopify-faq-2023-10/_meta.tsx b/docs-v2/pages/deprecated/shopify-faq-2023-10/_meta.tsx deleted file mode 100644 index 4705b04ff8795..0000000000000 --- a/docs-v2/pages/deprecated/shopify-faq-2023-10/_meta.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default { - "index": { - "display": "hidden", - }, -} as const diff --git a/docs-v2/pages/deprecated/shopify-faq-2023-10/index.mdx b/docs-v2/pages/deprecated/shopify-faq-2023-10/index.mdx deleted file mode 100644 index bc9ecbfbf6137..0000000000000 --- a/docs-v2/pages/deprecated/shopify-faq-2023-10/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ -# Update to the Shopify Integration on Pipedream (October 2023) - -Effective 2023-10-15, Shopify will no longer allow their customers to access **[Protected Customer Data](https://www.shopify.com/partners/blog/data-protection)** on Pipedream. - - - -### What is Protected Customer Data? -**Refer to Shopify's docs for the latest**, but [here is what they say](https://www.shopify.com/partners/blog/data-protection): -> Protected customer data includes any data that relates directly to a customer or prospective customer, as represented in the API resources. This includes information like total order value, line items in an order, and order shipping events. Apps that require this level of data must implement our [data protection requirements](https://shopify.dev/apps/store/data-protection/protected-customer-data?shpxid=aa95abd6-7955-4C12-6DB9-B3C3859B16AE), including informing merchants of your appโ€™s data use and purpose, applying customer consent decisions, opt-out requests, and more. - -> Protected customer fields require individual configuration and approval, in addition to approval for protected customer data. This includes information like name, address, email, and phone number. Apps that require this layer of data will need to abide by [additional requirements](https://shopify.dev/apps/store/data-protection/protected-customer-data?shpxid=aa95abd6-7955-4C12-6DB9-B3C3859B16AE#requirements), including encrypting your data back ups, keeping test and production data separate, and more. - -### Why is this data no longer available in Pipedream? -We've invested significant Product and Engineering time to get our app approved based on Shopifyโ€™s requirements, and unfortunately theyโ€™ve been unwilling to support the use case of an app-agnostic platform like Pipedream. - -### How will this impact my workflows? -Starting 2023-10-15, the relevant API calls will return a message like this: - -![Restricted Customer Fields](https://res.cloudinary.com/pipedreamin/image/upload/v1695097066/shopify-customer-fields_f7enlk.png) - -### What do I need to do? - -#### Use a custom Shopify app -- Create a custom Shopify app for your Shopify store and connect it to Pipedream using the [Shopify Developer App](https://pipedream.com/apps/shopify-developer-app#getting-started) -- Custom apps that are not distributed on Shopifyโ€™s app store do not have to meet any of their review requirements, but [can only be connected to a single Shopify store](https://shopify.dev/docs/apps/distribution) -- Each โ€œappโ€ represents a unique connected account for the Shopify Developer app in Pipedream -- All of the triggers and actions from the main Shopify app are supported on the [Shopify Developer App](https://pipedream.com/apps/shopify-developer-app/#popular-shopify-developer-app-triggers) (including those that access Protected Customer Data) -- Youโ€™ll need to modify each workflow that uses Shopify to use the Shopify Developer app instead of the main Shopify app - -Here's an example of a code step using the **`shopify`** app: - -``` javascript -import { axios } from "@pipedream/platform" -export default defineComponent({ - props: { - // Note the prop definition - shopify: { - type: "app", - app: "shopify", - }, - customerEmail: { - type: "string" - label: "Customer Email" - } - }, - async run({steps, $}) { - return await axios($, { - // Note the version - url: `https://${this.shopify.$auth.shop_id}.myshopify.com/admin/api/2022-07/customers/search.json`, - headers: { - // Note the reference to the auth token - "X-Shopify-Access-Token": `${this.shopify.$auth.oauth_access_token}`, - "Content-Type": `application/json`, - }, - params: { - query: `email:${this.customerEmail}` - } - }) - }, -}) -``` - -And here's an example of the updated code step that uses a custom app with the **`shopify_developer_app`** instead: - -``` javascript -import { axios } from "@pipedream/platform" -export default defineComponent({ - props: { - // Note the updated prop definition - shopify_developer_app: { - type: "app", - app: "shopify_developer_app", - }, - customerEmail: { - type: "string" - label: "Customer Email" - } - }, - async run({steps, $}) { - return await axios($, { - // Note the updated version - url: `https://${this.shopify_developer_app.$auth.shop_id}.myshopify.com/admin/api/2023-07/customers/search.json`, - headers: { - // Note the updated reference to the auth token - "X-Shopify-Access-Token": `${this.shopify_developer_app.$auth.access_token}`, - "Content-Type": `application/json`, - }, - params: { - query: `email:${this.customerEmail}` - } - }) - }, -}) -``` \ No newline at end of file diff --git a/docs-v2/pages/glossary.mdx b/docs-v2/pages/glossary.mdx deleted file mode 100644 index f07e41c5d36cc..0000000000000 --- a/docs-v2/pages/glossary.mdx +++ /dev/null @@ -1,493 +0,0 @@ -# Pipedream Glossary - -Below you'll find a glossary of Pipedream-specific terms. We use these in the product, docs, and other content, so if you're seeing a term for the first time, you'll probably find it below. - -All terms that aren't in this doc hold their standard technical meaning. If you see a term missing, please [reach out](https://pipedream.com/support). - -[0-9](#0---9) | [A](#a) | [B](#b) | [C](#c) | [D](#d) | [E](#e) | [F](#f) | [G](#g) | [H](#h) | [I](#i) | [J](#j) | [K](#k) | [L](#l) | [M](#m) | [N](#n) | [O](#o) | [P](#p) | [Q](#q) | [R](#r) | [S](#s) | [T](#t) | [U](#u) | [V](#v) | [W-Z](#w-z) - -## 0 - 9 - -### 2FA - -Short for [two-factor authentication](#two-factor-authentication-2fa). - -## A - -### Account - -Synonym for [connected account](#connected-account). - -### Action - -Actions are reusable code steps, written as [Pipedream components](#component). - -### Advanced plan - -Pipedream's plan for individuals and teams running production workflows. [See the pricing page](https://pipedream.com/pricing) for more details. - -### Auto-retry - -[A workflow setting](/workflows/building-workflows/settings/#auto-retry-errors) that lets you automatically retry an execution from the failed step when it encounters an error. - -## B - -### Bash runtime - -Pipedream's internal code in the [execution environment](#execution-environment) responsible for running Bash code. - -### Basic plan - -Pipedream's plan for individuals who need higher limits and the option to scale usage. [See the pricing page](https://pipedream.com/pricing) for more details. - -### Bi-directional GitHub sync - -When you configure [GitHub Sync](#github-sync), you can make changes in Pipedream and push them to GitHub, or make changes locally, push to GitHub, and deploy to Pipedream. Since changes can be made in each system and communicated to the other, the sync is bi-directional. - -### Branch - -Short for [Git branch](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell). When using [Pipedream GitHub Sync](#github-sync), you can sync a GitHub repository to a Pipedream project and manage changes to code in a branch. - -### Builder - -The Pipedream UI where you build, edit, and test workflows. - -### Business plan - -Pipedream's plan for teams with security, compliance, and support needs. [See the pricing page](https://pipedream.com/pricing) for more details. - -## C - -### Changelog - -Synonym for [project changelog](#project-changelog). - -### Code step - -[Steps](#step) that let users run [custom code](/workflows/building-workflows/code/) in a workflow. - -### Cold start - -A cold start refers to the delay between the invocation of workflow and the execution of the workflow code. Cold starts happen when Pipedream spins up a new [execution environment](#execution-environment) to handle incoming events. - -### Commit - -Short for [Git commit](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository). When using [Pipedream GitHub Sync](#github-sync), you commit changes to a branch before deploying the workflow to production. - -### Component - -Components are Node.js modules that run on Pipedream's serverless infrastructure. [Sources](#source) and [actions](#action) are two types of components. See [the component API](/components/contributing/api/) for more details. - -### Component API - -The programming interface for creating [components](#component) in Pipedream. - -### Component guidelines - -Guidelines applied to components submitted to [the Pipedream component registry](#component-registry). - -### Component registry - -The public registry of [components](#component) available to Pipedream users, [available on GitHub](https://github.com/PipedreamHQ/pipedream). - -### Concurrency - -[A workflow setting](/workflows/building-workflows/settings/concurrency-and-throttling/#concurrency) that lets users configure the number of concurrent [workers](#worker) available to process events. - -### Connected account - -A specific account or credentials used to connect to a Pipedream [integration](#integrations). If both you and your team member have an account with OpenAI, for example, you would connect each account as a distinct connected account. [See the docs](/apps/connected-accounts) for more details. - -### Connected account access control - -You can restrict access to connected accounts to specific individuals or share with the entire workspace. [See the docs](/apps/connected-accounts#access-control) for more details. - -### Credit - -Pipedream charges one credit per 30 seconds of compute time at 256MB megabytes of memory (the default) per workflow execution. Credits are also charged for [dedicated workers](#dedicated-workers). [See the docs](/pricing/#credits-and-billing) for more details. - -### Custom domain - -By default, [HTTP endpoints](#http-endpoint) are served from the `*.m.pipedream.net` domain. You can configure a [custom domain](/workflows/domains/) if you want to host that endpoint on your own domain. - -### Custom source - -An [event source](#event-source) that you create using custom code, or by modifying a [registry source](#registry-source). - -## D - -### Data retention - -A workflow setting that allows you to configure how long Pipedream stores event data and logs associated with [executions](#execution). [See the docs](/workflows/building-workflows/settings/#data-retention-controls) for more details. - -### Dedicated workers - -[Workers](#worker) that remain available to process events, even when the workflow is not running. This can help reduce [cold starts](#cold-start) and improve performance for workflows that require low latency. [See the docs](/workflows/building-workflows/settings/#eliminate-cold-starts) for more details. - -### Deduper - -[Event sources](#event-source) can receive duplicate requests tied to the same event. Pipedream's infrastructure supports [deduplication](/components/contributing/api/#dedupe-strategies) to ensure that only unique events are emitted by a source. - -### Delay - -[A built-in service](/workflows/building-workflows/control-flow/delay/) that lets you pause a workflow for a specified amount of time. You can delay workflows using pre-built actions, or delay in code. - -### Destination - -[Destinations](/workflows/data-management/destinations/) are built-in services that abstract the delivery and connection logic required to send events to services like Amazon S3, or targets like HTTP and email. - -### Domain - -Synonum for [custom domain](#custom-domain). - -### Data store - -[Data stores](/workflows/data-management/data-stores/) are Pipedream's built-in key-value store. - -### Deploy key - -When you configure [GitHub Sync](#github-sync), you can use a deploy key to authenticate Pipedream with your GitHub repository. [See the docs](/workflows/git/#create-a-new-project-and-enable-github-sync) for more details. - -## E - -### Editor - -The built-in code editor in the [builder](#builder). - -### Email trigger - -A [workflow trigger](#trigger) that listens for incoming email. This trigger exposes a workflow-specific email address that you can use to send email to the workflow. - -### Emit - -[Event sources](#event-source), [workflow triggers](#trigger), and even workflows themselves can emit [events](#event) that trigger other [listeners](#listener). Since sources have a built-in [deduper](#deduper), not all requests are emitted as events. - -### Emitter - -A resource that [emits](#emit) [events](#event). Emitters can be [event sources](#event-source), [workflow triggers](#trigger), or even workflows themselves. - -### Error notification - -When a workflow execution encounters an error, Pipedream sends an [error notification](/workflows/building-workflows/errors/) to the configured error [listeners](#listener). - -### Environment variable - -Pipedream supports two types of environment variables: - -- [Project variables](#project-variable), available within a specific project -- [Workspace variables](#workspace-variable), available across all projects in a workspace - -### Event - -Events are emitted by [sources](#event-source) and consumed by workflows. Events can be triggered by a variety of sources, including HTTP requests, cron schedules, and third-party APIs. Events can be passed to actions, which can process the event data and perform a variety of operations, including making HTTP requests, sending emails, and interacting with third-party APIs. - -### Event context - -Metadata about a workflow execution, including the timestamp of the event, the event ID, and more. Exposed in [`steps.trigger.context`](/workflows/building-workflows/triggers/#stepstriggercontext). - -### Event data - -The content of the event, exposed in [`steps.trigger.event`](/workflows/building-workflows/triggers/). - -### Event history - -A log of all workflow events and executions, available in the [event inspector](#inspector) or the global [event history UI](/workflows/event-history/). - -### Event queue - -When using built-in [concurrency](#concurrency) or [throttling](#throttling) controls, events are queued in a workflow-specific queue and processed by available [workers](#worker). - -### Event source - -[Components](#component) that watch for events from a third-party data source, emitting those events to [listeners](#listener). - -### Execution - -When a workflow is triggered by an event, the running instance of the workflow on that event is called an execution. - -### Execution environment - -[The virtual machine](/privacy-and-security/#execution-environment) and internal Pipedream platform code that runs a workflow execution. An instance of an execution environment is called a [worker](#worker). - -### Execution rate controls - -The workflow setting that allows users to configure the number of executions a workflow can process per unit time. Also known as throttling. [See the docs](/workflows/building-workflows/settings/concurrency-and-throttling/#throttling) for more details. - -### Export - -Depending on the context, **export** can function as a noun or verb: - -- **Noun**: A synonym for [step export](#step-export) -- **Verb**: The act of exporting data from a step using Pipedream primitives like [`$.export`](/workflows/building-workflows/code/nodejs/#using-export) or `return`. - -### Expression - -In programming, expressions are code that resolve to a value. In Pipedream, [you can use expressions within props forms](/workflows/building-workflows/using-props/#entering-expressions) to reference prior steps or compute custom values at runtime. - -### External credentials - -[Connected accounts](#connected-account) are accounts that users link directly in Pipedream. External credentials are credentials that users store in their own database or service, and reference in Pipedream at runtime. [See the docs](/apps/connected-accounts/external-auth) for more details. - -## F - -### File store - -[File stores](/projects/file-stores) are filesystems scoped to projects. Any files stored in the file store are available to all workflows in the project. - -### Filter - -[Built-in actions](https://pipedream.com/apps/filter) that let you continue or stop a workflow based on a condition. - -### Folder - -Within projects, you can organize workflows into folders. - -### Free plan - -Pipedream's free plan. [See the limits docs](/workflows/limits/) for more details. - -## G - -### Global search - -Press `Ctrl + K` or `Cmd + K` to open the global search bar in the Pipedream UI. - -### GitHub Sync - -When enabled on a [project](#project), GitHub Sync syncs the project's workflow code with a GitHub repository. [See the docs](/workflows/git/) for more details. - -### Golang runtime - -Pipedream's internal code in the [execution environment](#execution-environment) responsible for running Go code. - -## H - -### Helper functions - -[Built-in actions](https://pipedream.com/apps/helper-functions) that convert data types, format dates, and more. - -### Hooks - -[Hooks](/components/contributing/api/#hooks) are functions executed as a part of the [event source](#event-source) lifecycle. They can be used to perform setup tasks before the source is deployed, or teardown tasks after the source is destroyed. - -### HTTP endpoint - -The URL tied to a [workflow HTTP trigger](#http-trigger) or HTTP-triggered [event source](#event-source). - -### HTTP trigger - -A [workflow trigger](#trigger) that listens for incoming HTTP requests. This trigger exposes a unique URL that you can use to send HTTP requests to the workflow. - -## I - -### Inspector - -The Pipedream UI that displays a specific workflow's event history. [See the docs](/workflows/building-workflows/inspect/) for more details. - -### Integrations - -When Pipedream adds a new third-party service to our marketplace of apps, we often have to handle details of the OAuth process and authentication, and build [sources](#event-source) and [actions](#action) for the API. These details are abstracted from the user, and the app configuration is referred to as an **integration**. - -## J - -## K - -### Key-based account - -A [connected account](#connected-account) that uses static credentials, like API keys. - -## L - -### Listener - -A resource that listens for events emitted by [emitters](#emitter). Listeners can be [workflows](#workflow), [event sources](#event-source), webhook URLs, and more. - -### Logs - -Standard output and error logs generated by steps during a workflow execution. Logs are available as a part of the step execution details in the [event inspector](#inspector) or the global [event history UI](/workflows/event-history/). - -## M - -### Merge - -When you configure [GitHub Sync](#github-sync), you can merge changes from a branch into the production branch of your GitHub repository, deploying those changes to Pipedream. - -## N - -### Node.js runtime - -Pipedream's internal code in the [execution environment](#execution-environment) responsible for running Node.js code. - -## O - -### Organization - -Synonym for [workspaces](#workspace). - -### OAuth account - -A [connected account](#connected-account) that uses OAuth to authenticate with a third-party service. - -## P - -### Premium apps - -Pipedream's built-in [integrations](#integrations) that require a paid plan to use. [See the pricing page](https://pipedream.com/pricing) for more details and the [full list of premium apps](/apps/#premium-apps). - -### Project - -A container for workflows, secrets, and other resources in Pipedream. Projects can be synced with a GitHub repository using [GitHub Sync](#github-sync). [See the docs](/projects/) for more details. - -### Project-based access control - -You can restrict access to projects to specific individuals or share with the entire workspace. [See the docs](/projects/access-controls) for more details. - -### Project changelog - -When using [Pipedream GitHub Sync](#github-sync), the changelog shows the history of changes made to a project. - -### Project file - -A file stored in a [file store](#file-store). - -### Project secret - -Users can add both standard project variables and secrets to a project. The values of secrets are encrypted and cannot be read from the UI once added. - -### Project settings - -Configure GitHub Sync and other project-specific configuration in a project's settings. - -### Project variable - -Project-specific environment variables, available to all workflows in a project. - -### Props - -[Props](/workflows/building-workflows/using-props/) allow you to pass input to [components](#component). - -### Python runtime - -Pipedream's internal code in the [execution environment](#execution-environment) responsible for running Python code. - -### Object explorer - -The [builder](#builder) UI that allows you to search objects [exported](#export) from prior steps. [See the docs](/workflows/building-workflows/using-props/#use-the-object-explorer) for more details. - -## Q - -## R - -### Registry - -Synonym for [component registry](#component-registry). - -### Registry source - -An [event source](#event-source) available in the [component registry](#component-registry). Registry sources are reviewed and approved by Pipedream. - -## S - -### Schedule trigger - -A [workflow trigger](#trigger) that runs on a schedule. This trigger exposes a cron-like syntax that you can use to schedule the workflow. - -### Single sign-on (SSO) - -Users can [configure SSO](/workspaces/sso/) to authenticate with Pipedream using their identity provider. - -### Source - -Synonym for [event source](#event-source). - -### Step - -[Steps](/workflows/#steps) are the building blocks used to create workflows. Steps can be [triggers](#trigger), [actions](#action), or [code steps](#code-step). - -### Step export - -JSON-serializable data returned from steps, available in future steps of a workflow. [See the docs](/workflows/#step-exports) for more details. - -### Step notes - -[Step notes](/workflows/#step-notes) are Markdown notes you can add to a step to document its purpose. - -### Subscription - -A connection between a [listener](#listener) and an [emitter](#emitter) that allows the listener to receive events from the emitter. - -### Suspend - -Workflow [executions](#execution) are suspended when you [delay](#delay) or use functions like [`$.flow.suspend`](/workflows/building-workflows/code/nodejs/rerun/#flowsuspend) to pause the workflow. - -## T - -### Throttling - -Synonym for [execution rate controls](#execution-rate-controls). - -### Timeout - -All workflows have [a default timeout](/workflows/limits/#time-per-execution). You can configure a custom timeout in the [workflow settings](/workflows/building-workflows/settings/#execution-timeout-limit). - -### `/tmp` directory - -A directory available to the workflow's [execution environment](#execution-environment) for storing files. Files stored in `/tmp` are only guaranteed to be available for the duration of the workflow execution, and are not accessible across [workers](#worker). - -### Trigger - -Triggers process data from third-party APIs and [emit](#emit) [events](#event) that run workflows. Triggers can be [HTTP triggers](#http-trigger), [schedule triggers](#schedule-trigger), [email triggers](#email-trigger), [event sources](#event-source), and more. - -### Two-factor authentication (2FA) - -Two-factor authentication. [Configure 2FA](/account/user-settings/#two-factor-authentication) to add an extra layer of security to your Pipedream account. - -## U - -## V - -### VPC (Virtual Private Cloud) - -VPCs are customer-specific private networks where workflows can run. [See the docs](/workflows/vpc/) for more details. - -## W-Z - -### Worker - -An instance of a workflow [execution environment](#execution-environment) available to processes [events](#event). - -### Workspace - -You create a workspace when you sign up for Pipedream. Workspaces contain projects, workflows, and other resources. [See the docs](/workflows/workspaces) for more details. - -### Workspace admin - -A workspace can have multiple [admins](/workspaces/#promoting-a-member-to-admin), who can administer the workspace, manage billing, and more. - -### Workspace member - -A user invited to a workspace. Members can create projects, workflows, and other resources in the workspace, but cannot manage billing or administer the workspace. - -### Workspace owner - -The user who created the workspace. - -### Workflow serialization - -When you use [GitHub Sync](#github-sync), Pipedream serializes the workflow configuration to a YAML file. Optionally, if your workflow contains custom code, Pipedream serializes the code to a separate file. - -### Workspace settings - -[Workspace settings](#workspace-settings) let [workspace admins](#workspace-admin) configure settings like membership, [SSO](#single-sign-on-sso), and more. - -### Workflow template - -When you [share a workflow](/workflows/building-workflows/sharing/), you create a template that anyone can copy and run. - -### Workspace variable - -An environment variable available across all projects in a workspace. - -### Workflow - -Workflows are the primary resource in Pipedream. They process events from [triggers](#trigger) and run [steps](#step) to perform actions like making HTTP requests, sending emails, and more. diff --git a/docs-v2/pages/hidden/abuse/_meta.tsx b/docs-v2/pages/hidden/abuse/_meta.tsx deleted file mode 100644 index 1926dd0089996..0000000000000 --- a/docs-v2/pages/hidden/abuse/_meta.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default { - index: { - display: "hidden", - }, -} as const diff --git a/docs-v2/pages/hidden/abuse/index.mdx b/docs-v2/pages/hidden/abuse/index.mdx deleted file mode 100644 index 7a9ae074dfa1e..0000000000000 --- a/docs-v2/pages/hidden/abuse/index.mdx +++ /dev/null @@ -1,9 +0,0 @@ -# Reporting abuse - -If you suspect Pipedream resources are being used for illegal purposes, or otherwise violate [the Pipedream Terms](https://pipedream.com/terms), please reach out to abuse@pipedream.com. - -In your abuse report, please provide as many details as possible, including: - -- The specific issue you're seeing, and what date / time it started / you observed it. -- Relevant Pipedream resources involved in the abuse, for example: the HTTP endpoint to which traffic is being sent. -- Any logs / code involved in the abuse. For example, if you're encountering a Denial-of-service attack, please include any HTTP / networking logs related to the issue. If you're reporting malware that exfiltrates data to Pipedream, please include relevant code from that malware or links to relevant reports. \ No newline at end of file diff --git a/docs-v2/pages/hidden/scheduling-future-tasks/_meta.tsx b/docs-v2/pages/hidden/scheduling-future-tasks/_meta.tsx deleted file mode 100644 index 4705b04ff8795..0000000000000 --- a/docs-v2/pages/hidden/scheduling-future-tasks/_meta.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default { - "index": { - "display": "hidden", - }, -} as const diff --git a/docs-v2/pages/hidden/scheduling-future-tasks/index.mdx b/docs-v2/pages/hidden/scheduling-future-tasks/index.mdx deleted file mode 100644 index 8858c212f6bc1..0000000000000 --- a/docs-v2/pages/hidden/scheduling-future-tasks/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ -# Scheduling future tasks - -Pipedream includes an event source which exposes an HTTP API for scheduling one-time tasks. You can schedule tasks at any timestamp, with second-level precision, up to one year in the future. - -[Click here to create this source](https://pipedream.com/sources?action=create&key=pipedream-new-scheduled-tasks), or visit [https://pipedream.com/sources/new](https://pipedream.com/sources/new), select the **Pipedream** app, and the **New Scheduled Tasks** source. - -To [schedule a new task](#scheduling-a-task), just send an HTTP `POST` request to your source's endpoint, at the `/schedule` path, with the following format: - -```javascript -{ - "timestamp": "2020-08-21T04:29:00.951Z", // timestamp: an ISO 8601 timestamp - "message": { "name": "Luke" } // message: any object or string -} -``` - -When the timestamp arrives and the task is invoked, the source will emit the payload passed in your original, scheduled request. This allows you to trigger [a Pipedream workflow](/workflows/building-workflows/) at the scheduled time, passing the `message` and `timestamp` to the workflow as an [incoming event](/workflows/building-workflows/triggers/). - -You can also listen for these events in your own app / infra, by [subscribing to your source's SSE stream](/workflows/data-management/destinations/sse/). Each time a scheduled task is emitted from your Pipedream source, it also emits a message to that SSE stream. Any application (a Docker container, a Rails app, etc.) listening to that SSE stream can react to that message to run whatever code you'd like. - - - -## HTTP API - -This source exposes an HTTP endpoint where you can send `POST` requests to schedule new tasks. Your endpoint URL should appear as the **Endpoint** in your source's details, in the **Events** tab. - -### Scheduling a task - -``` -POST /schedule -``` - -#### Pipedream built-in action - -Use the **Pipedream Task Scheduler - Schedule Task** Helper Functions action to schedule a new task. - -#### Node.js - -Use the following code in a Node.js code step: - -```javascript -import { axios } from "@pipedream/platform" - -export default defineComponent({ - props: { - numSeconds: { - type: "integer", - label: "Num Seconds", - description: "How many seconds in the future would you like to schedule the task?", - }, - secret: { - type: "string", - optional: true, - }, - taskSchedulerURL: { - type: "string", - label: "Task Scheduler URL", - description: "Enter the URL as it appears in the **Endpoint** field of your Task Scheduler source", - }, - message: { - type: "string", - description: "The message / payload to send to your task scheduler. Can be any string or JavaScript object. This message will be emitted by the task scheduler at the specified number of seconds in the future.", - }, - }, - async run({ $ }) { - const timestamp = (new Date(+new Date() + (this.numSeconds * 1000))).toISOString() - - const headers = { - "Content-Type": "application/json", - }; - if (this.secret) { - headers["x-pd-secret"] = this.secret; - } - - return await axios($, { - url: `${this.taskSchedulerURL}/schedule`, - method: "POST", - headers, - data: { - timestamp, - message: this.message, - }, - }); - }, -}) -``` - -#### `cURL` - -To schedule a new task, `POST` a JSON object with an [ISO 8601](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) `timestamp` and a `message` to the **`/schedule` path** of your source's HTTP endpoint: - -```javascript -{ - "timestamp": "2020-08-21T04:29:00.951Z", // timestamp: an ISO 8601 timestamp - "message": { "name": "Luke" } // message can be any object or string -} -``` - -Optionally, if you configured a secret in your source, you'll need to pass that in the `x-pd-secret` header. For example: - -```bash -curl -X POST \ - -H 'Content-Type: application/json' \ - -H 'x-pd-secret: 123' \ - -d '{ "timestamp": "2020-09-18T04:40:59Z", "message": "foo" }' \ - https://endpoint.m.pipedream.net/schedule -``` - -Successful task schedule requests yield a `200 OK` response, noting the task was successfully scheduled. - -### Cancelling a scheduled task - -``` -POST /cancel -``` - -When you schedule a task, you'll receive a unique ID assigned to that task in the `id` field of the HTTP response body. That `id` can be passed to the `/cancel` endpoint to cancel that task before its scheduled time arrives. - -#### Node.js - -Cancel tasks using the following code in a Node.js code step: - -```javascript -import { axios } from "@pipedream/platform" - -export default defineComponent({ - props: { - secret: { - type: "string", - optional: true, - }, - taskSchedulerURL: { - type: "string", - label: "Task Scheduler URL", - description: "Enter the URL as it appears in the **Endpoint** field of your Task Scheduler source", - }, - taskId: { - type: "string", - description: "The ID of the task you'd like to cancel", - }, - }, - async run({ $ }) { - const headers = { - "Content-Type": "application/json", - }; - if (this.secret) { - headers["x-pd-secret"] = this.secret; - } - - return await axios($, { - url: `${this.taskSchedulerURL}/cancel`, - method: "DELETE", - headers, - data: { - id: this.taskId, - }, - }); - }, -}) -``` - -#### `cURL` - -```bash -curl -X POST \ - -H 'Content-Type: application/json' \ - -H 'x-pd-secret: 123' \ - -d '{ "id": "8fceb45b-0241-4d04-9f3f-334679586370" }' \ - https://endpoint.m.pipedream.net/cancel -``` - -## Processing scheduled tasks - -Scheduled tasks are emitted by the event source as events, which you can consume with - -- [Pipedream workflows](/workflows/building-workflows/) -- [A source-specific SSE stream](/workflows/data-management/destinations/sse/) -- [The Pipedream REST API](/rest-api/) -- [The Pipedream CLI](/components/contributing/cli/reference/#installing-the-cli) - -[See the docs on consuming events from sources](/workflows/building-workflows/sources/#consuming-events-from-sources) for more information. diff --git a/docs-v2/pages/hidden/status/_meta.tsx b/docs-v2/pages/hidden/status/_meta.tsx deleted file mode 100644 index 4705b04ff8795..0000000000000 --- a/docs-v2/pages/hidden/status/_meta.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default { - "index": { - "display": "hidden", - }, -} as const diff --git a/docs-v2/pages/hidden/status/index.mdx b/docs-v2/pages/hidden/status/index.mdx deleted file mode 100644 index 03952467f7d6d..0000000000000 --- a/docs-v2/pages/hidden/status/index.mdx +++ /dev/null @@ -1,5 +0,0 @@ -# Service Status - -Pipedream operates a status page at [https://status.pipedream.com](https://status.pipedream.com/). That page displays the uptime history and current status of every Pipedream service. - -When incidents occur, updates are published to the **#incidents** channel of [Pipedream's Slack Community](https://pipedream.com/support) and to the [@PipedreamStatus](https://twitter.com/PipedreamStatus) account on Twitter. On the status page itself, you can also subscribe to updates directly. diff --git a/docs-v2/pages/hidden/subprocessors/_meta.tsx b/docs-v2/pages/hidden/subprocessors/_meta.tsx deleted file mode 100644 index 4705b04ff8795..0000000000000 --- a/docs-v2/pages/hidden/subprocessors/_meta.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default { - "index": { - "display": "hidden", - }, -} as const diff --git a/docs-v2/pages/hidden/subprocessors/index.mdx b/docs-v2/pages/hidden/subprocessors/index.mdx deleted file mode 100644 index 1bc5d6502fca5..0000000000000 --- a/docs-v2/pages/hidden/subprocessors/index.mdx +++ /dev/null @@ -1,17 +0,0 @@ - -# Subprocessors - -Below, you'll find a list of Pipedreamโ€™s Subprocessors in our capacity as a Processor (as defined by our Data Protection Addendum). Please check this list frequently for any updates. - -_Last updated March 17, 2021_ - -| Company / Service | Scope of Subprocessing | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | -| [Amazon Web Services](https://aws.amazon.com/financial-services/security-compliance/compliance-center/?country-compliance-center-cards.sort-by=item.additionalFields.headline&country-compliance-center-cards.sort-order=asc&awsf.country-compliance-center-master-filter=*all) | Cloud hosting | -| [Datadog](https://www.datadoghq.com/security/) | Application monitoring | -| [Google Cloud Platform](https://cloud.google.com/security/compliance) | Cloud hosting | -| [Looker Data Sciences, Inc.](https://looker.com/trust-center/compliance) | Business analytics | -| [Redis Labs](https://redislabs.com/company/compliance-and-privacy/) | Cloud hosting | -| [Snowflake Computing](https://www.snowflake.com/snowflakes-security-compliance-reports/) | Business analytics | -| [Sentry](https://sentry.io/security/) | Application monitoring | -| [OpenAI](https://openai.com/) | AI services (chat support, code gen, and more) | diff --git a/docs-v2/pages/index.mdx b/docs-v2/pages/index.mdx deleted file mode 100644 index b11182c4aee66..0000000000000 --- a/docs-v2/pages/index.mdx +++ /dev/null @@ -1,69 +0,0 @@ -import VideoPlayer from "@/components/VideoPlayer"; - -# Introduction to Pipedream - -Pipedream is the easiest way to automate any process that connects APIs: - -- [Pipedream Connect](/connect) makes it easy to add thousands of customer-facing integrations to your app or AI agent in minutes -- Our [visual builder](/workflows) lets you build and run complex workflows with code-level control when you need it, and no code when you don't - -The Pipedream platform includes: - -- A [serverless runtime](/workflows/building-workflows/code/) and [workflow service](/workflows/building-workflows/) -- SDKs to handle [user authentication](/connect/) for {process.env.PUBLIC_APPS}+ APIs -- Source-available [triggers](/workflows/building-workflows/triggers/) and [actions](/workflows/building-workflows/actions/) for [thousands of integrated apps](https://pipedream.com/explore/) -- One-click [OAuth and key-based authentication](/apps/connected-accounts/) for more than {process.env.PUBLIC_APPS} APIs (use tokens directly in code or with pre-built actions) - - - -## Getting Started - -To get started, [sign up for a free account](https://pipedream.com/auth/signup) (no credit card required) and follow our [quickstart guide](/quickstart/) to create your first workflow or add your first integration. - -## Use Cases - -Pipedream supports use cases from prototype to production and is trusted by more than 1 million developers from startups to Fortune 500 companies: - -![logos](https://res.cloudinary.com/pipedreamin/image/upload/v1612919944/homepage/logos_kcbviz.png) - -The platform processes billions of events and is built and [priced](https://pipedream.com/pricing/) for use at scale. [Our team](https://pipedream.com/about) has built internet scale applications and managed data pipelines in excess of 10 million events per second (EPS) at startups and high-growth environments like BrightRoll, Yahoo!, Affirm, and Dropbox. - -Our [community](https://pipedream.com/support) uses Pipedream for a wide variety of use cases including: - -- AI agents and chatbots -- Workflow builders and SaaS automation -- API orchestration and automation -- Database automations -- Custom notifications and alerting -- Event queueing and concurrency management -- Webhook inspection and routing -- Prototyping and demos - -## Source-available - -Pipedream maintains a [source-available component registry](https://github.com/PipedreamHQ/pipedream) on GitHub so you can avoid writing boilerplate code for common API integrations. Use components as no code building blocks in workflows, or use them to scaffold code that you can customize. You can also [create a PR to contribute new components](/components/contributing/#contribution-process) via GitHub. - -## Contributing - -We hope that by providing a generous free tier, you will not only get value from Pipedream, but you will give back to help us improve the product for the entire community and grow the platform by: - -- [Contributing components](/components/contributing/) to the [Pipedream registry](https://github.com/PipedreamHQ/pipedream) or sharing via your own GitHub repo -- Asking and answering questions in our [public community](https://pipedream.com/community/) -- [Reporting bugs](https://pipedream.com/community/c/bugs/9) and [requesting features](https://github.com/PipedreamHQ/pipedream/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=%5BFEATURE%5D+) that help us build a better product -- Following us on [Twitter](https://twitter.com/pipedream), starring our [GitHub repo](https://github.com/PipedreamHQ/pipedream) and subscribing to our [YouTube channel](https://www.youtube.com/c/pipedreamhq) -- Recommending us to your friends and colleagues - -Learn about [all the ways you can contribute](https://pipedream.com/contributing). - -## Support & Community - -If you have any questions or feedback, please [reach out in our community forum](https://pipedream.com/community) or [to our support team](https://pipedream.com/support). - -## Service Status - -Pipedream operates a status page at [https://status.pipedream.com](https://status.pipedream.com/). That page displays the uptime history and current status of every Pipedream service. - -When incidents occur, updates are published to the **#incidents** channel of [Pipedream's Slack Community](https://pipedream.com/support) and to the [@PipedreamStatus](https://twitter.com/PipedreamStatus) account on Twitter. On the status page itself, you can also subscribe to updates directly. diff --git a/docs-v2/pages/pricing/_meta.tsx b/docs-v2/pages/pricing/_meta.tsx deleted file mode 100644 index f07074c72382a..0000000000000 --- a/docs-v2/pages/pricing/_meta.tsx +++ /dev/null @@ -1,4 +0,0 @@ -export default { - "index": "Overview", - "faq": "FAQ", -} as const diff --git a/docs-v2/pages/pricing/faq.mdx b/docs-v2/pages/pricing/faq.mdx deleted file mode 100644 index 1106ba4fd1550..0000000000000 --- a/docs-v2/pages/pricing/faq.mdx +++ /dev/null @@ -1,55 +0,0 @@ -# FAQ - -## How does workflow memory affect credits? - -Pipedream charges credits proportional to the memory configuration. If you run your workflow at the default memory of {process.env.MEMORY_LIMIT}, you are charged one credit each time your workflow executes for 30 seconds. But if you configure your workflow with `1024MB` of memory, for example, you're charged **four** credits, since you're using `4x` the default memory. - -## Are there any limits on paid tiers? - -**You can run any number of credits for any amount of compute time** on any paid tier. [Other platform limits](/workflows/limits/) apply. - -## When am I billed for paid plans? - -When you upgrade to a paid tier, Stripe will immediately charge your payment method on file for the platform fee tied to your plan (see [https://pipedream.com/pricing](https://pipedream.com/pricing)) - -If you accrue any [additional credits](/pricing/#additional-credits), that usage is reported to Stripe throughout the [billing period](/pricing/#billing-period). That overage, as well as the next platform fee, is charged at the start of the _next_ billing period. - -## Do any plans support payment by invoice, instead of credit / debit card? - -Yes, Pipedream can issue invoices on the Business Plan. [Please reach out to support](https://pipedream.com/support) - -## How does Pipedream secure my credit card data? - -Pipedream stores no information on your payment method and uses Stripe as our payment processor. [See our security docs](/privacy-and-security/#payment-processor) for more information. - -## Are unused credits rolled over from one period to the next? - -**No**. On the Free tier, unused included daily credits under the daily limit are **not** rolled over to the next day. - -On paid tiers, unused included credits are also **not** rolled over to the next month. - -## How do I change my billing payment method? - -Please visit your [Stripe customer portal](https://pipedream.com/settings/billing?rtsbp=1) to change your payment method. - -## How can I view my past invoices? - -Invoices are emailed to your billing email address. You can also visit your [Stripe customer portal](https://pipedream.com/settings/billing?rtsbp=1) to view past invoices. - -## Can I retrieve my billing information via API? - -Yes. You can retrieve your usage and billing metadata from the [/users/me](/rest-api/#get-current-user-info) endpoint in the Pipedream REST API. - -## How do I cancel my paid plan? - -You can cancel your plan in your [Billing and Usage Settings](https://pipedream.com/settings/billing). You will have access to your paid plan through the end of your current billing period. Pipedream does not prorate plans cancelled within a billing period. - -If you'd like to process your cancellation immediately, and downgrade to the free tier, please [reach out](https://pipedream.com/support). - -## How do I change the billing email, VAT, or other company details tied to my invoice? - -You can update your billing information in your [Stripe customer portal](https://pipedream.com/settings/billing?rtsbp=1). - -## How do I contact the Pipedream team with other questions? - -You can start a support ticket [on our support page](https://pipedream.com/support). Select the **Billing Issues** category to start a billing related ticket. diff --git a/docs-v2/pages/pricing/index.mdx b/docs-v2/pages/pricing/index.mdx deleted file mode 100644 index 9c0e004dd2c98..0000000000000 --- a/docs-v2/pages/pricing/index.mdx +++ /dev/null @@ -1,194 +0,0 @@ -import Callout from '@/components/Callout' - -# Plans and Pricing - -We believe anyone should be able to run simple, low-volume workflows at no cost, and whatever you're building, we want you to be able to prototype and get to value before having to pay Pipedream any money. We also hope that you share your [sources](/components/contributing/#sources), [workflows](/workflows/building-workflows/), [actions](/components/contributing/#actions), and other integration components so that other Pipedream users benefit from your work. - -To support these goals, Pipedream offers a generous [free plan](#free-plan), free access to Pipedream Connect [while in `development`](/connect/environments), and you can **[request a free trial of our Advanced plan](https://pipedream.com/pricing)**. If you exceed the limits of the free plan, you can upgrade to one of our [paid plans](#paid-plans). - -[Read more about our plans and pricing here](https://pipedream.com/pricing). - -## Free plan - -Workspaces on the Free plan have access to many of the Pipedream features, including [Workflows](/workflows) and [Connect](/connect). However, the free plan includes several limitations: - -**General:** -- **Daily credit limit**: Free workspaces have a [daily limit of free credits](/workflows/limits/#daily-credits-limit) that cannot be exceeded -- **Support**: Community support is available via our [community forum](https://pipedream.com/community) and [Slack](https://join.slack.com/t/pipedream-users/shared_invite/zt-36p4ige2d-9CejV713NlwvVFeyMJnQPwL) - -**Connect:** -- **Development environment**: Access all the features of Connect while in [development mode](/connect/environments) - -**Workflows:** -- **Active workflows**: Limited number of active workflows -- **Connected accounts**: Limited number of connected accounts (like Slack, Google Sheets, GitHub, etc.) - -To lift the daily credit limit, access additional features, or use Connect in production, [upgrade to a paid plan](https://pipedream.com/pricing). - -## Paid plans - -[Visit our pricing page](https://pipedream.com/pricing) to learn more about the details of our paid plans. - -## Pipedream Connect - -Pipedream Connect provides SDKs and APIs to let you easily add {process.env.PUBLIC_APPS}+ integrations to your app or AI agent. Connect pricing is based on two inputs: - -1. **[API usage](#how-credits-work-in-connect)**: Credits consumed by action executions, tool calls, and other operations -2. **[End users](#end-users)**: Referred to as "external users" throughout the docs and API, this is the number of unique users in your application who connect accounts - -### How credits work in Connect - -API operations that consume credits (1 credit per 30 seconds of compute time): - -- **Action executions** -- **Tool calls via MCP** -- **Source execution for deployed triggers** -- **Requests to the Connect proxy** - -API operations that do **not** consume credits: - -- **Listing apps, actions, and triggers** -- **Listing accounts** -- **Configuring actions and triggers** -- **Other management operations** - -### End users - -End (external) users are a core billing component for Connect pricing, separate from credit usage: - -- **End user definition**: A unique end user in your application who connects one or more accounts through Connect -- **User to account relationship**: Each end user can have multiple connected accounts (e.g., one user might connect their Slack, Gmail, and GitHub accounts) -- **Billing impact**: For standard plans, you're billed based on the number of unique external users, not the number of connected accounts - -## Pipedream Workflows - -Pipedream Workflows uses a credit-based pricing model where you pay for compute time used during workflow execution. - -### Credits and billing - -Pipedream uses a number of terms to describe platform metrics and details of our plans. See the definitions of key terms in the [glossary](/glossary). - -#### How credits work for Workflows - -Pipedream charges one credit per 30 seconds of compute time at 256MB megabytes of memory (the default) per [workflow segment](/workflows/building-workflows/control-flow/#workflow-segments). Credits are also charged for [dedicated workers](/workflows/building-workflows/settings/#eliminate-cold-starts). - -Unlike some other platforms, Pipedream does not charge for usage based on the number of steps. Credits are not charged for workflows during development or testing. - -Adding additional memory capacity to workflows will increase credit usage in intervals of 256 megabytes. For example, doubling the memory of a workflow from 256MB to 512MB will double the cost of credits in the same execution time. - -**Scenarios** - - -Developing a workflow with test events in the Pipedream workflow builder is free. No credit usage is incurred. - - - -If an active workflow isn't executed in a billing period no credit usage is incurred. Pipedream only charges credits for workflow executions. - - -**Workflow segments configured to use 256MB memory (default)** - -| Scenario | Credits Used | -| --- | --- | -| Simple linear workflow - 1 second of compute | 1 credit | -| Simple linear workflow - 15 seconds of compute | 1 credit | -| Simple linear workflow - 35 seconds of compute | 2 credits | -| Linear workflow with a delay- 15 seconds before the delay- 15 seconds after execution resumes | 2 credits | -| Workflow with a branch - 3 seconds before the branch- 15 seconds within the executed branch | 2 credits | -| Workflow with a branch - 3 seconds before the branch, 15 seconds within the executed branch, 3 seconds after the branch in the parent flow | 3 credits | - -**Workflow segments configured to use 1GB memory** - -| Scenario | Credits Used | -| --- | --- | -| Simple linear workflow - 1 second of compute | 4 credit | -| Simple linear workflow - 15 seconds of compute | 4 credit | -| Simple linear workflow - 35 seconds of compute | 8 credits | -| Linear workflow with a delay- 15 seconds before the delay- 15 seconds after execution resumes | 8 credits | -| Workflow with a branch - 3 seconds before the branch- 15 seconds within the executed branch | 8 credits | -| Workflow with a branch - 3 seconds before the branch, 15 seconds within the executed branch, 3 seconds after the branch in the parent flow | 24 credits | - -#### Source credit usage - -When an [event source](/workflows/building-workflows/triggers/) triggers a workflow, **the source execution is included for free.** This includes workspaces on the [Free plan](/pricing/#free-plan). - -When a source is configured as a workflow trigger, the core value is in the workflow. You won't be charged for two credits (one to run the source, one to run the workflow) when the workflow contains the core logic. - - -This free credit per execution **only** applies to sources from the [Pipedream public registry](/workflows/building-workflows/triggers/). If you deploy a private custom source to your account, then all computation time including the inital 30 seconds for that private source counts toward credits. - - - -A polling source finishing under 30 seconds per execution - -For example, a source that polls an API for new events like [Airtable - New Row Added](https://pipedream.com/apps/airtable/triggers/new-records) only takes ~5 seconds to poll and emit events to subscribing workflows. - -This would result in **0 credits** per run because the **Airtable - New Row Added** source is a [publicly available component](https://pipedream.com/apps/airtable/triggers/new-records). - - - -A polling source finishing over 30 seconds per execution - -Consider a source (like **RSS - New Item in Feed** for instance) that takes 60 seconds total to finish polling, per execution. - -Each execution of this source would result in **0 credits** because the **RSS - New Item in Feed** source is a [publicly available component](https://pipedream.com/apps/rss/triggers/new-item-in-feed). - - - -A custom source that finished under 30 seconds per execution - -This would result in **1 credit** per execution because the initial free credit only applies to Pipedream Public Registry sources attached to at least one workflow. - - - -#### Included credits - -When you sign up for a paid plan, you pay a platform fee at the start of each [billing period](#billing-period). This minimum monthly charge grants you a base of included credits that you can use for the rest of your billing period (see your [Billing and Usage Settings](https://pipedream.com/settings/billing) for your exact quota). If you have been granted any additional credit increases by Pipedream, that is added to the included credits. - -#### Additional credits - -Any credits you run over your [included credit](/workflows/limits/#daily-credits-limit) are called **additional credits**. This usage is added to the invoice for your next [billing period](#billing-period), according to the [invoicing cycle described here](/pricing/faq/#when-am-i-billed-for-paid-plans). - -#### Data store keys - -A Data Store key represents a single record in a Data Store. - -In the example below, there are two records in the Data Store, and therefore there are two keys total. - -![Example of a Data Store with two keys](https://res.cloudinary.com/pipedreamin/image/upload/v1673537163/docs/CleanShot_2023-01-12_at_10.25.25_z6yg8t.png) - -## Managing your plan - -To cancel, upgrade or downgrade your plan, open the [pricing page](https://pipedream.com/pricing). - -To update your billing details, such as your VAT number, email address, etc. use the **Manage Billing Information** button in your [workspace billing settings](https://pipedream.com/settings/billing) to change your plan. Within this portal you can cancel, upgrade or downgrade your plan at any time. - -### Billing period - -Many of the usage statistics for paid users are tied to a **billing period**. Your billing period starts when you sign up for a paid plan, and recurs roughly once a month for the duration of your subscription. - -For example, if you sign up on Jan 1st, your first billing period will last one month, ending around Feb 1st, at which point you'll start a new billing period. - -Your invoices are tied to your billing period. [Read more about invoicing / billing here](/pricing/faq/#when-am-i-billed-for-paid-plans). - -### Upgrading - -Upgrading your subscription instantly activates the features available to your workspace. For example, if you upgrade your workspace from Free to Basic, that workspace will immediately be able to activate more workflows and connected accounts. - -### Downgrading - -Downgrades will apply at the end of your billing cycle, and any workflows or integrations that use features outside the new billing plan will be automatically disabled. - -For example, if your workspace downgrades from Advanced to Basic and a workflow uses an Advanced feature such as [auto-retries](/workflows/building-workflows/settings/#auto-retry-errors), then this workflow will be disabled because the workspace plan no longer qualifies for that feature. - -Additionally, resource limits such as the number of active workflows and connected accounts will also be enforced at this same time. - -### Cancelling your plan - -To cancel your plan, open the [pricing page](https://pipedream.com/pricing) and click **Cancel** beneath your current plan. - -Cancelling your subscription will apply at the end of your current billing period. Workflows, connected accounts and sources will be deactivated from newest to oldest until the Free limits have been reached. - -## Detailed pricing information - -Refer to our [pricing page](https://pipedream.com/pricing) for detailed pricing information. \ No newline at end of file diff --git a/docs-v2/pages/privacy-and-security/_meta.tsx b/docs-v2/pages/privacy-and-security/_meta.tsx deleted file mode 100644 index 853d3c0df56ae..0000000000000 --- a/docs-v2/pages/privacy-and-security/_meta.tsx +++ /dev/null @@ -1,6 +0,0 @@ -export default { - "index": "Privacy and Security", - "best-practices": "Security best-practices", - "hipaa": "HIPAA compliance", - "pgp-key": "PGP key", -} as const diff --git a/docs-v2/pages/privacy-and-security/best-practices.mdx b/docs-v2/pages/privacy-and-security/best-practices.mdx deleted file mode 100644 index 48938b3d528cf..0000000000000 --- a/docs-v2/pages/privacy-and-security/best-practices.mdx +++ /dev/null @@ -1,55 +0,0 @@ -# Security Best Practices - -Pipedream implements a range of [privacy and security measures](/privacy-and-security/) meant to protect your data from unauthorized access. Since Pipedream [workflows](/workflows/building-workflows/), [event sources](/workflows/building-workflows/triggers/), and other resources can run any code and process any event data, you also have a responsibility to ensure you handle that code and data securely. We've outlined a handful of best practices for that below. - -## Store secrets as Pipedream connected accounts or environment variables - -Never store secrets like API keys directly in code. These secrets should be stored in one of two ways: - -- [If Pipedream integrates with the app](https://pipedream.com/apps), use [connected accounts](/apps/connected-accounts/) to link your apps / APIs. -- If you need to store credentials for an app Pipedream doesn't support, or you need to store arbitrary configuration data, use [environment variables](/workflows/environment-variables/). - -Read more about how Pipedream secures connected accounts / environment variables [here](/privacy-and-security/#third-party-oauth-grants-api-keys-and-environment-variables). - -## Deliver data to Pipedream securely - -Always send data over HTTPS to Pipedream endpoints. - -## Send data out of Pipedream securely - -When you connect to APIs in a workflow, or deliver data to third-party destinations, encrypt that data in transit. For example, use HTTPS endpoints when sending HTTP traffic to third parties. - -## Require authorization for HTTP triggers - -HTTP triggers are public by default, and require no authorization or token to invoke. - -For many workflows, you should [configure authorization](/workflows/building-workflows/triggers/#authorizing-http-requests) to ensure that only authorized parties can invoke your HTTP trigger. - -For third-party services like webhooks, that authorize requests using their own mechanism, use the [Validate Webhook Auth action](https://pipedream.com/apps/http/actions/validate-webhook-auth). This supports common auth options, and you don't have to write any code to configure it. - -## Validate signatures for incoming events, where available - -Many apps pass a **signature** with event data delivered via webhooks (or other push delivery systems). The signature is an opaque value computed from the incoming event data and a secret that only you and the app know. When you receive the event, you can validate the signature by computing it yourself and comparing it to the signature sent by the app. If the two values match, it verifies that the app sent the data, and not some third party. - -Signatures are specific to the app sending the data, and the app should provide instructions for signature validation. **Not all apps compute signatures, but when they do, you should always verify them**. - -When you use a Pipedream [event source](/workflows/building-workflows/triggers/) as your workflow trigger, Pipedream should verify the signature for you. You can always [audit the code behind the event source](#audit-code-or-packages-you-use-within-a-workflow) to confirm this, and suggest further security improvements that you find. - -See [Stripe's signature docs](https://stripe.com/docs/webhooks/signatures) for a real-world example. Pipedream's Stripe event source [verifies this signature for you](https://github.com/PipedreamHQ/pipedream/blob/bb1ebedf8cbcc6f1f755a8878c759522b8cc145b/components/stripe/sources/custom-webhook-events/custom-webhook-events.js#L49). - -## Audit code or packages you use within a workflow - -Pipedream workflows are just code. Pipedream provides prebuilt triggers and actions that facilitate common use cases, but these are written and run as code within your workflow. You can examine and modify this code in any way you'd like. - -This also means that you can audit the code for any triggers or actions you use in your workflow. We encourage this as a best practice. Even code authored by Pipedream can be improved, and if you notice a vulnerability or other issue, you can submit a patch or raise an issue [in our GitHub repo](https://github.com/PipedreamHQ/pipedream/tree/master/components). - -The same follows for [npm](https://www.npmjs.com/) packages. Before you use a new npm package in your workflow, review its page on npm and its repo, if available. Good packages should have recent updates. The package should have a healthy number of downloads and related activity (like GitHub stars), and the package author should be responsive to issues raised by the community. If you don't observe these signals, be wary of using the package in your workflow. - -## Limit what you log and return from steps - -[Pipedream retains a limited history of event data](/workflows/limits/#event-history) and associated logs for event sources and workflows. But if you cannot log specific data in Pipedream for privacy / security reasons, or if you want to limit risk, remember that **Pipedream only stores data returned from or logged in steps**. Specifically, Pipedream will only store: - -- The event data emitted from event sources, and any `console` logs / errors -- The event data that triggers your workflow, any `console` logs / errors, [step exports](/workflows/#step-exports), and any data included in error stack traces. - -Variables stored in memory that aren't logged or returned from steps are not included in Pipedream logs. Since you can modify any code in your Pipedream workflow, if you want to limit what gets logged from a Pipedream action or other step, you can adjust the code accordingly, removing any logs or step exports. diff --git a/docs-v2/pages/privacy-and-security/hipaa.mdx b/docs-v2/pages/privacy-and-security/hipaa.mdx deleted file mode 100644 index 02a64a0da4529..0000000000000 --- a/docs-v2/pages/privacy-and-security/hipaa.mdx +++ /dev/null @@ -1,39 +0,0 @@ -# HIPAA compliance - -Pipedream can [sign Business Associate Addendums (BAAs)](#signing-a-business-associate-addendum) for Business customers intending to pass PHI to Pipedream. We can also provide a third-party SOC 2 report detailing our HIPAA-related controls. - -## HIPAA-eligible services - -- [Workflows](/workflows/building-workflows/) -- [Event sources](/workflows/building-workflows/triggers/) -- [Data stores](/workflows/data-management/data-stores/) -- [Destinations](/workflows/data-management/destinations/) -- [Pipedream Connect](/connect) - -### Ineligible services - -Any service not listed in the [HIPAA-eligible services](#hipaa-eligible-services) section is not eligible for use with PHI under HIPAA. Please reach out to [Pipedream support](https://pipedream.com/support) if you have questions about a specific service. - -The following services are explicitly not eligible for use with PHI under HIPAA. - -- [v1 workflows](/deprecated/migrate-from-v1/) -- [File stores](/workflows/data-management/file-stores/) - -## Your obligations as a customer - -If you are a covered entity or business associate under HIPAA, you must ensure that [you have a BAA in place with Pipedream](#signing-a-business-associate-addendum) before passing PHI to Pipedream. - -You must also ensure that you are using Pipedream in a manner that complies with HIPAA. This includes: - -- You may only use [HIPAA-eligible services](#hipaa-eligible-services) to process or store PHI -- You may not include PHI in Pipedream resource names, like the names of projects or workflows - -## Signing a Business Associate Addendum - -Pipedream is considered a Business Associate under HIPAA regulations. If you are a Covered Entity or Business Associate under HIPAA, you must have a Business Associate Agreement (BAA) in place with Pipedream before passing PHI to Pipedream. This agreement is an addendum to our standard terms, and outlines your obligations as a customer and Pipedream's obligations as a Business Associate under HIPAA. - -Please request a BAA by visiting [https://pipedream.com/support](https://pipedream.com/support). - -## Requesting information on HIPAA controls - -Please request compliance reports from [https://pipedream.com/support](https://pipedream.com/support). Pipedream can provide a SOC 2 Type II report covering Security controls, and a SOC 2 Type I report for Confidentiality and Availability. In 2025, Pipedream plans to include Confidentiality and Availability controls in our standard Type II audit. diff --git a/docs-v2/pages/privacy-and-security/index.mdx b/docs-v2/pages/privacy-and-security/index.mdx deleted file mode 100644 index 8cea1cd5b2060..0000000000000 --- a/docs-v2/pages/privacy-and-security/index.mdx +++ /dev/null @@ -1,236 +0,0 @@ -# Privacy and Security at Pipedream - -Pipedream is committed to the privacy and security of your data. Below, we outline how we handle specific data and what we do to secure it. This is not an exhaustive list of practices, but an overview of key policies and procedures. - -It is also your responsibility as a customer to ensure you're securing your workflows' code and data. See our [security best practices](/privacy-and-security/best-practices/) for more information. - -Pipedream has demonstrated SOC 2 compliance and can provide a SOC 2 Type 2 report upon request (please reach out to support@pipedream.com). - -If you have any questions related to data privacy, please email privacy@pipedream.com. If you have any security-related questions, or if you'd like to report a suspected vulnerability, please email security@pipedream.com. - -## Reporting a Vulnerability - -If you'd like to report a suspected vulnerability, please contact security@pipedream.com. - -If you need to encrypt sensitive data as part of your report, you can use our security team's [PGP key](/privacy-and-security/pgp-key/). - -## Reporting abuse - -If you suspect Pipedream resources are being used for illegal purposes, or otherwise violate [the Pipedream Terms](https://pipedream.com/terms), [report abuse here](/abuse/). - -## Compliance - -### SOC 2 - -Pipedream undergoes annual third-party audits. We have demonstrated SOC 2 compliance and can provide a SOC 2 Type 2 report upon request. Please reach out to support@pipedream.com to request the latest report. - -We use [Drata](https://drata.com) to continuosly monitor our infrastructure's compliance with standards like SOC 2, and you can visit our [Security Report](https://app.drata.com/security-report/b45c2f79-1968-496b-8a10-321115b55845/27f61ebf-57e1-4917-9536-780faed1f236) to see a list of policies and processes we implement and track within Drata. - -### Annual penetration test - -Pipedream performs annual pen tests with a third-party security firm. Please reach out to support@pipedream.com to request the latest report. - -### GDPR - -#### Data Protection Addendum - -Pipedream is considered both a Controller and a Processor as defined by the GDPR. As a Processor, Pipedream implements policies and practices that secure the personal data you send to the platform, and includes a [Data Protection Addendum](https://pipedream.com/dpa) as part of our standard [Terms of Service](https://pipedream.com/terms). - -The Pipedream Data Protection Addendum includes the [Standard Contractual Clauses (SCCs)](https://ec.europa.eu/info/law/law-topic/data-protection/international-dimension-data-protection/standard-contractual-clauses-scc_en). These clarify how Pipedream handles your data, and they update our GDPR policies to cover the latest standards set by the European Commission. - -You can find a list of Pipedream subprocessors [here](/subprocessors/). - -#### Submitting a GDPR deletion request - -When you [delete your account](/account/user-settings/#delete-account), Pipedream deletes all personal data we hold on you in our system and our vendors. - -If you need to delete data on behalf of one of your users, you can delete the event data yourself in your workflow or event source (for example, by deleting the events, or by removing the data from data stores). Your customer event data is automatically deleted from Pipedream subprocessors. - -### HIPAA - -Pipedream can sign Business Associate Addendum (BAAs) for customers intending to pass PHI to Pipedream. We can also provide a third-party SOC 2 report detailing our HIPAA-related controls. See our [dedicated HIPAA docs](/privacy-and-security/hipaa) for more details. - -## Hosting Details - -Pipedream is hosted on the [Amazon Web Services](https://aws.amazon.com/) (AWS) platform in the `us-east-1` region. The physical hardware powering Pipedream, and the data stored by our platform, is hosted in data centers controlled and secured by AWS. You can read more about AWSโ€™s security practices and compliance certifications [here](https://aws.amazon.com/security/). - -Pipedream further secures access to AWS resources through a series of controls, including but not limited to: using multi-factor authentication to access AWS, hosting services within a private network inaccessible to the public internet, and more. - -## Intrustion Detection and Prevention - -Pipedream uses AWS WAF, GuardDuty, CloudTrail, CloudWatch, Datadog, and other custom alerts to monitor and block suspected attacks against Pipedream infrastructure, including DDoS attacks. - -Pipedream reacts to potential threats quickly based on [our incident response policy](#incident-response). - -## User Accounts, Authentication and Authorization - -When you sign up for a Pipedream account, you can choose to link your Pipedream login to either an existing [Google](https://google.com) or [Github](https://github.com) account, or create an account directly with Pipedream. Pipedream also supports [single-sign on](/workspaces/#configuring-single-sign-on-sso). - -When you link your Pipedream login to an existing identity provider, Pipedream does not store any passwords tied to your user account โ€”ย that information is secured with the identity provider. We recommend you configure two-factor authentication in the provider to further protect access to your Pipedream account. - -When you create an account on Pipedream directly, with a username and password, Pipedream implements account security best practices (for example: Pipedream hashes your password, and the hashed password is encrypted in our database, which resides in a private network accessible only to select Pipedream employees). - -## Third party OAuth grants, API keys, and environment variables - -When you link an account from a third party application, you may be asked to either authorize a Pipedream OAuth application access to your account, or provide an API key or other credentials. This section describes how we handle these grants and keys. - -When a third party application supports an [OAuth integration](https://oauth.net/2/), Pipedream prefers that interface. The OAuth protocol allows Pipedream to request scoped access to specific resources in your third party account without you having to provide long-term credentials directly. Pipedream must request short-term access tokens at regular intervals, and most applications provide a way to revoke Pipedream's access to your account at any time. - -Some third party applications do not provide an OAuth interface. To access these services, you must provide the required authorization mechanism (often an API key). As a best practice, if your application provides such functionality, Pipedream recommends you limit that API key's access to only the resources you need access to within Pipedream. - -Pipedream encrypts all OAuth grants, key-based credentials, and environment variables at rest in our production database. That database resides in a private network. Backups of that database are encrypted. The key used to encrypt this database is managed by [AWS KMS](https://aws.amazon.com/kms/) and controlled by Pipedream. KMS keys are 256 bit in length and use the Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM). Access to administer these keys is limited to specific members of our team. Keys are automatically rotated once a year. KMS has achieved SOC 1, 2, 3, and ISO 9001, 27001, 27017, 27018 compliance. Copies of these certifications are available from Amazon on request. - -When you link credentials to a specific source or workflow, the credentials are loaded into that program's [execution environment](#execution-environment), which runs in its own virtual machine, with access to RAM and disk isolated from other users' code. - -No credentials are logged in your source or workflow by default. If you log their values or [export data from a step](/workflows/#step-exports), you can always delete the data for that execution from your source or workflow. These logs will also be deleted automatically based on the [event retention](/workflows/limits#event-history) for your account. - -You can delete your OAuth grants or key-based credentials at any time by visiting [https://pipedream.com/accounts](https://pipedream.com/accounts). Deleting OAuth grants within Pipedream **do not** revoke Pipedream's access to your account. You must revoke that access wherever you manage OAuth grants in your third party application. - -## Pipedream REST API security, OAuth clients - -The Pipedream API supports two methods of authentication: [OAuth](/rest-api/auth/#oauth) and [User API keys](/rest-api/auth/#user-api-keys). **We recommend using OAuth clients** for a few reasons: - -โœ… OAuth clients are tied to the workspace, administered by workspace admins
-โœ… Tokens are short-lived
-โœ… OAuth clients support scopes, limiting access to specific operations
- -When testing the API or using the CLI, you can use your user API key. This key is tied to your user account and provides full access to any resources your user has access to, across workspaces. - -### OAuth clients - -Pipedream supports client credentials OAuth clients, which exchange a client ID and client secret for a short-lived access token. These clients are not tied to individual end users, and are meant to be used server-side. You must store these credentials securely on your server, never allowing them to be exposed in client-side code. - -Client secrets are salted and hashed before being saved to the database. The hashed secret is encrypted at rest. Pipedream does not store the client secret in plaintext. - -You can revoke a specific client secret at any time by visiting [https://pipedream.com/settings/api](https://pipedream.com/settings/api). - -### OAuth tokens - -Since Pipedream uses client credentials grants, access tokens must not be shared with end users or stored anywhere outside of your server environment. - -Access tokens are issued as JWTs, signed with an ED25519 private key. The public key used to verify these tokens is available at https://api.pipedream.com/.well-known/jwks.json. See [this workflow template](https://pipedream.com/new?h=tch_rBf76M) for example code you can use to validate these tokens. - -Access tokens are hashed before being saved in the Pipedream database, and are encrypted at rest. - -Access tokens expire after 1 hour. Tokens can be revoked at any time. - -## Pipedream Connect - -[Pipedream Connect](/connect/) is the easiest way for your users to connect to [over {process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps), **right in your product**. - -### Client-side SDK - -Pipedream provides a [client-side SDK](/connect/api/#typescript-sdk-browser) to initiate authorization or accept API keys on behalf of your users in environments that can run JavaScript. You can see the code for that SDK [here](https://github.com/PipedreamHQ/pipedream/tree/master/packages/sdk). - -When you initiate authorization, you must: - -1. [Create a server-side token for a specific end user](/connect/api/#create-token) -2. Initiate auth with that token, connecting an account for a specific user - -These tokens can only initiate the auth connection flow. They have no permissions to access credentials or perform other operations against the REST API. They are meant to be scoped to a specific user, for use in clients that need to initiate auth flows. - -Tokens expire after 4 hours, at which point you must create a new token for that specific user. - -### Connect Link - -You can also use [Connect Link](/connect/connect-link/) to generate a URL that initiates the authorization flow for a specific user. This is useful when you want to initiate the auth flow from a client-side environment that can't run JavaScript, or include the link in an email, chat message, etc. - -Like tokens, Connect Links are coupled to specific users, and expire after 4 hours. - -### REST API - -The Pipedream Connect API is a subset of the [Pipedream REST API](/rest-api/). See the [REST API Security](#pipedream-rest-api-security-oauth-clients) section for more information on how we secure the API. - -## Execution environment - -The **execution environment** refers to the environment in which your sources, workflows, and other Pipedream code is executed. - -Each version of a source or workflow is deployed to its own virtual machine in AWS. This means your execution environment has its own RAM and disk, isolated from other users' environments. You can read more about the details of the virtualization and isolation mechanisms used to secure your execution environment [here](https://firecracker-microvm.github.io/). - -Instances of running VMs are called **workers**. If Pipedream spins up three VMs to handle multiple, concurrent requests for a single workflow, we're running three **workers**. Each worker runs the same Pipedream execution environment. Workers are ephemeral โ€”ย AWS will shut them down within ~5 minutes of inactivity โ€”ย but you can configure [dedicated workers](/workflows/building-workflows/settings/#eliminate-cold-starts) to ensure workers are always available to handle incoming requests. - -## Controlling egress traffic from Pipedream - -By default, outbound traffic shares the same network as other AWS services deployed in the `us-east-1` region. That means network requests from your workflows (e.g. an HTTP request or a connection to a database) originate from the standard range of AWS IP addresses. - -[Pipedream VPCs](/workflows/vpc/) enable you to run workflows in dedicated and isolated networks with static outbound egress IP addresses that are unique to your workspace (unlike other platforms that provide static IPs common to all customers on the platform). Outbound network requests from workflows that run in a VPC will originate from these IP addresses, and only workflows in your workspace will run there. - -## Encryption of data in transit, TLS (SSL) Certificates - -When you use the Pipedream web application at [https://pipedream.com](https://pipedream.com), traffic between your client and Pipedream services is encrypted in transit. When you create an HTTP interface in Pipedream, the Pipedream UI defaults to displaying the HTTPS endpoint, which we recommend you use when sending HTTP traffic to Pipedream so that your data is encrypted in transit. - -All Pipedream-managed certificates, including those we create for [custom domains](/workflows/domains/), are created using [AWS Certificate Manager](https://aws.amazon.com/certificate-manager/). This eliminates the need for our employees to manage certificate private keys: these keys are managed and secured by Amazon. Certificate renewal is also handled by Amazon. - -## Encryption of data at rest - -Pipedream encrypts customer data at rest in our databases and data stores. We use [AWS KMS](https://aws.amazon.com/kms/) to manage encryption keys, and all keys are controlled by Pipedream. KMS keys are 256 bit in length and use the Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM). Access to administer these keys is limited to specific members of our team. Keys are automatically rotated once a year. KMS has achieved SOC 1, 2, 3, and ISO 9001, 27001, 27017, 27018 compliance. Copies of these certifications are available from Amazon on request. - -## Email Security - -Pipedream delivers emails to users for the purpose of email verification, error notifications, and more. Pipedream implements [SPF](https://en.wikipedia.org/wiki/Sender_Policy_Framework) and [DMARC](https://en.wikipedia.org/wiki/DMARC) DNS records to guard against email spoofing / forgery. You can review these records by using a DNS lookup tool like `dig`: - -```bash -# SPF -dig pipedream.com TXT +short -# DMARC -dig _dmarc.pipedream.com TXT +short -``` - -## Incident Response - -Pipedream implements incident response best practices for identifying, documenting, resolving and communicating incidents. Pipedream publishes incident notifications to a status page at [status.pipedream.com](https://status.pipedream.com/) and to the [@PipedreamStatus Twitter account](https://twitter.com/pipedreamstatus). - -Pipedream notifies customers of any data breaches according to our [Data Protection Addendum](https://pipedream.com/dpa). - -## Software Development - -Pipedream uses GitHub to store and version all production code. Employee access to Pipedream's GitHub organization is protected by multi-factor authentication. - -Only authorized employees are able to deploy code to production. Deploys are tested and monitored before and after release. - -## Vulnerability Management - -Pipedream monitors our code, infrastructure and core application for known vulnerabilities and addresses critical vulnerabilities in a timely manner. - -## Corporate Security - -### Background Checks - -Pipedream performs background checks on all new hires. - -### Workstation Security - -Pipedream provides hardware to all new hires. These machines run a local agent that sets configuration of the operating system to hardened standards, including: - -- Automatic OS updates -- Hard disk encryption -- Anti-malware software -- Screen lock - -and more. - -### System Access - -Employee access to systems is granted on a least-privilege basis. This means that employees only have access to the data they need to perform their job. System access is reviewed quarterly, on any change in role, or upon termination. - -### Security Training - -Pipedream provides annual security training to all employees. Developers go through a separate, annual training on secure software development practices. - -## Data Retention - -Pipedream retains data only for as long as necessary to provide the core service. Pipedream stores your workflow code, data in data stores, and other data indefinitely, until you choose to delete it. - -Event data and the logs associated with workflow executions are stored according to [the retention rules on your account](/workflows/limits/#event-history). - -Pipedream deletes most internal application logs and logs tied to subprocessors within 30 days. We retain a subset of logs for longer periods where required for security investigations. - -## Data Deletion - -If you choose to delete your Pipedream account, Pipedream deletes all customer data and event data associated with your account. We also make a request to all subprocessors to delete any data those vendors store on our behalf. - -Pipedream deletes customer data in backups within 30 days. - -## Payment Processor - -Pipedream uses [Stripe](https://stripe.com) as our payment processor. When you sign up for a paid plan, the details of your payment method are transmitted to and stored by Stripe [according to their security policy](https://stripe.com/docs/security/stripe). Pipedream stores no information about your payment method. diff --git a/docs-v2/pages/privacy-and-security/pgp-key.mdx b/docs-v2/pages/privacy-and-security/pgp-key.mdx deleted file mode 100644 index 80da9f1225816..0000000000000 --- a/docs-v2/pages/privacy-and-security/pgp-key.mdx +++ /dev/null @@ -1,64 +0,0 @@ - -# PGP Key - -If you'd like to encrypt sensitive information in communications to Pipedream, use this PGP key. - -- Key ID: `3C85BC49602873EB` -- Fingerprint: `E0AD ABAC 0597 5F51 8BF5 3ECC 3C85 BC49 6028 73EB` -- User ID: `Pipedream Security ` - -``` ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBF9n4TABEACxKdiysQswLHSg7u1uUtY3evSNeuqU4DGNxLwVmPLUt4CRd170 -EgeCnGpLXQtbQI6HccZapD2emAF0PHXXvx/Q6VB+8iuIZorYGfafIvXsaZhIakrp -xAkSY/eZ/YVWNnnqCpwHxjccFjpIfWph/MVoJ853Eg42IwEGLF7fPMPdcZ1W6S/q -kZzRLMKW60sLvyeTdyemUd/sza72ouv0FioP5zNOmZx8mawVvVeVrM2TD14cJ454 -zmYUkxlyvLnHxIF+kZUoLk628qGjTzvEnWlIrLiTQRvTyefzpBBcVz+px35zOFz9 -1DdQXz6EFgP46zeLVa8m8dDBkadJPoGFWgMOKlRhYxfdlZlVHSXJcwTl7jN4EW6G -+Oagp36oQvVALtpakP7TUyZ7iKi1gU/i2nAgb885hdMO3bRX8vtg8RYan/3wzKOm -Ky/8rOAq9tFporqCU/EQWbalbBWT6yIn0zxmO33199B8cvIZPg9ZMsrMtSqKu83L -9vqGTK6pVSKEBCqSqmOhveKjgV+gsniKj+0ZiudxMQ8YzSa40dbBPTj0d5GB8Ceo -HVzzZZVcsOFbWU3mEqyhus1q81B58DjAouQlH5RoQ4U/MgsZnbghPTxkir3wttPB -kbbN3DnEHwOPI9ErvBU5UEcA39VqJaMSWImsX450GGfX/sSUNOw2wSXV7QARAQAB -tCtQaXBlZHJlYW0gU2VjdXJpdHkgPHNlY3VyaXR5QHBpcGVkcmVhbS5jb20+iQJO -BBMBCAA4FiEE4K2rrAWXX1GL9T7MPIW8SWAoc+sFAl9n4TACGwMFCwkIBwIGFQoJ -CAsCBBYCAwECHgECF4AACgkQPIW8SWAoc+vIjA//ZMkS6qnWhEygSBoKV2ZRfCF+ -vsKCaimMD369w+pGSldJ9cNA7EKbGzs7cp+jkOaq9yruevy+OuHupSUJUEsaOhzk -fnSHdo0EO/47AJ6yWNrziS1IsHU/aZYA++wfbrn90RCmlCbfErgarkDSsKkFhMra -bWRNj/OXcIOJsBEHwALTpgMLjDXngGU6iwM6hFgvqIVeuBFQjbYwTLbBwfuXrxWF -o3olmqgRL4KE6wKzu3nQDBlxHrumF8+34V2P7DSgDCDZzbZOcYZ+erroQrhq8hkL -D1gf2TopHzdjiVXR6VgV0a4qOKniQU5weiiV7ESeuOnNKdGjq5JWHnI6XmEPeAvv -f87PFArbqde75Mv258BF+TTMa6Kt3Uv8wIwvVo78LRsOENja89Q+v3bUn064lWCP -6XLROQD5zaapnMOzFLVW0KDq2z0edud+0W6lNRgB9tgXZ59OgbMvEVah1rf+BnTv -OZ0In/KBsg5Xl3+OapWrspTk9WCVnZ5KOdMYM6s1pN1P5ocDTnvBkDjs2gBUCUZ8 -bSjnoAaoji/DqXGWEWD5soZRbGoVjLqMCPQyMjTCrt9IH9EAAgrRkmkjeACGVXtk -FFkY+nZ/7z1Jd6wBd482H65gPjQf/wJmaBdgGX9yfG7bQJKxEYZUnCv/9yt551Jw -aE9s4B/LAHI3S7BeQDO5Ag0EX2fhMAEQAN7Rn6TfP79WOMcweATB2cLlfqAF77xf -Dh2nVdpWG6IDF2Bke2IU4hhz/Egkx+mR6Av8beufrUeaMZXevBnuWfT94Qk/nBvx -RWJbSkvYK1q7hMW5QqJgPcp+kJX6WLVMRNkCJjjyd24kdIneZ0X1oudREXO5HOBw -A68bzIwsJqzXfINt0GFJjGQ71COoStMI+/GqGlKsee8ajwzI03yBkI7nWDIx9UkJ -QFR/34jnf0QSpfE65cl3dwI5f0a9oQoBsg4XqcIAjjqJzismEfScVCyj/ru97e+g -jdAJWdEhZDyv5IDHX6+Jyc7JUl+6+chufqzeKwns7OFEBebmyKB2vVzQnah6xtJu -w+VsVk4EepIRXIC2vY/+ZRiLaO5R0U4WefJZEJS1YrKaJ7nGkEICfPnVu+d6f3jb -aed/k9S7zfIugcqX42mmac4+hKm4rJ/9/W0dqbqQnQfdRilGax6Poco9LSEzY6zQ -7Bgnkz7/gTBBC4/YyTxZNnxil+mRg6uePlUBA4/p224FMx65K0WVgKCnalELY68f -a5z7fVUmfLCKLzeMwSRvhWSjVgMJ6XB8ngkci6OtsI0eBJutGxFhcBD+GqafBOWC -KP7Me8DJRx8F6bPbpJqj+T1+hROerLTFQRfm6IuL5LjzlNGteD+ZwcIMql++22/q -ta7Pfac/+rOfABEBAAGJAjYEGAEIACAWIQTgrausBZdfUYv1Psw8hbxJYChz6wUC -X2fhMAIbDAAKCRA8hbxJYChz6+tGEACGVCcVmXpKFveN6lhSvuJG3J9eddEQgx0g -DKirFTzgXDbVc91+hRHcNK6Dk6udL7iZM79pAy26oYqP7VAkA6VwU91xG/0Sdk4a -f0/i3BkbmE2kaKiJj4pn8F3ZihEKbSgbn7VsXkvE+9k1zkLKg6c7BBn2U6s4rW5g -mBWf92bhxnp3mstP5Ci7duJoEM8xMf/BCiCJGksjIStLOmxCn+I6N0diAa1CPcA9 -U34Cj1sPv8R9sB1sLjdanWLRL5aViE7Zo4bavX70oQXZWATuMoVgDcSCHD7K9iwg -ZZIVlvRF5Otq9JpE70toH4VVnkru2R0JpNwkGVm2+gp5sieNTHTB2J36/fxr0+O7 -hPiE/bfOjZb/GpS8ppvKyCBB/K0pfhzl5+QsNhMFLrMF1YVHb2WImnQDz3G9mtBi -O/wgCUrBQG8lf6G50Tq1hklGPnh4VoAeJBrjojKh/Cuep8ZE6z5XYo2sYX7qKCi+ -fzJDhiKbFco16Njg0kpxAJl2Qb8zn3HOwrc1Np7K79LA92Gopve/poqQLPQn46Dh -p0o5ixKvUW8yCPQDajGAFGdzcr3q75fySNkX0pBdY8IwqpFptH3BQgjZFg8M2E8x -TOmmirEWCFx1F+4Aj+iU+ustTialkqQd8D3tnR3I/uFgNmaNjqpf4K12HGwIIU1j -XLQIwNRYZw== -=SOPy ------END PGP PUBLIC KEY BLOCK----- - -``` \ No newline at end of file diff --git a/docs-v2/pages/projects/_meta.tsx b/docs-v2/pages/projects/_meta.tsx deleted file mode 100644 index 090dea761c1aa..0000000000000 --- a/docs-v2/pages/projects/_meta.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default { - "index": "Overview", - "access-controls": "Access Controls", - "secrets": "Variables and Secrets", -} as const diff --git a/docs-v2/pages/projects/access-controls.mdx b/docs-v2/pages/projects/access-controls.mdx deleted file mode 100644 index 29483d2dc5e28..0000000000000 --- a/docs-v2/pages/projects/access-controls.mdx +++ /dev/null @@ -1,73 +0,0 @@ -import Callout from "@/components/Callout"; - -# Access Controls - -The [projects list view](https://pipedream.com/projects) contains **Owner** and **Access** columns. - -**Owner** indicates who within the workspace owns each project. This is typically the person who created the project. - -![Project Listing (Owner)](/images/projects/project-listing-owner.png) - - - Projects created before February 2024 don't automatically have owners, which - has no functional impact. - - -**Access** indicates which workspace members have access to each project, and this can be displayed as "me", "Workspace", or "N members". - -![Project Listing (Access)](/images/projects/project-listing-access.png) - -## Permissions - -Workspace owners and admins are able to perform all actions in projects, whereas workspace members are restricted from performing certain actions in projects. - -| Operation | Project creator | Workspace members | -| ------------------------------------------------------------ | :-------------: | :---------------: | -| View in [projects listing](https://pipedream.com/projects) | โœ… | โœ… | -| View in [Event History](https://pipedream.com/event-history) | โœ… | โœ… | -| View in global search | โœ… | โœ… | -| Manage project workflows | โœ… | โœ… | -| Manage project files | โœ… | โœ… | -| Manage project variables | โœ… | โœ… | -| Manage member access | โœ… | โŒ | -| Manage GitHub Sync settings | โœ… | โŒ | -| Delete project | โœ… | โŒ | - - - **Workspace admins and owners have the same permissions as project creators - for all projects in the workspace.** - - -## Managing access - - - By default, all projects are accessible to all workspace members. Workspaces - on the [Business plan](https://pipedream.com/pricing) can restrict access for - individual projects to specific workspace members. - - -You can easily modify the access rules for a project directly from the [project list view](https://pipedream.com/projects), either by clicking the access badge in the project row (fig 1) or clicking the 3 dots to open the action menu, then selecting **Manage Access** (fig 2). - -Via the access badge (fig 1): - -![Click the access badge to manage access](/images/projects/access-badge-click.png) - -Via the action menu (fig 2): - -![Click manage access from the action menu](/images/projects/manage-access-overflow-menu.png) - -From here, a slideout drawer reveals the access management configuration: - -![Manage access slideout workspace access](/images/projects/slideout-workspace-share.png) - -Toggle the **Restrict access to this project** switch to manage access: - -![Manage access slideout restricted](/images/projects/slideout-restricted.png) - -Select specific members of the workspace to grant access: - -![Manage access slideout showing member dropdown](/images/projects/slideout-member-dropdown.png) - -You can always see who has access and remove access if necessary: - -![Manage access showing members with access](/images/projects/slideout-member-list.png) diff --git a/docs-v2/pages/projects/index.mdx b/docs-v2/pages/projects/index.mdx deleted file mode 100644 index c08fca57456f8..0000000000000 --- a/docs-v2/pages/projects/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ -import Callout from "@/components/Callout"; - -# Projects - -A workspace can contain one or more _projects_. Projects are a way to organize your workflows into specific groupings or categories. - -
-
- How workspaces are organized -
- -## Getting started with projects - -### Creating projects - -To create a new project, first [open the Projects section in the dashboard](https://pipedream.com/projects). - -Then click **Create project** to start a new project. - -Enter in your desired name for the project in the prompt, then click **Create**. - -That's it, you now have a dedicated new project created within your workspace. Now you can create workflows within this project, or move workflows into it or create folders for further organization. - -### Creating folders and workflows in projects - -Within a given project, you can create folders for your workflows. - -Open your project, and then click the **New** button for a dropdown to create a workflow in your current project. - - -Helpful hotkeys to speed up your development - -- `C then F` creates a new folder. -- `C then W` creates a new workflow. - - - -Folders can also contain sub-folders, which allows you to create a filing system to organize your workflows. - -### Moving workflows into folders - -To move workflows into folders, simply drag and drop the workflow into the folder. - -You can move workflows or folders up a level by dragging and dropping the workflow to the folder icon at the top of the list. - -### Importing workflows into projects - - - This only applies to Pipedream accounts that created workflows before the - projects feature was released. - - -To import a workflow from the general **Workflows** area of your dashboard into a project: - -1. Open the Workflows area in the dashboard -2. Select one or more workflows you'd like to import into a project -3. Click *Move* in the top right and select a project to move them to - -![Moving a workflow to a project in the Workflows area of the dashboard](/images/projects/import-workflows-into-projects.png) - -### Moving workflows between projects - -To move a workflow from one project to another project, first check the workflow and then click **Move** to open a dropdown of projects. Select the project to move this workflow to, and click **Move** once more to complete the move. - -![How to move workflows from one project to another in the Pipedream dashboard.](https://res.cloudinary.com/pipedreamin/image/upload/v1695662665/docs/docs/projects/CleanShot_2023-09-25_at_13.23.38_2x_dyrtlv.png) - - -Github Sync limitation - -At this time it's not possible to move workflows out of GitHub Synchronized Projects. - - - -## Finding your project's ID - -Visit your project's **Settings** and copy the project ID. diff --git a/docs-v2/pages/projects/secrets.mdx b/docs-v2/pages/projects/secrets.mdx deleted file mode 100644 index 533a631a56f32..0000000000000 --- a/docs-v2/pages/projects/secrets.mdx +++ /dev/null @@ -1,13 +0,0 @@ -import Callout from "@/components/Callout"; - -# Project variables and secrets - -Environment variables defined at the global workspace level are accessible to all workspace members and workflows within the workspace. To restrict access to sensitive variables or secrets, define them at the project-level and [configure access controls for the project](/projects/access-controls#managing-access). - -[See here](/workflows/environment-variables/) for info on creating, managing, and using environment variables and secrets. - - - **Project variables override workspace variables**. When the same variable is - defined at both the workspace and project levels (for example, - `process.env.BASE_DOMAIN`), the **project** variable takes precedence. - diff --git a/docs-v2/pages/rest-api/_meta.tsx b/docs-v2/pages/rest-api/_meta.tsx deleted file mode 100644 index b05fdbc325523..0000000000000 --- a/docs-v2/pages/rest-api/_meta.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default { - "index": "API Reference", - "auth": "Authentication", - "workflows": "Example: Create a workflow", - "rss": "Example: Create an RSS source", - "webhooks": "Example: Webhooks", -} as const diff --git a/docs-v2/pages/rest-api/auth.mdx b/docs-v2/pages/rest-api/auth.mdx deleted file mode 100644 index 53dd8f1764f03..0000000000000 --- a/docs-v2/pages/rest-api/auth.mdx +++ /dev/null @@ -1,113 +0,0 @@ -# Authentication - -The Pipedream API supports two methods of authentication: [OAuth](#oauth) and [User API keys](#user-api-keys). - -**We recommend OAuth** for a few reasons: - -โœ… OAuth clients are tied to the workspace, administered by workspace admins
-โœ… Tokens are short-lived
-โœ… OAuth clients support scopes, limiting access to specific operations (coming soon!)
-โœ… Limit access to specific Pipedream projects (coming soon!)
- -When testing the API or using the CLI, you can use your user API key. This key is tied to your user account and provides full access to any resources your user has access to, across workspaces. - -## OAuth - -Workspace administrators can create OAuth clients in your workspace's [API settings](https://pipedream.com/settings/api). - -Since API requests are meant to be made server-side, and since grants are not tied to individual end users, all OAuth clients are [**Client Credentials** applications](https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/). - -### Creating an OAuth client - -1. Visit the [API settings](https://pipedream.com/settings/api) for your workspace. -2. Click the **New OAuth Client** button. -3. Name your client and click **Create**. -4. Copy the client secret. **It will not be accessible again**. Click **Close**. -5. Copy the client ID from the list. - -### How to get an access token - -In the client credentials model, you exchange your OAuth client ID and secret for an access token. Then you use the access token to make API requests. - -If you're running a server that executes JavaScript, we recommend using [the Pipedream SDK](/connect/api/#installing-the-typescript-sdk), which automatically refreshes tokens for you. - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -// These secrets should be saved securely and passed to your environment -const pd = createBackendClient({ - credentials: { - clientId: "YOUR_CLIENT_ID", - clientSecret: "YOUR_CLIENT_SECRET", - }, - projectId: "YOUR_PROJECT_ID", // This is typically required for most Connect API endpoints -}); - -// Use the SDK's helper methods to make requests -const accounts = await pd.getAccounts({ include_credentials: 1 }); - -// Or make any Pipedream API request with the fresh token -const accounts = await pd.makeAuthorizedRequest("/accounts", { - method: "GET" - params: { - include_credentials: 1, - } -}); -``` - -You can also manage this token refresh process yourself, using the `/oauth/token` API endpoint: - -```bash -curl https://api.pipedream.com/v1/oauth/token \ - -H 'Content-Type: application/json' \ - -d '{ "grant_type": "client_credentials", "client_id": "", "client_secret": "" }' -``` - -Access tokens expire after 1 hour. Store access tokens securely, server-side. - -### Revoking a client secret - -1. Visit your workspace's [API settings](https://pipedream.com/settings/api). -2. Click the **...** button to the right of the OAuth client whose secret you want to revoke, then click **Rotate client secret**. -3. Copy the new client secret. **It will not be accessible again**. - -### OAuth security - -See [the OAuth section of the security docs](/privacy-and-security/#pipedream-rest-api-security-oauth-clients) for more information on how Pipedream secures OAuth credentials. - -## User API keys - -When you sign up for Pipedream, an API key is automatically generated for your user account. You can use this key to authorize requests to the API. - -You'll find this API key in your [User Settings](https://pipedream.com/user) (**My Account** -> **API Key**). - -**Use user API keys when testing the API or using the CLI**. This key is tied to your user account and provides full access to any resources your user has access to, across workspaces. - -### Revoking your API key - -You can revoke your API key in your [Account Settings](https://pipedream.com/settings/account) (**Settings** -> **Account**). Click on the **REVOKE** button directly to the right of your API key. - -This will revoke your original API key, generating a new one. Any API requests made with the original token will yield a `401 Unauthorized` error. - -## Authorizing API requests - -Whether you use OAuth access tokens or user API keys, Pipedream uses [Bearer Authentication](https://oauth.net/2/bearer-tokens/) to authorize your access to the API or SSE event streams. When you make API requests, pass an `Authorization` header of the following format: - -``` -# OAuth access token -Authorization: Bearer - -# User API key -Authorization: Bearer -``` - -For example, here's how you can use `cURL` to fetch profile information for the authenticated user: - -```bash -curl 'https://api.pipedream.com/v1/users/me' \ - -H 'Authorization: Bearer ' -``` - -## Using the Pipedream CLI - -You can [link the CLI to your Pipedream account](/components/contributing/cli/login/), which will automatically pass your API key in the `Authorization` header with every API request. diff --git a/docs-v2/pages/rest-api/index.mdx b/docs-v2/pages/rest-api/index.mdx deleted file mode 100644 index 8f5c729db26b3..0000000000000 --- a/docs-v2/pages/rest-api/index.mdx +++ /dev/null @@ -1,2233 +0,0 @@ -import Callout from "@/components/Callout"; - -# REST API - -## Overview - -Use the REST API to create workflows, manage event sources, handle subscriptions, and more. - -## Base URL - -The base URL for all requests is [https://api.pipedream.com/v1](https://api.pipedream.com/v1). - -## Authentication - -The Pipedream API supports two methods of authentication: [OAuth](/rest-api/auth/#oauth) and [User API keys](/rest-api/auth/#user-api-keys). **Pipedream recommends using OAuth for most use cases**. - -All credentials are passed as a Bearer token in the `Authorization` header. For example: - -```shell -curl https://api.pipedream.com/v1/accounts \ - -H "Authorization Bearer " -``` - -Learn more in the [Authentication docs](/rest-api/auth/). - -### Authenticating as a workspace vs. a user - -Pipedream recommends using [OAuth](/rest-api/auth/#oauth) to auth against the Pipedream API. OAuth tokens are associated with a workspace, and the API will automatically use the workspace associated with the token. - -When you authenticate with a user API key, you must [specify the workspace ID in the `org_id` parameter](#common-parameters) when making requests to specific endpoints. - -## Required headers - -The `Authorization` header is required on all endpoints, to authenticate API requests. - -`POST` or `PUT` requests that accept JSON payloads also require a `Content-Type` -header set to `application/json`. For example: - -```shell -curl https://api.pipedream.com/v1/components \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" \ - -d '{"component_url": "https://github.com/PipedreamHQ/pipedream/blob/master/components/rss/sources/new-item-in-feed/new-item-in-feed.ts"}' -``` - -## Common Parameters - -The following parameters can be passed to any endpoint. They can be included as -query string params for `GET` requests, or in the body of the payload of `POST` -requests. - ---- - -`include` **string** - -The fields in the API response you'd like to include (defaults to all fields). -Pass as a string of comma-separated values: - -`comma,separated,fields,to,include` - ---- - -`exclude` **string** - -The fields in the API response you'd like to _exclude_ (defaults to none, -including all fields). Pass as a string of comma-separated values: - -`comma,separated,fields,to,include` - ---- - -`org_id` **string** - - -The `org_id` parameter is only required when using [User API keys](/rest-api/auth/#user-api-keys). When authenticating with OAuth tokens, the API will automatically use the workspace associated with the token. - - -When using [User API keys](/rest-api/auth/#user-api-keys), some endpoints require you to specify [your workspace ID](/workspaces/#finding-your-workspaces-id) you want the operation to take effect in: - -- When _fetching_ specific resources (for example, when you [retrieve events for a specific source](#get-source-events)), **you should not need to pass `org_id`**. If your user is a part of the workspace, and you have access to that resource, and the API will return the details of the resource. -- When _creating_ new resources, you'll need to specify the `org_id` in which you want to create the resource. - -[Find your workspace / org ID here](/workspaces/#finding-your-workspaces-id). - -## Pagination - -Most API endpoints below support pagination, **with a default page size of 10 -items**. You can vary the size of pages, and set a `before` or `after` cursor on -the results, using the following parameters. They can be included as query -string params for `GET` requests, or in the body of the payload of `POST` -requests. - ---- - -`limit` **integer** - -The number of items to return in the requested page of results. - -- Default: 10 -- Min: 1 -- Max: 100 - ---- - -`after` **string** - -A cursor, specifying you'd like to retrieve items _after_ this cursor. - -Cursor strings are returned with all paginated responses. - ---- - -`before` **string** - -A cursor, specifying you'd like to retrieve items _before_ this cursor. - -Cursor strings are returned with all paginated responses. - -### Example Paginated Request - -This request fetches a page of 5 sources in the authenticated account, after a -specific cursor (returned with a previous request): - -```shell -curl https://api.pipedream.com/v1/users/me/sources\?limit\=3\&after\=ZGNfSzB1QWVl \ - -H "Authorization: Bearer " -``` - -### Example Paginated Response - -The response from the request above will have a shape that looks like: - -```json -{ - "page_info": { - "total_count": 3, - "count": 3, - "start_cursor": "ZGNfSzB1QWVl", - "end_cursor": "ZGNfclhhdTZv" - }, - "data": [ - { - "id": "dc_5YGuMo" - }, - { - "id": "dc_5v3unr" - }, - { - "id": "dc_rXau6o" - } - ] -} -``` - -## Errors - -Pipedream uses conventional HTTP response codes to indicate the success or -failure of an API request: - -- Codes in the `2xx` range indicate success. -- Codes in the `4xx` range indicate an error that failed (e.g., a required parameter was omitted). -- Codes in the `5xx` range indicate an error with Pipedream's server. - -## Accounts - - -These docs discuss connected accounts **for Pipedream users**. To retrieve accounts for your end users via Connect, refer to the [Connect API docs](/connect/api/#accounts). - - -[Connected accounts](/apps/connected-accounts/) let you manage credentials for integrated APIs. - -### List accounts - -List connected accounts accessible by the authenticated user or workspace. - -``` -GET /accounts/ -``` - -#### Parameters - -`app` **string** (_optional_) - -The ID or name slug the app you'd like to retrieve. For example, Slack's unique app ID is `app_OkrhR1`, and its name slug is `slack`. - -You can find the app's ID in the response from the [List apps](#list-apps) endpoint, and the name slug under the **Authentication** section of any [app page](https://pipedream.com/apps). - ---- - -`oauth_app_id` **string** (_optional_) - -The ID of the custom [OAuth app](/connect/managed-auth/quickstart/#create-a-pipedream-oauth-client) you'd like to retrieve accounts for. - ---- - -`include_credentials` **boolean** (_optional_) - -Pass `include_credentials=true` as a query-string parameter to include the account credentials in the response - -#### Example Request โ€” Get account metadata - -```bash -curl 'https://api.pipedream.com/v1/accounts' \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -#### Example Response โ€” Get account metadata - -```json -{ - "data": [ - { - "id": "apn_abc123", - "created_at": "2022-07-27T20:37:52.000Z", - "updated_at": "2024-02-11T04:18:46.000Z", - "name": "Google Sheets โ€” pipedream.com", // account nickname, if set - "app": { - "id": "app_abc123", - "name": "Google Sheets" - }, - "healthy": true // true if Pipedream can make a successful test request - } - ] -} -``` - -### Get account - -By default, this route returns metadata for a specific connected account. Set `include_credentials=true` to return credentials that you can use in any app where you need the actual credentials (API key or OAuth access token for example). - -#### Endpoint - -``` -GET /accounts/{account_id} -``` - -#### Parameters - -`account_id` **string** - -To retrieve your account ID: - -1. [Connect your account](/apps/connected-accounts/#connecting-a-new-account) -2. On [https://pipedream.com/accounts](https://pipedream.com/accounts), find your account and click the `...` to the right of the account, -3. **Copy Account ID** - -
- -
- ---- - -`include_credentials` **boolean** (_optional_) - -Pass `include_credentials=true` as a query-string parameter to include the account credentials in the response - -#### Example Request โ€” Get account metadata - -```bash -curl 'https://api.pipedream.com/v1/accounts/' \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -#### Example Response โ€” Get account metadata - -```json -{ - "data": { - "id": "apn_abc123", - "created_at": "2022-07-27T20:37:52.000Z", - "updated_at": "2024-02-11T04:18:46.000Z", - "name": "Google Sheets โ€” pipedream.com", // account nickname, if set - "app": { - "id": "app_abc123", - "name": "Google Sheets" - }, - "healthy": true // true if Pipedream can make a successful test request - } -} -``` - -#### Example Request โ€” Get account credentials - -```bash -curl 'https://api.pipedream.com/v1/accounts/?include_credentials=true' \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -#### Example Response โ€” Get account credentials - -```json -{ - "data": { - "id": "apn_abc123", - "created_at": "2022-07-27T20:37:52.000Z", - "updated_at": "2024-02-11T04:18:46.000Z", - "expires_at": "2024-02-11T05:18:46.000Z", - "name": "Google Sheets โ€” pipedream.com", // account nickname, if set - "app": { - "id": "app_abc123", - "name": "Google Sheets" - }, - "credentials": { - // Properties are specific to the app โ€” see below - } - } -} -``` - -#### The `credentials` object - -The properties of the `credentials` object are specific to the app. - -All OAuth apps expose the following properties: - -- `oauth_access_token` โ€” A fresh OAuth access token -- `oauth_client_id` โ€” The client ID of the OAuth app -- `oauth_refresh_token` โ€” The latest OAuth refresh token for your grant -- `oauth_uid` โ€” A unique identifier in the third party API's system, typically a user ID or email address - -Apps with static credentials expose fields specific to the API, e.g. `api_key`. Review the response for specific apps to see the app-specific response. - -## Apps - -### List Apps - ---- - -Retrieve a list of all apps available on Pipedream. - -#### Endpoint - -``` -GET /apps -``` - -#### Parameters - -`q` **string** (_optional_) - -A query string to filter the list of apps. For example, to search for apps that **contain** the string "Slack", pass `q=Slack`. - ---- - -`has_components` **string** (_optional_) - -Pass `1` to filter the list of apps to only those with public triggers or actions. - ---- - -`has_actions` **string** (_optional_) - -Pass `1` to filter the list of apps to only those with public actions. - ---- - -`has_triggers` **string** (_optional_) - -Pass `1` to filter the list of apps to only those with public triggers. - -#### Example Request - -```shell -curl https://api.pipedream.com/v1/apps - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -#### Example Response - -```json -{ - "page_info": { - "total_count": 2, - "count": 2, - "start_cursor": "c2xhY2s", - "end_cursor": "c2xhY2tfYm90" - }, - "data": [ - { - "id": "app_OkrhR1", - "name_slug": "slack", - "name": "Slack", - "auth_type": "oauth", - "description": "Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work โ€” all within a secure, enterprise-grade environment.", - "img_src": "https://assets.pipedream.net/s.v0/app_OkrhR1/logo/orig", - "custom_fields_json": "[]", - "categories": [ - "Communication" - ], - "featured_weight": 1000000001, - "connect": { - "proxy_enabled": true, - "allowed_domains": ["slack.com"], - "base_proxy_target_url": "https://slack.com" - } - }, - { - "id": "app_mWnheL", - "name_slug": "slack_bot", - "name": "Slack Bot", - "auth_type": "keys", - "description": "Interact with Slack with your own bot user", - "img_src": "https://assets.pipedream.net/s.v0/app_mWnheL/logo/orig", - "custom_fields_json": "[{\"name\":\"bot_token\",\"label\":\"Bot Token\",\"description\":null,\"default\":null,\"optional\":null,\"type\":\"password\"}]", - "categories": [ - "Communication" - ], - "featured_weight": 4100, - "connect": { - "proxy_enabled": true, - "allowed_domains": ["slack.com"], - "base_proxy_target_url": "https://slack.com" - } - } - ] -} -``` - - -The `apps` API returns a `featured_weight` for integrated apps, which powers the sort order on [pipedream.com/apps](https://pipedream.com/apps). Note that this is roughly based on popularity from Pipedream users, but is manually defined by Pipedream and is subject to change. - - -### Get an App - -Retrieve metadata for a specific app. - -#### Endpoint - -``` -GET /apps/{app_id} -``` - -#### Path Parameters - -`app_id` **string** - -The ID or name slug the app you'd like to retrieve. For example, Slack's unique app ID is `app_OkrhR1`, and its name slug is `slack`. - -You can find the app's ID in the response from the [List apps](#list-apps) endpoint, and the name slug under the **Authentication** section of any [app page](https://pipedream.com/apps). - -#### Example Request - -```bash -curl https://api.pipedream.com/v1/apps/app_OkrhR1 \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -#### Example Response - -```json -{ - "data": { - "id": "app_OkrhR1", - "name_slug": "slack", - "name": "Slack", - "auth_type": "oauth", - "description": "Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work โ€” all within a secure, enterprise-grade environment.", - "img_src": "https://assets.pipedream.net/s.v0/app_OkrhR1/logo/orig", - "custom_fields_json": "[]", - "categories": [ - "Communication" - ], - "featured_weight": 1000000001, - "connect": { - "proxy_enabled": true, - "allowed_domains": ["slack.com"], - "base_proxy_target_url": "https://slack.com" - } - } -} -``` - -## Components - - -These docs discuss the management of Pipedream components. To run components on behalf of your end users in your application, refer to the [Connect API docs](/connect/api/#components). - - -Components are objects that represent the code for an [event source](#sources). - -### Create a component - - -`/components` endpoints are only available when using [user API keys](/rest-api/auth/#user-api-keys), not yet for workspace [OAuth tokens](/rest-api/auth/#oauth). - - -Before you can create a source using the REST API, you must first create a -**component** - the code for the source. - -This route returns the components `id`, `code`, `configurable_props`, and other -metadata you'll need to [deploy a source](#create-a-source) from this component. - -#### Endpoint - -``` -POST /components -``` - -#### Parameters - -`component_code` **string** (_optional_) - -The full code for a [Pipedream component](/components/contributing/api/). - ---- - -`component_url` **string** (_optional_) - -A reference to the URL where the component is hosted. - -For example, to create an RSS component, pass -`https://github.com/PipedreamHQ/pipedream/blob/master/components/rss/sources/new-item-in-feed/new-item-in-feed.ts`. - ---- - -One of `component_code` _or_ `component_url` is required. If both are present, -`component_code` is preferred and `component_url` will be used only as metadata -to identify the location of the code. - -#### Example Request - -Here's an example of how to create an RSS component from a Github URL: - -```shell -curl https://api.pipedream.com/v1/components \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" \ - -d '{"component_url": "https://github.com/PipedreamHQ/pipedream/blob/master/components/rss/sources/new-item-in-feed/new-item-in-feed.ts"}' -``` - -#### Example Response - -```json -{ - "data": { - "id": "sc_JDi8EB", - "code": "component code here", - "code_hash": "685c7a680d055eaf505b08d5d814feef9fabd516d5960837d2e0838d3e1c9ed1", - "name": "rss", - "version": "0.0.1", - "configurable_props": [ - { - "name": "url", - "type": "string", - "label": "Feed URL", - "description": "Enter the URL for any public RSS feed." - }, - { - "name": "timer", - "type": "$.interface.timer", - "default": { - "intervalSeconds": 900 - } - } - ], - "created_at": 1588866900, - "updated_at": 1588866900 - } -} -``` - -### Get a component - -Retrieve a component saved or published in your account using its saved -component ID **or** key. - -This endpoint returns the component's metadata and configurable props. - -#### Endpoint - -``` -GET /components/{key|id} -``` - -#### Parameters - -`key` **string** - -The component key (identified by the `key` property within the component's -source code) you'd like to fetch metadata for (example: `my-component`) - -**or** - -`id` **string** - -The saved component ID you'd like to fetch metadata for (example: `sc_JDi8EB`) - -#### Example Request - -```shell -curl https://api.pipedream.com/v1/components/my-component \ - -H "Authorization: Bearer " -``` - -#### Example Response - -```json -{ - "data": { - "id": "sc_JDi8EB", - "code": "component code here", - "code_hash": "685c7a680d055eaf505b08d5d814feef9fabd516d5960837d2e0838d3e1c9ed1", - "name": "rss", - "version": "0.0.1", - "configurable_props": [ - { - "name": "url", - "type": "string", - "label": "Feed URL", - "description": "Enter the URL for any public RSS feed." - }, - { - "name": "timer", - "type": "$.interface.timer", - "default": { - "intervalSeconds": 900 - } - } - ], - "created_at": 1588866900, - "updated_at": 1588866900 - } -} -``` - -### Get a component from the global registry - -Pipedream operates a global registry of all public components (for example, for -apps like Github, Google Calendar, and more). This endpoint returns the same -data as the endpoint for [retrieving metadata on a component you -own](#get-a-component), but allows you to fetch data for any globally-published -component. - -#### Endpoint - -``` -GET /components/registry/{key} -``` - -#### Parameters - -`key` **string** - -The component key (identified by the `key` property within the component's -source code) you'd like to fetch metadata for (example: `my-component`) - -#### Example Request - -```shell -curl https://api.pipedream.com/v1/components/registry/github-new-repository \ - -H "Authorization: Bearer " -``` - -#### Example Response - -```json -{ - "data": { - "id": "sc_JDi8EB", - "code": "component code here", - "code_hash": "685c7a680d055eaf505b08d5d814feef9fabd516d5960837d2e0838d3e1c9ed1", - "name": "rss", - "version": "0.0.1", - "configurable_props": [ - { - "name": "url", - "type": "string", - "label": "Feed URL", - "description": "Enter the URL for any public RSS feed." - }, - { - "name": "timer", - "type": "$.interface.timer", - "default": { - "intervalSeconds": 900 - } - } - ], - "created_at": 1588866900, - "updated_at": 1588866900 - } -} -``` - -### Search for registry components - -Search for components in the global registry with natural language. Pipedream will use AI to match your query to the most relevant components. - -#### Endpoint - -``` -GET /components/search -``` - -#### Parameters - -`query` **string** - -The query string to search for components in the global registry, e.g. "Send a message to Slack on new Hubspot contacts" - ---- - -`app` **string** (_optional_) - -The name slug the app you'd like to filter results for. For example, Slack's name slug is `slack`. Returned sources and actions are filtered to only those tied to the specified app. - -You can find the name slug under the **Authentication** section of any [app page](https://pipedream.com/apps). - ---- - -`similarity_threshold` **number** (_optional_) - -The minimum similarity score required for a component to be returned. The similarity score is a number between 0 and 1, where 1 is a perfect match. Similarity here is computed as the cosine distance between the embedding of the user query and the embedding of the component's metadata. - ---- - -`debug` **boolean** (_optional_) - -Pass `debug=true` to return additional data in the response, useful for inspecting the results. - -#### Example Request - -```shell -curl https://api.pipedream.com/v1/components/search\?query\="When a new Hubspot contact is added, send me an SMS"&limit=1 \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -### Example Response - -```json -{ - "sources": [ - "hubspot-new-contact" - ], - "actions": [ - "twilio-send-sms" - ] -} -``` - -## Connect - -[Pipedream Connect](/connect/) is the easiest way for your users to connect to [over {process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps), **right in your product**. You can build in-app messaging, CRM syncs, AI-driven products, [and much more](/connect/use-cases/), all in a few minutes. Visit [the quickstart](/connect/quickstart/) to build your first integration. - -Read more about the Connect API in the [Connect API docs](/connect/api/). - -## Events - -### Get Source Events - -Retrieve up to the last 100 events emitted by a source. - -#### Endpoint - -``` -GET /sources/{id}/event_summaries -``` - -#### Notes and Examples - -The event data for events larger than `1KB` may get truncated in the response. -If you're processing larger events, and need to see the full event data, pass -`?expand=event`: - -``` -GET /sources/{id}/event_summaries?expand=event -``` - -Pass `?limit=N` to retrieve the last **N** events: - -``` -GET /sources/{id}/event_summaries?limit=10 -``` - -### Delete source events - -Deletes all events, or a specific set of events, tied to a source. - -By default, making a `DELETE` request to this endpoint deletes **all** events -associated with a source. To delete a specific event, or a range of events, you -can use the `start_id` and `end_id` parameters. - -These IDs can be retrieved by using the [`GET /sources/{id}/event_summaries` -endpoint](/rest-api/#get-source-events), and are tied to the timestamp at which -the event was emitted โ€” e.g. `1589486981597-0`. They are therefore naturally -ordered by time. - -#### Endpoint - -``` -DELETE /sources/{id}/events -``` - -#### Parameters - -`start_id` **string** - -The event ID from which you'd like to start deleting events. - -If `start_id` is passed without `end_id`, the request will delete all events -starting with and including this event ID. For example, if your source has 3 -events: - -- `1589486981597-0` -- `1589486981598-0` -- `1589486981599-0` - -and you issue a `DELETE` request like so: - -```shell -curl -X DELETE \ - -H "Authorization: Bearer " \ - "https://api.pipedream.com/v1/sources/dc_abc123/events?start_id=1589486981598-0" -``` - -The request will delete the **last two events**. - ---- - -`end_id` **string** - -The event ID from which you'd like to end the range of deletion. - -If `end_id` is passed without `start_id`, the request will delete all events up -to and including this event ID. For example, if your source has 3 events: - -- `1589486981597-0` -- `1589486981598-0` -- `1589486981599-0` - -and you issue a `DELETE` request like so: - -```shell -curl -X DELETE \ - -H "Authorization: Bearer " \ - "https://api.pipedream.com/v1/sources/dc_abc123/events?end_id=1589486981598-0" -``` - -The request will delete the **first two events**. - -#### Example Request - -You can delete a single event by passing its event ID in both the value of the -`start_id` and `end_id` params: - -```shell -curl -X DELETE \ - -H "Authorization: Bearer " \ - "https://api.pipedream.com/v1/sources/dc_abc123/events?start_id=1589486981598-0&end_id=1589486981598-0" -``` - -#### Example Response - -Deletion happens asynchronously, so you'll receive a `202 Accepted` HTTP status -code in response to any deletion requests. - -## OAuth - -### Get a new access token - -Exchanges a client ID and client secret for a new access token. - -#### Endpoint - -``` -POST /oauth/token -``` - -#### Parameters - -`grant_type` **string** - -The OAuth grant type. For Pipedream, this is always `client_credentials`. - ---- - -`client_id` **string** - -The client ID of the OAuth app. - ---- - -`client_secret` **string** - -The client secret of the OAuth app. - -#### Example Request - -```bash -curl https://api.pipedream.com/v1/oauth/token \ - -H 'Content-Type: application/json' \ - -d '{ "grant_type": "client_credentials", "client_id": "", "client_secret": "" }' -``` - -#### Example Response - -```json -{ - "access_token": "", - "token_type": "Bearer", - "expires_in": 3600, - "created_at": 1645142400 -} -``` - -### Revoke an access token - -Revokes an access token, rendering it invalid for future requests. - -#### Endpoint - -``` -POST /oauth/revoke -``` - -#### Parameters - -`token` **string** - -The access token to revoke. - ---- - -`client_id` **string** - -The client ID of the OAuth app. - ---- - -`client_secret` **string** - -The client secret of the OAuth app. - ---- - -#### Example Request - -```bash -curl https://api.pipedream.com/v1/oauth/revoke \ - -H 'Content-Type: application/json' \ - -d '{ "token": "", "client_id": "", "client_secret": "" }' -``` - -#### Example Response - -This endpoint will return a `200 OK` response with an empty body if the token was successfully revoked: - -```json -{} -``` - -## Sources - -Event sources run code to collect events from an API, or receive events via -webhooks, emitting those events for use on Pipedream. Event sources can function -as workflow triggers. [Read more here](/workflows/building-workflows/triggers/). - -### Create a Source - - -This endpoint is only available when using [user API keys](/rest-api/auth/#user-api-keys), not yet for workspace [OAuth tokens](/rest-api/auth/#oauth). - - -#### Endpoint - -``` -POST /sources/ -``` - -#### Parameters - -`component_id` **string** (_optional_) - -The ID of a component previously created in your account. [See the component -endpoints](/rest-api/#components) for information on how to retrieve this ID. - ---- - -`component_code` **string** (_optional_) - -The full code for a [Pipedream component](/components/contributing/api/). - ---- - -`component_url` **string** (_optional_) - -A reference to the URL where the component is hosted. - -For example, to create an RSS component, pass -`https://github.com/PipedreamHQ/pipedream/blob/master/components/rss/sources/new-item-in-feed/new-item-in-feed.ts`. - ---- - -One of `component_id`, `component_code`, or `component_url` is required. If all -are present, `component_id` is preferred and `component_url` will be used only -as metadata to identify the location of the code. - ---- - -`name` **string** (_optional_) - -The name of the source. - -If absent, this defaults to using the [name -slug](/components/contributing/api/#component-structure) -of the component used to create the source. - -#### Example Request - -```shell -curl https://api.pipedream.com/v1/sources \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" \ - -d '{"component_url": "https://github.com/PipedreamHQ/pipedream/blob/master/components/rss/sources/new-item-in-feed/new-item-in-feed.ts", "name": "your-name-here", "configured_props": { "url": "https://rss.m.pipedream.net", "timer": { "intervalSeconds": 60 }}}' -``` - -#### Example Response - -Example response from creating an RSS source that runs once a minute: - -```json -{ - "data": { - "id": "dc_abc123", - "user_id": "u_abc123", - "component_id": "sc_abc123", - "configured_props": { - "url": "https://rss.m.pipedream.net", - "timer": { - "cron": null, - "interval_seconds": 60 - } - }, - "active": true, - "created_at": 1589486978, - "updated_at": 1589486978, - "name": "your-name-here", - "name_slug": "your-name-here" - } -} -``` - -### Update a source - -#### Endpoint - -``` -PUT /sources/{id} -``` - -#### Parameters - -`component_id` **string** (_optional_) - -The ID of a component previously created in your account. [See the component -endpoints](/rest-api/#components) for information on how to retrieve this ID. - ---- - -`component_code` **string** (_optional_) - -The full code for a [Pipedream -component](/components/contributing/api/). - ---- - -`component_url` **string** (_optional_) - -A reference to the URL where the component is hosted. - -For example, to create an RSS component, pass -`https://github.com/PipedreamHQ/pipedream/blob/master/components/rss/sources/new-item-in-feed/new-item-in-feed.ts`. - ---- - -One of `component_id`, `component_code`, or `component_url` is required. If all -are present, `component_id` is preferred and `component_url` will be used only -as metadata to identify the location of the code. - ---- - -`name` **string** (_optional_) - -The name of the source. - -If absent, this defaults to using the [name slug](/components/contributing/api/#component-structure) -of the component used to create the source. - ---- - -`active` **boolean** (_optional_) - -The active state of a component. To disable a component, set to `false`. To -enable a component, set to `true`. - -Default: `true`. - -### Delete a source - -#### Endpoint - -``` -DELETE /sources/{id} -``` - -## Subscriptions - - - The Subscriptions API is currently incompatible with projects that have [GitHub Sync](/workflows/git/) enabled. To [trigger another workflow](/workflows/building-workflows/code/nodejs/#invoke-another-workflow), use `$.flow.trigger` instead. - - -### Listen for events from another source or workflow - -You can configure a source or workflow to receive events from any number of -other workflows or sources. For example, if you want a single workflow to run on -10 different RSS sources, you can configure the workflow to _listen_ for events -from those 10 sources. - -#### Endpoint - -``` -POST /subscriptions?emitter_id={emitting_component_id}&event_name={event_name}&listener_id={receiving_source_id} -``` - -#### Parameters - -`emitter_id` **string** - -The ID of the workflow or component emitting events. Events from this component -trigger the receiving component / workflow. - -`emitter_id` also accepts glob patterns that allow you to subscribe to _all_ -workflows or components: - -- `p_*`: Listen to events from all workflows -- `dc_*`: Listen to events from all event sources - -[See the component endpoints](/rest-api/#components) for information on how to -retrieve the ID of existing components. You can retrieve the ID of your workflow -in your workflow's URL - it's the string `p_2gCPml` in -`https://pipedream.com/@dylan/example-rss-sql-workflow-p_2gCPml/edit`. - ---- - -`event_name` **string** (optional) - -**Only pass `event_name` when you're listening for events on a custom channel, with the name of the custom channel**: - -``` -event_name= -``` - -See [the `this.$emit` docs](/components/contributing/api/#emit) for more information on how to emit events on custom channels. - -Pipedream also exposes channels for logs and errors: - -- `$errors`: Any errors thrown by workflows or sources are emitted to this - stream -- `$logs`: Any logs produced by **event sources** are emitted to this stream - ---- - -`listener_id` **string** - -The ID of the component or workflow you'd like to receive events. - -[See the component endpoints](/rest-api/#components) for information on how to -retrieve the ID of existing components. You can retrieve the ID of your workflow -in your workflow's URL - it's the string `p_2gCPml` in -`https://pipedream.com/@dylan/example-rss-sql-workflow-p_2gCPml/edit`. - -#### Example Request - -You can configure workflow `p_abc123` to listen to events from the source -`dc_def456` using the following command: - -```shell -curl "https://api.pipedream.com/v1/subscriptions?emitter_id=dc_def456&listener_id=p_abc123" \ - -X POST \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -### Automatically subscribe a listener to events from new workflows / sources - -You can use this endpoint to automatically receive events, like workflow errors, -in another listening workflow or event source. Once you setup the -auto-subscription, any new workflows or event sources you create will -automatically deliver the specified events to the listener. - -Note: this will configure subscriptions for _new_ workflows and sources after -the time you configure the subscription. To deliver events to your listener from -_existing_ workflows or sources, use the [`POST /subscriptions` -endpoint](#listen-for-events-from-another-source-or-workflow). - -**Currently, this feature is enabled only on the API. The Pipedream UI will not -display the sources configured as listeners using this API**. - -#### Endpoint - -``` -POST /auto_subscriptions?event_name={event_name}&listener_id={receiving_source_id} -``` - -#### Parameters - -`event_name` **string** - -The name of the event stream whose events you'd like to receive: - -- `$errors`: Any errors thrown by workflows or sources are emitted to this - stream -- `$logs`: Any logs produced by **event sources** are emitted to this stream - ---- - -`listener_id` **string** - -The ID of the component or workflow you'd like to receive events. - -[See the component endpoints](/rest-api/#components) for information on how to -retrieve the ID of existing components. You can retrieve the ID of your workflow -in your workflow's URL - it's the string `p_2gCPml` in -`https://pipedream.com/@dylan/example-rss-sql-workflow-p_2gCPml/edit`. - -#### Example Request - -You can configure workflow `p_abc123` to listen to events from the source -`dc_def456` using the following command: - -```shell -curl "https://api.pipedream.com/v1/auto_subscriptions?event_name=$errors&listener_id=p_abc123" \ - -X POST \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -### Delete a subscription - -Use this endpoint to delete an existing subscription. This endpoint accepts the -same parameters as the [`POST /subscriptions` -endpoint](#listen-for-events-from-another-source-or-workflow) for creating -subscriptions. - -#### Endpoint - -``` -DELETE /subscriptions?emitter_id={emitting_component_id}&listener_id={receiving_source_id}&event_name={event_name} -``` - -#### Parameters - -`emitter_id` **string** - -The ID of the workflow or component emitting events. Events from this component -trigger the receiving component / workflow. - -`emitter_id` also accepts glob patterns that allow you to subscribe to _all_ -workflows or components: - -- `p_*`: Listen to events from all workflows -- `dc_*`: Listen to events from all event sources - -[See the component endpoints](/rest-api/#components) for information on how to -retrieve the ID of existing components. You can retrieve the ID of your workflow -in your workflow's URL - it's the string `p_2gCPml` in -`https://pipedream.com/@dylan/example-rss-sql-workflow-p_2gCPml/edit`. - ---- - -`listener_id` **string** - -The ID of the component or workflow you'd like to receive events. - -[See the component endpoints](/rest-api/#components) for information on how to -retrieve the ID of existing components. You can retrieve the ID of your workflow -in your workflow's URL - it's the string `p_2gCPml` in -`https://pipedream.com/@dylan/example-rss-sql-workflow-p_2gCPml/edit`. - ---- - -`event_name` **string** - -The name of the event stream tied to your subscription. **If you didn't specify -an `event_name` when creating your subscription, pass `event_name=`**. - -You'll find the `event_name` that's tied to your subscription when [listing your -subscriptions](#get-current-users-subscriptions): - -```javascript -{ - "id": "sub_abc123", - "emitter_id": "dc_abc123", - "listener_id": "dc_def456", - "event_name": "test" -}, -{ - "id": "sub_def456", - "emitter_id": "dc_abc123", - "listener_id": "wh_abc123", - "event_name": "" -} -``` - -#### Example Request - -You can delete a subscription you configured for workflow `p_abc123` to listen -to events from the source `dc_def456` using the following command: - -```shell -curl "https://api.pipedream.com/v1/subscriptions?emitter_id=dc_def456&listener_id=p_abc123" \ - -X DELETE \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -## Users - - -These endpoints only work when using [user API keys](/rest-api/auth/#user-api-keys), and will not work with workspace-level OAuth clients. - - -### Get Current User Info - -Retrieve information on the authenticated user. - -#### Endpoint - -``` -GET /users/me -``` - -#### Parameters - -_No parameters_ - -#### Example Request - -```bash -curl 'https://api.pipedream.com/v1/users/me' \ - -H 'Authorization: Bearer ' -``` - -#### Example Response - -Free user: - -```json -{ - "data": { - "id": "u_abc123", - "username": "dylburger", - "email": "dylan@pipedream.com", - "daily_compute_time_quota": 95400000, - "daily_compute_time_used": 8420300, - "daily_invocations_quota": 27344, - "daily_invocations_used": 24903 - "orgs": [ - { - "name": "MyWorkspace", - "id": "o_abc123", - "orgname": "myworkspace", - "email": "workspace@pipedream.com", - "daily_credits_quota": 100, - "daily_credits_used": 0 - }, - { - "name": "MyTeam", - "id": "o_edf456", - "orgname": "myteam", - "email": "team@pipedream.com", - "daily_credits_quota": 100, - "daily_credits_used": 0, - "daily_compute_time_quota": 1800000, - "daily_compute_time_used": 0, - "daily_invocations_quota": 100, - "daily_invocations_used": 0 - } - ], - - } -} -``` - -Paid user: - -```json -{ - "data": { - "id": "u_abc123", - "username": "user-35b7389db9e5222d42df6b3f0cfa8143" - "email": "dylan@pipedream.com", - "billing_period_start_ts": 1610154978, - "billing_period_end_ts": 1612833378, - "billing_period_credits": 12345 - } -} -``` - -## Webhooks - -Pipedream supports webhooks as a way to deliver events to a endpoint you own. -Webhooks are managed at an account-level, and you send data to these webhooks -using [subscriptions](#subscriptions). - -For example, you can run a Twitter [event source](/workflows/building-workflows/triggers/) that listens -for new tweets. If you [subscribe](#subscriptions) the webhook to this source, -Pipedream will deliver those tweets directly to your webhook's URL without -running a workflow. - -[**See these tutorials**](/rest-api/webhooks) for examples. - -### Create a webhook - -Creates a webhook pointing to a URL. Configure a [subscription](#subscriptions) -to deliver events to this webhook. - -#### Endpoint - -``` -POST /webhooks?url={your_endpoint_url}&name={name}&description={description} -``` - -#### Parameters - -`url` **string** - -The endpoint URL where you'd like to deliver events. Any events sent to this -webhook object will be delivered to this endpoint URL. - -This URL **must** contain, at a minimum, a protocol โ€” one of `http` or `https` โ€” -and hostname, but can specify resources or ports. For example, these URLs work: - -``` -https://example.com -http://example.com -https://example.com:12345/endpoint -``` - -but these do not: - -``` -# No protocol - needs http(s):// -example.com - -# mysql protocol not supported. Must be an HTTP(S) endpoint -mysql://user:pass@host:port -``` - ---- - -`name` **string** - -The name you'd like to assign to this webhook, which will appear when [listing -your webhooks](#get-current-users-webhooks). - ---- - -`description` **string** - -The description you'd like to assign to this webhook. - -#### Example Request - -You can create a webhook that delivers events to -`https://endpoint.m.pipedream.net` using the following command: - -```shell -curl "https://api.pipedream.com/v1/webhooks?url=https://endpoint.m.pipedream.net&name=name&description=description" \ - -X POST \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -#### Example Response - -Successful API responses contain a webhook ID for the webhook that was created -in `data.id` โ€” the string that starts with `wh_` โ€” which you can reference when -creating [subscriptions](#subscriptions). - -```json -{ - "data": { - "id": "wh_abc123", - "user_id": "u_abc123", - "name": null, - "description": null, - "url": "https://endpoint.m.pipedream.net", - "active": true, - "created_at": 1611964025, - "updated_at": 1611964025 - } -} -``` - -### Delete a webhook - -Use this endpoint to delete a webhook in your account. - -#### Endpoint - -``` -DELETE /webhooks/{id} -``` - -#### Path Parameters - -`id` **string** - -The ID of a webhook in your account. - ---- - -#### Example Request - -```shell -curl "https://api.pipedream.com/v1/webhooks/wh_abc123" \ - -X DELETE \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -## Workflows - -### Invoke workflow - -You can invoke workflows by making an HTTP request to a workflow's HTTP trigger. [See the docs on authorizing requests and invoking workflows](/workflows/building-workflows/triggers/#authorizing-http-requests) for more detail. - -### Create a Workflow - - -This endpoint is only available when using [user API keys](/rest-api/auth/#user-api-keys), not yet for workspace [OAuth tokens](/rest-api/auth/#oauth). - - -Creates a new workflow within an organization's project. This endpoint allows defining workflow steps, triggers, and settings, based on a supplied template. - -#### Endpoint - -``` -POST /workflows -``` - -#### Request Body - -`org_id` **string** - -[Switch to your workspace's context](/workspaces/#switching-between-workspaces) and [find your org's ID](/workspaces/#finding-your-workspaces-id). - ---- - -`project_id` **string** - -The ID of the project where the new workflow will be created. To find your project ID, switch to your desired worksapce, and click on Projects in the top left of the Pipedream dashboard. - -Click on the project where you'd like to create the new workflow, and the project ID can be found in the URL, starting with `proj_`. - -If the URL is [https://pipedream.com/@pd-testing/projects/proj_GzsRY5N/tree](https://pipedream.com/@pd-testing/projects/proj_GzsRY5N/tree), your `project_id` is `proj_GzsRY5N`. - ---- - -`template_id` **string** - -The ID of the workflow template to base the workflow on. To find a workflow's `template_id`, navigate to your workflow that you'd like to create a template for, and click "Create share link". If the URL created is [https://pipedream.com/new?h=tch_Vdfl0l](https://pipedream.com/new?h=tch_Vdfl0l), your `template_id` is `tch_Vdfl01`. - ---- - -`steps` **array**: Definitions of the steps to include in the workflow. Each item in the array represents a step, with its namespace and `props`. - ---- - -`triggers` **array**: Definitions of the triggers that will start the workflow. Each item in the array represents a trigger, with its type and `props`. - ---- - -`settings` **object**: Additional settings for the workflow, such as `name` and `auto_deploy`. - -#### Example Request - -```json -{ - "project_id": "proj_wx9sgy", - "org_id": "o_BYDI5y", - "template_id": "tch_3BXfWO", - "steps": [ - { - "namespace": "code", - "props": { - "stringProp": "asdf" - } - }, - { - "namespace": "keyauth_hello_world", - "props": { - "keyauth": { - "authProvisionId": "apn_Nb6h9v" - } - } - } - ], - "triggers": [ - { - "props": { - "oauth": { - "authProvisionId": "apn_qZWh4A" - }, - "string": "jkl" - } - } - ], - "settings": { - "name": "example workflow name", - "auto_deploy": true - } -} -``` - -#### Example Response - -```json -{ - "data": { - "id": "p_48rCxZ", - "name": "example workflow name", - "active": true, - "steps": [ - { - "id": "c_bDf10L", - "type": "CodeCell", - "namespace": "code", - "disabled": false, - "code_raw": null, - "codeRaw": null, - "codeConfigJson": null, - "lang": "nodejs20.x", - "text_raw": null, - "appConnections": [], - "flat_params_visibility_json": null, - "params_json": "{}", - "component": true, - "savedComponent": { - "id": "sc_PRYiAZ", - "code": "export default defineComponent({\n props: {\n stringProp: {\n type: \"string\"\n },\n intProp: {\n type: \"integer\",\n }\n },\n async run({ steps, $ }) {\n console.log(this.stringProp)\n return steps.trigger.event\n },\n})", - "codeHash": "1908045950f3c1a861e538b20d70732adb701a81174dc59f809398e43f85d132", - "configurableProps": [ - { - "name": "stringProp", - "type": "string" - }, - { - "name": "intProp", - "type": "integer" - } - ], - "key": null, - "description": null, - "entryPath": null, - "version": "", - "apps": [] - }, - "component_key": null, - "component_owner_id": null, - "configured_props_json": "{\"intProp\":5,\"stringProp\":\"asdf\"}", - "authProvisionIdMap": {}, - "authProvisionIds": [] - }, - { - "id": "c_W3f0YV", - "type": "CodeCell", - "namespace": "python", - "disabled": false, - "code_raw": null, - "codeRaw": null, - "codeConfigJson": null, - "lang": "python3.12", - "text_raw": null, - "appConnections": [], - "flat_params_visibility_json": null, - "params_json": "{}", - "component": true, - "savedComponent": { - "id": "sc_mweiWO", - "code": "def handler(pd: \"pipedream\"):\n # Reference data from previous steps\n print(pd.steps[\"trigger\"][\"context\"][\"id\"])\n # Return data for use in future steps\n return {\"foo\": {\"test\": True}}\n", - "codeHash": "63b32f00f1bc0b594e7a109cced4bda5011ab4420e358f743058dc46de8c5270", - "configurableProps": [], - "key": null, - "description": null, - "entryPath": null, - "version": "", - "apps": [] - }, - "component_key": null, - "component_owner_id": null, - "configured_props_json": null, - "authProvisionIdMap": {}, - "authProvisionIds": [] - }, - { - "id": "c_D7feVN", - "type": "CodeCell", - "namespace": "keyauth_hello_world", - "disabled": false, - "code_raw": null, - "codeRaw": null, - "codeConfigJson": null, - "lang": "nodejs20.x", - "text_raw": null, - "appConnections": [], - "flat_params_visibility_json": null, - "params_json": "{}", - "component": true, - "savedComponent": { - "id": "sc_71Li4l", - "code": "const keyauth = {\n type: \"app\",\n app: \"keyauth\",\n propDefinitions: {},\n}\n\nexport default {\n name: \"Key auth hello world\",\n version: \"0.0.1\",\n key: \"keyauth-hello-world\",\n type: \"action\",\n description: \"simple hello world with dev keyauth app.\",\n props: {\n keyauth,\n },\n async run() {\n console.log(\"hello world\")\n return \"hello world\"\n },\n}\n", - "codeHash": "b7d5c6540f60e63174a96d5e5ba4aa89bf45b7b9d9fdc01db0ee64c905962415", - "configurableProps": [ - { - "name": "keyauth", - "type": "app", - "app": "keyauth" - } - ], - "key": "keyauth-hello-world", - "description": "simple hello world with dev keyauth app.", - "entryPath": null, - "version": "0.0.1", - "apps": [ - { - "appId": "app_1xohQx", - "nameSlug": "keyauth", - "authType": "keys" - } - ] - }, - "component_key": "keyauth-hello-world", - "component_owner_id": null, - "configured_props_json": "{\"keyauth\":{\"authProvisionId\":\"apn_Nb6h9v\"}}", - "authProvisionIdMap": {}, - "authProvisionIds": [] - } - ], - "triggers": [ - { - "id": "hi_0R3HKG", - "key": "eohq5aaq8yr4sye", - "endpoint_url": "http://eojq5abv8yr4sye.m.d.pipedream.net", - "custom_response": false, - "created_at": 1707418403, - "updated_at": 1707418403 - }, - { - "id": "dc_rmXuv3", - "owner_id": "o_BYDI5y", - "component_id": "sc_PgliBJ", - "configured_props": {}, - "active": true, - "created_at": 1707241571, - "updated_at": 1707241571, - "name": "Emit hello world", - "name_slug": "emit-hello-world-6" - }, - { - "id": "ti_aPxTPY", - "interval_seconds": 3600, - "cron": null, - "timezone": "America/New_York", - "schedule_changed_at": 1707418408, - "created_at": 1707418404, - "updated_at": 1707418404 - }, - { - "id": "dc_5nvuPv", - "owner_id": "o_BYDI5y", - "component_id": "sc_XGBiLw", - "configured_props": { - "oauth": { - "authProvisionId": "apn_qZWh4A" - }, - "string": "jkl" - }, - "active": true, - "created_at": 1707418404, - "updated_at": 1707418404, - "name": "oauth-test-source", - "name_slug": "oauth-test-source-3" - }, - { - "id": "ei_QbGT3D", - "email_address": "em5tdwgfgbw9piv@upload.pipedream.net", - "created_at": 1707418407, - "updated_at": 1707418407 - } - ] - } -} -``` - -### Update a Workflow - - -This endpoint is only available when using [user API keys](/rest-api/auth/#user-api-keys), not yet for workspace [OAuth tokens](/rest-api/auth/#oauth). - - -Updates the workflow's activation status. If you need to modify the workflow's steps, triggers, or connected accounts [consider making a new workflow](#create-a-workflow). - -#### Endpoint - -```bash -PUT /workflows/{id} -``` - -#### Path Parameters - -`id` **string** -The ID of the workflow to update. - -To find your workflow ID, navigate to your workflow. - -If the URL is [https://pipedream.com/@michael-testing/api-p_13CDnxK/inspect](https://pipedream.com/@michael-testing/api-p_13CDnxK/inspect), your `workflow_id` begins with `p_` and would be `p_13CDnxK`. - -#### Request Body - -`active` **boolean** -The activation status of a workflow. Set to `true` to activate the workflow, or `false` to deactivate it. - -`org_id` **string** -[Find your org's ID](/workspaces/#finding-your-workspaces-id). - -#### Example Request - -```bash -curl -X PUT 'https://api.pipedream.com/v1/workflows/p_abc123' \ - -H 'Authorization: Bearer ' \ - -H 'Content-Type: application/json' \ - -d '{"active": false, "org_id": "o_BYDI5y"}' -``` - -### Get a Workflow's details - -Retrieves the details of a specific workflow within an organization's project. - -#### Endpoint - -```bash -GET /workflows/{workflow_id} -``` - -#### Path Parameters - -`workflow_id` **string**: The ID of the workflow to retrieve. - -#### Example Request - -```bash -curl 'https://api.pipedream.com/v1/workflows/p_abc123?org_id=o_abc123' \ - -H 'Authorization: Bearer ' -``` - -#### Example Response - -```json -{ - "triggers": [ - { - "id": "hi_ABpHKz", - "key": "eabcdefghiklmnop", - "endpoint_url": "http://eabcdefghiklmnop.m.d.pipedream.net", - "custom_response": false - } - ], - "steps": [ - { - "id": "c_abc123", - "namespace": "code", - "disabled": false, - "lang": "nodejs20.x", - "appConnections": [], - "component": true, - "savedComponent": { - "id": "sc_abc123", - "codeHash": "long-hash-here", - "configurableProps": [ - { - "name": "channelId", - "type": "string" - }, - { - "name": "message", - "type": "string" - }, - { - "name": "slack", - "type": "app", - "app": "slack" - } - ], - "version": "" - }, - "component_key": null, - "component_owner_id": "o_abc123", - "configured_props_json": "{}" - } - ] -} -``` - -### Get Workflow Emits - -Retrieve up to the last 100 events emitted from a workflow using -[`$send.emit()`](/workflows/data-management/destinations/emit/#emit-events). - -#### Endpoint - -``` -GET /workflows/{workflow_id}/event_summaries -``` - -#### Notes and Examples - -The event data for events larger than `1KB` may get truncated in the response. -If you're retrieving larger events, and need to see the full event data, pass -`?expand=event`: - -``` -GET /workflows/{workflow_id}/event_summaries&expand=event -``` - -Pass `?limit=N` to retrieve the last **N** events: - -``` -GET /v1/workflows/{workflow_id}/event_summaries?expand=event&limit=1 -``` - -#### Example Request - -```shell -curl 'https://api.pipedream.com/v1/workflows/p_abc123/event_summaries?expand=event&limit=1' \ - -H 'Authorization: Bearer ' -``` - -#### Example Response - -```json -{ - "page_info": { - "total_count": 1, - "start_cursor": "1606511826306-0", - "end_cursor": "1606511826306-0", - "count": 1 - }, - "data": [ - { - "id": "1606511826306-0", - "indexed_at_ms": 1606511826306, - "event": { - "raw_event": { - "name": "Luke", - "title": "Jedi" - } - }, - "metadata": { - "emit_id": "1ktF96gAMsLqdYSRWYL9KFS5QqW", - "name": "", - "emitter_id": "p_abc123" - } - } - ] -} -``` - -### Get Workflow Errors - -Retrieve up to the last 100 events for a workflow that threw an error. The -details of the error, along with the original event data, will be included - -#### Endpoint - -``` -GET /workflows/{workflow_id}/$errors/event_summaries -``` - -#### Notes and Examples - -The event data for events larger than `1KB` may get truncated in the response. -If you're processing larger events, and need to see the full event data, pass -`?expand=event`: - -``` -GET /workflows/{workflow_id}/$errors/event_summaries&expand=event -``` - -Pass `?limit=N` to retrieve the last **N** events: - -``` -GET /v1/workflows/{workflow_id}/$errors/event_summaries?expand=event&limit=1 -``` - -#### Example Request - -```shell -curl 'https://api.pipedream.com/v1/workflows/p_abc123/$errors/event_summaries?expand=event&limit=1' \ - -H 'Authorization: Bearer ' -``` - -#### Example Response - -```json -{ - "page_info": { - "total_count": 100, - "start_cursor": "1606370816223-0", - "end_cursor": "1606370816223-0", - "count": 1 - }, - "data": [ - { - "id": "1606370816223-0", - "indexed_at_ms": 1606370816223, - "event": { - "original_event": { - "name": "Luke", - "title": "Jedi" - }, - "original_context": { - "id": "1kodJIW7jVnKfvB2yp1OoPrtbFk", - "ts": "2020-11-26T06:06:44.652Z", - "workflow_id": "p_abc123", - "deployment_id": "d_abc123", - "source_type": "SDK", - "verified": false, - "owner_id": "u_abc123", - "platform_version": "3.1.20" - }, - "error": { - "code": "InternalFailure", - "cellId": "c_abc123", - "ts": "2020-11-26T06:06:56.077Z", - "stack": " at Request.extractError ..." - }, - "metadata": { - "emitter_id": "p_abc123", - "emit_id": "1kodKnAdWGeJyhqYbqyW6lEXVAo", - "name": "$errors" - } - } - } - ] -} -``` - -## Workspaces - -[Workspaces](/workspaces/) provide your team a way to manage resources in a shared workspace. Any resources created by the workspace are owned by the workspace and accessible to its members. - -### Get a Workspace - -Programmatically view your workspace's current credit usage for the billing period in real time. - -#### Endpoint - -``` -GET /v1/workspaces/ -``` - -#### Path Parameters - -`workspaces_id` **string** - -[Switch to your workspace's context](/workspaces/#switching-between-workspaces) and [find your org's ID](/workspaces/#finding-your-workspaces-id). - -#### Example Response - -``` -{ - "data": { - "id": "o_Qa8I1Z", - "orgname": "asdf", - "name": "asdf", - "email": "dev@pipedream.com", - "daily_credits_quota": 100, - "daily_credits_used": 0 - } -} -``` - -### Get Workspaces's Connected Accounts - -Retrieve all the connected accounts for a specific workspace. - -#### Endpoint - -``` -GET /workspaces//accounts -``` - -#### Path Parameters - -`org_id` **string** - -[Switch to your workspace's context](/workspaces/#switching-between-workspaces) and [find your org's ID](/workspaces/#finding-your-workspaces-id). - -#### Query Parameters - -`query` **string** (_optional_) - -To look up the connected account information for a specific app, use the `query` query parameter to filter results for that app. You can find a given app's `query` from the [Explore](https://pipedream.com/explore) page by selecting the app, and looking at the prop definition for the app. - -#### Example Request - -```shell -curl 'https://api.pipedream.com/v1/workspaces/o_abc123/accounts?query=google_sheets' \ - -H 'Authorization: Bearer ' -``` - -#### Example Response - -```json -{ - "page_info": { - "total_count": 1, - "count": 1, - "start_cursor": "YXBuXzJrVmhMUg", - "end_cursor": "YXBuXzJrVmhMUg" - }, - "data": [ - { - "id": "apn_2kVhLR", - "name": "Google Sheets #1" - } - ] -} -``` - -### Get Workspaces's Subscriptions - -Retrieve all the [subscriptions](#subscriptions) configured for a specific workspace. - -#### Endpoint - -``` -GET /workspaces//subscriptions -``` - -#### Path Parameters - -`workspaces_id` **string** - -[Switch to your workspace's context](/workspaces/#switching-between-workspaces) and [find your org's ID](/workspaces/#finding-your-workspaces-id). - -#### Example Request - -```shell -curl 'https://api.pipedream.com/v1/workspaces/o_abc123/subscriptions' \ - -H 'Authorization: Bearer ' -``` - -#### Example Response - -```json -{ - "data": [ - { - "id": "sub_abc123", - "emitter_id": "dc_abc123", - "listener_id": "p_abc123", - "event_name": "" - }, - { - "id": "sub_def456", - "emitter_id": "dc_def456", - "listener_id": "p_def456", - "event_name": "" - } - ] -} -``` - -### Get Workspaces's Sources - -Retrieve all the [event sources](#sources) configured for a specific workspace. - -#### Endpoint - -``` -GET /orgs//sources -``` - -#### Path Parameters - -`org_id` **string** - -[Switch to your workspace's context](/workspaces/#switching-between-workspaces) and [find your org's ID](/workspaces/#finding-your-workspaces-id). - -#### Example Request - -```shell -curl 'https://api.pipedream.com/v1/orgs/o_abc123/sources' \ - -H 'Authorization: Bearer ' -``` - -#### Example Response - -```json -{ - "page_info": { - "total_count": 19, - "count": 10, - "start_cursor": "ZGNfSzB1QWVl", - "end_cursor": "ZGNfeUx1alJx" - }, - "data": [ - { - "id": "dc_abc123", - "component_id": "sc_def456", - "configured_props": { - "http": { - "endpoint_url": "https://myendpoint.m.pipedream.net" - } - }, - "active": true, - "created_at": 1587679599, - "updated_at": 1587764467, - "name": "test", - "name_slug": "test" - } - ] -} -``` diff --git a/docs-v2/pages/rest-api/rss.mdx b/docs-v2/pages/rest-api/rss.mdx deleted file mode 100644 index 306d69ebcf7af..0000000000000 --- a/docs-v2/pages/rest-api/rss.mdx +++ /dev/null @@ -1,132 +0,0 @@ -# REST API example: Create an RSS source - -Here, we'll walk through an example of how to create an RSS [event source](/workflows/building-workflows/triggers/) and retrieve events from that source using the [REST API](/rest-api/). - -Before you begin, you'll need your [Pipedream API Key](/rest-api/auth/#user-api-keys). - -## Find the details of the source you'd like to create - -To create an event source using Pipedream's REST API, you'll need two things: - -- The `key` that identifies the component by name -- The `props` - input data - required to create the source - -You can find the `key` by reviewing the code for the source, [in Pipedream's Github repo](https://github.com/PipedreamHQ/pipedream/tree/master/components). - -In the `components/` directory, you'll see a list of apps. Navigate to the app-specific directory for your source, then visit the `sources/` directory in that dir to find your source. For example, to create an RSS source, visit the [`components/rss/sources/new-item-in-feed/new-item-in-feed.js` source](https://github.com/PipedreamHQ/pipedream/blob/master/components/rss/sources/new-item-in-feed/new-item-in-feed.ts). - -The `key` is a globally unique identifier for the source. You'll see the `key` for this source near the top of the file: - -```javascript -key: "rss-new-item-in-feed", -``` - -Given this key, make an API request to the `/components/registry/{key}` endpoint of Pipedream's REST API: - -```bash -curl https://api.pipedream.com/v1/components/registry/rss-new-item-in-feed \ - -H "Authorization: Bearer XXX" -vvv \ - -H "Content-Type: application/json" -``` - -This returns information about the component, including a `configurable_props` section that lists the input you'll need to provide to create the source: - -```json -"configurable_props": [ - { - "name": "rss", - "type": "app", - "app": "rss" - }, - { - "name": "url", - "type": "string", - "label": "Feed URL", - "description": "Enter the URL for any public RSS feed." - }, - { - "name": "timer", - "type": "$.interface.timer", - "default": { - "intervalSeconds": 900 - } - } -], -``` - -In this specific case, you can ignore the `rss` "app" prop. The other two props โ€” `url` and `timer` โ€” are inputs that you can control: - -- `url`: the URL to the RSS feed -- `timer` (optional): the frequency at which you'd like to poll the RSS feed for new items. By default, this source will poll for new items every 15 minutes. - -## Creating the source - -To create an RSS event source, make an HTTP POST request to the `/v1/sources` endpoint of Pipedream's REST API, passing the `url` you'd like to poll and the frequency at which you'd like to run the source in the `timer` object. In this example, we'll run the source once every 60 seconds. - -```bash -curl https://api.pipedream.com/v1/sources \ - -H "Authorization: Bearer XXX" -vvv \ - -H "Content-Type: application/json" \ - -d '{"key": "rss-new-item-in-feed", "name": "test-rss", "configured_props": { "url": "https://rss.m.pipedream.net", "timer": { "intervalSeconds": 60 }}}' -``` - -If successful, you should get back a `200 OK` response from the API with the following payload: - -```json -{ - "data": { - "id": "dc_abc123", - "user_id": "u_abc123", - "component_id": "sc_abc123", - "configured_props": { - "url": "https://rss.m.pipedream.net", - "timer": { - "cron": null, - "interval_seconds": 60 - } - }, - "active": true, - "created_at": 1589486978, - "updated_at": 1589486978, - "name": "your-name-here", - "name_slug": "your-name-here" - } -} -``` - -Visit [https://pipedream.com/sources](https://pipedream.com/sources) to see your running source. You should see the source listed on the left with the name you specified in the API request. - -## Fetching new events - -The RSS source polls your feed URL for items at the specified frequency. It emits new items as **events** of the following shape: - -```json -{ - "permalink": "https://example.com/8161", - "guid": "https://example.com/8161", - "title": "Example post", - "link": "https://example.com/8161" -} -``` - -### SSE - -You can subscribe to new events in real time by listening to the SSE stream tied to this source. Take the `id` from the API response above โ€”ย `dc_abc123` in our example โ€”ย and make a request to this endpoint: - -```bash -curl -H "Authorization: Bearer " \ - "https://api.pipedream.com/sources/dc_abc123/sse" -``` - -[See the SSE docs for more detail on this interface](/workflows/data-management/destinations/sse/). - -### REST API - -You can also fetch items in batch using the REST API. If you don't need to act on items in real time, and just need to fetch new items from the feed on a regular interval, you can fetch events like so: - -```bash -curl -H "Authorization: Bearer " \ - "https://api.pipedream.com/v1/sources/dc_BVuN2Q/event_summaries" -``` - -[See the docs on the `/event_summaries` endpoint](/rest-api/#get-source-events) for more details on the parameters it accepts. For example, you can pass a `limit` param to return only `N` results per page, and paginate over results using the `before` and `after` cursors described in the [pagination docs](/rest-api/#pagination). diff --git a/docs-v2/pages/rest-api/webhooks.mdx b/docs-v2/pages/rest-api/webhooks.mdx deleted file mode 100644 index 9d1056f843919..0000000000000 --- a/docs-v2/pages/rest-api/webhooks.mdx +++ /dev/null @@ -1,79 +0,0 @@ -# REST API Example: Webhooks - -Pipedream supports webhooks as a way to deliver events to an endpoint you own. Webhooks are managed at an account-level, and you send data to these webhooks using [subscriptions](/rest-api/#subscriptions). - -For example, you can run a Twitter [event source](/workflows/building-workflows/triggers/) that listens for new tweets. If you [subscribe](/rest-api/#subscriptions) the webhook to this source, Pipedream will deliver those tweets directly to your webhook's URL without running a workflow. - -## Send events from an existing event source to a webhook - -[Event sources](/workflows/building-workflows/triggers/) source data from a service / API, emitting events that can trigger Pipedream workflows. For example, you can run a Github event source that emits an event anytime someone stars your repo, triggering a workflow on each new star. - -**You can also send the events emitted by an event source to a webhook**. - -![Github stars to Pipedream](/images/rest-api/webhook-proxy.png) - -### Step 1 - retrieve the source's ID - -First, you'll need the ID of your source. You can visit [https://pipedream.com/sources](https://pipedream.com/sources), select a source, and copy its ID from the URL. It's the string that starts with `dc_`: - -![Source ID](/images/rest-api/source-id.png) - -You can also find the ID by running `pd list sources` using [the CLI](/components/contributing/cli/reference/#pd-list). - -### Step 2 - Create a webhook - -You can create a webhook using the [`POST /webhooks` endpoint](/rest-api/#create-a-webhook). The endpoint accepts 3 params: - -- `url`: the endpoint to which you'd like to deliver events -- `name`: a name to assign to the webhook, for your own reference -- `description`: a longer description - -You can make a request to this endpoint using `cURL`: - -```bash -curl "https://api.pipedream.com/v1/webhooks?url=https://endpoint.m.pipedream.net&name=name&description=description" \ - -X POST \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -Successful API responses contain a webhook ID in `data.id` โ€” the string that starts with `wh_` โ€” which you'll use in **Step 3**: - -```json -{ - "data": { - "id": "wh_abc123" - ... - } -} -``` - -### Step 3 - Create a subscription - -[Subscriptions](/rest-api/#subscriptions) allow you to deliver events from one Pipedream resource to another. In the language of subscriptions, the webhook will **listen** for events **emitted** by the event source. - -You can make a request to the [`POST /subscriptions` endpoint](/rest-api/#listen-for-events-from-another-source-or-workflow) to create this subscription. This endpoint requires two params: - -- `emitter_id`: the source ID from **Step 1** -- `listener_id`: the webhook ID from **Step 2** - -You can make a request to this endpoint using `cURL`: - -```bash -curl "https://api.pipedream.com/v1/subscriptions?emitter_id=dc_abc123&listener_id=wh_abc123" \ - -X POST \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -If successful, this endpoint should return a `200 OK` with metadata on the subscription. - -### Step 4 - Trigger an event - -Trigger an event in your source (for example, send a tweet, star a Github repo, etc). You should see the event emitted by the source delivered to the webhook URL. - -## Extending these ideas - -You can configure _any_ events to be delivered to a webhook: events emitted by event source, or those [emitted by a workflow](/workflows/data-management/destinations/emit/). - -You can also configure an event to be delivered to _multiple_ webhooks by creating multiple webhooks / subscriptions. diff --git a/docs-v2/pages/rest-api/workflows.mdx b/docs-v2/pages/rest-api/workflows.mdx deleted file mode 100644 index 30fcc40b6d6de..0000000000000 --- a/docs-v2/pages/rest-api/workflows.mdx +++ /dev/null @@ -1,255 +0,0 @@ -import Callout from '@/components/Callout' -import { Steps } from 'nextra/components' - -# Example: Create a Workflow - -Here, we'll walk through an example of how to create a [workflow](/workflows/building-workflows/) programmatically using the [create workflow endpoint](/rest-api/#create-a-workflow) from a [workflow share link](/workflows/building-workflows/sharing/), and pass your own connected accounts, step and trigger props as configuration. - -Before you begin, you'll need your [Pipedream API Key](/rest-api/auth/#user-api-keys). - -## Creating a new workflow from a template - -Workflows can be shared as templates using a [Workflow Share Link](/workflows/building-workflows/sharing/). When you share a workflow, a unique key is created that represents that workflow's triggers, steps and settings. - -However, opening workflow share link with a browser will not include sharing private resources - such as connected accounts, sources and data stores. Connections to your private resources have to be populated by hand. - -The [create workflow endpoint](/rest-api/#create-a-workflow) allows you to programmatically assign your own connected accounts, props within the workflow, and even deploy the workflow in a single API request. - - - -### Create a workflow share link - -First, you'll need a workflow template. To create a new workflow template, follow this short guide. - -A workflow share link has the following format: - -``` -https://pipedream.com/new?h=tch_abc123 -``` - -The `tch_abc123` portion of the URL represents the unique workflow template ID. Copy this, you'll need it in the following steps. - - -**You can create workflows from any workflow template** - -You're not limited to creating new workflows from your own templates, you can create your own workflows using this endpoint with any workflow share link. - -This guide will also work for any workflow share link, although we recommend copying the workflow to your account first so you can view the workflow's available configurable props. - - -### Create the workflow, and view the parameters - -You'll need to view the original workflow's configuration so you can identify the props you'll need to provide for the new version of the workflow. - -Use the **Get Workflow** endpoint to retrieve the details about the workflow you've created a template for. - -In the Get Workflow API response, you'll see two properties: - -* `triggers` - represents the triggers for the workflow. -* `steps` - represents the series of steps within your workflow - -`triggers` and `steps` contain [props](/workflows/building-workflows/using-props/) that define the connected accounts as well as configuration. - -The next step is to learn how we can pass our specific connected accounts to app based props in the `steps` and/or `triggers` of the workflow template. - -Within the `steps` and `triggers`, find the `configurable_props` for the trigger. Here is where you can find the available slots that you can programmtically provide configuration for the **Create Workflow** endpoint: - -```json {6-11,27-41} -// Example of a Get Workflow response -{ - "triggers": [ - { - "id": "dc_abc123", - "configurable_props": [ - { - "name": "url", - "type": "string" - } - ], - "configured_props": {}, - "active": true, - "created_at": 1707170044, - "updated_at": 1707170044, - "name": "New Item in Feed", - "name_slug": "new-item-in-feed" - }, - ], - "steps": [ - { - "namespace": "send_message", - "lang": "nodejs20.x", - "component": true, - "savedComponent": { - "id": "sc_abc123", - "configurableProps": [ - { - "name": "slack", - "type": "app", - "app": "slack" - }, - { - "name": "channelId", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - } - } - ] -} -``` - -For the example workflow above, the RSS feed trigger has a `url` property, and the Slack step as a `slack`, `channelId` and `message` property. We'll use these names in the next steps as arguments for the **Create Workflow** endpoint. - - -### Design the payload - -Now that we have the names of the configurable props for both the `triggers` and `steps` of the workflow, let's design the payload for creating a new instance of the workflow. - -First, populate the `project_id` and `org_id` where you'd like this new workflow to be instantiated under. Please refer to the [**Create Workflow** parameters documentation](/rest-api/#create-a-workflow) on how to find these values. - -The `template_id` for your workflow can be found from the URL of the workflow share link you created in **Step 1** of this guide. - -The `trigger` as a `url` prop, so let's provide it with a specific URL (`https://hnrss.org/newest?q=Pipedream`) for this new workflow: - -```json {7-11} -// Example of a Create Workflow request payload -{ - "project_id": "proj_abc123", - "org_id": "o_abc123", - "template_id": "tch_abc123", - "triggers": [ - { - "props": { - "url": "https://hnrss.org/newest?q=Pipedream" - } - } - ] -} -``` - - -**Triggers are addressable by index** - -You may have noticed that we didn't include the `namespace` argument to the trigger in our payload. This is because triggers are ordered sequentially, whereas steps need a `namespace` argument for proper addressing. - - -If we were to send this payload to the **Create Workflow** endpoint now, it will populate the *RSS - New Item in Feed* trigger with the feed we provided. - -You can also populate the `steps` props. - -The **Slack - Send message in a Public Channel** step requires a `channelId`, `message` and the connected Slack account (`slack`). Let's start with connecting the Slack account. - -#### Find your connected accounts - -To connect your accounts to the workflow, you'll need to find the specific IDs for each of the accounts you'd like to connect. - -You can find your connected account IDs by using the [List Accounts endpoint](/rest-api/#get-workspacess-connected-accounts). - -You can filter your accounts by using the `query` query parameter. For example, if you want to find your connected Slack accounts to your workspace, then add `slack` to the query param: - -``` -GET /workflows/workspaces//accounts?query=slack -``` - -This request will narrow down the results to your connected Slack accounts, for easier finding. - -You'll need the ID of each connected account you'd like to configure this new workflow with. Copy down the `apn_******` value of the connected accounts from the response you'd like to use for the steps. - -```json {10} -{ - "page_info": { - "total_count": 1, - "count": 1, - "start_cursor": "YXBuXzJrVmhMUg", - "end_cursor": "YXBuXzJrVmhMUg" - }, - "data": [ - { - "id": "apn_abc123", - "name": "Slack Pipedream Workspace" - } - ] -} -``` - -Now we can copy the ID for our Slack account from the response: `apn_abc123`. - -Given we now have the connected account ID, we can design the rest of the payload: - -```json {13-21} -{ - "project_id": "proj_abc123", - "org_id": "o_abc123", - "template_id": "tch_3BXfWO", - "triggers": [ - { - "props": { - "url": "https://hnrss.org/newest?q=Pipedream" - } - } - ], - "steps": [ - { - "namespace": "send_message", - "props": { - "slack": { - "authProvisionId": "apn_abc123", - } - "channelId": "U12356", - "message": "**New HackerNews Mention** \n \n {{steps.trigger.event.item.title}} \n {{steps.trigger.event.item.description}}" - } - } - ] -} -``` -Our payload now instructs Pipedream to set up the `send_message` step in our workflow with our connected Slack account and specific `channelId` and `message` parameters. - -### Define settings (optional) - -You can also define workflow settings such as the workflows, name, allocated memory, or if it should be deployed immediately: - -```json {24-27} -{ - "project_id": "proj_abc123", - "org_id": "o_abc123", - "template_id": "tch_3BXfWO", - "triggers": [ - { - "props": { - "url": "https://hnrss.org/newest?q=Pipedream" - } - } - ], - "steps": [ - { - "namespace": "send_message", - "props": { - "slack": { - "authProvisionId": "apn_abc123", - } - "channelId": "U12356", - "message": "**New HackerNews Mention** \n \n {{steps.trigger.event.item.title}} \n {{steps.trigger.event.item.description}}" - } - } - ], - "settings": { - "name": "New HackerNews Mentions to Slack", - "auto_deploy": true - } -} -``` - -The `auto_deploy` option instructs Pipedream to deploy this workflow automatically, without requiring a manual deployment from the dashboard. - -### Send the request - -Finally, send the request to create this new workflow with this payload we've designed. - -You should see the new workflow within your Pipedream dashboard under the workspace and project defined in the payload. - -You can use this request to dynamically create new instances of the same workflow with different props, connected accounts and settings. - diff --git a/docs-v2/pages/troubleshooting.mdx b/docs-v2/pages/troubleshooting.mdx deleted file mode 100644 index 8f819d86559fc..0000000000000 --- a/docs-v2/pages/troubleshooting.mdx +++ /dev/null @@ -1,311 +0,0 @@ -import Callout from '@/components/Callout' - -# Troubleshooting Common Issues - -This doc describes some common solutions for fixing issues with [pipedream.com](https://pipedream.com) or with a specific workflow. - -## A feature isn't working on pipedream.com - -If you're seeing an issue with [pipedream.com](https://pipedream.com) (for example, the site won't load, or you think you've found a bug), try each of the following steps, checking to see if they fix the problem: - -1. [Hard refresh](https://fabricdigital.co.nz/blog/how-to-hard-refresh-your-browser-and-clear-cache) pipedream.com in your browser. - -2. Log out of your pipedream.com account, and log back in. - -3. [Disable your browser extensions](https://www.computerhope.com/issues/ch001411.htm) or use features like [Chrome Guest mode](https://support.google.com/chrome/answer/6130773?hl=en&co=GENIE.Platform%3DAndroid) to browse pipedream.com without any existing extensions / cookies / cache. - -If you're still seeing the issue after trying these steps, please [report a bug](https://github.com/PipedreamHQ/pipedream/issues/new?assignees=&labels=bug&template=bug_report.md&title=%5BBUG%5D+). - -## How do I contact Pipedream Support? - -Start by filling out the request form at [https://pipedream.com/support](https://pipedream.com/support), providing detailed information about your issue. - -### How do I share my workflow with Support? - -First, navigate to your **Project Settings** and share your project with Pipedream Support. - -When filling out the request form at [https://pipedream.com/support](https://pipedream.com/support), please provide detailed information along with the URL from your browser's address bar, which should look something like: - -``` -https://pipedream.com/@yourworkspace/projects/proj_abc123/test-workflow-p_abc123/inspect -``` - -## Workflows - -### Where do I find my workflow's ID? - -Open [https://pipedream.com](https://pipedream.com) and visit your workflow. Copy the URL that appears in your browser's address bar. For example: - -``` -https://pipedream.com/@yourworkspace/projects/proj_abc123/test-workflow-p_abc123/inspect - -``` - -Your workflow's ID is the value that starts with `p_`. In this example: `p_abc123`. - -### My workflow isn't working - -If you're encountering a specific issue in a workflow, try the following steps, checking to see if they fix the problem: - -1. Make a trivial change to your workflow, and **Deploy** your workflow again. - -2. Try searching [the community](https://pipedream.com/support) or [the `pipedream` GitHub repo](https://github.com/PipedreamHQ/pipedream/issues) to see if anyone else has solved the same issue. - -If you're still seeing the issue after trying these steps, please reach out in [the community](https://pipedream.com/support). - -### Error in workflow - -If you see a generic `Error in workflow` when invoking a webhook-triggered workflow, follow these steps to resolve the issue: -1. Check if your trigger is configured to return a custom HTTP response. -2. Confirm that your workflow is [returning an HTTP response](https://pipedream.com/docs/workflows/building-workflows/triggers/#customizing-the-http-response) in *every* situation, e.g., by using `$.respond()`. - -### How do I invoke another workflow? - -We provide a [Trigger Workflow](https://pipedream.com/apps/helper-functions/actions/trigger-workflow) action in the [Helper Functions](https://pipedream.com/apps/helper-functions) app. [See more here](/workflows/building-workflows/code/nodejs/#invoke-another-workflow). - -Another option is to make an HTTP request to a Pipedream HTTP webhook trigger. - -## Triggers - -### Why is my trigger not saving? - -If your trigger continuously spins without saving, it might be processing too much data at once or taking longer than expected. This issue often occurs with polling database-related triggers (e.g., PostgreSQL, Snowflake, Notion Databases). To resolve it, try reducing the volume of data fetched, e.g., by limiting the number of rows returned in your query. - -### Why is my trigger not emitting events? - -First, look at your [trigger logs](/troubleshooting/#where-can-i-find-the-trigger-logs) and check for any errors there. Verify that it has been running, whether on a new webhook event or at the configured polling interval. - -If your trigger operates on a large amount of data at once, it may fail to log the execution and you won't see any new events and logs. Try polling more frequently or limiting the number of records being fetched in the API request or Database query. - -#### Webhook-based instant sources - -These sources will get triggered immediately. But because events come in in real-time, most will **not** automatically fetch historical events upon creation. To surface test events in your workflow while building, you'll need to generate an eligible event in the selected app. - -For example, if you've configured the "[Message Updates (Instant)](https://pipedream.com/apps/telegram-bot-api/triggers/message-updates) Telegram source, you'll need to send a message in the Telegram account you've selected in order for an event to appear. - -![Select an event](https://res.cloudinary.com/pipedreamin/image/upload/v1653434586/docs/webhook-triggers-select-event_qj7nlp.png) - -Sources for apps like [Telegram](https://pipedream.com/apps/telegram-bot-api/triggers/message-updates) and [Google Sheets](https://pipedream.com/apps/google-sheets/triggers/new-row-added) use webhooks and get triggered immediately. - -#### Timer-based polling sources - -These sources will fetch new events on a regular interval, based on a schedule you specify in the trigger configuration. - -![Configure polling timer](https://res.cloudinary.com/pipedreamin/image/upload/v1653434591/docs/polling-triggers-timer_ooz26c.png) - -In most cases, Pipedream will automatically fetch recent historical events to help enable easier workflow development. Sources for apps like [Twitter](https://pipedream.com/apps/twitter/triggers/search-mentions) and [Spotify](https://pipedream.com/apps/spotify/triggers/new-playlist) require we poll their endpoints in order to fetch new events. - -### Where do I find my event source's ID? - -Open [https://pipedream.com/sources](https://pipedream.com/sources) and click on your event source. Copy the URL that appears in your browser's address bar. For example: - -``` -https://pipedream.com/sources/dc_abc123 -``` - -Your source's ID is the value that starts with `dc_`. In this example: `dc_abc123`. - -### Where can I find the trigger logs? - -Find your [source](/troubleshooting/#where-do-i-find-my-event-sources-id), then click on the logs or visit this URL: - -``` -https://pipedream.com/sources/dc_abc123/logs -``` - -### Why is my trigger paused? - -Pipedream automatically disables sources with a 100% error rate in the past 5 days for accounts on the Free plan. - -To troubleshoot, you can look at the errors in the [source](/workflows/building-workflows/triggers/) logs, and may need to reconnect your account and re-enable the source for it to run again. If the issue persists, please reach out in [the community](https://pipedream.com/support). - -## Warnings - -Pipedream displays warnings below steps in certain conditions. These warnings do not stop the execution of your workflow, but can signal an issue you should be aware of. - -### Code was still running when the step ended - -This error occurs when Promises or asynchronous code is not properly finished before the next step begins execution. - -See the [Asynchronous section of the Node.js documentation](/workflows/building-workflows/code/nodejs/async/#the-problem) for more details. - -### Undeployed changes โ€” You have made changes to this workflow. Deploy the latest version from the editor - -On workflows that are not [synced with GitHub](/workflows/git/), you may notice the following warning at the top of your workflow: - -> **Undeployed changes** โ€” You have made changes to this workflow. Deploy the latest version from the editor - -This means that you've made some changes to your workflow that you haven't yet deployed. To see a diff of what's changed, we recommend [enabling GitHub sync](/workflows/git/), where you'll get a full commit history of changes made to your workflows, synced to your own GitHub repo. - -## Errors - -### Limit Exceeded Errors - -Pipedream sets [limits](/workflows/limits/) on runtime, memory, and other execution-related properties. If you exceed these limits, you'll receive one of the errors below. [See the limits doc](/workflows/limits/) for details on specific limits. - -### Quota Exceeded - -On the Free tier, Pipedream imposes a limit on the [daily credits](/workflows/limits/#daily-credits-limit) across all workflows and sources. If you hit this limit, you'll see a **Quota Exceeded** error. - -Paid plans have no credit limit. [Upgrade here](https://pipedream.com/pricing). - -### Runtime Quota Exceeded - -You **do not** use credits testing workflows, but workspaces on the **Free** plan are limited to {process.env.DAILY_TESTING_LIMIT} of test runtime per day. If you exceed this limit when testing in the builder, you'll see a **Runtime Quota Exceeded** error. - -### Timeout - -Event sources and workflows have a [default time limit on a given execution](/workflows/limits/#time-per-execution). If your code exceeds that limit, you may encounter a **Timeout** error. - -To address timeouts, you'll either need to: - -1. Figure out why your code is running for longer than expected. It's important to note that **timeouts are not an issue with Pipedream โ€” they are specific to your workflow**. Often, you're making a request to a third party API that doesn't respond in the time you expect, or you're processing a large amount of data in your workflow, and it doesn't complete before you hit the execution limit. -2. If it's expected that your code is taking a long time to run, you can raise the execution limit of a workflow in your [workflow's settings](/workflows/building-workflows/settings/#execution-timeout-limit). If you need to change the execution limit for an event source, please [reach out to our team](https://pipedream.com/support/). - -### Out of Memory - -Pipedream [limits the default memory](/workflows/limits/#memory) available to workflows and event sources. If you exceed this memory, you'll see an **Out of Memory** error. **You can raise the memory of your workflow [in your workflow's Settings](/workflows/building-workflows/settings/#memory)**. - - -Even though the event may appear to have stopped at the trigger, the workflow steps were executed. We currently are unable to pinpoint the exact step where the OOM error occurred. - - -This can happen for two main reasons: - -1. Even for small files or objects, avoid loading the entire content into memory (e.g., by saving it in a variable). Always stream files to/from disk to prevent potential memory leaks, using a [technique like this](/workflows/building-workflows/code/nodejs/http-requests/#download-a-file-to-the-tmp-directory). -2. When you have many steps in your Pipedream workflow. When your workflow runs, Pipedream runs a separate process for each step in your workflow. That incurs some memory overhead. Typically this happens when you have more than 8-10 steps. When you see an OOM error on a workflow with many steps, try increasing the memory. - -### Rate Limit Exceeded - -Pipedream limits the number of events that can be processed by a given interface (e.g. HTTP endpoints) during a given interval. This limit is most commonly reached for HTTP interfaces - see the [QPS limits documentation](/workflows/limits/#qps-queries-per-second) for more information on that limit. - -**This limit can be raised for HTTP endpoints**. [Reach out to our team](https://pipedream.com/support/) to request an increase. - -### Request Entity Too Large - -By default, Pipedream limits the size of incoming HTTP payloads. If you exceed this limit, you'll see a **Request Entity Too Large** error. - -Pipedream supports two different ways to bypass this limit. Both of these interfaces support uploading data up to `5TB`, though you may encounter other [platform limits](/workflows/limits/). - -- You can send large HTTP payloads by passing the `pipedream_upload_body=1` query string or an `x-pd-upload-body: 1` HTTP header in your HTTP request. [Read more here](/workflows/building-workflows/triggers/#sending-large-payloads). -- You can upload multiple large files, like images and videos, using the [large file upload interface](/workflows/building-workflows/triggers/#large-file-support). - -### Function Payload Limit Exceeded - -The total size of `console.log()` statements, [step exports](/workflows/#step-exports), and the original event data sent to workflows and sources cannot exceed a combined size of {process.env.FUNCTION_PAYLOAD_LIMIT}. If you produce logs or step exports larger than this - for example, passing around large API responses, CSVs, or other data - you may encounter a **Function Payload Limit Exceeded** in your workflow. - -Often, this occurs when you pass large data between steps using [step exports](/workflows/#step-exports). You can avoid this error by [writing that data to the `/tmp` directory](/workflows/building-workflows/code/nodejs/working-with-files/#writing-a-file-to-tmp) in one step, and [reading the data into another step](/workflows/building-workflows/code/nodejs/working-with-files/#reading-a-file-from-tmp), which avoids the use of step exports and should keep you under the payload limit. - -Pipedream also compresses the function payload from your workflow, which can yield roughly a 2x-3x increase in payload size (somewhere between `12MB` and `18MB`), depending on the data. - -### JSON Nested Property Limit Exceeded - -Working with nested JavaScript objects that have more than 256 nested objects will trigger a **JSON Nested Property Limit Exceeded** error. - -Often, objects with this many nested objects result from a programming error that explodes the object in an unexpected way. Please confirm the code you're using to convert data into an object is correctly parsing the object. - -### Event Queue Full - -Workflows have a maximum event queue size when using concurrency and throttling controls. If the number of unprocessed events exceeds the [maximum queue size](/workflows/building-workflows/settings/concurrency-and-throttling/#increasing-the-queue-size-for-a-workflow), you may encounter an **Event Queue Full** error. - -[Paid plans](https://pipedream.com/pricing) can [increase their queue size up to {process.env.MAX_WORKFLOW_QUEUE_SIZE}](/workflows/building-workflows/settings/concurrency-and-throttling/#increasing-the-queue-size-for-a-workflow) for a given workflow. - -### Credit Budget Exceeded - -Credit Budgets are configurable limits on your credit usage at the account or workspace level. - -If you're receiving this warning on a source or workflow, this means your allocated Credit Budget has been reached for the defined period. - -You can increase this limit at any time in the [billing area of your settings](https://pipedream.com/settings/billing). - -### Pipedream Internal Error - -A `Pipedream Internal Error` is thrown whenever there's an exception during the building or executing of a workflow that's outside the scope of the code for the individual components (steps or actions). - -There are a few known ways this can be caused and how to solve them. - -## Out of date actions or sources - -Pipedream components are updated continously. But when new versions of actions and sources are published to the Pipedream Component Registry, your workflows are not updated by default. - -[An **Update** prompt](/workflows/building-workflows/actions/#updating-actions-to-the-latest-version) is shown in the in the top right of the action if the component has a new version available. - -Sources do not feature an update button at this time, to receive the latest version, you'll need to create a new source, then attach it to your workflow. - -### New package versions issues - -If an NPM or PyPI package throws an error during either the building of the workflow or during it's execution, it may cause a `Pipedream Internal Error`. - -By default, Pipedream automatically updates NPM and PyPI packages to the latest version available. This is designed to make sure your workflows receive the latest package updates automatically. - -However, if a new package version includes bugs, or changes it's export signature, then this may cause a `Pipedream Internal Error`. - -You can potentially fix this issue by downgrading packages by pinning in [your Node.js](/workflows/building-workflows/code/nodejs/#pinning-package-versions) or [Python code steps](/workflows/building-workflows/code/python/#pinning-package-versions) to the last known working version. - -Alternatively, if the error is due to a major release that changes the import signature of a package, then modifying your code to match the signature may help. - - -Some Pipedream components use NPM packages - -Some Pipedream components like pre-built [actions and triggers for Slack use NPM packages](https://github.com/PipedreamHQ/pipedream/blob/9aea8653dc65d438d968971df72e95b17f52d51c/components/slack/slack.app.mjs#L1). - -In order to downgrade these packages, you'll need to fork the Pipedream Github Repository and deploy your own changes to test them privately. Then you can [contribute the fix back into the main Pipedream Repository](/components/contributing/#contribution-process). - - -### Packages consuming all available storage - -A `Pipedream Internal Error` could be the result of NPM or PyPI packages using the entireity of the workflow's storage capacity. - -The `lodash` library for example will import the entire package if individual modules are imported with this type of signature: - -```javascript -// This style of import will cause the entire lodash package to be installed, not just the pick module -import { pick } from "lodash" -``` - -Instead, use the specific package that exports the `pick` module alone: - -```javascript -// This style imports only the pick module, since the lodash.pick package only contains this module -import pick from "lodash.pick" -``` - -## Is there a way to replay workflow events programmatically? - -Not via the API, but you can bulk select and replay failed events using the [Event History](/workflows/event-history/). - -## How do I store and retrieve data across workflow executions? - -If you operate your own database or data store, you can connect to it directly in Pipedream. - -Pipedream also operates a [built-in key-value store](/workflows/data-management/data-stores/) that you can use to get and set data across workflow executions and different workflows. - -## How do I delay the execution of a workflow? - -Use Pipedream's [built-in Delay actions](/workflows/building-workflows/control-flow/delay/) to delay a workflow at any step. - -## How can my workflow run faster? - -Here are a few things that can help your workflow execute faster: - -1. **Increase memory:** Increase your [workflow memory](/workflows/building-workflows/settings/#memory) to at least 512 MB. Raising the memory limit will proportionally increase CPU resources, leading to improved performance and reduced latency. - -2. **Return static HTTP responses:** If your workflow is triggered by an HTTP source, return a [static HTTP response](/workflows/building-workflows/triggers/#http-responses) directly from the trigger configuration. This ensures the HTTP response is sent to the caller immediately, before the rest of the workflow steps are executed. - -3. **Simplify your workflow:** Reduce the number of [steps](/workflows/#code-actions) and [segments](/workflows/building-workflows/control-flow/#workflow-segments) in your workflow, combining multiple steps into one, if possible. This lowers the overhead involved in managing step execution and exports. - -4. **Activate warm workers:** Use [warm workers](/workflows/building-workflows/settings/#eliminate-cold-starts) to reduce the startup time of workflows. Set [as many warm workers](/workflows/building-workflows/settings/#how-many-workers-should-i-configure) as you want for high-volume traffic. - -## How can I save common functions as steps? - -You can create your own custom triggers and actions ("components") on Pipedream using [the Component API](/components/contributing/api/). These components are private to your account and can be used in any workflow. - -You can also publish common functions in your own package on a public registry like [npm](https://www.npmjs.com/) or [PyPI](https://pypi.org/). - -## Is Puppeteer supported in Pipedream? - -Yes, see [our Puppeteer docs](/workflows/building-workflows/code/nodejs/browser-automation/#puppeteer) for more detail. - -## Is Playwright supported in Pipedream? - -Yes, see [our Playwright docs](/workflows/building-workflows/code/nodejs/browser-automation/#playwright) for more detail. diff --git a/docs-v2/pages/workflows/_meta.tsx b/docs-v2/pages/workflows/_meta.tsx deleted file mode 100644 index 68e576ea05d00..0000000000000 --- a/docs-v2/pages/workflows/_meta.tsx +++ /dev/null @@ -1,12 +0,0 @@ -export default { - "index": "Overview", - "quickstart": "Quickstart", - "building-workflows": "Building Workflows", - "data-management": "Data Management", - "event-history": "Event History", - "environment-variables": "Environment Variables", - "git": "GitHub Sync", - "domains": "Custom Domains", - "vpc": "Virtual Private Clouds", - "limits": "Limits", -} as const diff --git a/docs-v2/pages/workflows/building-workflows/_meta.tsx b/docs-v2/pages/workflows/building-workflows/_meta.tsx deleted file mode 100644 index 42bee16c86848..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/_meta.tsx +++ /dev/null @@ -1,16 +0,0 @@ -export default { - "triggers": "Triggers", - "sources": { - "title": "Sources", - "display": "hidden", - }, - "actions": "Actions", - "http": "HTTP", - "using-props": "Using Props", - "code": "Write your own code", - "control-flow": "Control Flow", - "inspect": "Inspect events", - "errors": "Handling errors", - "sharing": "Sharing workflows", - "settings": "Settings", -} as const diff --git a/docs-v2/pages/workflows/building-workflows/actions.mdx b/docs-v2/pages/workflows/building-workflows/actions.mdx deleted file mode 100644 index bf28ffc496aa7..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/actions.mdx +++ /dev/null @@ -1,39 +0,0 @@ -# Actions - -Actions are reusable code steps that integrate your apps, data and APIs. For example, you can send HTTP requests to an external service using our HTTP actions, or use our Google Sheets actions to add new data. You can use thousands of actions across {process.env.PUBLIC_APPS}+ apps today. - -Typically, integrating with these services requires custom code to manage connection logic, error handling, and more. Actions handle that for you. You only need to specify the parameters required for the action. For example, the HTTP `GET` Request action requires you enter the URL whose data you want to retrieve. - -You can also [create your own actions](#creating-your-own-actions) that can be shared across your own workflows, or published to all Pipedream users. - -## Using Existing Actions - -Adding existing actions to your workflow is easy: - -1. Click the **+** button below any step. -2. Search for the app you're looking for and select it from the list. -3. Search for the action and select it to add it to your workflow. - -For example, here's how to add the HTTP `GET` Request action: - -![Adding HTTP GET request action](https://res.cloudinary.com/pipedreamin/image/upload/v1710509483/docs/docs/workflows/CleanShot_2024-03-15_at_09.30.51_lquom2.gif) - -## Updating actions to the latest version - -When you use existing actions or create your own, you'll often want to update an action you added to a workflow to the newest version. For example, the community might publish a new feature or bug fix that you want to use. - -In your code steps with out of date actions, you'll see a button appear that will update your action to the latest version. Click on this button to update your code step: - -![Updating an action to the latest version](/images/actions/update-action-button.png) - -## Creating your own actions - -You can author your own actions on Pipedream, too. Anytime you need to reuse the same code across steps, consider making that an action. - -Start with our [action development quickstart](/components/contributing/actions-quickstart/). You can read more about all the capabilities of actions in [our API docs](/components/contributing/api/), and review [example actions here](/components/contributing/api/#example-components). - -You can also publish actions to [the Pipedream registry](/components/contributing/), which makes them available for anyone on Pipedream to use. - -## Reporting a bug / feature request - -If you'd like to report a bug, request a new action, or submit a feature request for an existing action, [open an issue in our GitHub repo](https://github.com/PipedreamHQ/pipedream). diff --git a/docs-v2/pages/workflows/building-workflows/code/_meta.tsx b/docs-v2/pages/workflows/building-workflows/code/_meta.tsx deleted file mode 100644 index 540119f98bc88..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/_meta.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default { - "index": "Overview", - "nodejs": "Node.js", - "python": "Python", - "go": "Go", - "bash": "Bash", -} as const diff --git a/docs-v2/pages/workflows/building-workflows/code/bash.mdx b/docs-v2/pages/workflows/building-workflows/code/bash.mdx deleted file mode 100644 index fb4a1384c950b..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/bash.mdx +++ /dev/null @@ -1,182 +0,0 @@ -import Callout from '@/components/Callout' - -# Bash - -Prefer to write quick scripts in Bash? We've got you covered. You can run any Bash in a Pipedream step within your workflows. - -Within a Bash step, you can [share data between steps](/workflows/building-workflows/code/bash/#sharing-data-between-steps) and [access environment variables](/workflows/building-workflows/code/bash/#using-environment-variables). But you can't connect accounts, return HTTP responses, or take advantage of other features available in the [Node.js](/workflows/building-workflows/code/nodejs/) environment at this time. - -## Adding a Bash code step - -1. Click the + icon to add a new step -2. Click **Custom Code** -3. In the new step, select the `bash` runtime in language dropdown - -## Logging and debugging - -When it comes to debugging Bash scripts, `echo` is your friend. - -Your `echo` statements will print their output in the workflow step results: - -```bash -MESSAGE='Hello world' - -# The message will now be available in the "Result > Logs" area in the workflow step -echo $MESSAGE -``` - -## Available binaries - -Bash steps come with many common and useful binaries preinstalled and available in `$PATH` for you to use out of the box. These binaries include but aren't limited to: - -- `curl` for making HTTP requests -- `jq` for manipulating and viewing JSON data -- `git` for interacting with remote repositories - -If you need a package pre-installed in your Bash steps, [just ask us](https://pipedream.com/support). Otherwise, you can use the `/tmp` directory to download and install software from source. - -## Sharing data between steps - -A step can accept data from other steps in the same workflow, or pass data downstream to others. - -### Using data from another step - -In Bash steps, data from the initial workflow trigger and other steps are available in the `$PIPEDREAM_STEPS` environment variable. - -In this example, we'll pretend this data is coming into our HTTP trigger via a POST request. - -```json -{ - "id": 1, - "name": "Bulbasaur", - "type": "plant" -} -``` - -In our Bash script, we can access this data via the `$PIPEDREAM_STEPS` file. Specifically, this data from the POST request into our workflow is available in the `trigger` object. - -```bash -cat $PIPEDREAM_STEPS | jq .trigger.event - -# Results in { id: 1, name: "Bulbasaur", type: "plant" } -``` - - -The period (`.`) in front the `trigger.event` in the example is not a typo. This is to define the starting point for `jq` to traverse down the JSON in the HTTP response. - - -### Sending data downstream to other steps - -To share data for future steps to use downstream, append it to the `$PIPEDREAM_EXPORTS` file. - -```bash -# Retrieve the data from an API and store it in a variable -DATA=`curl --silent https://pokeapi.co/api/v2/pokemon/charizard` - -# Write data to $PIPEDREAM_EXPORTS to share with steps downstream -EXPORT="key:json=${DATA}" -echo $EXPORT >> $PIPEDREAM_EXPORTS -``` - - -Not all data types can be stored in the `$PIPEDREAM_EXPORTS` data shared between workflow steps. - -You can only export JSON-serializable data from Bash steps. - - -## Using environment variables - -You can leverage any [environment variables defined in your Pipedream account](/workflows/environment-variables/) in a bash step. This is useful for keeping your secrets out of code as well as keeping them flexible to swap API keys without having to update each step individually. - -To access them, just append the `$` in front of the environment variable name. - -```bash -echo $POKEDEX_API_KEY -``` - -Or an even more useful example, using the stored environment variable to make an authenticated API request. - -```bash -curl --silent -X POST -h "Authorization: Bearer $TWITTER_API_KEY" https://api.twitter.com/2/users/@pipedream/mentions -``` - -## Making a `GET` request - -You can use `curl` to perform `GET` requests. - -```bash -# Get the current weather in San Francisco -WEATHER=`curl --silent https://wttr.in/San\ Francisco\?format=3` - -echo $WEATHER -# Produces: -# San Francisco: ๐ŸŒซ +48ยฐF -``` - - -Use the `--silent` flag with `curl` to suppress extra extra diagnostic information that `curl` produces when making requests. - -This enables you to only worry about the body of the response so you can visualize it with tools like `echo` or `jq`. - - -## Making a `POST` request - -```bash -curl --silent -X POST https://postman-echo.com/post -d 'name=Bulbasaur&id=1' - -# To store the API response in a variable, interpolate the response into a string and store it in variable -RESPONSE=`curl --silent -X POST https://postman-echo.com/post -d 'name=Bulbasaur&id=1'` - -# Now the response is stored as a variable -echo $RESPONSE -``` - -## Using API key authentication - -Some APIs require you to authenticate with a secret API key. - -`curl` has an `-h` flag where you can pass your API key as a token. - -For example, here's how to retrieve mentions from the Twitter API: - -```bash -# Define the "Authorization" header to include your Twitter API key -curl --silent -X POST -h "Authorization: Bearer $()" https://api.twitter.com/2/users/@pipedream/mentions -``` - -## Raising exceptions - -You may need to stop your step immediately. You can use the normal `exit` function available in Bash to quit the step prematurely. - -```bash -echo "Exiting now!" 1>&2 -exit 1 -``` - - -Using `exit` to quit a Bash step early _won't_ stop the execution of the rest of the workflow. - -Exiting a Bash step will only apply that particular step in the workflow. - - -This will exit the step and output the error message to `stderr` which will appear in the results of the step in the workflow. - -## File storage - -If you need to download and store files, you can write them to the `/tmp` directory. - -### Writing a file to /tmp - -Download a file to `/tmp` using `curl` - -```bash -# Download the current weather in Cleveland in PNG format -curl --silent https://wttr.in/Cleveland.png --output /tmp/weather.png - -# Output the contents of /tmp to confirm the file is there -ls /tmp -``` - - -The `/tmp` directory does not have unlimited storage. Please refer to the [disk limits](/workflows/limits/#disk) for details. - diff --git a/docs-v2/pages/workflows/building-workflows/code/go.mdx b/docs-v2/pages/workflows/building-workflows/code/go.mdx deleted file mode 100644 index 7f9b4aab7c5cb..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/go.mdx +++ /dev/null @@ -1,426 +0,0 @@ -import Callout from '@/components/Callout' - -# Go - -Pipedream supports [Go v{process.env.GO_LANG_VERSION}](https://go.dev) in workflows. You can use any of the [Go packages available](https://pkg.go.dev/) with a simple `import` โ€” no `go get` needed. - -When you write Go code on Pipedream, you can [share data between steps](/workflows/building-workflows/code/bash/#sharing-data-between-steps) and [access environment variables](/workflows/building-workflows/code/bash/#using-environment-variables). However, you can't connect accounts, return HTTP responses, or take advantage of other features available in the [Node.js](/workflows/building-workflows/code/nodejs/) environment at this time. - -If you have any feedback on the Go runtime, please let us know in [our community](https://pipedream.com/support). - -## Adding a Go code step - -1. Click the + icon to add a new step -2. Click "Custom Code" -3. In the new step, select the `golang` language runtime in language dropdown - -## Logging and debugging - -You can use `fmt.Println` at any time to log information as the script is running. - -The output for the `fmt.Println` **Logs** will appear in the `Results` section just beneath the code editor. - - -Don't forget to import the `fmt` package in order to run `fmt.Println`. - -```go {3} - package main - - import "fmt" - - func main() { - fmt.Println("Hello World!") - } -``` - - -## Using third party packages - -You can use any packages from [Go package registry](https://pkg.go.dev). This includes popular choices such as: - -- [`net/http` for making HTTP requests](https://pkg.go.dev/net/http#pkg-overview/) -- [`encoding/json` for encoding and decoding JSON](https://pkg.go.dev/encoding/json) -- [`database/sql` for reading and writing to SQL databases](https://pkg.go.dev/database/sql@go1.17.6) - -To use a Go package, just `import` it in your step's code: - -```go -import "net/http" -``` - -And that's it. - -## Sending files - -You can send files stored in the `/tmp` directory in an HTTP request: - -```go - -package main - -import ( - "os" - "log" - "mime/multipart" - "bytes" - "io" - "net/http" -) - -func main() { - // Instantiate a new HTTP client, body and form writer - client := http.Client{} - body := &bytes.Buffer{} - writer := multipart.NewWriter(body) - - // Create an empty file to start - fw, _:= writer.CreateFormFile("file", "go-logo.svg") - - - // Retrieve a previously saved file from workflow storage - file, _ := os.Open("/tmp/go-logo.svg") - - // Close multipart form writer - writer.Close() - - _, _ = io.Copy(fw, file) - - // Send the POST request - req, _:= http.NewRequest("POST", "https://postman-echo.com/post", bytes.NewReader(body.Bytes())) - - req.Header.Set("Content-Type", writer.FormDataContentType()) - _, err := client.Do(req) - if err != nil { - log.Fatalln(err) - } -} -``` - -## Sharing data between steps - -A step can accept data from other steps in the same workflow, or pass data downstream to others. - -This makes your steps even more powerful, you can compose new workflows and reuse steps. - -### Using data from another step - -Data from the initial workflow trigger and other steps are available in the `pipedream-go` package. - -In this example, we'll pretend this data is coming into our HTTP trigger via POST request. - -```json -{ - "id": 1, - "name": "Bulbasaur", - "type": "plant" -} -``` - -You can access this data in the `Steps` variable from the `pd` package. Specifically, this data from the POST request into our workflow is available in the `trigger` map. - -```go -package main - -import ( - "fmt" - "github.com/PipedreamHQ/pipedream-go" -) - -func main() { - // Access previous step data using pd.Steps - fmt.Println(pd.Steps["trigger"]) -} -``` - -### Sending data downstream to other steps - -To share data for future steps to use, call the Export function from pd package: - -```go -package main - -import ( - "encoding/json" - "github.com/PipedreamHQ/pipedream-go" - "io/ioutil" - "net/http" -) - -func main() { - // Use a GET request to look up the latest data on Charizard - resp, _ := http.Get("https://pokeapi.co/api/v2/pokemon/charizard") - body, _ := ioutil.ReadAll(resp.Body) - - // Unmarshal the JSON into a struct - var data map[string]interface{} - json.Unmarshal(body, &data) - - // Expose the pokemon data downstream to others steps in the "pokemon" key from this step - pd.Export("pokemon", data) -} -``` - -Now this `pokemon` data is accessible to downstream steps within `pd.Steps["code"]["pokemon"]` - - -Not all data types can be stored in the `Steps` data shared between workflow steps. - -For the best experience, we recommend only [exporting structs that can be marshalled into JSON](https://go.dev/blog/json). - - -## Using environment variables - -You can leverage any [environment variables defined in your Pipedream account](/workflows/environment-variables/) in a Go step. This is useful for keeping your secrets out of code as well as keeping them flexible to swap API keys without having to update each step individually. - -To access them, use the `os` package. - -```go -package main - -import ( - "log" - "os" -) - -func main() { - log.PrintLn(os.Getenv('TWITTER_API_KEY')) -} -``` - -### Using API key authentication - -If a particular service requires you to use an API key, you can pass it via the HTTP request. - -This proves your identity to the service so you can interact with it: - -```go -package main - -import ( - "os" - "bytes" - "encoding/json" - "io/ioutil" - "log" - "net/http" - "fmt" -) - -func main() { - // Access the Twitter API key from the environment - const apiKey := os.Getenv('TWITTER_API_KEY')) - - // JSON encode our payload - payload, _ := json.Marshal(map[string]string{ - "name": "Bulbasaur", - }) - payloadBuf:= bytes.NewBuffer(payload) - - // Send the POST request - req, err := http.NewRequest("POST", "https://api.twitter.com/2/users/@pipedream/mentions'", payloadBuf) - - // Build the headers in order to authenticate properly - req.Header = http.Header{ - "Content-Type": []string{"application/json"}, - "Authorization": []string{fmt.Sprintf("Bearer %s", apiKey)}, - } - - client := http.Client{} - resp, err := client.Do(req) - - if err != nil { - log.Fatalln(err) - } - // Don't forget to close the request after the function is finished - defer resp.Body.Close() - - // Read the response body - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - log.Fatalln(err) - } - // Convert the body into a string - sb := string(body) - // Log the body to our Workflow Results - log.Println(sb) -} -``` - -## Making a `GET` request - -You'll typically use `GET` requests to retrieve data from an API: - -```go -package main - -import ( - "net/http" // HTTP client - "io/ioutil" // Reads the body of the response - "log" // Logger -) - -func main() { - resp, err := http.Get("https://swapi.dev/api/people/1") - - if err != nil { - log.Fatalln(err) - } - defer resp.Body.Close() - - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - log.Fatalln(err) - } - - // The response status code is logged in your Pipedream step results: - log.Println(resp.Status) - - // The response is logged in your Pipedream step results: - sb := string(body) - log.Println(sb) -} -``` - -## Making a `POST` request - -```go -package main - -import ( - "bytes" - "encoding/json" - "io/ioutil" - "log" - "net/http" -) - -func main() { - // JSON encode our payload - payload, _ := json.Marshal(map[string]string{ - "name": "Bulbasaur", - }) - payloadBuf:= bytes.NewBuffer(payload) - - // Send the POST request - resp, err := http.Post("https://postman-echo.com/post", "application/json", payloadBuf) - - if err != nil { - log.Fatalln(err) - } - defer resp.Body.Close() - - // Read the response body - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - log.Fatalln(err) - } - // Convert the body into a string - sb := string(body) - // Log the body to our Workflow Results - log.Println(sb) -} -``` - -## Handling errors - -You may need to exit a workflow early, use the `os.Exit` to exit the `main` function with a specific error code. - -```go -package main - -import ( - "fmt" - "os" -) - -func main() { - os.Exit(1) - fmt.Println("This message will not be logged.") -} - -``` - -The step will quit at the time `os.Exit` is called. In this example, the exit code `1` will appear in the **Results** of the step. - -## File storage - -You can also store and read files with Go steps. This means you can upload photos, retrieve datasets, accept files from an HTTP request and more. - -The `/tmp` directory is accessible from your workflow steps for saving and retrieving files. - -You have full access to read and write both files in `/tmp`. - -### Writing a file to `/tmp` - -```go -package main - -import ( - "io" - "net/http" - "os" - "fmt" -) -func main() { - // Define where the file is and where to save it - fileUrl := "https://golangcode.com/go-logo.svg" - filePath := "/tmp/go-logo.svg" - - // Download the file - resp, err := http.Get(fileUrl) - if err != nil { - fmt.Println(err) - } - - // Don't forget to the close the HTTP connection at the end of the function - defer resp.Body.Close() - - // Create the empty file - out, err := os.Create(filePath) - if err != nil { - fmt.Println(err) - } - - // Don't forget to close the file - defer out.Close() - - // Write the file data to file - _, err = io.Copy(out, resp.Body) - if err != nil { - fmt.Println(err) - } -} -``` - -Now `/tmp/go-logo.svg` holds the official Go logo. - -### Reading a file from /tmp - -You can also open files you have previously stored in the `/tmp` directory. Let's open the `go-logo.svg` file. - -```go -package main - -import ( - "os" - "log" -) - -func main() { - // Open the file - data, err := os.ReadFile("/tmp/go-logo.svg") - - if e != nil { - log.Fatalln(e) - } - - // Print it's contents to the logs - log.Println(string(data)) -} -``` - -### `/tmp` limitations - -The `/tmp` directory can store up to {process.env.TMP_SIZE_LIMIT} of storage. Also the storage may be wiped or may not exist between workflow executions. - -To avoid errors, assume that the `/tmp` directory is empty between workflow runs. diff --git a/docs-v2/pages/workflows/building-workflows/code/index.mdx b/docs-v2/pages/workflows/building-workflows/code/index.mdx deleted file mode 100644 index 88afeb081b713..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/index.mdx +++ /dev/null @@ -1,24 +0,0 @@ -import icons from '@/utils/icons' -import LanguageLink from "@/components/LanguageLink"; -import VideoPlayer from "@/components/VideoPlayer"; - -# Overview - - - -Pipedream comes with thousands of prebuilt [triggers](/workflows/building-workflows/triggers/) and [actions](/components/contributing/#actions) for [hundreds of apps](https://pipedream.com/apps). Often, these will be sufficient for building simple workflows. - -But sometimes you need to run your own custom logic. You may need to make an API request to fetch additional metadata about the event, transform data into a custom format, or end the execution of a workflow early under some conditions. **Code steps let you do this and more**. - -Code steps let you execute [Node.js v{process.env.PIPEDREAM_NODE_VERSION}](https://nodejs.org/) (JavaScript) code, Python, Go or even Bash right in a workflow. - -Choose a language to get started: - -
- - - - -
- -If you'd like to see another, specific language supported, please [let us know](https://pipedream.com/community). diff --git a/docs-v2/pages/workflows/building-workflows/code/nodejs/_meta.tsx b/docs-v2/pages/workflows/building-workflows/code/nodejs/_meta.tsx deleted file mode 100644 index b311680cc1055..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/nodejs/_meta.tsx +++ /dev/null @@ -1,13 +0,0 @@ -export default { - "index": "Running Node.js in workflows", - "ai-code-generation": "Use AI to generate code", - "auth": "Connect apps", - "http-requests": "HTTP requests", - "working-with-files": "Files", - "using-data-stores": "Data stores", - "delay": "Delaying steps", - "rerun": "Pause, resume, and rerun steps", - "async": "Running asynchronous code", - "sharing-code": "Sharing code across workflows", - "browser-automation": "Browser automation", -} as const diff --git a/docs-v2/pages/workflows/building-workflows/code/nodejs/ai-code-generation.mdx b/docs-v2/pages/workflows/building-workflows/code/nodejs/ai-code-generation.mdx deleted file mode 100644 index a0c07526fb80b..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/nodejs/ai-code-generation.mdx +++ /dev/null @@ -1,153 +0,0 @@ -import VideoPlayer from "@/components/VideoPlayer"; - -# Using AI to generate code - - - -Tell Pipedream the code you want, we generate it for you. - -![Generate code with AI](https://res.cloudinary.com/pipedreamin/image/upload/v1710515666/docs/docs/workflows/building-workflows/code/nodejs/ai-code-generation/CleanShot_2024-03-15_at_11.13.07_mjgmdc.gif) - -Pipedream's [built-in actions](/workflows/building-workflows/actions/) are great for running common API operations without having to write code, but sometimes you need code-level control in a workflow. You can [write this code yourself](/workflows/building-workflows/code/), or you can let Pipedream generate it for you with AI. - -This feature is new, and [we welcome feedback](https://pipedream.com/support). Please let us know what we can improve or add to make this more useful for you. - -## Getting Started - -Access the feature either from within a Node.js code cell or from any app in the step selector. - -![Use AI with the Slack API](/images/nodejs/ai-code-generation/generating-slack-actions-with-ai.png) - -A window should pop up and ask for your prompt. Write exactly what you want to do within that step. **Be verbose** and see our tips for [getting the best results](#getting-the-best-results). - -- **Bad**: "Send a Slack message" -- **Good**: "Send a Slack message in the following format: `Hello, ${name}`. Let me select the channel from a list of available options." - -Once you're done, hit **Enter** or click **Generate**. - -Code will immediately start streaming to the editor. You can modify the prompt and re-generate the code if it doesn't look right, or click **Use this code** to add it to your code cell and test it. - -Pipedream will automatically refresh the step to show connected accounts and any input fields (props) above the step. - -![AI-generated code for Slack](https://res.cloudinary.com/pipedreamin/image/upload/v1685130847/docs/ai-generated-code_uzsr8q.png) - -Edit the code however you'd like. Once you're done, test the code. You'll see the option to provide a :+1: or :-1: on the code, which helps us learn what's working and what's not. - -## Editing existing code - -You can also edit existing code with AI. Click the **Edit with AI** button at the top-right of any Node.js code step. You'll see the code gen window appear with the original code from your step. Enter a prompt to suggest an edit, and we'll give you the modified code. - -![Edit code with AI](https://res.cloudinary.com/pipedreamin/image/upload/v1710515922/docs/docs/workflows/building-workflows/code/nodejs/ai-code-generation/CleanShot_2024-03-15_at_11.17.20_pumcgn.gif) - -## Getting the best results - -**Generating code works best with clear, precise, and detailed instructions of what you want to do in your step.** The code gen service understands the [Pipedream component API](/components/contributing/api/) and references the API docs of [integrated apps](https://pipedream.com/apps). For example, you can tell it to include specific [props](/components/contributing/api/#props) (input) or [async options](/components/contributing/api/#async-options-example), and reference specific API endpoints you want to use for the selected app. - -### Examples - -#### Slack - -Send a message to the `#general` channel that says, "This message was sent with AI-generate code!" Format it as a Slack block, with a header named, "Hello, world!" - -**Output**: - -```javascript -import { axios } from "@pipedream/platform"; - -export default defineComponent({ - props: { - slack: { - type: "app", - app: "slack", - }, - }, - async run({ steps, $ }) { - return await axios($, { - method: "POST", - url: `https://slack.com/api/chat.postMessage`, - headers: { - Authorization: `Bearer ${this.slack.$auth.oauth_access_token}`, - }, - data: { - channel: "#general", - blocks: [ - { - type: "header", - text: { - type: "plain_text", - text: "Hello, world!", - }, - }, - { - type: "section", - text: { - type: "mrkdwn", - text: "This message was sent with AI-generated code!", - }, - }, - ], - }, - }); - }, -}); -``` - -#### Stripe - -Get the subscription information about a specific customer based on their email address - -**Output:** - -```javascript -import { axios } from "@pipedream/platform"; - -export default defineComponent({ - props: { - stripe: { - type: "app", - app: "stripe", - }, - email: { - type: "string", - label: "Email Address", - description: - "The email address of the customer to get subscription information for", - }, - }, - async run({ steps, $ }) { - const customerResponse = await axios($, { - method: "GET", - url: `https://api.stripe.com/v1/customers`, - headers: { - Authorization: `Bearer ${this.stripe.$auth.api_key}`, - }, - params: { - email: this.email, - }, - }); - - if (customerResponse.data.length === 0) { - throw new Error("Customer not found"); - } - - const customerId = customerResponse.data[0].id; - - return await axios($, { - method: "GET", - url: `https://api.stripe.com/v1/subscriptions`, - headers: { - Authorization: `Bearer ${this.stripe.$auth.api_key}`, - }, - params: { - customer: customerId, - }, - }); - }, -}); -``` - -## Current limitations, and what we're working on next - -- Currently supports Pipedream actions, not triggers -- Only supports Node.js output. Python coming soon. -- It supports single steps, and not entire workflows (also coming soon) diff --git a/docs-v2/pages/workflows/building-workflows/code/nodejs/async.mdx b/docs-v2/pages/workflows/building-workflows/code/nodejs/async.mdx deleted file mode 100644 index 4a68ab72c7444..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/nodejs/async.mdx +++ /dev/null @@ -1,113 +0,0 @@ -import VideoPlayer from "@/components/VideoPlayer"; - -# Running asynchronous code in Node.js - - - -If you're not familiar with asynchronous programming concepts like [callback functions](https://developer.mozilla.org/en-US/docs/Glossary/Callback_function) or [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises), see [this overview](https://eloquentjavascript.net/11_async.html). - -## The problem - -**Any asynchronous code within a Node.js code step must complete before the next step runs**. This ensures future steps have access to its data. If Pipedream detects that code is still running by the time the step completes, you'll see the following warning below the code step: - -> **This step was still trying to run code when the step ended. Make sure you await all Promises, or promisify callback functions.** - -As the warning notes, this often arises from one of two issues: - -- You forgot to `await` a Promise. [All Promises must be awaited](#await-all-promises) within a step so they resolve before the step finishes. -- You tried to run a callback function. Since callback functions run asynchronously, they typically will not finish before the step ends. [You can wrap your function in a Promise](#wrap-callback-functions-in-a-promise) to make sure it resolves before the step finishes. - -## Solutions - -### `await` all Promises - -Most Node.js packages that run async code return Promises as the result of method calls. For example, [`axios`](/workflows/building-workflows/code/nodejs/http-requests/#basic-axios-usage-notes) is an HTTP client. If you make an HTTP request like this in a Pipedream code step: - -```javascript -const resp = axios({ - method: "GET", - url: `https://swapi.dev/api/films/`, -}); -``` - -It won't send the HTTP request, since **`axios` returns a Promise**. Instead, add an `await` in front of the call to `axios`: - -```javascript -const resp = await axios({ - method: "GET", - url: `https://swapi.dev/api/films/`, -}); -``` - -In short, always do this: - -```javascript -const res = await runAsyncCode(); -``` - -instead of this: - -```javascript -// This code may not finish by the time the workflow finishes -runAsyncCode(); -``` - -### Wrap callback functions in a Promise - -Before support for Promises was widespread, [callback functions](https://developer.mozilla.org/en-US/docs/Glossary/Callback_function) were a popular way to run some code asynchronously, after some operation was completed. For example, [PDFKit](https://pdfkit.org/) lets you pass a callback function that runs when certain events fire, like when the PDF has been finalized: - -```javascript -import PDFDocument from "pdfkit"; -import fs from "fs"; - -let doc = new PDFDocument({ size: "A4", margin: 50 }); -this.fileName = `tmp/test.pdf`; -let file = fs.createWriteStream(this.fileName); -doc.pipe(file); -doc.text("Hello world!"); - -// Finalize PDF file -doc.end(); -file.on("finish", () => { - console.log(fs.statSync(this.fileName)); -}); -``` - -This is the callback function: - -```javascript -() => { - console.log(fs.statSync(this.fileName)); -}; -``` - -and **it will not run**. By running a callback function in this way, we're saying that we want the function to be run asynchronously. But on Pipedream, this code must finish by the time the step ends. **You can wrap this callback function in a Promise to make sure that happens**. Instead of running: - -```javascript -file.on("finish", () => { - console.log(fs.statSync(this.fileName)); -}); -``` - -run: - -```javascript -// Wait for PDF to finalize -await new Promise((resolve) => file.on("finish", resolve)); -// Once done, get stats -const stats = fs.statSync(this.filePath); -``` - -This is called "[promisification](https://javascript.info/promisify)". - -You can often promisify a function in one line using Node.js' [`util.promisify` function](https://2ality.com/2017/05/util-promisify.html). - -### Other solutions - -If a specific library doesn't support Promises, you can often find an equivalent library that does. For example, many older HTTP clients like `request` didn't support Promises natively, but the community [published packages that wrapped it with a Promise-based interface](https://www.npmjs.com/package/request#promises--asyncawait) (note: `request` has been deprecated, this is just an example). - -## False positives - -This warning can also be a false positive. If you're successfully awaiting all Promises, Pipedream could be throwing the warning in error. If you observe this, please [file a bug](https://github.com/PipedreamHQ/pipedream/issues/new?assignees=&labels=bug&template=bug_report.md&title=%5BBUG%5D+). - -Packages that make HTTP requests or read data from disk (for example) fail to resolve Promises at the right time, or at all. This means that Pipedream is correctly detecting that code is still running, but there's also no issue - the library successfully ran, but just failed to resolve the Promise. You can safely ignore the error if all relevant operations are truly succeeding. diff --git a/docs-v2/pages/workflows/building-workflows/code/nodejs/auth.mdx b/docs-v2/pages/workflows/building-workflows/code/nodejs/auth.mdx deleted file mode 100644 index de7f3741df03f..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/nodejs/auth.mdx +++ /dev/null @@ -1,126 +0,0 @@ -import VideoPlayer from '@/components/VideoPlayer'; - -# Connecting apps in Node.js - - - -When you use [prebuilt actions](/components/contributing/#actions) tied to apps, you don't need to write the code to authorize API requests. Just [connect your account](/apps/connected-accounts/#connecting-accounts) for that app and run your workflow. - -But sometimes you'll need to [write your own code](/workflows/building-workflows/code/nodejs/). You can also connect apps to custom code steps, using the auth information to authorize requests to that app. - -For example, you may want to send a Slack message from a step. We use Slack's OAuth integration to authorize sending messages from your workflows. - -To wire up a Slack account to a workflow, define it as a `prop` to the workflow. - -```javascript -import { WebClient } from '@slack/web-api' - -export default defineComponent({ - props: { - // This creates a connection called "slack" that connects a Slack account. - slack: { - type: 'app', - app: 'slack' - } - }, - async run({ steps, $ }) { - const web = new WebClient(this.slack.$auth.oauth_access_token) - - return await web.chat.postMessage({ - text: "Hello, world!", - channel: "#general", - }) - } -}); -``` - -Then click the **Refresh fields** button in the editor to render the Slack field based on the `slack` prop: - -![Refresh the prop defintions to rebuild the steps fields](/images/auth/refresh-fields-after-connecting-slack.png) - -Now the step in the workflow builder will allow you to connect your Slack account: - -![Connect a Slack account to a Node.js code step using a prop](/images/auth/slack-field-rendered.png) - -## Accessing connected account data with `this.appName.$auth` - -In our Slack example above, we created a Slack `WebClient` using the Slack OAuth access token: - -```javascript -const web = new WebClient(this.slack.$auth.oauth_access_token); -``` - -Where did `this.slack` come from? Good question. It was generated by the definition we made in `props`: - -```javascript {4-9} -export default defineComponent({ - props: { - // the name of the app from the key of the prop, in this case it's "slack" - slack: { - // define that this prop is an app - type: 'app', - // define that this app connects to Slack - app: 'slack' - } - } - // ... rest of the Node.js step -``` - -The Slack access token is generated by Pipedream, and is available to this step in the `this.slack.$auth` object: - -```javascript {11} -export default defineComponent({ - props: { - slack: { - type: 'app', - app: 'slack' - } - }, - async run({ steps, $ }) { - async (steps, $) => { - // Authentication details for all of your apps are accessible under the special $ variable: - console.log(this.slack.$auth); - } - }) -}); -``` - -`this.appName.$auth` contains named properties for each account you connect to the associated step. Here, we connected Slack, so `this.slack.$auth` contains the Slack auth info (the `oauth_access_token`). - -The names of the properties for each connected account will differ with the account. Pipedream typically exposes OAuth access tokens as `oauth_access_token`, and API keys under the property `api_key`. But if there's a service-specific name for the tokens (for example, if the service calls it `server_token`), we prefer that name, instead. - -To list the `this.[app name].$auth` properties available to you for a given app, run `Object.keys` on the app: - -```javascript -console.log(Object.keys(this.slack.$auth)) // Replace this.slack with your app's name -``` - -and run your workflow. You'll see the property names in the logs below your step. - -## Writing custom steps to use `this.appName.$auth` - -You can write code that utilizes connected accounts in a few different ways: - -### Using the code templates tied to apps - -When you write custom code that connects to an app, you can start with a code snippet Pipedream provides for each app. This is called the **test request**. - -When you search for an app in a step: - -1. Click the **+** button below any step. -2. Search for the app you're looking for and select it from the list. -3. Select the option to **Use any \ API**. - -This code operates as a template you can extend, and comes preconfigured with the connection to the target app and the code for authorizing requests to the API. You can modify this code however you'd like. - -### Manually connecting apps to steps - -See the Connected Accounts docs for [connecting an account to a code step](/apps/connected-accounts/#from-a-code-step). - -## Custom auth tokens / secrets - -When you want to connect to a 3rd party service that isn't supported by Pipedream, you can store those secrets in [Environment Variables](/workflows/environment-variables/). - -## Learn more about `props` - -Not only can `props` be used to connect apps to workflow steps, but they can also be used to [collect properties collected from user input](/workflows/building-workflows/code/nodejs/#passing-props-to-code-steps) and [save data between workflow runs](/workflows/building-workflows/code/nodejs/using-data-stores/). diff --git a/docs-v2/pages/workflows/building-workflows/code/nodejs/browser-automation.mdx b/docs-v2/pages/workflows/building-workflows/code/nodejs/browser-automation.mdx deleted file mode 100644 index 1252d15df9550..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/nodejs/browser-automation.mdx +++ /dev/null @@ -1,577 +0,0 @@ -import Callout from '@/components/Callout' -import { Tabs } from 'nextra/components' -import VideoPlayer from '@/components/VideoPlayer' - -# Browser Automation with Node.js - - - -You can leverage headless browser automations within Pipedream workflows for web scraping, generating screenshots, or programmatically interacting with websites - even those that make heavy usage of frontend Javascript. - -Pipedream manages a [specialized package](https://www.npmjs.com/package/@pipedream/browsers) that includes Puppeteer and Playwright bundled with a specialized Chromium instance that's compatible with Pipedream's Node.js Execution Environment. - -All that's required is importing the [`@pipedream/browsers`](https://www.npmjs.com/package/@pipedream/browsers) package into your Node.js code step and launch a browser. Pipedream will start Chromium and launch a Puppeteer or Playwright Browser instance for you. - -## Usage - -The `@pipedream/browsers` package exports two modules: `puppeteer` & `playwright`. Both modules share the same interface: - -* `browser(opts?)` - method to instantiate a new browser (returns a browser instance) -* `launch(opts?)` - an alias to browser() -* `newPage()` - creates a new page instance and returns both the page & browser - -### Puppeteer - -First import the `puppeteer` module from `@pipedream/browsers` and use `browser()` or `launch()` method to instantiate a browser. - -Then using this browser you can open new [Pages](https://pptr.dev/api/puppeteer.page), which have individual controls to open URLs: - -```javascript - import { puppeteer } from '@pipedream/browsers'; - -export default defineComponent({ - async run({steps, $}) { - const browser = await puppeteer.browser(); - - // Interact with the web page programmatically - // See Puppeeter's Page documentation for available methods: - // https://pptr.dev/api/puppeteer.page - const page = await browser.newPage(); - - await page.goto('https://pipedream.com/'); - const title = await page.title(); - const content = await page.content(); - - $.export('title', title); - $.export('content', content); - - // The browser needs to be closed, otherwise the step will hang - await browser.close(); - }, -}) -``` - -#### Screenshot a webpage - -Puppeteer can take a full screenshot of a webpage rendered with Chromium. For full options [see the Puppeteer Screenshot method documentation.](https://pptr.dev/api/puppeteer.page.screenshot) - - - - -Save a screenshot within the local `/tmp` directory: - -```javascript -import { puppeteer } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ $ }) { - const browser = await puppeteer.launch(); - const page = await browser.newPage(); - await page.goto('https://pipedream.com'); - await page.screenshot({ path: '/tmp/screenshot.png' }); - await browser.close(); - }, -}); - -``` - - - -Save the screenshot as a base 64 encoded string: - -```javascript -import { puppeteer } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ $ }) { - const browser = await puppeteer.browser(); - const page = await browser.newPage(); - await page.goto('https://pipedream.com/'); - const screenshot = await page.screenshot({ encoding: 'base64' }); - await browser.close(); - return screenshot; - }, -}); -``` - - - - -#### Generate a PDF of a webpage - -Puppeteer can render a PDF of a webpage. For full options [see the Puppeteer Screenshot method documentation.](https://pptr.dev/api/puppeteer.page.pdf) - - - - -Save the PDF locally to `/tmp`: - -```javascript -import { puppeteer } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ $ }) { - const browser = await puppeteer.launch(); - const page = await browser.newPage(); - await page.goto('https://pipedream.com'); - await page.pdf({ path: '/tmp/screenshot.pdf' }); - await browser.close(); - }, -}); - -``` - - - -Save the PDF as a base 64 encoded string: - -```javascript -import { puppeteer } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ $ }) { - const browser = await puppeteer.browser(); - const page = await browser.newPage(); - await page.goto('https://pipedream.com'); - const pdfBuffer = await page.pdf(); - const pdfBase64 = pdfBuffer.toString('base64'); - await browser.close(); - return pdfBase64; - }, -}); -``` - - - - -#### Scrape content from a webpage - -Puppeteer can scrape individual elements or return all content of a webpage. - - - - -Extract individual elements with a CSS selector: - -```javascript -import { puppeteer } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ $ }) { - const browser = await puppeteer.browser(); - const page = await browser.newPage(); - await page.goto('https://pipedream.com'); - const h1Content = await page.$eval('h1', el => el.textContent); - await browser.close(); - return h1Content; - }, -}); - -``` - - - -Extract all HTML content form a webpage: - -```javascript -import { puppeteer } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ $ }) { - const browser = await puppeteer.browser(); - const page = await browser.newPage(); - await page.goto('https://pipedream.com'); - const content = await page.content(); - await browser.close(); - return content; - }, -}); -``` - - - - -#### Submit a form - -Puppeteer can also programmatically click and type on a webpage. - - - - -`Page.type` accepts a CSS selector and a string to type into the field. - -```javascript -import { puppeteer } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ steps, $ }) { - const browser = await puppeteer.browser(); - const page = await browser.newPage(); - - await page.goto('https://example.com/contact'); - await page.type('input[name=email]', 'pierce@pipedream.com'); - await page.type('input[name=name]', 'Dylan Pierce'); - await page.type('textarea[name=message]', "Hello, from a Pipedream workflow."); - await page.click('input[type=submit]'); - - await browser.close(); - }, -}); -``` - - - -`Page.click` will click on the element to focus on it, then `Page.keyboard.type` emulates keyboard keystrokes. - -```javascript -import { puppeteer } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ steps, $ }) { - const browser = await puppeteer.browser(); - const page = await browser.newPage(); - - await page.goto('https://example.com/contact'); - await page.click('input[name=email]') - await page.keyboard.type('pierce@pipedream.com'); - await page.click('input[name=name]') - await page.keyboard.type('Dylan Pierce'); - await page.click('textarea[name=message]') - await page.keyboard.type("Hello, from a Pipedream workflow."); - await page.click('input[type=submit]'); - - await browser.close(); - }, -}); -``` - - - -### Playwright - -First import the `playwright` module from `@pipedream/browsers` and use `browser()` or `launch()` method to instantiate a browser. - -Then using this browser you can open new [Pages](https://playwright.dev/docs/api/class-page), which have individual controls to open URLs, click elements, generate screenshots and type and more: - -```javascript -import { playwright } from '@pipedream/browsers'; - -export default defineComponent({ - async run({steps, $}) { - const browser = await playwright.browser(); - - // Interact with the web page programmatically - // See Playwright's Page documentation for available methods: - // https://playwright.dev/docs/api/class-page - const page = await browser.newPage(); - - await page.goto('https://pipedream.com/'); - const title = await page.title(); - const content = await page.content(); - - $.export('title', title); - $.export('content', content); - - // The browser context and browser needs to be closed, otherwise the step will hang - await page.context().close(); - await browser.close(); - }, -}) -``` - - -**Don't forget to close the browser context** - -Playwright differs from Puppeteer slightly in that you have to close the page's browser context before closing the browser itself. - -```javascript -// Close the context & browser before returning results -// Otherwise the step will hang -await page.context().close(); -await browser.close(); -``` - - -#### Screenshot a webpage - -Playwright can take a full screenshot of a webpage rendered with Chromium. For full options [see the Playwright Screenshot method documentation.](https://playwright.dev/docs/api/class-page#page-screenshot) - - - - -Save a screenshot within the local `/tmp` directory: - -```javascript -import { playwright } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ $ }) { - const browser = await playwright.launch(); - const page = await browser.newPage(); - await page.goto('https://pipedream.com'); - await page.screenshot({ path: '/tmp/screenshot.png' }); - - await page.context().close(); - await browser.close(); - }, -}); - -``` - - - -Save the screenshot as a base 64 encoded string: - -```javascript -import { playwright } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ $ }) { - const browser = await playwright.launch(); - const page = await browser.newPage(); - await page.goto('https://pipedream.com/'); - - const screenshotBuffer = await page.screenshot(); - const screenshotBase64 = screenshotBuffer.toString('base64'); - - await page.context().close(); - await browser.close(); - - return screenshotBase64; - }, -}); -``` - - - - -#### Generate a PDF of a webpage - -Playwright can render a PDF of a webpage. For full options [see the Playwright Screenshot method documentation.](https://playwright.dev/docs/api/class-page#page-pdf) - - - - -Save a PDF locally to `/tmp`: - -```javascript -import { playwright } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ $ }) { - const browser = await playwright.launch(); - const page = await browser.newPage(); - await page.goto('https://pipedream.com'); - await page.pdf({ path: '/tmp/screenshot.pdf' }); - - await page.context().close(); - await browser.close(); - }, -}); - -``` - - - -Save the screenshot as a base 64 encoded string: - -```javascript -import { playwright } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ $ }) { - const browser = await playwright.launch(); - const page = await browser.newPage(); - await page.goto('https://pipedream.com/'); - - const screenshotBuffer = await page.pdf(); - const screenshotBase64 = screenshotBuffer.toString('base64'); - - await page.context().close(); - await browser.close(); - - return screenshotBase64; - }, -}); -``` - - - - -#### Scrape content from a webpage - -Playwright can scrape individual elements or return all content of a webpage. - - - - -Extract individual HTML elements using a CSS Selector: - -```javascript -import { playwright } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ $ }) { - const browser = await playwright.browser(); - const page = await browser.newPage(); - await page.goto('https://pipedream.com'); - const h1Content = await page.$eval('h1', el => el.textContent); - - await page.context().close(); - await browser.close(); - - return h1Content; - }, -}); - -``` - - - -Extract all HTML content from a webpage with `Page.content`: - -```javascript -import { playwright } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ $ }) { - const browser = await playwright.browser(); - const page = await browser.newPage(); - await page.goto('https://pipedream.com'); - const content = await page.content(); - - await page.context().close(); - await browser.close(); - - return content; - }, -}); -``` - - - - -#### Submit a form - -Playwright can also programmatically click and type on a webpage. - - - - -`Page.type` accepts a CSS selector and a string to type into the selected element. - -```javascript -import { playwright } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ steps, $ }) { - const browser = await playwright.browser(); - const page = await browser.newPage(); - - await page.goto('https://example.com/contact'); - await page.type('input[name=email]', 'pierce@pipedream.com'); - await page.type('input[name=name]', 'Dylan Pierce'); - await page.type('textarea[name=message]', "Hello, from a Pipedream workflow."); - await page.click('input[type=submit]'); - - await page.context().close(); - await browser.close(); - }, -}); -``` - - - -`Page.click` will click on the element to focus on it, then `Page.keyboard.type` emulates keyboard keystrokes. - -```javascript -import { playwright } from '@pipedream/browsers'; - -export default defineComponent({ - async run({ steps, $ }) { - const browser = await playwright.browser(); - const page = await browser.newPage(); - - await page.goto('https://example.com/contact'); - await page.click('input[name=email]') - await page.keyboard.type('pierce@pipedream.com'); - await page.click('input[name=name]') - await page.keyboard.type('Dylan Pierce'); - await page.click('textarea[name=message]') - await page.keyboard.type("Hello, from a Pipedream workflow."); - await page.click('input[type=submit]'); - - await page.context().close(); - await browser.close(); - }, -}); -``` - - - - - -## FAQ - -### Can I use this package in sources or actions? - -Yes, the same `@pipedream/browsers` package can be used in [actions](/components/contributing/actions-quickstart/) as well as [sources](/components/contributing/sources-quickstart/). - -The steps are the same as usage in Node.js code. Open a browser, create a page, and close the browser at the end of the code step. - - -**Memory limits** - -At this time it's not possible to configure the allocated memory to a Source. You may experience a higher rate of Out of Memory errors on Sources that use Puppeteer or Playwright due to the high usage of memory required by Chromium. - - -### Workflow exited before step finished execution - -Remember to close the browser instance _before_ the step finishes. Otherwise, the browser will keep the step "open" and not transfer control to the next step. - -### Out of memory errors or slow starts - -For best results, we recommend increasing the amount of memory available to your workflow to 2 gigabytes. You can adjust the available memory in the [workflow settings](/workflows/building-workflows/settings/#memory). - -### Which browser are these packages using? - -The `@pipedream/browsers` package includes a specific version of Chromium that is compatible with Pipedream Node.js execution environments that run your code. - -For details on the specific versions of Chromium, puppeeter and playwright bundled in this package, visit the package's [README](https://github.com/PipedreamHQ/pipedream/tree/master/packages/browsers). - -### How to customize `puppeteer.launch()`? - -To pass arguments to `puppeteer.launch()` to customize the browser instance, you can pass them directly to `puppeteer.browser()`. - -For example, you can alter the `protocolTimeout` length just by passing it as an argument: - -```javascript -import { puppeteer } from '@pipedream/browsers'; - -export default defineComponent({ - async run({steps, $}) { - // passing a `protocolTimeout` argument to increase the timeout length for a puppeteer instance - const browser = await puppeteer.browser({ protocolTimeout: 480000 }); - // rest of code - }, -}) - -``` - -Please see the [`@pipedream/browsers` source code](https://github.com/PipedreamHQ/pipedream/blob/17888e631857259a6535f9bd13c23a1e7ff95381/packages/browsers/index.mjs#L14) for the default arguments that Pipedream provides. - -### How do I use `puppeteer.connect()`? - -To use `puppeteer.connect()` to connect to a remote browser instance, you can use the [`puppeteer-core`](https://github.com/puppeteer/puppeteer/tree/main?tab=readme-ov-file#puppeteer-core) package: - -```javascript -import puppeteer from "puppeteer-core"; -``` - -`puppeteer-core` does not download Chrome when installed, which decreases the size of your deployment and can improve cold start times. - -To connect to a remote browser instance using Playwright, you can use the [`playwright-core`](https://www.npmjs.com/package/playwright-core) package, which is the no-browser Playwright package: - -```javascript -import playwright from "playwright-core"; -``` diff --git a/docs-v2/pages/workflows/building-workflows/code/nodejs/delay.mdx b/docs-v2/pages/workflows/building-workflows/code/nodejs/delay.mdx deleted file mode 100644 index 169343f94c0b2..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/nodejs/delay.mdx +++ /dev/null @@ -1,140 +0,0 @@ -import Callout from '@/components/Callout' -import VideoPlayer from '@/components/VideoPlayer' - -# Delaying a workflow - - - -Use `$.flow.delay` to [delay a step in a workflow](/workflows/building-workflows/control-flow/delay/). - -These docs show you how to write Node.js code to handle delays. If you don't need to write code, see [our built-in delay actions](/workflows/building-workflows/control-flow/delay/#delay-actions). - -## Using `$.flow.delay` - -`$.flow.delay` takes one argument: the number of **milliseconds** you'd like to pause your workflow until the next step executes. {process.env.DELAY_MIN_MAX_TIME}. - -Note that [delays happen at the end of the step where they're called](#when-delays-happen). - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // Delay a workflow for 60 seconds (60,000 ms) - $.flow.delay(60 * 1000) - - // Delay a workflow for 15 minutes - $.flow.delay(15 * 60 * 1000) - - // Delay a workflow based on the value of incoming event data, - // or default to 60 seconds if that variable is undefined - $.flow.delay(steps.trigger.event?.body?.delayMs ?? 60 * 1000) - - // Delay a workflow a random amount of time - $.flow.delay(Math.floor(Math.random() * 1000)) - } -}); -``` - - -Paused workflow state - -When `$.flow.delay` is executed in a Node.js step, the workflow itself will enter a **Paused** state. - -While the workflow is paused, it will not incur any credits towards compute time. You can also [view all paused workflows in the Event History](/workflows/event-history/#filtering-by-status). - - -### Credit usage - -The length of time a workflow is delayed from `$.flow.delay` does _not_ impact your credit usage. For example, delaying a 256 megabyte workflow for five minutes will **not** incur ten credits. - -However, using `$.flow.delay` in a workflow will incur two credits. - -One credit is used to initially start the workflow, then the second credit is used when the workflow resumes after its pause period has ended. - - -Exact credit usage depends on duration and memory configuration - -If your workflow's [execution timeout limit](/workflows/building-workflows/settings/#execution-timeout-limit) is set to longer than [default limit](/workflows/limits/#time-per-execution), it may incur more than two [credits](/pricing/#credits-and-billing) when using `pd.flow.delay`. - - -## `cancel_url` and `resume_url` - -Both the built-in **Delay** actions and `$.flow.delay` return a `cancel_url` and `resume_url` that lets you cancel or resume paused executions. - -These URLs are specific to a single execution of your workflow. While the workflow is paused, you can load these in your browser or send an HTTP request to either: - -- Hitting the `cancel_url` will immediately cancel that execution -- Hitting the `resume_url` will immediately resume that execution early - -[Since Pipedream pauses your workflow at the _end_ of the step where you run call `$.flow.delay`](#when-delays-happen), you can send these URLs to third party systems, via email, or anywhere else you'd like to control the execution of your workflow. - -```javascript -import axios from 'axios' - -export default defineComponent({ - async run({ steps, $ }) { - const { cancel_url, resume_url } = $.flow.delay(15 * 60 * 1000) - - // Send the URLs to a system you own - await axios({ - method: "POST", - url: `https://example.com`, - data: { cancel_url, resume_url }, - }); - - // Email yourself the URLs. Click on the links to cancel / resume - $.send.email({ - subject: `Workflow execution ${steps.trigger.context.id}`, - text: `Cancel your workflow here: ${cancel_url} . Resume early here: ${resume_url}`, - }); - } -}); - -// Delay happens at the end of this step -``` - -## When delays happen - -**Pipedream pauses your workflow at the _end_ of the step where you call `$.flow.delay`**. This lets you [send the `cancel_url` and `resume_url` to third-party systems](#cancel_url-and-resume_url). - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - const { cancel_url, resume_url } = $.flow.delay(15 * 60 * 1000) - // ... run any code you want here - } -}); - -// Delay happens at the end of this step -``` - -## Delays and HTTP responses - -You cannot run `$.respond` after running `$.flow.delay`. Pipedream ends the original execution of the workflow when `$.flow.delay` is called and issues the following response to the client to indicate this state: - -> $.respond() not called for this invocation - -If you need to set a delay on an HTTP request triggered workflow, consider using [`setTimeout`](#settimeout) instead. - -## `setTimeout` - -Alternatively, you can use `setTimeout` instead of using `$.flow.delay` to delay individual workflow steps. - -However, there are some drawbacks to using `setTimeout` instead of `$.flow.delay`. `setTimeout` will count towards your workflow's compute time, for example: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // delay this step for 30 seconds - const delay = 30000; - - return new Promise((resolve, reject) => { - setTimeout(() => { - resolve('timer ended') - }, delay) - }) - } -}); - -``` - -The Node.js step above will hold the workflow's execution for this step for 30 seconds; however, 30 seconds will also _contribute_ to your credit usage. Also consider that workflows have a hard limit of {process.env.MAX_WORKFLOW_EXECUTION_LIMIT} seconds. diff --git a/docs-v2/pages/workflows/building-workflows/code/nodejs/http-requests.mdx b/docs-v2/pages/workflows/building-workflows/code/nodejs/http-requests.mdx deleted file mode 100644 index 172912e04462b..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/nodejs/http-requests.mdx +++ /dev/null @@ -1,667 +0,0 @@ -import Callout from '@/components/Callout' -import { Tabs } from 'nextra/components' - -# Make HTTP Requests with Node.js - -HTTP requests are fundamental to working with APIs or other web services. You can make HTTP requests to retrieve data from APIs, fetch HTML from websites, or do pretty much anything your web browser can do. - -**Below, we'll review how to make HTTP requests using Node.js code on Pipedream.** - -We'll use the [`axios`](https://github.com/axios/axios) and [`got`](https://github.com/sindresorhus/got) HTTP clients in the examples below, but [you can use any npm package you'd like](/workflows/building-workflows/code/nodejs/#using-npm-packages) on Pipedream, so feel free to experiment with other clients, too. - -If you're developing Pipedream components, you may find the [`@pipedream/platform` version of `axios`](/workflows/building-workflows/http/#platform-axios) helpful for displaying error data clearly in the Pipedream UI. - -If you're new to HTTP, see our [glossary of HTTP terms](https://requestbin.com/blog/working-with-webhooks/#webhooks-glossary-common-terms) for a helpful introduction. - -## Basic `axios` usage notes - -To use `axios` on Pipedream, you'll just need to import the `axios` npm package: - -```javascript -import axios from "axios"; -``` - -You make HTTP requests by passing a [JavaScript object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects) to `axios` that defines the parameters of the request. For example, you'll typically want to define the HTTP method and the URL you're sending data to: - -```javascript -{ - method: "GET", - url: `https://swapi.dev/api/films/` -} -``` - -`axios` returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises), which is just a fancy way of saying that it makes the HTTP request in the background (asynchronously) while the rest of your code runs. On Pipedream, [all asynchronous code must be run synchronously](/workflows/building-workflows/code/nodejs/async/), which means you'll need to wait for the HTTP request to finish before moving on to the next step. You do this by adding an `await` in front of the call to `axios`. - -**Putting all of this together, here's how to make a basic HTTP request on Pipedream:** - -```javascript -const resp = await axios({ - method: "GET", - url: `https://swapi.dev/api/films/`, -}); -``` - -The response object `resp` contains a lot of information about the response: its data, headers, and more. Typically, you just care about the data, which you can access in the `data` property of the response: - -```javascript -const resp = await axios({ - method: "GET", - url: `https://swapi.dev/api/films/`, -}); - -// HTTP response data is in the data property -const data = resp.data; -``` - -Alternatively, you can access the data using [object destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Object_destructuring), which is equivalent to the above and preferred in modern JavaScript: - -```javascript -const { data } = resp; -``` - -## Send a `GET` request to fetch data - -Make a request to retrieve Star Wars films from the Star Wars API: - - - -``` javascript -import axios from "axios"; - -export default defineComponent({ - async run({ steps, $ }) { - // Make an HTTP GET request using axios - const res = await axios({ - method: "GET", - url: `https://swapi.dev/api/films/`, - }); - - // Retrieve just the data from the response - const { data } = res; - } -}); -``` - - -``` javascript -export default defineComponent({ - props: { - httpRequest: { - type: "http_request", - label: "Star Wars API request", - default: { - method: "GET", - url: "https://swapi.dev/api/films/" - } - }, - }, - async run({ steps, $ }) { - // Make an HTTP GET request using the http-request - const res = await this.httpRequest.execute(); - - // Retrieve just the data from the response - const { data } = res; - }, -}) -``` - -**Produces** - -![With the http-request prop](https://res.cloudinary.com/pipedreamin/image/upload/v1649961271/docs/components/CleanShot_2022-04-14_at_14.34.16_2x_c0urph.png) - - - -## Send a `POST` request to submit data - -POST sample JSON to [JSONPlaceholder](https://jsonplaceholder.typicode.com/), a free mock API service: - - - -``` javascript -import axios from "axios"; - -export default defineComponent({ - async run({ steps, $ }) { - // Make an HTTP POST request using axios - const resp = await axios({ - method: "POST", - url: `https://jsonplaceholder.typicode.com/posts`, - data: { - name: "Luke", - }, - }); - - // Retrieve just the data from the response - const { data } = resp; - } -}); -``` - - -``` javascript -export default defineComponent({ - props: { - httpRequest: { - type: "http_request", - label: "JSON Placeholder API request", - default: { - method: "POST", - url: "https://jsonplaceholder.typicode.com/posts", - body: { - contentType: "application/json", - fields: [{ name: "Luke" }] - } - } - }, - }, - async run({ steps, $ }) { - // Make an HTTP GET request using the http-request - const res = await this.httpRequest.execute(); - - // Retrieve just the data from the response - const { data } = res; - }, -}) -``` - - - -When you make a `POST` request, you pass `POST` as the `method`, and include the data you'd like to send in the `data` object. - -## Pass query string parameters to a `GET` request - -Retrieve fake comment data on a specific post using [JSONPlaceholder](https://jsonplaceholder.typicode.com/), a free mock API service. Here, you fetch data from the `/comments` resource, retrieving data for a specific post by query string parameter: `/comments?postId=1`. - - - -``` javascript -import axios from "axios"; - -export default defineComponent({ - async run({ steps, $ }) { - // Make an HTTP GET request using axios - const resp = await axios({ - method: "GET", - url: `https://jsonplaceholder.typicode.com/comments`, - params: { - postId: 1, - }, - }); - - // Retrieve just the data from the response - const { data } = resp; - } -}); -``` - - -``` javascript -export default defineComponent({ - props: { - httpRequest: { - type: "http_request", - label: "JSON Placeholder API request", - default: { - method: "GET", - url: "https://jsonplaceholder.typicode.com/comments", - params: { - fields: [{ postId: 1 }] - } - } - }, - }, - async run({ steps, $ }) { - // Make an HTTP GET request using the http-request - const res = await this.httpRequest.execute(); - - // Retrieve just the data from the response - const { data } = res; - }, -}) -``` - -You should pass query string parameters using the `params` object, like above. When you do, `axios` automatically [URL-encodes](https://www.w3schools.com/tags/ref_urlencode.ASP) the parameters for you, which you'd otherwise have to do manually. - - - -## Send a request with HTTP headers - -You pass HTTP headers in the `headers` object of the `axios` request: - -```javascript -import axios from "axios"; - -// Make an HTTP POST request using axios -const resp = await axios({ - method: "POST", - url: `https://jsonplaceholder.typicode.com/posts`, - headers: { - "Content-Type": "application/json", - }, - data: { - name: "Luke", - }, -}); -``` - -## Send a request with a secret or API key - -Most APIs require you authenticate HTTP requests with an API key or other token. **Please review the docs for your service to understand how they accept this data.** - -Here's an example showing an API key passed in an HTTP header: - -```javascript -import axios from "axios"; - -// Make an HTTP POST request using axios -const resp = await axios({ - method: "POST", - url: `https://jsonplaceholder.typicode.com/posts`, - headers: { - "Content-Type": "application/json", - "X-API-Key": "123", // API KEY - }, - data: { - name: "Luke", - }, -}); -``` - -[Copy this workflow to run this code on Pipedream](https://pipedream.com/@dylburger/send-an-http-request-with-headers-p_q6ClzO/edit). - -## Send multiple HTTP requests in sequence - -There are many ways to make multiple HTTP requests. This code shows you a simple example that sends the numbers `1`, `2`, and `3` in the body of an HTTP POST request: - -```javascript -import axios from "axios"; - -export default defineComponent({ - async run({ steps, $ }) { - // We'll store each response and return them in this array - const responses = []; - - for await (const num of [1, 2, 3]) { - const resp = await axios({ - method: "POST", - url: "https://example.com", - data: { - num, // Will send the current value of num in the loop - }, - }); - responses.push(resp.data); - } - - return responses; - }, -}); -``` - -This sends each HTTP request _in sequence_, one after another, and returns an array of response data returned from the URL to which you send the POST request. If you need to make requests _in parallel_, [see these docs](#send-multiple-http-requests-in-parallel). - -[Copy this workflow](https://pipedream.com/@dylburger/iterate-over-a-pipedream-step-export-sending-multiple-http-requests-p_ljCAPN/edit) and fill in your destination URL to see how this works. **This workflow iterates over the value of a Pipedream [step export](/workflows/#step-exports)** - data returned from a previous step. Since you often want to iterate over data returned from a Pipedream action or other code step, this is a common use case. - -## Send multiple HTTP requests in parallel - -Sometimes you'll want to make multiple HTTP requests in parallel. If one request doesn't depend on the results of another, this is a nice way to save processing time in a workflow. It can significantly cut down on the time you spend waiting for one request to finish, and for the next to begin. - -To make requests in parallel, you can use two techniques. By default, we recommend using [`promise.allSettled`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled), which makes all HTTP requests and returns data on their success / failure. If an HTTP request fails, all other requests will proceed. - -```javascript -import axios from "axios"; - -export default defineComponent({ - async run({ steps, $ }) { - const arr = [ - "https://www.example.com", - "https://www.cnn.com", - "https://www.espn.com", - ]; - const promises = arr.map((url) => axios.get(url)); - return Promise.allSettled(promises); - }, -}); -``` - -First, we generate an array of `axios.get` requests (which are all [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)), and then call `Promise.allSettled` to run them in parallel. - -When you want to stop future requests when _one_ of the requests fails, you can use [`Promise.all`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all), instead: - -```javascript -import axios from "axios"; - -export default defineComponent({ - async run({ steps, $ }) { - const arr = [ - "https://www.example.com", - "https://www.cnn.com", - "https://www.espn.com", - ]; - const promises = arr.map((url) => axios.get(url)); - return Promise.all(promises); - }, -}); -``` - -The Mozilla docs expand on the difference between these methods, and when you may want to use one or the other: - -> The `Promise.allSettled()` method returns a promise that resolves after all of the given promises have either fulfilled or rejected, with an array of objects that each describes the outcome of each promise.
-> It is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.
-> In comparison, the Promise returned by `Promise.all()` may be more appropriate if the tasks are dependent on each other / if you'd like to immediately reject upon any of them rejecting. - -## Send a `multipart/form-data` request - - - - -``` javascript -import axios from "axios"; -import FormData from "form-data"; - -export default defineComponent({ - async run({ steps, $ }) { - const formData = new FormData(); - formData.append("name", "Luke Skywalker"); - - const headers = formData.getHeaders(); - const config = { - method: "POST", - url: "https://example.com", - headers, - data: formData, - }; - return await axios(config); - } -}); -``` - - - - -``` javascript -export default defineComponent({ - props: { - httpRequest: { - type: "http_request", - label: "Example Multipart Form Request", - default: { - method: "POST", - url: "https://example.com", - headers: { - contentType: "multipart/form-data", - fields: [{ name: "Luke Skywalker" }] - } - } - }, - }, - async run({ steps, $ }) { - // Make an HTTP GET request using the http-request - const res = await this.httpRequest.execute(); - - // Retrieve just the data from the response - const { data } = res; - }, -}) -``` - - - -[Copy this workflow](https://pipedream.com/@dylburger/send-a-multipart-form-data-request-p_WxCQRyr/edit) to run this example. - -## Download a file to the `/tmp` directory - -This example shows you how to download a file to a file in [the `/tmp` directory](/workflows/building-workflows/code/nodejs/working-with-files/). This can be especially helpful for downloading large files: it streams the file to disk, minimizing the memory the workflow uses when downloading the file. - -```javascript -import { pipeline } from "stream/promises"; -import fs from "fs"; -import got from "got"; - -export default defineComponent({ - async run({ steps, $ }) { - // Download the webpage HTML file to /tmp - return await pipeline( - got.stream("https://example.com"), - fs.createWriteStream('/tmp/file.html') - ); - } -}) -``` - -[Copy this workflow](https://pipedream.com/new?h=tch_wqKfoW) to run this example. - -## Upload a file from the `/tmp` directory - -This example shows you how to make a `multipart/form-data` request with a file as a form part. You can store and read any files from [the `/tmp` directory](/workflows/building-workflows/code/nodejs/working-with-files/#the-tmp-directory). - -This can be especially helpful for uploading large files: it streams the file from disk, minimizing the memory the workflow uses when uploading the file. - -```javascript -import axios from "axios"; -import fs from "fs"; -import FormData from "form-data"; - -export default defineComponent({ - async run({ steps, $ }) { - const formData = new FormData(); - formData.append("file", fs.createReadStream('/tmp/file.pdf')); - const headers = formData.getHeaders(); - - const config = { - method: "POST", - url: "https://example.com", - headers, - data: formData, - }; - return await axios(config); - } -}); -``` - -[Copy this workflow](https://pipedream.com/new?h=tch_Oknf4r) to run this example. - -## IP addresses for HTTP requests made from Pipedream workflows - -By default, [HTTP requests made from Pipedream can come from a large range of IP addresses](/privacy-and-security/#hosting-details). **If you need to restrict the IP addresses HTTP requests come from, you have two options**: - -- [Use a Pipedream VPC](/workflows/vpc/) to route all outbound HTTP requests through a single IP address -- If you don't need to access the HTTP response data, you can [use `$send.http()`](/workflows/data-management/destinations/http/) to send requests from a [limited set of IP addresses](/workflows/data-management/destinations/http/#ip-addresses-for-pipedream-http-requests). - - -## Use an HTTP proxy to proxy requests through another host - -By default, HTTP requests made from Pipedream can come from a range of IP addresses. **If you need to make requests from a single IP address, you can route traffic through an HTTP proxy**: - -```javascript -import axios from "axios"; -import httpsProxyAgent from "https-proxy-agent"; - -export default defineComponent({ - props: { - user: { - type: 'string', - label: 'Username', - description: 'The username for the HTTP proxy authentication', - }, - pass: { - type: 'string', - label: 'Password', - secret: true, - description: 'The password for the HTTP proxy authentication', - }, - host: { - type: 'string', - label: "HTTP Proxy Host", - description: "The URL for the HTTP proxy", - }, - port: { - type: "string", - label: "Port", - description: "The port the HTTP proxy is accepting requests at", - }, - target_host: { - type: 'string', - label: "Target Host", - description: "The URL for the end target to reach through the proxy", - }, - method: { - type: 'string', - default: 'GET', - label: "HTTP method", - description: "The HTTP method to use to reach the end target host" - }, - body: { - type: 'object', - label: "HTTP body", - description: "The HTTP body payload to send to the end target host" - } - }, - async run({ steps, $ }) { - const { user, pass, host, port, target_host, method } = this; - const agent = new httpsProxyAgent(`http://${user}:${pass}@${host}:${port}`); - - const config = { - method, - url: target_host, - body, - httpsAgent: agent, - }; - - return await axios.request(config); - } -}); -``` - -[Copy this workflow to run this code on Pipedream](https://pipedream.com/new?h=tch_mypfby). - -## Stream a downloaded file directly to another URL - -Sometimes you need to upload a downloaded file directly to another service, without processing the downloaded file. You could [download the file](#download-a-file-to-the-tmp-directory) and then [upload it](#upload-a-file-from-the-tmp-directory) to the other URL, but these intermediate steps are unnecessary: you can just stream the download to the other service directly, without saving the file to disk. - -This method is especially effective for large files that exceed the [limits of the `/tmp` directory](/workflows/limits/#disk). - -[Copy this workflow](https://pipedream.com/@dylburger/stream-download-to-upload-p_5VCLoa1/edit) or paste this code into a [new Node.js code step](/workflows/building-workflows/code/nodejs/): - -```javascript -import stream from "stream"; -import { promisify } from "util"; -import got from "got"; - -export default defineComponent({ - async run({ steps, $ }) { - const pipeline = promisify(stream.pipeline); - - await pipeline( - got.stream("https://example.com"), - got.stream.post("https://example2.com") - ); - } -}); -``` - -You'll want to replace `https://example.com` with the URL you'd like to stream data from, and replace `https://example2.com` with the URL you'd like to send the data _to_. `got` streams the content directly, downloading the file using a `GET` request and uploading it as a `POST` request. - -If you need to modify this behavior, [see the `got` Stream API](https://github.com/sindresorhus/got#gotstreamurl-options). - -## Catch and process HTTP errors - -By default, `axios` throws an error when the HTTP response code is in the 400-500 range (a client or server error). If you'd like to process the error data instead of throwing an error, you can pass a custom function to the `validateStatus` property: - -```javascript -import axios from "axios"; - -export default defineComponent({ - async run({ steps, $ }) { - const resp = await axios({ - url: "https://httpstat.us/400", - validateStatus: () => true, // will not throw error when axios gets a 400+ status code (the default behavior) - }); - if (resp.status >= 400) { - this.debug = resp; - throw new Error(JSON.stringify(resp.data)); // This can be modified to throw any error you'd like - } - return resp; - } -}); -``` - -See [the `axios` docs](https://github.com/axios/axios#request-config) for more details. - -## Paginating API requests - -When you fetch data from an API, the API may return records in "pages". For example, if you're trying to fetch a list of 1,000 records, the API might return those in groups of 100 items. - -Different APIs paginate data in different ways. You'll need to consult the docs of your API provider to see how they suggest you paginate through records. - -## Send GraphQL request - -Make a GraphQL request using the `graphql-request` NPM package: - -```javascript -import { graphql } from 'graphql' -import { request, gql } from 'graphql-request' - -export default defineComponent({ - async run({ steps, $ }) { - const document = gql` - query samplePokeAPIquery { - generations: pokemon_v2_generation { - name - pokemon_species: pokemon_v2_pokemonspecies_aggregate { - aggregate { - count - } - } - } - } - ` - return await request('https://beta.pokeapi.co/graphql/v1beta', document) - }, -}) -``` - - -The graphql package is required - -The `graphql` package is required for popular GraphQL clients to function, like `graphql-request` and `urql`. - -Even though you will not need to use the `graphql` code itself in your code step, it's required to import it in order for `graphql-request` to function. - - -### Send an authenticated GraphQL request - -Authenticate your connected accounts in Pipedream with GraphQL requests using the `app` prop: - -```javascript -import { graphql } from 'graphql' -import { GraphQLClient, gql } from 'graphql-request' - -export default defineComponent({ - props: { - github: { - type: 'app', - app: 'github' - } - }, - async run({ steps, $ }) { - const me = gql` - query { - viewer { - login - } - } - ` - - const client = new GraphQLClient('https://api.github.com/graphql', { - headers: { - authorization: `Bearer ${this.github.$auth.oauth_access_token}`, - }, - }) - - return await client.request(me) - }, -}) - -``` - -Alternatively, you can use Environment Variables as well for simple API key based GraphQL APIs. diff --git a/docs-v2/pages/workflows/building-workflows/code/nodejs/index.mdx b/docs-v2/pages/workflows/building-workflows/code/nodejs/index.mdx deleted file mode 100644 index 1c7163e23ae37..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/nodejs/index.mdx +++ /dev/null @@ -1,505 +0,0 @@ -import Callout from '@/components/Callout' -import VideoPlayer from "@/components/VideoPlayer"; - -# Running Node.js in workflows - -Pipedream supports writing Node.js v{process.env.PIPEDREAM_NODE_VERSION} at any point of a workflow. - -Anything you can do with Node.js, you can do in a workflow. This includes using most of [npm's 400,000+ packages](#using-npm-packages). JavaScript is one of the [most used](https://insights.stackoverflow.com/survey/2019#technology-_-programming-scripting-and-markup-languages) [languages](https://github.blog/2018-11-15-state-of-the-octoverse-top-programming-languages/) in the world, with a thriving community and extensive package ecosystem. If you work on websites and know JavaScript well, Pipedream makes you a full stack engineer. If you've never used JavaScript, see the [resources below](#new-to-javascript). - - -It's important to understand the core difference between Node.js and the JavaScript that runs in your web browser: **Node doesn't have access to some of the things a browser expects, like the HTML on the page, or its URL**. If you haven't used Node before, be aware of this limitation as you search for JavaScript examples on the web. - - -## Adding a code step - -1. Click the **+** button below any step of your workflow. -2. Select the option to **Run custom code**. - -Note that new code steps will default to Node.js v{process.env.PIPEDREAM_NODE_VERSION}. You can add any Node.js code in the editor that appears. For example, try: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - console.log("This is Node.js code"); - $.export("test", "Some test data"); - return "Test data"; - }, -}); -``` - -Code steps use the same editor ([Monaco](https://microsoft.github.io/monaco-editor/)) used in Microsoft's [VS Code](https://code.visualstudio.com/), which supports syntax highlighting, automatic indentation, and more. - -## Sharing data between steps - -A Node.js step can use data from other steps using [step exports](/workflows/#step-exports), it can also export data for other steps to use. - -### Using data from another step - -In Node.js steps, data from the initial workflow trigger and other steps are available in the `steps` argument passed to the `run({ steps, $ })` function. - -In this example, we'll pretend this data is coming into our HTTP trigger via POST request. - -```json -{ - "id": 1, - "name": "Bulbasaur", - "type": "plant" -} -``` - -In our Node.js step, we can access this data in the `steps` variable Specifically, this data from the POST request into our workflow is available in the `trigger` property. - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - const pokemonName = steps.trigger.event.name; - const pokemonType = steps.trigger.event.type; - - console.log(`${pokemonName} is a ${pokemonType} type Pokemon`); - }, -}); -``` - -### Sending data downstream to other steps - -To share data created, retrieved, transformed or manipulated by a step to others downstream you can simply `return` it. - -```javascript -// This step is named "code" in the workflow -import axios from "axios"; - -export default defineComponent({ - async run({ steps, $ }) { - const response = await axios.get( - "https://pokeapi.co/api/v2/pokemon/charizard" - ); - // Store the response's JSON contents into a variable called "pokemon" - const pokemon = response.data; - - // Expose the pokemon data downstream to other steps in the $return_value from this step - return pokemon; - }, -}); -``` - -### Using $.export - - - -Alternatively, use the built in `$.export` helper instead of returning data. The `$.export` creates a _named_ export with the given value. - -```javascript -// This step is named "code" in the workflow -import axios from "axios"; - -export default defineComponent({ - async run({ steps, $ }) { - const response = await axios.get( - "https://pokeapi.co/api/v2/pokemon/charizard" - ); - // Store the response's JSON contents into a variable called "pokemon" - const pokemon = response.data; - - // Expose the pokemon data downstream to other steps in the pokemon export from this step - $.export("pokemon", pokemon); - }, -}); -``` - -Now this `pokemon` data is accessible to downstream steps within `steps.code.pokemon` - - -You can only export JSON-serializable data from steps. Things like: - -- strings -- numbers -- objects - -You cannot export functions or other complex objects that don't serialize to JSON. [You can save that data to a file in the `/tmp` directory](/workflows/building-workflows/code/nodejs/working-with-files/). - - -## Passing props to code steps - - - -You can make code steps reusable by allowing them to accept props. Instead of hard-coding the values of variables within the code itself, you can pass them to the code step as arguments or parameters _entered in the workflow builder_. - -For example, let's define a `firstName` prop. This will allow us to freely enter text from the workflow builder. - -```javascript -export default defineComponent({ - props: { - firstName: { - type: "string", - label: "Your first name", - default: "Dylan", - }, - }, - async run({ steps, $ }) { - console.log( - `Hello ${this.firstName}, congrats on crafting your first prop!` - ); - }, -}); -``` - -The workflow builder now can accept text input to populate the `firstName` to this particular step only: - -![Workflow builder displaying the input visually as a text input field](/images/nodejs/first-name-prop-example.png) - -Accepting a single string is just one example, you can build a step to accept arrays of strings through a dropdown presented in the workflow builder. - -[Read the props reference for the full list of options](/components/contributing/api/#props). - -## How Pipedream Node.js components work - - - -When you add a new Node.js code step or use the examples in this doc, you'll notice a common structure to the code: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // this Node.js code will execute when the step runs - }, -}); -``` - -This defines [a Node.js component](/components/contributing/api/). Components let you: - -- Pass input to steps using [props](/workflows/building-workflows/code/nodejs/#passing-props-to-code-steps) -- [Connect an account to a step](/apps/connected-accounts/#from-a-code-step) -- [Issue HTTP responses](/workflows/building-workflows/triggers/#http-responses) -- Perform workflow-level flow control, like [ending a workflow early](#ending-a-workflow-early) - -When the step runs, Pipedream executes the `run` method: - -- Any asynchronous code within a code step [**must** be run synchronously](/workflows/building-workflows/code/nodejs/async/), using the `await` keyword or with a Promise chain, using `.then()`, `.catch()`, and related methods. -- Pipedream passes the `steps` variable to the run method. `steps` is also an object, and contains the [data exported from previous steps](/workflows/#step-exports) in your workflow. -- You also have access to the `$` variable, which gives you access to methods like `$.respond`, `$.export`, [and more](/components/contributing/api/#actions). - -If you're using [props](/workflows/building-workflows/code/nodejs/#passing-props-to-code-steps) or [connect an account to a step](/apps/connected-accounts/#from-a-code-step), the component exposes them in the variable `this`, which refers to the current step: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // `this` refers to the running component. Props, connected accounts, etc. are exposed here - console.log(this); - }, -}); -``` - -When you [connect an account to a step](/apps/connected-accounts/#from-a-code-step), Pipedream exposes the auth info in the variable [`this.appName.$auth`](/workflows/building-workflows/code/nodejs/auth/#accessing-connected-account-data-with-thisappnameauth). - -## Logs - -You can call `console.log` or `console.error` to add logs to the execution of a code step. - -These logs will appear just below the associated step. `console.log` messages appear in black, `console.error` in red. - -### `console.dir` - -If you need to print the contents of JavaScript objects, use `console.dir`: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - console.dir({ - name: "Luke", - }); - }, -}); -``` - -## Syntax errors - -Pipedream will attempt to catch syntax errors when you're writing code, highlighting the lines where the error occurred in red. - - -While you can save a workflow with syntax errors, it's unlikely to run correctly on new events. Make sure to fix syntax errors before running your workflow. - - -## Using `npm` packages - - - -[npm](https://www.npmjs.com/) hosts JavaScript packages: libraries of code someone else wrote and packaged for others to use. npm has over 400,000 packages and counting. - -### Just `import` it - -To use an npm package on Pipedream, simply `import` it: - -```javascript -import axios from "axios"; -``` - -By default, workflows don't have any packages installed. Just import any package in this manner to make it available in the step. - -If a package only supports the [CommonJS module format](https://nodejs.org/api/modules.html), you may have to `require` it: - -```javascript -const axios = require("axios"); -``` - -**Within a single step, you can only use `import` or `require` statements, not both**. See [this section](#require-is-not-defined) for more details. - -When Pipedream runs your workflow, we download the associated npm package for you before running your code steps. - -If you've used Node before, you'll notice there's no `package.json` file to upload or edit. We want to make package management simple, so just `import` or `require` the module like you would in your code, after package installation, and get to work. - -### Third-party package limitations - -Some packages require access to a web browser to run, and don't work with Node.js. Often this limitation is documented on the package `README`, but often it's not. If you're not sure and need to use it, we recommend just trying to `import` or `require` it. - -Other packages require access to binaries or system libraries that aren't installed in the Pipedream execution environment. - -If you're seeing any issues with a specific package, please [let us know](https://pipedream.com/support/) and we'll try to help you make it work. - -### Pinning package versions - -Each time you deploy a workflow with Node.js code, Pipedream downloads the npm packages you `import` in your step. **By default, Pipedream deploys the latest version of the npm package each time you deploy a change**. - -There are many cases where you may want to specify the version of the packages you're using. If you'd like to use a _specific_ version of a package in a workflow, you can add that version in the `import` string, for example: - -```javascript -import axios from "axios@0.19.2"; -``` - -You can also pass the version specifiers used by npm to support [semantic version](https://semver.org/) upgrades. For example, to allow for future patch version upgrades: - -```javascript -import axios from "axios@~0.20.0"; -``` - -To allow for patch and minor version upgrades, use: - -```javascript -import got from "got@^11.0.0"; -``` - - -The behavior of the caret (`^`) operator is different for 0.x versions, for which it will only match patch versions, and not minor versions. - - -You can also specify different versions of the same package in different steps. Each step will used the associated version. Note that this also increases the size of your deployment, which can affect cold start times. - -### CommonJS vs. ESM imports - -In Node.js, you may be used to importing third-party packages using the `require` statement: - -```javascript -const axios = require("axios"); -``` - -In this example, we're including the `axios` [CommonJS module](https://nodejs.org/api/modules.html) published to npm. You import CommonJS modules using the `require` statement. - -But you may encounter this error in workflows: - -`Error Must use import to load ES Module` - -This means that the package you're trying to `require` uses a different format to export their code, called [ECMAScript modules](https://nodejs.org/api/esm.html#esm_modules_ecmascript_modules) (**ESM**, or **ES modules**, for short). With ES modules, you instead need to `import` the package: - -```javascript -import got from "got"; -``` - -Most package publish both CommonJS and ESM versions, so **if you always use `import`, you're less likely to have problems**. In general, refer to the documentation for your package for instructions on importing it correctly. - -### `require` is not defined - -This error means that you cannot use CommonJS and ESM imports in the same step. For example, if you run code like this: - -```javascript -import fetch from "node-fetch"; -const axios = require("axios"); -``` - -your workflow will throw a `require is not defined` error. There are two solutions: - -1. Try converting your CommonJS `require` statement into an ESM `import` statement. For example, convert this: - -```javascript -const axios = require("axios"); -``` - -to this: - -```javascript -import axios from "axios"; -``` - -2. If the `import` syntax fails to work, separate your imports into different steps, using only CommonJS requires in one step, and only ESM imports in another. - -## Variable scope - -Any variables you create within a step are scoped to that step. That is, they cannot be referenced in any other step. - -Within a step, the [normal rules of JavaScript variable scope](https://developer.mozilla.org/en-US/docs/Glossary/Scope) apply. - -**When you need to share data across steps, use [step exports](/workflows/#step-exports).** - -## Making HTTP requests from your workflow - -There are two ways to make HTTP requests in code steps: - -- Use any HTTP client that works with Node.js. [See this example guide for how to use `axios` to make HTTP requests](/workflows/building-workflows/code/nodejs/http-requests/). -- [Use `$.send.http()`](/workflows/data-management/destinations/http/#using-sendhttp-in-workflows), a Pipedream-provided method for making asynchronous HTTP requests. - -In general, if you just need to make an HTTP request but don't care about the response, [use `$.send.http()`](/workflows/data-management/destinations/http/#using-sendhttp-in-workflows). If you need to operate on the data in the HTTP response in the rest of your workflow, [use `axios`](/workflows/building-workflows/code/nodejs/http-requests/). - -## Returning HTTP responses - -You can return HTTP responses from [HTTP-triggered workflows](/workflows/building-workflows/triggers/#http) using the [`$.respond()` function](/workflows/building-workflows/triggers/#http-responses). - -## Invoke another workflow - - -This is an alpha feature and is subject to change without prior notice. - - -You can invoke another workflow in your workspace with `$.flow.trigger`: - -``` -await $.flow.trigger( - workflowId, // your Pipedream workflow ID, e.g. p_abc123 - payload, // any JSON-serializable data -) -``` - -[Find your workflow's ID here.](/troubleshooting/#where-do-i-find-my-workflows-id) - -This invokes the workflow directly -- you don't need to configure a trigger, and the request does not leave the platform. - -We also provide a [Trigger Workflow](https://pipedream.com/apps/helper-functions/actions/trigger-workflow) action in the [Helper Functions](https://pipedream.com/apps/helper-functions) app so you don't need to do it by code! - -## Ending a workflow early - - - -Sometimes you want to end your workflow early, or otherwise stop or cancel the execution or a workflow under certain conditions. For example: - -- You may want to end your workflow early if you don't receive all the fields you expect in the event data. -- You only want to run your workflow for 5% of all events sent from your source. -- You only want to run your workflow for users in the United States. If you receive a request from outside the U.S., you don't want the rest of the code in your workflow to run. -- You may use the `user_id` contained in the event to look up information in an external API. If you can't find data in the API tied to that user, you don't want to proceed. - -**In any code step, calling `return $.flow.exit()` will end the execution of the workflow immediately.** No remaining code in that step, and no code or destination steps below, will run for the current event. - - -It's a good practice to use `return $.flow.exit()` to immediately exit the workflow. -In contrast, `$.flow.exit()` on its own will end the workflow only after executing all remaining code in the step. - - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - return $.flow.exit(); - console.log( - "This code will not run, since $.flow.exit() was called above it" - ); - }, -}); -``` - -You can pass any string as an argument to `$.flow.exit()`: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - return $.flow.exit("End message"); - }, -}); -``` - -Or exit the workflow early within a conditional: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // Flip a coin, running $.flow.exit() for 50% of events - if (Math.random() > 0.5) { - return $.flow.exit(); - } - console.log("This code will only run 50% of the time"); - }, -}); -``` - -## Errors - -[Errors](https://nodejs.org/dist/latest-v10.x/docs/api/errors.html#errors_errors) raised in a code step will stop the execution of code or destinations that follow. - -### Configuration Error - -Throwing a `ConfigurationError` in a Node.js step will display the error message in a dedicated area. - -This is useful for providing feedback during validation of `props`. In the example below, a required Header value is missing from the Google Sheets action: - -![Example of an ConfigurationError](/images/nodejs/configuration-error-example.png) - -Or you can use it for validating the format of a given `email` prop: - -```javascript -import { ConfigurationError } from "@pipedream/platform"; - -export default defineComponent({ - props: { - email: { type: "string" }, - }, - async run({ steps, $ }) { - // if the email address doesn't include a @, it's not valid - if (!this.email.includes("@")) { - throw new ConfigurationError("Provide a valid email address"); - } - }, -}); -``` - -## Using secrets in code - -Workflow code is private. Still, we recommend you don't include secrets โ€” API keys, tokens, or other sensitive values โ€” directly in code steps. - -Pipedream supports [environment variables](/workflows/environment-variables/) for keeping secrets separate from code. Once you create an environment variable in Pipedream, you can reference it in any workflow using `process.env.VARIABLE_NAME`. The values of environment variables are private. - -See the [Environment Variables](/workflows/environment-variables/) docs for more information. - -## Limitations of code steps - -Code steps operate within the [general constraints on workflows](/workflows/limits/#workflows). As long as you stay within those limits and abide by our [acceptable use policy](/workflows/limits/#acceptable-use), you can add any number of code steps in a workflow to do virtually anything you'd be able to do in Node.js. - -If you're trying to run code that doesn't work or you have questions about any limits on code steps, [please reach out](https://pipedream.com/support/). - -## Editor settings - -We use the [Monaco Editor](https://microsoft.github.io/monaco-editor/), which powers VS Code and other web-based editors. - -We also let you customize the editor. For example, you can enable Vim mode, and change the default tab size for indented code. Visit your [Settings](https://pipedream.com/settings) to modify these settings. - -## Keyboard Shortcuts - -We use the [Monaco Editor](https://microsoft.github.io/monaco-editor/), which powers VS Code. As a result, many of the VS Code [keyboard shortcuts](https://code.visualstudio.com/docs/getstarted/keybindings) should work in the context of the editor. - -For example, you can use shortcuts to search for text, format code, and more. - -## New to JavaScript? - -We understand many of you might be new to JavaScript, and provide resources for you to learn the language below. - -When you're searching for how to do something in JavaScript, some of the code you try might not work in Pipedream. This could be because the code expects to run in a browser, not a Node.js environment. The same goes for [npm packages](#using-npm-packages). - -### I'm new to programming - -Many of the most basic JavaScript tutorials are geared towards writing code for a web browser to run. This is great for learning โ€” a webpage is one of the coolest things you can build with code. We recommend starting with these general JavaScript tutorials and trying the code you learn on Pipedream: - -- [JavaScript For Cats](http://jsforcats.com/) -- [Mozilla - JavaScript First Steps](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps) -- [StackOverflow](https://stackoverflow.com/) operates a programming Q&A site that typically has the first Google result when you're searching for something specific. It's a great place to find answers to common questions. - -### I know how to code, but don't know JavaScript - -- [A re-introduction to JavaScript (JS tutorial)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript) -- [MDN language overview](https://developer.mozilla.org/en-US/docs/Web/JavaScript) -- [Eloquent Javascript](https://eloquentjavascript.net/) -- [Node School](https://nodeschool.io/) -- [You Don't Know JS](https://github.com/getify/You-Dont-Know-JS) diff --git a/docs-v2/pages/workflows/building-workflows/code/nodejs/rerun.mdx b/docs-v2/pages/workflows/building-workflows/code/nodejs/rerun.mdx deleted file mode 100644 index e556d07979d4b..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/nodejs/rerun.mdx +++ /dev/null @@ -1,266 +0,0 @@ -import Callout from "@/components/Callout"; -import VideoPlayer from "@/components/VideoPlayer"; - -# Pause, resume, and rerun a workflow - -You can use `$.flow.suspend` and `$.flow.rerun` to pause a workflow and resume it later. - -This is useful when you want to: - -- Pause a workflow until someone manually approves it -- Poll an external API until some job completes, and proceed with the workflow when it's done -- Trigger an external API to start a job, pause the workflow, and resume it when the external API sends an HTTP callback - -We'll cover all of these examples below. - -## `$.flow.suspend` - -Use `$.flow.suspend` when you want to pause a workflow and proceed with the remaining steps only when manually approved or cancelled. - -For example, you can suspend a workflow and send yourself a link to manually resume or cancel the rest of the workflow: - -```javascript -export default defineComponent({ - async run({ $ }) { - const { resume_url, cancel_url } = $.flow.suspend(); - $.send.email({ - subject: "Please approve this important workflow", - text: `Click here to approve the workflow: ${resume_url}, and cancel here: ${cancel_url}`, - }); - // Pipedream suspends your workflow at the end of the step - }, -}); -``` - -You'll receive an email like this: - -
-approve this workflow -
- -And can resume or cancel the rest of the workflow by clicking on the appropriate link. - -### `resume_url` and `cancel_url` - -In general, calling `$.flow.suspend` returns a `cancel_url` and `resume_url` that lets you cancel or resume paused executions. Since Pipedream pauses your workflow at the _end_ of the step, you can pass these URLs to any external service before the workflow pauses. If that service accepts a callback URL, it can trigger the `resume_url` when its work is complete. - -These URLs are specific to a single execution of your workflow. While the workflow is paused, you can load these in your browser or send any HTTP request to them: - -- Sending an HTTP request to the `cancel_url` will cancel that execution -- Sending an HTTP request to the `resume_url` will resume that execution - -If you resume a workflow, any data sent in the HTTP request is passed to the workflow and returned in the `$resume_data` [step export](/workflows/#step-exports) of the suspended step. For example, if you call `$.flow.suspend` within a step named `code`, the `$resume_data` export should contain the data sent in the `resume_url` request: - -
-resume data step export -
- -Requests to the `resume_url` have [the same limits as any HTTP request to Pipedream](/workflows/limits/#http-request-body-size), but you can send larger payloads using our [large payload](/workflows/building-workflows/triggers/#sending-large-payloads) or [large file](/workflows/building-workflows/triggers/#large-file-support) interfaces. - -### Default timeout of 24 hours - -By default, `$.flow.suspend` will automatically cancel the workflow after 24 hours. You can set your own timeout (in milliseconds) as the first argument: - -```javascript -export default defineComponent({ - async run({ $ }) { - // 7 days - const TIMEOUT = 1000 * 60 * 60 * 24 * 7; - $.flow.suspend(TIMEOUT); - }, -}); -``` - -## `$.flow.rerun` - - - -Use `$.flow.rerun` when you want to run a specific step of a workflow multiple times. This is useful when you need to start a job in an external API and poll for its completion, or have the service call back to the step and let you process the HTTP request within the step. - -### Retrying a Failed API Request - -`$.flow.rerun` can be used to conditionally retry a failed API request due to a service outage or rate limit reached. Place the `$.flow.rerun` call within a `catch` block to only retry the API request if an error is thrown: - -```javascript -import { axios } from "@pipedream/platform"; - -export default defineComponent({ - props: { - openai: { - type: "app", - app: "openai", - }, - }, - async run({ steps, $ }) { - try { - return await axios($, { - url: `https://api.openai.com/v1/completions`, - method: "post", - headers: { - Authorization: `Bearer ${this.openai.$auth.api_key}`, - }, - data: { - model: "text-davinci-003", - prompt: "Say this is a test", - max_tokens: 7, - temperature: 0, - }, - }); - } catch (error) { - const MAX_RETRIES = 3; - const DELAY = 1000 * 30; - - // Retry the request every 30 seconds, for up to 3 times - $.flow.rerun(DELAY, null, MAX_RETRIES); - } - }, -}); -``` - -### Polling for the status of an external job - -Sometimes you need to poll for the status of an external job until it completes. `$.flow.rerun` lets you rerun a specific step multiple times: - -```javascript -import axios from "axios"; - -export default defineComponent({ - async run({ $ }) { - const MAX_RETRIES = 3; - // 10 seconds - const DELAY = 1000 * 10; - const { run } = $.context; - // $.context.run.runs starts at 1 and increments when the step is rerun - if (run.runs === 1) { - // $.flow.rerun(delay, context (discussed below), max retries) - $.flow.rerun(DELAY, null, MAX_RETRIES); - } else if (run.runs === MAX_RETRIES + 1) { - throw new Error("Max retries exceeded"); - } else { - // Poll external API for status - const { data } = await axios({ - method: "GET", - url: "https://example.com/status", - }); - // If we're done, continue with the rest of the workflow - if (data.status === "DONE") return data; - - // Else retry later - $.flow.rerun(DELAY, null, MAX_RETRIES); - } - }, -}); -``` - -`$.flow.rerun` accepts the following arguments: - -```javascript -$.flow.rerun( - delay, // The number of milliseconds until the step will be rerun - context, // JSON-serializable data you need to pass between runs - maxRetries // The total number of times the step will rerun. Defaults to 10 -); -``` - -### Accept an HTTP callback from an external service - -When you trigger a job in an external service, and that service can send back data in an HTTP callback to Pipedream, you can process that data within the same step using `$.flow.rerun`: - -```javascript -import axios from "axios"; - -export default defineComponent({ - async run({ steps, $ }) { - const TIMEOUT = 86400 * 1000; - const { run } = $.context; - // $.context.run.runs starts at 1 and increments when the step is rerun - if (run.runs === 1) { - const { cancel_url, resume_url } = $.flow.rerun(TIMEOUT, null, 1); - - // Send resume_url to external service - await axios({ - method: "POST", - url: "your callback URL", - data: { - resume_url, - cancel_url, - }, - }); - } - - // When the external service calls back into the resume_url, you have access to - // the callback data within $.context.run.callback_request - else if (run.callback_request) { - return run.callback_request; - } - }, -}); -``` - -### Passing `context` to `$.flow.rerun` - -Within a Node.js code step, `$.context.run.context` contains the `context` passed from the prior call to `rerun`. This lets you pass data from one run to another. For example, if you call: - -```javascript -$.flow.rerun(1000, { hello: "world" }); -``` - -`$.context.run.context` will contain: - -
-resume data step export -
- -### `maxRetries` - -By default, `maxRetries` is **10**. - -When you exceed `maxRetries`, the workflow proceeds to the next step. If you need to handle this case with an exception, `throw` an error from the step: - -```javascript -export default defineComponent({ - async run({ $ }) { - const MAX_RETRIES = 3; - const { run } = $.context; - if (run.runs === 1) { - $.flow.rerun(1000, null, MAX_RETRIES); - } else if (run.runs === MAX_RETRIES + 1) { - throw new Error("Max retries exceeded"); - } - }, -}); -``` - -## Behavior when testing - -When you're building a workflow and test a step with `$.flow.suspend` or `$.flow.rerun`, it will not suspend the workflow, and you'll see a message like the following: - -> Workflow execution canceled โ€” this may be due to `$.flow.suspend()` usage (not supported in test) - -These functions will only suspend and resume when run in production. - -## Credits when using `suspend` / `rerun` - -You are not charged for the time your workflow is suspended during a `$.flow.rerun` or `$.flow.suspend`. Only when workflows are resumed will compute time count toward [credit usage](/pricing/#credits-and-billing). - - -When a suspended workflow reawakens, it will reset the credit counter. - -Each rerun or reawakening from a suspension will count as a new fresh credit. - - diff --git a/docs-v2/pages/workflows/building-workflows/code/nodejs/sharing-code.mdx b/docs-v2/pages/workflows/building-workflows/code/nodejs/sharing-code.mdx deleted file mode 100644 index 80435f614f883..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/nodejs/sharing-code.mdx +++ /dev/null @@ -1,148 +0,0 @@ -import Callout from '@/components/Callout' -import VideoPlayer from '@/components/VideoPlayer' - -# Sharing code across workflows - -[Actions](/components/contributing/#actions) are reusable steps. When you author an action, you can add it to your workflow like you would other actions, by clicking the **+** button below any step. - -Pipedream provides two ways to share code across workflows: - -- **Publish an action from a Node.js code step**. [Publish any Node.js code step as a reusable action](/workflows/building-workflows/code/nodejs/sharing-code/#publish-an-action-from-a-nodejs-code-step) from the Pipedream dashboard. - -- **Create an action from code**. Develop your action code on your local filesystem and [publish to your Pipedream account using the Pipedream CLI](/components/contributing/actions-quickstart/). - -## Publish an action from a Node.js code step - - - -You can publish any of your Node.js code steps into a reusable action. This enables you to write a Node.js code step once, and reuse it across many workflows without rewriting it. - -To convert a Node.js code step into an publishable action, make sure to include the below properties in your Node.js step: -- `version` -- `name` -- `key` -- `type` - -```javascript {6-9} -// Adding properties to a regular Node.js code step make it publishable -import { parseISO, format } from 'date-fns'; - -// Returns a formatted datetime string -export default defineComponent({ - name: 'Format Date', - version: '0.0.1', - key: 'format-date', - type: 'action', - props: { - date: { - type: "string", - label: "Date", - description: "Date to be formatted", - }, - format: { - type: 'string', - label: "Format", - description: "Format to apply to the date. [See date-fns format](https://date-fns.org/v2.29.3/docs/format) as a reference." - } - }, - async run({ $ }) { - const formatted = format(parseISO(this.date), this.format); - return formatted; - }, -}) - -``` - -Click **Test** to verify the step is working as expected. Only actions that have been successfully tested are to be published. - -Then open the menu in the top righthand corner of the code step and select **Publish to My Actions**: - -![Publish a Node.js code step to My Actions](https://res.cloudinary.com/pipedreamin/image/upload/v1664805822/docs/components/CleanShot_2022-10-03_at_10.03.08_2x_lpbjjs.png) - -And now you've successfully saved a custom Node.js code step to your account. You'll be able to use this code step in any of your workflows. - - -**Why can't I use the `steps` variable in published Node.js code steps?** - -The `steps` variable contains the _workflows_ step exports. - -When you publish a Node.js code step as an action, it becomes reusable across many workflows. - -This means that the step exports available vary depending on the workflow it's running on. - -Defining props is a way to map inputs to actions and allow individual workflows to define which exports should be used. - - -## Using your published actions - -To use your custom action, create a new step in your workflow and select **My Actions**. - -![Select My Actions in a new workflow step to access your actions](https://res.cloudinary.com/pipedreamin/image/upload/v1664806138/docs/components/CleanShot_2022-10-03_at_10.08.42_2x_qt1ht3.png) - -From there you'll be able to view and select any of your published actions and use them as steps. - -## Updating published Node.js code step actions - -If you need to make a change and update the underlying code to your published Node.js code step, you can do so by incrementing the `version` field on the Node.js code step. - -Every instance of your published action from a code step is editable. In any workflow where you've reused a published action, open the menu on the right side of the action and click **Edit action** button. - -This will open up the code editor for this action, even if this wasn't the original code step. - -Now increment the `version` field in the code: - -```javascript {6} -import { parseISO, format } from 'date-fns'; - -// The version field on a Node.js action is versioned -export default defineComponent({ - name: 'Format Date', - version: '0.0.2', - key: 'format-date', - type: 'action', - props: { - date: { - type: "string", - label: "Date", - description: "Date to be formatted", - }, - format: { - type: 'string', - label: "Format", - description: "Format to apply to the date. [See date-fns format](https://date-fns.org/v2.29.3/docs/format) as a reference." - } - }, - async run({ $ }) { - const formatted = format(parseISO(this.date), this.format); - return formatted; - }, -}) -``` - -Finally use the **Publish to My Actions** button in the right hand side menu to publish this new version. - - -**I'm not seeing an **Edit Action** button option in my step** - -The **Edit Action** button is only available for actions that are published from Node.js code steps. - -Actions submitted to the public component registry can contain multiple files. At this time it's not possible to edit multi-file components direct in a code step. - - - -**Will publishing a new version of an action automatically update all other steps using it?** - -No, a new version of an action doesn't automatically update all instances of the same action across your workflows. This gives you the control to gradually update. - - -After publishing a new version, all other steps using this same action will have the option to [update to the latest version](/workflows/building-workflows/actions/#updating-actions-to-the-latest-version). - -## Differences between publishing actions from workflow Node.js code steps and directly from code - -Publishing reusable actions from Node.js code steps allows you to quickly scaffold and publish Node.js code steps without leaving the Pipedream dashboard. The result is the same as publishing actions from code using the Pipedream CLI. - -However, there are some differences. - -1. Node.js code step actions cannot make use of [app files to further reduce redundancy](/components/contributing/guidelines/#promoting-reusability). -2. Node.js code step actions cannot be published to the [Pipedream Component Registry](/components/contributing/). -3. Node.js code step actions have a slightly different structure than [action components](/components/contributing/api/#component-api). diff --git a/docs-v2/pages/workflows/building-workflows/code/nodejs/using-data-stores.mdx b/docs-v2/pages/workflows/building-workflows/code/nodejs/using-data-stores.mdx deleted file mode 100644 index 2a00ad0496578..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/nodejs/using-data-stores.mdx +++ /dev/null @@ -1,338 +0,0 @@ -import Callout from '@/components/Callout' - -# Using Data Stores - -In Node.js (Javascript) code steps, you can also store and retrieve data within code steps without connecting a 3rd party database. - -Add data stores to steps as props. By adding the store as a prop, it's available under `this`. - -For example, you can define a data store as a dataStore prop, and reference it at `this.dataStore`: - -```javascript -export default defineComponent({ - props: { - // Define that the "dataStore" variable in our component is a data store - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - // Now we can access the data store at "this.dataStore" - await this.dataStore.get("email"); - }, -}); -``` - - -**`props` injects variables into `this`**. See how we declared the `dataStore` prop in the `props` object, and then accessed it at `this.dataStore` in the `run` method. - - - -All data store operations are asynchronous, so must be `await`ed. - - -## Using the data store - -Once you've defined a data store prop for your component, then you'll be able to create a new data store or use an existing one from your account. - -![Create a new data store or choose another one from your account for your component](/images/data-stores/nodejs-example.png) - -## Saving data - -Data Stores are key-value stores. Save data within a Data Store using the `this.dataStore.set` method. The first argument is the _key_ where the data should be held, and the second argument is the _value_ assigned to that key. - -```javascript -export default defineComponent({ - props: { - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - // Store a timestamp each time this step is executed in the workflow - await this.dataStore.set("lastRanAt", new Date()); - }, -}); -``` - -### Setting expiration (TTL) for records - -You can set an expiration time for a record by passing a TTL (Time-To-Live) option as the third argument to the `set` method. The TTL value is specified in seconds: - -```javascript -export default defineComponent({ - props: { - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - // Store a temporary value that will expire after 1 hour (3600 seconds) - await this.dataStore.set("temporaryToken", "abc123", { ttl: 3600 }); - - // Store a value that will expire after 1 day - await this.dataStore.set("dailyMetric", 42, { ttl: 86400 }); - }, -}); -``` - -When the TTL period elapses, the record will be automatically deleted from the data store. - -### Updating TTL for existing records - -You can update the TTL for an existing record using the `setTtl` method: - -```javascript -export default defineComponent({ - props: { - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - // Update an existing record to expire after 30 minutes - await this.dataStore.setTtl("temporaryToken", 1800); - - // Remove expiration from a record - await this.dataStore.setTtl("temporaryToken", null); - }, -}); -``` - -This is useful for extending the lifetime of temporary data or removing expiration from records that should now be permanent. - -## Retrieving keys - -Fetch all the keys in a given Data Store using the `keys` method: - -```javascript -export default defineComponent({ - props: { - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - // Return a list of all the keys in a given Data Store - return await this.dataStore.keys(); - }, -}); -``` - -## Checking for the existence of specific keys - -If you need to check whether a specific `key` exists in a Data Store, you can pass the `key` to the `has` method to get back a `true` or `false`: - -```javascript -export default defineComponent({ - props: { - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - // Check if a specific key exists in your Data Store - return await this.dataStore.has("lastRanAt"); - }, -}); -``` - -## Retrieving data - -You can retrieve data with the Data Store using the `get` method. Pass the _key_ to the `get` method to retrieve the content that was stored there with `set`. - -```javascript -export default defineComponent({ - props: { - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - // Check if the lastRanAt key exists - const lastRanAt = await this.dataStore.get("lastRanAt"); - }, -}); -``` - -## Retrieving all records - -Use an async iterator to efficiently retrieve all records or keys in your data store: - -```javascript -export default defineComponent({ - props: { - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - const records = {}; - for await (const [k,v] of this.dataStore) { - records[k] = v; - } - return records; - }, -}); -``` - -## Deleting or updating values within a record - -To delete or update the _value_ of an individual record, use the `set` method for an existing `key` and pass either the new value or `''` as the second argument to remove the value but retain the key. - -```javascript -export default defineComponent({ - props: { - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - // Update the value associated with the key, myKey - await this.dataStore.set("myKey", "newValue"); - - // Remove the value but retain the key - await this.dataStore.set("myKey", ""); - }, -}); -``` - -## Deleting specific records - -To delete individual records in a Data Store, use the `delete` method for a specific `key`: - -```javascript -export default defineComponent({ - props: { - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - // Delete the lastRanAt record - const lastRanAt = await this.dataStore.delete("lastRanAt"); - }, -}); -``` - -## Deleting all records from a specific Data Store - -If you need to delete all records in a given Data Store, you can use the `clear` method. **Note that this is an irreversible change, even when testing code in the workflow builder.** - -```javascript -export default defineComponent({ - props: { - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - // Delete all records from a specific Data Store - return await this.dataStore.clear(); - }, -}); -``` - -## Viewing store data - -You can view the contents of your data stores in your [Pipedream dashboard](https://pipedream.com/stores). - -From here you can also manually edit your data store's data, rename stores, delete stores or create new stores. - -## Using multiple data stores in a single code step - -It is possible to use multiple data stores in a single code step, just make a unique name per store in the `props` definition. Let's define 2 separate `customers` and `orders` data sources and leverage them in a single code step: - -```javascript -export default defineComponent({ - props: { - customers: { type: "data_store" }, - orders: { type: "data_store" }, - }, - async run({ steps, $ }) { - // Retrieve the customer from our customer store - const customer = await this.customer.get(steps.trigger.event.customer_id); - // Retrieve the order from our order data store - const order = await this.orders.get(steps.trigger.event.order_id); - }, -}); -``` - -## Workflow counter example - -You can use a data store as a counter. For example, this code counts the number of times the workflow runs: - -```javascript -export default defineComponent({ - props: { - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - // By default, all database entries are undefined. - // It's wise to set a default value so our code as an initial value to work with - const counter = (await this.dataStore.get("counter")) ?? 0; - - // On the first run "counter" will be 0 and we'll increment it to 1 - // The next run will increment the counter to 2, and so forth - await this.dataStore.set("counter", counter + 1); - }, -}); -``` - -## Dedupe data example - -Data Stores are also useful for storing data from prior runs to prevent acting on duplicate data, or data that's been seen before. - -For example, this workflow's trigger contains an email address from a potential new customer. But we want to track all emails collected so we don't send a welcome email twice: - -```javascript -export default defineComponent({ - props: { - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - const email = steps.trigger.event.body.new_customer_email; - // Retrieve the past recorded emails from other runs - const emails = (await this.dataStore.get("emails")) ?? []; - - // If the current email being passed from our webhook is already in our list, exit early - if (emails.includes(email)) { - return $.flow.exit("Already welcomed this user"); - } - - // Add the current email to the list of past emails so we can detect it in the future runs - await this.dataStore.set("emails", [...emails, email]); - }, -}); -``` - -## TTL use case: temporary caching and rate limiting - -TTL functionality is particularly useful for implementing temporary caching and rate limiting. Here's an example of a simple rate limiter that prevents a user from making more than 5 requests per hour: - -```javascript -export default defineComponent({ - props: { - dataStore: { type: "data_store" }, - }, - async run({ steps, $ }) { - const userId = steps.trigger.event.userId; - const rateKey = `ratelimit:${userId}`; - - // Try to get current rate limit counter - let requests = await this.dataStore.get(rateKey); - - if (requests === undefined) { - // First request from this user in the time window - await this.dataStore.set(rateKey, 1, { ttl: 3600 }); // Expire after 1 hour - return { allowed: true, remaining: 4 }; - } - - if (requests >= 5) { - // Rate limit exceeded - return { allowed: false, error: "Rate limit exceeded", retryAfter: "1 hour" }; - } - - // Increment the counter - await this.dataStore.set(rateKey, requests + 1); - return { allowed: true, remaining: 4 - requests }; - }, -}); -``` - -This pattern can be extended for various temporary caching scenarios like: -- Session tokens with automatic expiration -- Short-lived feature flags -- Temporary access grants -- Time-based promotional codes - -### Supported data types - -Data stores can hold any JSON-serializable data within the storage limits. This includes data types including: - -- Strings -- Objects -- Arrays -- Dates -- Integers -- Floats - -But you cannot serialize Functions, Classes, or other more complex objects. diff --git a/docs-v2/pages/workflows/building-workflows/code/nodejs/working-with-files.mdx b/docs-v2/pages/workflows/building-workflows/code/nodejs/working-with-files.mdx deleted file mode 100644 index 126f024bc0187..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/nodejs/working-with-files.mdx +++ /dev/null @@ -1,94 +0,0 @@ -# Working with the filesystem in Node.js - -You'll commonly need to work with files in a workflow, for example: downloading content from some service to upload to another. This doc explains how to work with files in Pipedream workflows and provides some sample code for common operations. - -## The `/tmp` directory - -Within a workflow, you have full read-write access to the `/tmp` directory. You have {process.env.TMP_SIZE_LIMIT} of available space in `/tmp` to save any file. - -### Managing `/tmp` across workflow runs - -The `/tmp` directory is stored on the virtual machine that runs your workflow. We call this the execution environment ("EE"). More than one EE may be created to handle high-volume workflows. And EEs can be destroyed at any time (for example, after about 10 minutes of receiving no events). This means that you should not expect to have access to files across executions. At the same time, files _may_ remain, so you should clean them up to make sure that doesn't affect your workflow. **Use [the `tmp-promise` package](https://github.com/benjamingr/tmp-promise) to cleanup files after use, or [delete the files manually](#delete-a-file).** - -### Reading a file from `/tmp` - -This example uses [step exports](/workflows/#step-exports) to return the contents of a test file saved in `/tmp` as a string: - -```javascript -import fs from "fs"; - -export default defineComponent({ - async run({ steps, $ }) { - return (await fs.promises.readFile('/tmp/your-file')).toString() - } -}); -``` - -### Writing a file to `/tmp` - -Use the [`fs` module](https://nodejs.org/api/fs.html) to write data to `/tmp`: - -```javascript -import fs from "fs" -import { file } from 'tmp-promise' - -export default defineComponent({ - async run({ steps, $ }) { - const { path, cleanup } = await file(); - await fs.promises.appendFile(path, Buffer.from("hello, world")) - await cleanup(); - } -}); -``` - -### Listing files in `/tmp` - -Return a list of the files saved in `/tmp`: - -```javascript -import fs from "fs"; - -export default defineComponent({ - async run({ steps, $ }) { - return fs.readdirSync("/tmp"); - } -}); -``` - -### Delete a file - -```javascript -import fs from "fs"; - -export default defineComponent({ - async run({ steps, $ }) { - return await fs.promises.unlink('/tmp/your-file'); - } -}); -``` - -### Download a file to `/tmp` - -[See this example](/workflows/building-workflows/code/nodejs/http-requests/#download-a-file-to-the-tmp-directory) to learn how to download a file to `/tmp`. - -### Upload a file from `/tmp` - -[See this example](/workflows/building-workflows/code/nodejs/http-requests/#upload-a-file-from-the-tmp-directory) to learn how to upload a file from `/tmp` in an HTTP request. - -### Download a file, uploading it in another `multipart/form-data` request - -[This workflow](https://pipedream.com/@dylburger/download-file-then-upload-file-via-multipart-form-data-request-p_QPCx7p/edit) provides an example of how to download a file at a specified **Download URL**, uploading that file to an **Upload URL** as form data. - -### Download email attachments to `/tmp`, upload to Amazon S3 - -[This workflow](https://pipedream.com/@dylan/upload-email-attachments-to-s3-p_V9CGAQ/edit) is triggered by incoming emails. When copied, you'll get a workflow-specific email address you can send any email to. This workflow takes any attachments included with inbound emails, saves them to `/tmp`, and uploads them to Amazon S3. - -You should also be aware of the [inbound payload limits](/workflows/limits/#email-triggers) associated with the email trigger. - -### Downloading and uploading files from File Stores - -Within Node.js code steps, you can download files from a File Store to the `/tmp` directory and vice versa. - -The `$.files` helper includes methods to upload and download files from the Project's File Store. - -[Read the File Stores `$.files` helper documentation.](/workflows/data-management/file-stores/#managing-file-stores-from-workflows) diff --git a/docs-v2/pages/workflows/building-workflows/code/python/_meta.tsx b/docs-v2/pages/workflows/building-workflows/code/python/_meta.tsx deleted file mode 100644 index 9c81cb2fdc407..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/python/_meta.tsx +++ /dev/null @@ -1,10 +0,0 @@ -export default { - "index": "Running Python in workflows", - "auth": "Connect apps", - "http-requests": "HTTP requests", - "working-with-files": "Files", - "using-data-stores": "Data stores", - "delay": "Delaying steps", - "rerun": "Pause, resume, and rerun steps", - "import-mappings": "Different PyPI package name and import name", -} as const diff --git a/docs-v2/pages/workflows/building-workflows/code/python/auth.mdx b/docs-v2/pages/workflows/building-workflows/code/python/auth.mdx deleted file mode 100644 index c06187f578b7b..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/python/auth.mdx +++ /dev/null @@ -1,91 +0,0 @@ -# Connecting apps in Python - -When you use [prebuilt actions](/components/contributing/#actions) tied to apps, you don't need to write the code to authorize API requests. Just [connect your account](/apps/connected-accounts/#connecting-accounts) for that app and run your workflow. - -But sometimes you'll need to [write your own code](/workflows/building-workflows/code/python/). You can also connect apps to custom code steps, using the auth information to authorize requests to that app. - -For example, you may want to send a Slack message from a step. We use Slack's OAuth integration to authorize sending messages from your workflows. - -Add Slack as an app on the Python step, then connect your Slack account. - -![Add your Slack account to a Python code step by adding it](https://res.cloudinary.com/pipedreamin/image/upload/v1710517970/docs/docs/workflows/building-workflows/code/pythonauth/CleanShot_2024-03-15_at_11.51.53_u3ld0i.gif) - -Then within the Python code step, `pd.inputs["slack"]["$auth"]["oauth_access_token"]` will contain your Slack account OAuth token. - -With that token, you can make authenticated API calls to Slack: - -```python -from slack_sdk import WebClient - -def handler(pd: "pipedream"): - # Your Slack OAuth token is available under pd.inputs - token = pd.inputs["slack"]["$auth"]["oauth_access_token"] - - # Instantiate a new Slack client with your token - client = WebClient(token=token) - - # Use the client to send messages to Slack channels - response = client.chat_postMessage( - channel='#general', - text='Hello from Pipedream!' - ) - - # Export the Slack response payload for use in future steps - pd.export("response", response.data) -``` - - - -## Accessing connected account data with `pd.inputs[appName]["$auth"]` - -In our Slack example above, we created a Slack `WebClient` using the Slack OAuth access token: - -```python -# Instantiate a new Slack client with your token -client = WebClient(token=token) -``` - -Where did `pd.inputs["slack"]` come from? Good question. It was generated when we connected Slack to our Python step. - -![The Slack app generates the pd.inputs["slack"] data](/images/python/auth/connected-slack-account.png) - -The Slack access token is generated by Pipedream, and is available to this step in the `pd.inputs[appName]["$auth"]` object: - -```python -from slack_sdk import WebClient - -def handler(pd: "pipedream"): - token = pd.inputs["slack"]["$auth"]["oauth_access_token"] - # Authentication details for all of your apps are accessible under the special pd.inputs["slack"] variable: - console.log(pd.inputs["slack"]["$auth"]) -``` - -`pd.inputs["slack"]["$auth"]` contains named properties for each account you connect to the associated step. Here, we connected Slack, so `this.slack.$auth` contains the Slack auth info (the `oauth_access_token`). - -The names of the properties for each connected account will differ with the account. Pipedream typically exposes OAuth access tokens as `oauth_access_token`, and API keys under the property `api_key`. But if there's a service-specific name for the tokens (for example, if the service calls it `server_token`), we prefer that name, instead. - -To list the `pd.inputs["slack"]["$auth"]` properties available to you for a given app, just print the contents of the `$auth` property: - -```python -print(pd.inputs["slack"]["$auth"]) # Replace "slack" with your app's name -``` - -and run your workflow. You'll see the property names in the logs below your step. - -### Using the code templates tied to apps - -When you write custom code that connects to an app, you can start with a code snippet Pipedream provides for each app. This is called the **test request**. - -When you search for an app in a step: - -1. Click the **+** button below any step. -2. Search for the app you're looking for and select it from the list. -3. Select the option to **Run Python with any [app] API**. - -![Create Python API scaffolding for any app](/images/python/auth/step-selector-python-example.png) - -This code operates as a template you can extend, and comes preconfigured with the connection to the target app and the code for authorizing requests to the API. You can modify this code however you'd like. - -## Custom auth tokens / secrets - -When you want to connect to a 3rd party service that isn't supported by Pipedream, you can store those secrets in [Environment Variables](/workflows/environment-variables/). diff --git a/docs-v2/pages/workflows/building-workflows/code/python/delay.mdx b/docs-v2/pages/workflows/building-workflows/code/python/delay.mdx deleted file mode 100644 index 3c5a2f543da75..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/python/delay.mdx +++ /dev/null @@ -1,129 +0,0 @@ -import Callout from '@/components/Callout' - -# Delaying a workflow - -Use `pd.flow.delay` to [delay a step in a workflow](/workflows/building-workflows/control-flow/delay/). - -These docs show you how to write Python code to handle delays. If you don't need to write code, see [our built-in delay actions](/workflows/building-workflows/control-flow/delay/#delay-actions). - -## Using `pd.flow.delay` - -`pd.flow.delay` takes one argument: the number of **milliseconds** you'd like to pause your workflow until the next step executes. {process.env.DELAY_MIN_MAX_TIME}. - -Note that [delays happen at the end of the step where they're called](#when-delays-happen). - -```python -import random - -def handler(pd: 'pipedream'): - # Delay a workflow for 60 seconds (60,000 ms) - pd.flow.delay(60 * 1000) - - # Delay a workflow for 15 minutes - pd.flow.delay(15 * 60 * 1000) - - # Delay a workflow based on the value of incoming event data, - # or default to 60 seconds if that variable is undefined - default = 60 * 1000 - delayMs = pd.steps["trigger"].get("event", {}).get("body", {}).get("delayMs", default) - pd.flow.delay(delayMs) - - # Delay a workflow a random amount of time - pd.flow.delay(random.randint(0, 999)) -``` - - -Paused workflow state - -When `pd.flow.delay` is executed in a Python step, the workflow itself will enter a **Paused** state. - -While the workflow is paused, it will not incur any credits towards compute time. You can also [view all paused workflows in the Event History](/workflows/event-history/#filtering-by-status). - - -### Credit usage - -The length of time a workflow is delayed from `pd.flow.delay` does _not_ impact your credit usage. For example, delaying a 256 megabyte workflow for five minutes will **not** incur ten credits. - -However, using `pd.flow.delay` in a workflow will incur two credits. - -One credit is used to initially start the workflow, then the second credit is used when the workflow resumes after its pause period has ended. - - -Exact credit usage depends on duration and memory configuration - -If your workflow's [execution timeout limit](/workflows/building-workflows/settings/#execution-timeout-limit) is set to longer than [default limit](/workflows/limits/#time-per-execution), it may incur more than two [credits](/pricing/#credits-and-billing) when using `pd.flow.delay`. - - -## `cancel_url` and `resume_url` - -Both the built-in **Delay** actions and `pd.flow.delay` return a `cancel_url` and `resume_url` that lets you cancel or resume paused executions. - -These URLs are specific to a single execution of your workflow. While the workflow is paused, you can load these in your browser or send an HTTP request to either: - -- Hitting the `cancel_url` will immediately cancel that execution -- Hitting the `resume_url` will immediately resume that execution early - -[Since Pipedream pauses your workflow at the _end_ of the step where you run call `pd.flow.delay`](#when-delays-happen), you can send these URLs to third party systems, via email, or anywhere else you'd like to control the execution of your workflow. - -```python -import requests - -def handler(pd: 'pipedream'): - links = pd.flow.delay(15 * 60 * 1000) - # links contains a dictionary with two entries: resume_url and cancel_url - - # Send the URLs to a system you own - requests.post("https://example.com", json=links) - - # Email yourself the URLs. Click on the links to cancel / resume - pd.send.email( - subject=f"Workflow execution {pd.steps['trigger']['context']['id']}", - text=f"Cancel your workflow here: {links['cancel_url']} . Resume early here: {links['resume_url']}", - html=None - ) - - # Delay happens at the end of this step -``` - - -In `pd.send.email`, the `html` argument defaults to `""`, so it overrides the email `text` unless explicitly set to `None`. - - -## When delays happen - -**Pipedream pauses your workflow at the _end_ of the step where you call `pd.flow.delay`**. This lets you [send the `cancel_url` and `resume_url` to third-party systems](cancel_url-and-resume_url). - -```python -def handler(pd: 'pipedream'): - urls = pd.flow.delay(15 * 60 * 1000) - cancel_url, resume_url = urls["cancel_url"], urls["resume_url"] - # ... run any code you want here - - # Delay happens at the end of this step -``` - -## Delays and HTTP responses - -You cannot run `pd.respond` after running `pd.flow.delay`. Pipedream ends the original execution of the workflow when `pd.flow.delay` is called and issues the following response to the client to indicate this state: - -> $.respond() not called for this invocation - -If you need to set a delay on an HTTP request triggered workflow, consider using [`time.sleep`](#timesleep) instead. - -## `time.sleep` - -Alternatively, you can use `time.sleep` instead of using `pd.flow.delay` to delay individual workflow steps. - -However, there are some drawbacks to using `time.sleep` instead of `pd.flow.delay`. `time.sleep` will count towards your workflow's compute time, for example: - -```python -import time - -def handler(pd: 'pipedream'): - # delay this step for 30 seconds - delay = 30 - - time.sleep(delay) -``` - -The Python step above will hold the workflow's execution for this step for 30 seconds; however, 30 seconds will also _contribute_ to your credit usage. Also consider that workflows have a hard limit of {process.env.MAX_WORKFLOW_EXECUTION_LIMIT} seconds. diff --git a/docs-v2/pages/workflows/building-workflows/code/python/http-requests.mdx b/docs-v2/pages/workflows/building-workflows/code/python/http-requests.mdx deleted file mode 100644 index 7ae57ea425ef8..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/python/http-requests.mdx +++ /dev/null @@ -1,292 +0,0 @@ -import Callout from '@/components/Callout' - -# Making HTTP Requests with Python - -HTTP requests are fundamental to working with APIs or other web services. You can make HTTP requests to retrieve data from APIs, fetch HTML from websites, or do pretty much anything your web browser can do. - -**Below, we'll review how to make HTTP requests using Python code on Pipedream.** - -We recommend using the popular `requests` HTTP client package available in Python to send HTTP requests, but [you can use any PyPi package you'd like on Pipedream](/workflows/building-workflows/code/python/#using-third-party-packages). - - - -## Basic `requests` usage notes - -No need to run `pip install`, just `import requests` at the top of your step's code and it's available for your code to use. - -To use `requests` on Pipedream, you'll just need to import the `requests` PyPi package: - -```python -import requests -``` - -You make HTTP requests by passing a URL and optional request parameters to one of [Requests' 7 HTTP request methods](https://requests.readthedocs.io/en/latest/api/#main-interface). - -**Here's how to make a basic HTTP request on Pipedream:** - -```python -r = requests.get('https://swapi.dev/api/films/') -``` - -The [Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) object `r` contains a lot of information about the response: its content, headers, and more. Typically, you just care about the content, which you can access in the `text` property of the response: - -```python -r = requests.get('https://swapi.dev/api/films/') - -# HTTP response content is in the text property -r.text -``` - -Requests automatically decodes the content of the response based on its encoding, `r.encoding`, which is determined based on the HTTP headers. - -If you're dealing with JSON data, you can call `r.json()` to decode the content as JSON: - -```python -r = requests.get('https://swapi.dev/api/films/') - -# The json-encoded content of a response, if any -r.json() -``` - -If JSON decoding fails, `r.json()` raises an exception. - -## Making a `GET` request - -GET requests typically are for retrieving data from an API. Below is an example. - -```python -import requests - -def handler(pd: "pipedream"): - url = "https://swapi.dev/api/people/1" - - r = requests.get(url) - - # The response is logged in your Pipedream step results: - print(r.text) - - # The response status code is logged in your Pipedream step results: - print(r.status_code) -``` - -## Making a `POST` request - -```python -import requests - -def handler(pd: "pipedream"): - # This a POST request to this URL will echo back whatever data we send to it - url = "https://postman-echo.com/post" - - data = {"name": "Bulbasaur"} - - r = requests.post(url, data=data) - - # The response is logged in your Pipedream step results: - print(r.text) - - # The response status code is logged in your Pipedream step results: - print(r.status_code) -``` - -When you make a `POST` request, pass a dictionary with the data you'd like to send to the `data` argument. Requests automatically form-encodes the data when the request is made. - - -The code example above will NOT set the `Content-Type` header, meaning it will NOT be set to `application/json`. - -If you want the header set to `application/json` and don't want to encode the `dict` yourself, you can pass it using the `json` parameter and it will be encoded automatically: - -```python - url = "https://postman-echo.com/post" - data = {"name": "Bulbasaur"} - r = requests.post(url, json=data) -``` - - -## Passing query string parameters to a `GET` request - -Retrieve fake comment data on a specific post using [JSONPlaceholder](https://jsonplaceholder.typicode.com/), a free mock API service. Here, you fetch data from the `/comments` resource, retrieving data for a specific post by query string parameter: `/comments?postId=1`. - -```python -import requests - -def handler(pd: "pipedream"): - url = "https://jsonplaceholder.typicode.com/comments" - params = {"postId": 1} - - # Make an HTTP GET request using requests - r = requests.get(url, params=params) - - # Retrieve the content of the response - data = r.text -``` - -You should pass query string parameters as a dictionary using the `params` keyword argument, like above. When you do, `requests` automatically [URL-encodes](https://www.w3schools.com/tags/ref_urlencode.ASP) the parameters for you, which you'd otherwise have to do manually. - -## Sending a request with HTTP headers - -To add HTTP headers to a request, pass a dictionary to the `headers` parameter: - -```python -import requests -import json - -def handler(pd: "pipedream"): - url = "https://jsonplaceholder.typicode.com/posts" - headers = {"Content-Type": "application/json"} - data = {"name": "Luke"} - - # Make an HTTP POST request using requests - r = requests.post(url, headers=headers, data=json.dumps(data)) -``` - -## Sending a request with a secret or API key - -Most APIs require you authenticate HTTP requests with an API key or other token. **Please review the docs for your service to understand how they accept this data.** - -Here's an example showing an API key passed in an HTTP header: - -```python -import requests - -def handler(pd: "pipedream"): - url = "https://jsonplaceholder.typicode.com/posts" - headers = {"X-API-KEY": "123"} # API KEY - data = {"name": "Luke"} - - # Make an HTTP POST request using requests - r = requests.post(url, headers=headers, json=data) -``` - -## Sending files - -An example of sending a previously stored file in the workflow's `/tmp` directory: - -```python -import requests - -def handler(pd: "pipedream"): - # Retrieving a previously saved file from workflow storage - files = {"image": open("/tmp/python-logo.png", "rb")} - - r = requests.post(url="https://api.imgur.com/3/image", files=files) -``` - -## Downloading a file to the `/tmp` directory - -This example shows you how to download a file to a file in [the `/tmp` directory](/workflows/building-workflows/code/python/working-with-files/). This can be especially helpful for downloading large files: it streams the file to disk, minimizing the memory the workflow uses when downloading the file. - -```python -import requests - -def handler(pd: "pipedream"): - # Download the webpage HTML file to /tmp - with requests.get("https://example.com", stream=True) as response: - # Check if the request was successful - response.raise_for_status() - - # Open the new file /tmp/file.html in binary write mode - with open("/tmp/file.html", "wb") as file: - for chunk in response.iter_content(chunk_size=8192): - # Write the chunk to file - file.write(chunk) -``` - -## Uploading a file from the `/tmp` directory - -This example shows you how to make a `multipart/form-data` request with a file as a form part. You can store and read any files from [the `/tmp` directory](/workflows/building-workflows/code/python/working-with-files/#the-tmp-directory). - -This can be especially helpful for uploading large files: it streams the file from disk, minimizing the memory the workflow uses when uploading the file. - -```python -import requests -from requests_toolbelt.multipart.encoder import MultipartEncoder - -def handler(pd: "pipedream"): - m = MultipartEncoder(fields={ - 'file': ('filename', open('/tmp/file.pdf', 'rb'), 'application/pdf') - }) - - r = requests.post("https://example.com", data=m, - headers={'Content-Type': m.content_type}) -``` - -## IP addresses for HTTP requests made from Pipedream workflows - -By default, [HTTP requests made from Pipedream can come from a large range of IP addresses](/privacy-and-security/#hosting-details). **If you need to restrict the IP addresses HTTP requests come from, you can [Use a Pipedream VPC](/workflows/vpc/) to route all outbound HTTP requests through a single IP address.** - -## Using an HTTP proxy to proxy requests through another host - -By default, HTTP requests made from Pipedream can come from a range of IP addresses. **If you need to make requests from a single IP address, you can route traffic through an HTTP proxy**: - -```python -import requests - -def handler(pd: "pipedream"): - user = "USERNAME" # Replace with your HTTP proxy username - password = "PASSWORD" # Replace with your HTTP proxy password - host = "10.10.1.10" # Replace with the HTTP proxy URL - port = 1080 # Replace with the port of the HTTP proxy - proxies = { - "https": f"http://{user}:{password}@{host}:{port}", - } - - r = requests.request("GET", "https://example.com", proxies=proxies) -``` - -## Paginating API requests - -When you fetch data from an API, the API may return records in "pages". For example, if you're trying to fetch a list of 1,000 records, the API might return those in groups of 100 items. - -Different APIs paginate data in different ways. You'll need to consult the docs of your API provider to see how they suggest you paginate through records. - -## Sending a GraphQL request - -Construct a GraphQL query as a string and then using the requests library to send it to the GraphQL server: - -```python -import requests - -def handler(pd: "pipedream"): - url = "https://beta.pokeapi.co/graphql/v1beta" - - query = """ -query samplePokeAPIquery { - generations: pokemon_v2_generation { - name - pokemon_species: pokemon_v2_pokemonspecies_aggregate { - aggregate { - count - } - } - } -} - """ - - r = requests.post(url, json={"query": query}) - return r.json() -``` - -### Sending an authenticated GraphQL request - -Authenticate your connected accounts in Pipedream with GraphQL requests using `pd.inputs[appName]["$auth"]`: - -```python -import requests - -def handler(pd: "pipedream"): - url = "https://api.github.com/graphql" - query = """ -query { - viewer { - login - } -} - """ - token = pd.inputs["github"]["$auth"]["oauth_access_token"] - headers = {"authorization": f"Bearer {token}"} - r = requests.post(url, json={"query": query}, headers=headers) - return r.json() -``` - -Alternatively, you can use Environment Variables as well for simple API key based GraphQL APIs. diff --git a/docs-v2/pages/workflows/building-workflows/code/python/import-mappings.mdx b/docs-v2/pages/workflows/building-workflows/code/python/import-mappings.mdx deleted file mode 100644 index 277da45e3257b..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/python/import-mappings.mdx +++ /dev/null @@ -1,24 +0,0 @@ -import PythonMappings from '@/components/PythonMappings' - -# Use PyPI packages with differing import names - -When a Python package's name matches its import name, you can use it in your Python code steps without any special configuration. - -But some package names do not match their import names. Use [the `add-package` comment](#using-magic-comments) to work with these packages. - -## Using Magic Comments - -When a package's name doesn't match the import name, you can install the package with the `add-package` comment above your imports. - -For example the `google.cloud` package exports `bigquery`, but you can still use it in your Python code steps in workflows: - -```python -# pipedream add-package google-cloud-bigquery -from google.cloud import bigquery -``` - -## Search mappings - -Search by package name, and you'll find both the `add-package` comment and the `import` statement you'll need to use for the package. - - diff --git a/docs-v2/pages/workflows/building-workflows/code/python/index.mdx b/docs-v2/pages/workflows/building-workflows/code/python/index.mdx deleted file mode 100644 index 3a37256d2a88d..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/python/index.mdx +++ /dev/null @@ -1,322 +0,0 @@ -import Callout from '@/components/Callout' -import VideoPlayer from '@/components/VideoPlayer' - -# Python - -Pipedream supports [Python v{process.env.PYTHON_VERSION}](https://www.python.org) in workflows. Run any Python code, use any [PyPI package](https://pypi.org/), connect to APIs, and more. - -## Adding a Python code step - -1. Click the + icon to add a new step -2. Click **Custom Code** -3. In the new step, select the `python` language runtime in language dropdown - -## Python Code Step Structure - -A new Python Code step will have the following structure: - -```python -def handler(pd: "pipedream"): - # Reference data from previous steps - print(pd.steps["trigger"]["context"]["id"]) - # Return data for use in future steps - return {"foo": {"test": True}} -``` - -You can also perform more complex operations, including [leveraging your connected accounts to make authenticated API requests](/workflows/building-workflows/code/python/auth/), [accessing Data Stores](/workflows/building-workflows/code/python/using-data-stores/) and [installing PyPI packages](/workflows/building-workflows/code/python/#using-third-party-packages). - -- [Install PyPI Packages](/workflows/building-workflows/code/python/#using-third-party-packages) -- [Import data exported from other steps](/workflows/building-workflows/code/python/#using-data-from-another-step) -- [Export data to downstream steps](/workflows/building-workflows/code/python/#sending-data-downstream-to-other-steps) -- [Retrieve data from a data store](/workflows/building-workflows/code/python/using-data-stores/#retrieving-data) -- [Store data into a data store](/workflows/building-workflows/code/python/using-data-stores/#saving-data) -- [Access API credentials from connected accounts](/workflows/building-workflows/code/python/auth/) - -## Logging and debugging - -You can use `print` at any time in a Python code step to log information as the script is running. - -The output for the `print` **logs** will appear in the `Results` section just beneath the code editor. - -![Python print log output in the results](/images/python/print-logs.png) - -## Using third party packages - - - -You can use any packages from [PyPI](https://pypi.org) in your Pipedream workflows. This includes popular choices such as: - -- [`requests` for making HTTP requests](https://pypi.org/project/requests/) -- [`sqlalchemy`for retrieving or inserting data in a SQL database](https://pypi.org/project/sqlalchemy/) -- [`pandas` for working with complex datasets](https://pypi.org/project/pandas/) - -To use a PyPI package, just include it in your step's code: - -```python -import requests -``` - -And that's it. No need to update a `requirements.txt` or specify elsewhere in your workflow of which packages you need. Pipedream will automatically install the dependency for you. - -### If your package's `import` name differs from its PyPI package name - -Pipedream's package installation uses [the `pipreqs` package](https://github.com/bndr/pipreqs) to detect package imports and install the associated package for you. Some packages, like [`python-telegram-bot`](https://python-telegram-bot.org/), use an `import` name that differs from their PyPI name: - -```bash -pip install python-telegram-bot -``` - -vs. - -```python -import telegram -``` - -Use the built in [magic comment system to resolve these mismatches](/workflows/building-workflows/code/python/import-mappings/): - -```python -# pipedream add-package python-telegram-bot -import telegram -``` - -### Pinning package versions - -Each time you deploy a workflow with Python code, Pipedream downloads the PyPi packages you `import` in your step. **By default, Pipedream deploys the latest version of the PyPi package each time you deploy a change**. - -There are many cases where you may want to specify the version of the packages you're using. If you'd like to use a _specific_ version of a package in a workflow, you can add that version in a [magic comment](/workflows/building-workflows/code/python/import-mappings/), for example: - -```python -# pipedream add-package pandas==2.0.0 -import pandas -``` - - -Currently, you cannot use different versions of the same package in different steps in a workflow. - - -## Making an HTTP request - -We recommend using the popular `requests` HTTP client package available in Python to send HTTP requests. - -No need to run `pip install`, just `import requests` at the top of your step's code and it's available for your code to use. - -See the [Making HTTP Requests with Python](/workflows/building-workflows/code/python/http-requests/) docs for more information. - -## Returning HTTP responses - -You can return HTTP responses from [HTTP-triggered workflows](/workflows/building-workflows/triggers/#http) using the `pd.respond()` method: - -```python -def handler(pd: "pipedream"): - pd.respond({ - "status": 200, - "body": { - "message": "Everything is ok" - } - }) -``` - -Please note to always include at least the `body` and `status` keys in your `pd.respond` argument. The `body` must also be a JSON serializable object or dictionary. - - -Unlike the Node.js equivalent, the Python `pd.respond` helper does not yet support responding with Streams. - - - -_Don't forget_ to [configure your workflow's HTTP trigger to allow a custom response](/workflows/building-workflows/triggers/#http-responses). Otherwise your workflow will return the default response. - - -## Sharing data between steps - -A step can accept data from other steps in the same workflow, or pass data downstream to others. - -### Using data from another step - -In Python steps, data from the initial workflow trigger and other steps are available in the `pd.steps` object. - -In this example, we'll pretend this data is coming into our workflow's HTTP trigger via POST request. - -```json -// POST .m.pipedream.net -{ - "id": 1, - "name": "Bulbasaur", - "type": "plant" -} -``` - -In our Python step, we can access this data in the `pd.steps` object passed into the `handler`. Specifically, this data from the POST request into our workflow is available in the `trigger` dictionary item. - -```python -def handler(pd: "pipedream"): - # retrieve the data from the HTTP request in the initial workflow trigger - pokemon_name = pd.steps["trigger"]["event"]["name"] - pokemon_type = pd.steps["trigger"]["event"]["type"] - - print(f"{pokemon_name} is a {pokemon_type} type Pokemon") -``` - -### Sending data downstream to other steps - -To share data created, retrieved, transformed or manipulated by a step to others downstream, `return` the data in the `handler` function: - -```python -# This step is named "code" in the workflow -import requests - -def handler(pd: "pipedream"): - r = requests.get("https://pokeapi.co/api/v2/pokemon/charizard") - # Store the JSON contents into a variable called "pokemon" - pokemon = r.json() - - # Expose the data to other steps in the "pokemon" key from this step - return { - "pokemon": pokemon - } -``` - -Now this `pokemon` data is accessible to downstream steps within `pd.steps["code"]["pokemon"]` - - -You can only export JSON-serializable data from steps. Things like: - -- strings -- numbers -- lists -- dictionaries - - -## Using environment variables - -You can leverage any [environment variables defined in your Pipedream account](/workflows/environment-variables/) in a Python step. This is useful for keeping your secrets out of code as well as keeping them flexible to swap API keys without having to update each step individually. - -To access them, use the `os` module. - -```python -import os - -def handler(pd: "pipedream"): - token = os.environ["AIRTABLE_API_KEY"] - - print(token) -``` - -Or an even more useful example, using the stored environment variable to make an authenticated API request. - -### Using API key authentication - -If an particular service requires you to use an API key, you can pass it via the headers of the request. - -This proves your identity to the service so you can interact with it: - -```python -import requests -import os - -def handler(pd: "pipedream"): - token = os.environ["AIRTABLE_API_KEY"] - - url = "https://api.airtable.com/v0/your-airtable-base/your-table" - - headers = { "Authorization": f"Bearer {token}"} - r = requests.get(url, headers=headers) - - print(r.text) -``` - - -There are 2 different ways of using the `os` module to access your environment variables. - -`os.environ["ENV_NAME_HERE"]` will raise an error that stops your workflow if that key doesn't exist in your Pipedream account. - -Whereas `os.environ.get("ENV_NAME_HERE")` will _not_ throw an error and instead returns an empty string. - -If your code relies on the presence of a environment variable, consider using `os.environ["ENV_NAME_HERE"]` instead. - - -## Handling errors - -You may need to exit a workflow early. In a Python step, just a `raise` an error to halt a step's execution. - -```python -raise NameError("Something happened that should not. Exiting early.") -``` - -All exceptions from your Python code will appear in the **logs** area of the results. - -## Ending a workflow early - -Sometimes you want to end your workflow early, or otherwise stop or cancel the execution of a workflow under certain conditions. For example: - -- You may want to end your workflow early if you don't receive all the fields you expect in the event data. -- You only want to run your workflow for 5% of all events sent from your source. -- You only want to run your workflow for users in the United States. If you receive a request from outside the U.S., you don't want the rest of the code in your workflow to run. -- You may use the `user_id` contained in the event to look up information in an external API. If you can't find data in the API tied to that user, you don't want to proceed. - -**In any code step, calling `return pd.flow.exit()` will end the execution of the workflow immediately.** No remaining code in that step, and no code or destination steps below, will run for the current event. - - -It's a good practice to use `return pd.flow.exit()` to immediately exit the workflow. -In contrast, `pd.flow.exit()` on its own will end the workflow only after executing all remaining code in the step. - - -```python -def handler(pd: "pipedream"): - return pd.flow.exit("reason") - print("This code will not run, since pd.flow.exit() was called above it") -``` - -You can pass any string as an argument to `pd.flow.exit()`: - -```python -def handler(pd: "pipedream"): - return pd.flow.exit("Exiting early. Goodbye.") - print("This code will not run, since pd.flow.exit() was called above it") -``` - -Or exit the workflow early within a conditional: - -```python -import random - -def handler(pd: "pipedream"): - # Flip a coin, running pd.flow.exit() for 50% of events - if random.randint(0, 100) <= 50: - return pd.flow.exit("reason") - - print("This code will only run 50% of the time"); -``` - -## File storage - -You can also store and read files with Python steps. This means you can upload photos, retrieve datasets, accept files from an HTTP request and more. - -The `/tmp` directory is accessible from your workflow steps for saving and retrieving files. - -You have full access to read and write both files in `/tmp`. - -See the [Working with the filesystem in Python](/workflows/building-workflows/code/python/working-with-files/) docs for more information. - -## FAQ - -### What's the difference between `def handler(pd)` and the `pipedream` package for Python code steps? - -The pd object passed to the handler method lets you exit the [workflow early](/workflows/building-workflows/code/python/#ending-a-workflow-early), [integrate a Data Store](/workflows/building-workflows/code/python/using-data-stores/), and [use connected accounts](/workflows/building-workflows/code/python/auth/) into your Python code steps. - -However, at this time there are issues with our Python interpreter that is causing an `ECONNRESET` error. - -If you need [to use data from other steps](/workflows/building-workflows/code/python/#using-data-from-another-step) or [export data to other steps](/workflows/building-workflows/code/python/#sending-data-downstream-to-other-steps) in your workflow, we recommend using the `pipedream` package module. - -If you need to use a Data Store in your workflow, we recommend using a [pre-built action](/workflows/data-management/data-stores/) to retrieve or store data or [Node.js's Data Store](/workflows/building-workflows/code/nodejs/using-data-stores/) capabilities. - -### I've tried installing a Python package with a normal import and the magic comment system, but I still can't. What can I do? - -Some Python packages require binaries present within the environment in order to function properly. Or they include binaries but those binaries are not compatible with the Pipedream workflow environment. - -Unfortunately we cannot support these types of packages at this time, but if you have an issue importing a PyPI package into a Python code step [please open a issue](https://github.com/PipedreamHQ/pipedream/issues/new/choose). - -### Can I publish my Python code as a reusable pre-built action or trigger like you can with Node.js? - -Not at this time. Pipedream only supports Python as a code step language. The Components system only supports Node.js at this time. - -You can still duplicate Python code steps within the same workflow, but to reuse a code step, you'll need to copy and paste the Python code to another workflow. diff --git a/docs-v2/pages/workflows/building-workflows/code/python/rerun.mdx b/docs-v2/pages/workflows/building-workflows/code/python/rerun.mdx deleted file mode 100644 index b14720e96bf58..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/python/rerun.mdx +++ /dev/null @@ -1,179 +0,0 @@ -import Callout from '@/components/Callout' - -# Pause, resume, and rerun a workflow - -You can use `pd.flow.suspend` and `pd.flow.rerun` to pause a workflow and resume it later. - -This is useful when you want to: - -- Pause a workflow until someone manually approves it -- Poll an external API until some job completes, and proceed with the workflow when it's done -- Trigger an external API to start a job, pause the workflow, and resume it when the external API sends an HTTP callback - -We'll cover all of these examples below. - -## `pd.flow.suspend` - -Use `pd.flow.suspend` when you want to pause a workflow and proceed with the remaining steps only when manually approved or cancelled. - -For example, you can suspend a workflow and send yourself a link to manually resume or cancel the rest of the workflow: - -```python -def handler(pd: 'pipedream'): - urls = pd.flow.suspend() - pd.send.email( - subject="Please approve this important workflow", - text=f"Click here to approve the workflow: ${urls["resume_url"]}, and cancel here: ${urls["cancel_url"]}" - ) - # Pipedream suspends your workflow at the end of the step -``` - -You'll receive an email like this: - -![Approve this workflow](https://res.cloudinary.com/pipedreamin/image/upload/v1655272047/docs/approve-workflow_oc06k3.png) - -And can resume or cancel the rest of the workflow by clicking on the appropriate link. - -### `resume_url` and `cancel_url` - -In general, calling `pd.flow.suspend` returns a `cancel_url` and `resume_url` that lets you cancel or resume paused executions. Since Pipedream pauses your workflow at the _end_ of the step, you can pass these URLs to any external service before the workflow pauses. If that service accepts a callback URL, it can trigger the `resume_url` when its work is complete. - -These URLs are specific to a single execution of your workflow. While the workflow is paused, you can load these in your browser or send any HTTP request to them: - -- Sending an HTTP request to the `cancel_url` will cancel that execution -- Sending an HTTP request to the `resume_url` will resume that execution - -If you resume a workflow, any data sent in the HTTP request is passed to the workflow and returned in the `$resume_data` [step export](/workflows/#step-exports) of the suspended step. For example, if you call `pd.flow.suspend` within a step named `code`, the `$resume_data` export should contain the data sent in the `resume_url` request: - -![resume data step export](https://res.cloudinary.com/pipedreamin/image/upload/v1655271815/docs/resume_data_lafhxr.png) - -### Default timeout of 24 hours - -By default, `pd.flow.suspend` will automatically cancel the workflow after 24 hours. You can set your own timeout (in milliseconds) as the first argument: - -```python -def handler(pd: 'pipedream'): - # 7 days - TIMEOUT = 1000 * 60 * 60 * 24 * 7 - pd.flow.suspend(TIMEOUT) -``` - -## `pd.flow.rerun` - -Use `pd.flow.rerun` when you want to run a specific step of a workflow multiple times. This is useful when you need to start a job in an external API and poll for its completion, or have the service call back to the step and let you process the HTTP request within the step. - -### Polling for the status of an external job - -Sometimes you need to poll for the status of an external job until it completes. `pd.flow.rerun` lets you rerun a specific step multiple times: - -```python -import requests - -def handler(pd: 'pipedream'): - MAX_RETRIES = 3 - # 10 seconds - DELAY = 1000 * 10 - run = pd.context['run'] - print(pd.context) - # pd.context.run.runs starts at 1 and increments when the step is rerun - if run['runs'] == 1: - # pd.flow.rerun(delay, context (discussed below), max retries) - pd.flow.rerun(DELAY, None, MAX_RETRIES) - - elif run['runs'] == MAX_RETRIES + 1: - raise Exception("Max retries exceeded") - - else: - # Poll external API for status - response = requests.get("https://example.com/status") - # If we're done, continue with the rest of the workflow - if response.json().status == "DONE": - return response.json() - - # Else retry later - pd.flow.rerun(DELAY, None, MAX_RETRIES) -``` - -`pd.flow.rerun` accepts the following arguments: - -```python -pd.flow.rerun( - delay, # The number of milliseconds until the step will be rerun - context, # JSON-serializable data you need to pass between runs - maxRetries, # The total number of times the step will rerun. Defaults to 10 -) -``` - -### Accept an HTTP callback from an external service - -When you trigger a job in an external service, and that service can send back data in an HTTP callback to Pipedream, you can process that data within the same step using `pd.flow.retry`: - -```python -import requests - -def handler(pd: 'pipedream'): - TIMEOUT = 86400 * 1000 - run = pd.context['run'] - # pd.context['run']['runs'] starts at 1 and increments when the step is rerun - if run['runs'] == 1: - links = pd.flow.rerun(TIMEOUT, None, 1) - # links contains a dictionary with two entries: resume_url and cancel_url - - # Send resume_url to external service - await request.post("your callback URL", json=links) - - # When the external service calls back into the resume_url, you have access to - # the callback data within pd.context.run['callback_request'] - elif 'callback_request' in run: - return run['callback_request'] - -``` - -### Passing `context` to `pd.flow.rerun` - -Within a Python code step, `pd.context.run.context` contains the `context` passed from the prior call to `rerun`. This lets you pass data from one run to another. For example, if you call: - -```python -pd.flow.rerun(1000, { "hello": "world" }) -``` - -`pd.context.run.context` will contain: - -
-resume data step export -
- -### `maxRetries` - -By default, `maxRetries` is **10**. - -When you exceed `maxRetries`, the workflow proceeds to the next step. If you need to handle this case with an exception, `raise` an Exception from the step: - -```python -def handler(pd: 'pipedream'): - MAX_RETRIES = 3 - run = pd.context['run'] - if run['runs'] == 1: - pd.flow.rerun(1000, None, MAX_RETRIES) - - else if (run['runs'] == MAX_RETRIES + 1): - raise Exception("Max retries exceeded") -``` - -## Behavior when testing - -When you're building a workflow and test a step with `pd.flow.suspend` or `pd.flow.rerun`, it will not suspend the workflow, and you'll see a message like the following: - -> Workflow execution canceled โ€” this may be due to `pd.flow.suspend()` usage (not supported in test) - -These functions will only suspend and resume when run in production. - -## Credits usage when using `pd.flow.suspend` / `pd.flow.rerun` - -You are not charged for the time your workflow is suspended during a `pd.flow.suspend` or `pd.flow.rerun`. Only when workflows are resumed will compute time count toward [credit usage](/pricing/#credits-and-billing). - - -When a suspended workflow reawakens, it will reset the credit counter. - -Each rerun or reawakening from a suspension will count as a new fresh credit. - diff --git a/docs-v2/pages/workflows/building-workflows/code/python/using-data-stores.mdx b/docs-v2/pages/workflows/building-workflows/code/python/using-data-stores.mdx deleted file mode 100644 index bab598ff78d24..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/python/using-data-stores.mdx +++ /dev/null @@ -1,368 +0,0 @@ -import Callout from '@/components/Callout' - -# Using Data Stores - -You can store and retrieve data from [Data Stores](/workflows/data-management/data-stores/) in Python without connecting to a 3rd party database. - -Add a data store as a input to a Python step, then access it in your Python `handler` with `pd.inputs["data_store"]`. - -```python -def handler(pd: "pipedream"): - # Access the data store under the pd.inputs - data_store = pd.inputs["data_store"] - - # Store a value under a key - data_store["key"] = "Hello World" - - # Retrieve the value and print it to the step's Logs - print(data_store["key"]) - -``` - -## Adding a Data Store - -Click _Add Data Store_ near the top of a Python step: - -![Adding a data store to a Python step](https://res.cloudinary.com/pipedreamin/image/upload/v1710518388/docs/docs/workflows/building-workflows/code/pythondata-stores/CleanShot_2024-03-15_at_11.58.53_ognvbc.gif) - -This will add the selected data store to your Python code step. - -## Saving data - -Data stores are key-value stores. Saving data within a data store is just like setting a property on a dictionary: - -```python -from datetime import datetime - -def handler(pd: "pipedream"): - # Access the data store under the pd.inputs - data_store = pd.inputs["data_store"] - - # Store a timestamp - data_store["last_ran_at"] = datetime.now().isoformat() -``` - -### Setting expiration (TTL) for records - -You can set an expiration time for a record by passing a TTL (Time-To-Live) option as the third argument to the `set` method. The TTL value is specified in seconds: - -```python -def handler(pd: "pipedream"): - # Access the data store under the pd.inputs - data_store = pd.inputs["data_store"] - - # Store a temporary value that will expire after 1 hour (3600 seconds) - data_store.set("temporaryToken", "abc123", ttl=3600) - - # Store a value that will expire after 1 day - data_store.set("dailyMetric", 42, ttl=86400) -``` - -When the TTL period elapses, the record will be automatically deleted from the data store. - -### Updating TTL for existing records - -You can update the TTL for an existing record using the `set_ttl` method: - -```python -def handler(pd: "pipedream"): - # Access the data store under the pd.inputs - data_store = pd.inputs["data_store"] - - # Update an existing record to expire after 30 minutes - data_store.set_ttl("temporaryToken", ttl=1800) - - # Remove expiration from a record - data_store.set_ttl("temporaryToken", ttl=None) -``` - -This is useful for extending the lifetime of temporary data or removing expiration from records that should now be permanent. - -## Retrieving keys - -Fetch all the keys in a given data store using the `keys` method: - -```python -def handler(pd: "pipedream"): - # Access the data store under the pd.inputs - data_store = pd.inputs["data_store"] - - # Retrieve all keys in the data store - keys = pd.inputs["data_store"].keys() - - # Print a comma separated string of all keys - print(*keys, sep=",") -``` - - -The `datastore.keys()` method does not return a list, but instead it returns a `Keys` iterable object. You cannot export a `data_store` or `data_store.keys()` from a Python code step at this time. - -Instead, build a dictionary or list when using the `data_store.keys()` method. - - -## Checking for the existence of specific keys - -If you need to check whether a specific `key` exists in a data store, use `if` and `in` as a conditional: - -```python -def handler(pd: "pipedream"): - # Access the data store under the pd.inputs - data_store = pd.inputs["data_store"] - - # Search for a key in a conditional - if "last_ran_at" in data_store: - print(f"Last ran at {data_store['last_ran_at']}") -``` - -## Retrieving data - -Data stores are very performant at retrieving single records by keys. However you can also use key iteration to retrieve all records within a Data Store as well. - - -Data stores are intended to be a fast and convienent data storage option for quickly adding data storage capability to your workflows without adding another database dependency. - -However, if you need more advanced querying capabilities for querying records with nested dictionaries or filtering based on a record value - consider using a full fledged database. Pipedream can integrate with MySQL, Postgres, DynamoDb, MongoDB and more. - - -### Get a single record - -You can retrieve single records from a data store by key: - -```python -def handler(pd: "pipedream"): - # Access the data store under the pd.inputs - data_store = pd.inputs["data_store"] - - # Retrieve the timestamp value by the key name - last_ran_at = data_store["last_ran_at"] - - # Print the timestamp - print(f"Last ran at {last_ran_at}") -``` - -Alternatively, use the `data_store.get()` method to retrieve a specific key's contents: - -```python -def handler(pd: "pipedream"): - # Access the data store under the pd.inputs - data_store = pd.inputs["data_store"] - - # Retrieve the timestamp value by the key name - last_ran_at = data_store.get("last_ran_at") - - # Print the timestamp - print(f"Last ran at {last_ran_at}") -``` - - -What's the difference between `data_store["key"]` and `data_store.get("key")`? - -- `data_store["key"]` will throw a `TypeError` if the key doesn't exist in the data store. -- `data_store.get("key")` will instead return `None` if the key doesn't exist in the data store. -- `data_store.get("key", "default_value")` will return `"default_value"` if the key doesn't exist on the data store. - - -### Retrieving all records - -You can retrieve all records within a data store by using an async iterator: - -```python -def handler(pd: "pipedream"): - data_store = pd.inputs["data_store"] - records = {} - for k,v in data_store.items(): - records[k] = v - return records -``` - -This code step example exports all records within the data store as a dictionary. - -## Deleting or updating values within a record - -To delete or update the _value_ of an individual record, assign `key` a new value or `''` to remove the value but retain the key. - -```python -def handler(pd: "pipedream"): - # Access the data store under the pd.inputs - data_store = pd.inputs["data_store"] - - # Assign a new value to the key - data_store["myKey"] = "newValue" - - # Remove the value but retain the key - data_store["myKey"] = "" -``` - -### Working with nested dictionaries - -You can store dictionaries within a record. This allows you to create complex records. - -However, to update specific attributes within a nested dictionary, you'll need to replace the record entirely. - -For example, the code the below will **not** update the `name` attribute on the stored dictionary stored under the key `pokemon`: - -```python -def handler(pd: "pipedream"): - # The current dictionary looks like this: - # pokemon: { - # "name": "Charmander" - # "type": "fire" - # } - - # You'll see "Charmander" in the logs - print(pd.inputs['data_store']['pokemon']['name']) - - # attempting to overwrite the pokemon's name will not apply - pd.inputs['data_store']['pokemon']['name'] = 'Bulbasaur' - - # Exports "Charmander" - return pd.inputs['data_store']['pokemon']['name'] -``` - -Instead, _overwrite_ the entire record to modify attributes: - -```python -def handler(pd: "pipedream"): - # retrieve the record item by it's key first - pokemon = pd.inputs['data_store']['pokemon'] - - # now update the record's attribute - pokemon['name'] = 'Bulbasaur' - - # and out right replace the record with the new modified dictionary - pd.inputs['data_store']['pokemon'] = pokemon - - # Now we'll see "Bulbasaur" exported - return pd.inputs['data_store']['pokemon']['name'] -``` - -## Deleting specific records - -To delete individual records in a data store, use the `del` operation for a specific `key`: - -```python -def handler(pd: "pipedream"): - # Access the data store under the pd.inputs - data_store = pd.inputs["data_store"] - - # Delete the last_ran_at timestamp key - del data_store["last_ran_at"] -``` - -## Deleting all records from a specific data store - -If you need to delete all records in a given data store, you can use the `clear` method. - -```python -def handler(pd: "pipedream"): - # Access the data store under the pd.inputs - data_store = pd.inputs["data_store"] - - # Delete the entire contents of the datas store - data_store.clear() -``` - - -`data_store.clear()` is an **irreversible** change, **even when testing code** in the workflow builder. - - -## Viewing store data - -You can view the contents of your data stores in your [Pipedream dashboard](https://pipedream.com/stores). - -From here you can also manually edit your data store's data, rename stores, delete stores or create new stores. - -## Workflow counter example - -You can use a data store as a counter. For example, this code counts the number of times the workflow runs: - -```python -def handler(pd: "pipedream"): - # Access the data store under the pd.inputs - data_store = pd.inputs["data_store"] - - # if the counter doesn't exist yet, start it at one - if data_store.get("counter") == None: - data_store["counter"] = 1 - - # Otherwise, increment it by one - else: - count = data_store["counter"] - data_store["counter"] = count + 1 -``` - -## Dedupe data example - -Data Stores are also useful for storing data from prior runs to prevent acting on duplicate data, or data that's been seen before. - -For example, this workflow's trigger contains an email address from a potential new customer. But we want to track all emails collected so we don't send a welcome email twice: - -```python -def handler(pd: "pipedream"): - # Access the data store - data_store = pd.inputs["data_store"] - - # Reference the incoming email from the HTTP request - new_email = pd.steps["trigger"]["event"]["body"]["new_customer_email"] - - # Retrieve the emails stored in our data store - emails = data_store.get('emails', []) - - # If this email has been seen before, exit early - if new_email in emails: - print(f"Already seen {new_email}, exiting") - return False - - # This email is new, append it to our list - else: - print(f"Adding new email to data store {new_email}") - emails.append(new_email) - data_store["emails"] = emails - return new_email -``` - -## TTL use case: temporary caching and rate limiting - -TTL functionality is particularly useful for implementing temporary caching and rate limiting. Here's an example of a simple rate limiter that prevents a user from making more than 5 requests per hour: - -```python -def handler(pd: "pipedream"): - # Access the data store - data_store = pd.inputs["data_store"] - user_id = pd.steps["trigger"]["event"]["user_id"] - rate_key = f"ratelimit:{user_id}" - - # Try to get current rate limit counter - requests_num = data_store.get("rate_key") - - if not requests_num: - # First request from this user in the time window - data_store.set(rate_key, 1, ttl=3600) # Expire after 1 hour - return { "allowed": True, "remaining": 4 } - - if requests_num >= 5: - # Rate limit exceeded - return { "allowed": False, "error": "Rate limit exceeded", "retry_after": "1 hour" } - - # Increment the counter - data_store["rate_key"] = requests_num + 1 - return { "allowed": True, "remaining": 4 - requests_num } -``` - -This pattern can be extended for various temporary caching scenarios like: -- Session tokens with automatic expiration -- Short-lived feature flags -- Temporary access grants -- Time-based promotional codes - -### Supported data types - -Data stores can hold any JSON-serializable data within the storage limits. This includes data types including: - -- Strings -- Dictionaries -- Lists -- Integers -- Floats - -But you cannot serialize Modules, Functions, Classes, or other more complex objects. diff --git a/docs-v2/pages/workflows/building-workflows/code/python/working-with-files.mdx b/docs-v2/pages/workflows/building-workflows/code/python/working-with-files.mdx deleted file mode 100644 index 6619755b512c1..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/code/python/working-with-files.mdx +++ /dev/null @@ -1,115 +0,0 @@ -import Callout from '@/components/Callout' - -# Working with the filesystem in Python - -You can work with files within a workflow. For instance, downloading content from some service to upload to another. Here are some sample code for common file operations. - -## The `/tmp` directory - -Within a workflow, you have full read-write access to the `/tmp` directory. You have {process.env.TMP_SIZE_LIMIT} of available space in `/tmp` to save any file. - -### Managing `/tmp` across workflow runs - -The `/tmp` directory is stored on the virtual machine that runs your workflow. We call this the execution environment ("EE"). More than one EE may be created to handle high-volume workflows. And EEs can be destroyed at any time (for example, after about 10 minutes of receiving no events). This means that you should not expect to have access to files across executions. At the same time, files _may_ remain, so you should clean them up to make sure that doesn't affect your workflow. **Use [the `tempfile` module](https://docs.python.org/3/library/tempfile.html) to cleanup files after use, or [delete the files manually](#deleting-a-file).** - -## Writing a file to `/tmp` - -```python -import requests - -def handler(pd: "pipedream"): - # Download the Python logo - r = requests.get("https://www.python.org/static/img/python-logo@2x.png") - - # Create a new file python-logo.png in the /tmp/data directory - with open("/tmp/python-logo.png", "wb") as f: - # Save the content of the HTTP response into the file - f.write(r.content) -``` - -Now `/tmp/python-logo.png` holds the official Python logo. - -## Reading a file from `/tmp` - -You can also open files you have previously stored in the `/tmp` directory. Let's open the `python-logo.png` file. - -```python -import os - -def handler(pd: "pipedream"): - with open("/tmp/python-logo.png") as f: - # Store the contents of the file into a variable - file_data = f.read() -``` - -## Listing files in `/tmp` - -If you need to check what files are currently in `/tmp` you can list them and print the results to the **Logs** section of **Results**: - -```python -import os - -def handler(pd: "pipedream"): - # Prints the files in the tmp directory - print(os.listdir("/tmp")) -``` - -## Deleting a file - -```python -import os - -def handler(pd: "pipedream"): - print(os.unlink("/tmp/your-file")) -``` - -## Downloading a file to `/tmp` - -[See this example](/workflows/building-workflows/code/python/http-requests/#downloading-a-file-to-the-tmp-directory) to learn how to download a file to `/tmp`. - -## Uploading a file from `/tmp` - -[See this example](/workflows/building-workflows/code/python/http-requests/#uploading-a-file-from-the-tmp-directory) to learn how to upload a file from `/tmp` in an HTTP request. - -## Downloading a file, uploading it in another `multipart/form-data` request - -```python -import requests -from requests_toolbelt.multipart.encoder import MultipartEncoder -import os - -def handler(pd: "pipedream"): - download_url = "https://example.com" - upload_url = "http://httpbin.org/post" - file_path = "/tmp/index.html" - content_type = "text/html" - - # DOWNLOAD - with requests.get(download_url, stream=True) as response: - response.raise_for_status() - with open(file_path, "wb") as file: - for chunk in response.iter_content(chunk_size=8192): - file.write(chunk) - - # UPLOAD - multipart_data = MultipartEncoder(fields={ - 'file': (os.path.basename(file_path), open(file_path, 'rb'), content_type) - }) - response = requests.post( - upload_url, - data=multipart_data, - headers={'Content-Type': multipart_data.content_type} - ) -``` - -## `/tmp` limitations - -The `/tmp` directory can store up to {process.env.TMP_SIZE_LIMIT} of storage. Also the storage may be wiped or may not exist between workflow executions. - -To avoid errors, assume that the `/tmp` directory is empty between workflow runs. Please refer to the [disk limits](/workflows/limits/#disk) for details. - - -Are File Stores helpers available for Python to download, upload and manage files? - -At this time no, only Node.js includes a helper to interact with the [File Store](/workflows/data-management/file-stores/) programmatically within workflows. - diff --git a/docs-v2/pages/workflows/building-workflows/control-flow/_meta.tsx b/docs-v2/pages/workflows/building-workflows/control-flow/_meta.tsx deleted file mode 100644 index ebd3a73ede551..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/control-flow/_meta.tsx +++ /dev/null @@ -1,9 +0,0 @@ -export default { - "index": "Overview", - "ifelse": "Branching - If/Else", - "switch": "Branching - Switch", - "parallel": "Branching - Parallel", - "delay": "Delay", - "filter": "Filter", - "end-workflow": "End Workflow", -} as const diff --git a/docs-v2/pages/workflows/building-workflows/control-flow/delay.mdx b/docs-v2/pages/workflows/building-workflows/control-flow/delay.mdx deleted file mode 100644 index 92aea8228f42b..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/control-flow/delay.mdx +++ /dev/null @@ -1,50 +0,0 @@ -import VideoPlayer from "@/components/VideoPlayer"; - -### Delay - - - -Sometimes you need to wait a specific amount of time before the next step of your workflow proceeds. Pipedream supports this in one of two ways: - -1. The built-in **Delay** actions -2. The `$.flow.delay` function in Node.js - -{process.env.DELAY_MIN_MAX_TIME}. For example, we at Pipedream use this functionality to delay welcome emails to our customers until they've had a chance to use the product. - -#### Delay actions - -You can pause your workflow without writing code using the **Delay** actions: - -1. Click the **+** button below any step -2. Search for the **Delay** app -3. Select the **Delay Workflow** action -4. Configure the action to delay any amount of time, up to one year - -![Workflow delay step](/images/control-flow/delay-step-props.png) - -#### `$.flow.delay` - -If you need to delay a workflow within Node.js code, or you need detailed control over how delays occur, [see the docs on `$.flow.delay`](/workflows/building-workflows/code/nodejs/delay/). - -#### The state of delayed executions - -Delayed executions can hold one of three states: - -- **Paused**: The execution is within the delay window, and the workflow is still paused -- **Resumed**: The workflow has been resumed at the end of its delay window automatically, or resumed manually -- **Cancelled**: The execution was cancelled manually - -You'll see the current state of an execution by [viewing its event data](/workflows/building-workflows/inspect/). - -#### Cancelling or resuming execution manually - -The [**Delay** actions](#delay-actions) and [`$.flow.delay`](/workflows/building-workflows/code/nodejs/delay/) return two URLs each time they run: - -![Cancel and resume URLs](https://res.cloudinary.com/pipedreamin/image/upload/v1651551860/docs/Screen_Shot_2022-05-02_at_9.16.11_PM_ahw7tu.png) - -These URLs are specific to a single execution of your workflow. While the workflow is paused, you can load these in your browser or send an HTTP request to either: - -- Hitting the `cancel_url` will immediately cancel that execution -- Hitting the `resume_url` will immediately resume that execution early - -If you use [`$.flow.delay`](/workflows/building-workflows/code/nodejs/delay/), you can send these URLs to your own system to handle cancellation / resumption. You can even email your customers to let them cancel / resume workflows that run on their behalf. diff --git a/docs-v2/pages/workflows/building-workflows/control-flow/end-workflow.mdx b/docs-v2/pages/workflows/building-workflows/control-flow/end-workflow.mdx deleted file mode 100644 index 0123b8e25dc83..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/control-flow/end-workflow.mdx +++ /dev/null @@ -1,21 +0,0 @@ -# End Workflow - -To terminate the workflow prior to the last step, use the **End Workflow** pre-built action or `$.flow.exit()` in code. - -![End Workflow](/images/control-flow/end_workflow.png) - -## End Workflow Using a Pre-Built Action - -- Select and configure the End Workflow action from the step selector -- When the step runs, the workflow execution will stop -- You may configure an optional reason for ending the workflow execution. This reason will be surfaced when inspecting the event execution. - - ![Reason](/images/control-flow/reason.png) - - -## End Workflow in Code - -Check the reference for your preferred language to learn how to end the workflow execution in code. - -- [Ending a workflow in Node.js](/workflows/building-workflows/code/nodejs/#ending-a-workflow-early) -- [Ending a workflow in Python](/workflows/building-workflows/code/python/#ending-a-workflow-early) diff --git a/docs-v2/pages/workflows/building-workflows/control-flow/filter.mdx b/docs-v2/pages/workflows/building-workflows/control-flow/filter.mdx deleted file mode 100644 index f92c8bc630cca..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/control-flow/filter.mdx +++ /dev/null @@ -1,21 +0,0 @@ -import VideoPlayer from "@/components/VideoPlayer"; - -### Filter - - - -Use the Filter action to quickly stop or continue workflows on certain conditions. - -![Create a filter action](https://res.cloudinary.com/pipedreamin/image/upload/v1651603927/docs/animations/CleanShot_2022-05-03_at_13.51.17_za1skw.gif) - -Add a filter action to your workflow by searching for the **Filter** app in a new step. - -The **Filter** app includes several built-in actions: Continue Workflow on Condition, Exit Workflow on Condition and Exit Workflow on Custom Condition. - -In each of these actions, the **Value** is the subject of the condition, and the **Condition** is the operand to compare the value against. - -For example, to only process orders with a `status = ready` - -#### Continue Workflow on Condition - -With this action, only when values that _pass_ a set condition will the workflow continue to execute steps after this filter. diff --git a/docs-v2/pages/workflows/building-workflows/control-flow/ifelse.mdx b/docs-v2/pages/workflows/building-workflows/control-flow/ifelse.mdx deleted file mode 100644 index b2f42498a0d4e..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/control-flow/ifelse.mdx +++ /dev/null @@ -1,86 +0,0 @@ -import Callout from '@/components/Callout' -import VideoPlayer from "@/components/VideoPlayer"; -import { Steps } from 'nextra/components' - -# If/Else - -## Overview - -**If/Else** is single path branching operator. You can create multiple execution branches, but Pipedream will execute the **first** branch that matches the configured rules. The order in which rules are defined will affect the path of execution. - -If/Else operator is useful when you need to branch based on the value of multiple input variables. You must define both the input variable and condition to evaluate for every rule. If you only need to test for the value of a single input variable (e.g., if you are branching based on the path of an inbound request), the [Switch operator](./switch/) may be a better choice. - -![if/else configuration](/images/control-flow/ifelse-configuration.png) - -## Capabilities - -- Define rules to conditionally execute one of many branches -- Evaluate one or more expressions for each condition (use boolean operators to combine muliple rules) -- Use the **Else** condition as a fallback -- Merge and continue execution in the parent flow after the branching operation - - -If you disable the **Else** branch and there are no matching cases, the workflow will continue execution in the parent workflow after the **end** phase of the If/Else block - - - -The If/Else operator is a control flow **Block** with **start** and **end** phases. [Learn more about Blocks](./#blocks). - - -## Demo - - - -## Getting Started - - - -### Generate a test event - -Add a trigger and generate an event to help you build and test your workflow: - -![trigger.gif](/images/control-flow/trigger.gif) - -### Add the If/Else control flow block - -Click the + button to add a step to the canvas and select If/Else from the Control Flow section on the right. In the โ€œstartโ€ phase, configure rules for each branch (optionally toggle the else branch) and then test the step. - -![add if else.gif](/images/control-flow/add_if_else.gif) - - -**IMPORTANT:** If you disable the **Else** condition and an event does not match any of the rules, the workflow will continue to the next step after the **If/Else** section. If you want to end workflow execution if no other conditions evaluate to `true`, enable the Else condition and add a **Terminate Workflow** action. - - -### Build and test along the execution path - -Add a step to the success branch and test it - -![add step to branch.gif](/images/control-flow/add_step_to_branch.gif) - -### Merge and continue the parent flow after the branching operation - -Test the end phase to export results from the If/Else control flow block. - -![test end phase.gif](/images/control-flow/test_end_phase.gif) - -Add a step and reference the exports from `ifelse` using the steps object. - -![reference end exports.gif](/images/control-flow/reference_end_exports.gif) - -### Build and test alternate paths - -Generate or select an alternate event to generate data to help you test other branches as you build. When you select a new event, the steps in the root workflow segments go stale. Steps in control flow blocks will only go stale if they are in the known path of execution; i.e., if you test a start phase, the steps in the success path will become stale. - -![select different event.gif](/images/control-flow/select_different_event.gif) - -Build, test and deploy the workflow. - -![test and deploy.gif](/images/control-flow/test_and_deploy.gif) - -### Test the deployed workflow - -Generate test events to trigger the deployed workflow and inspect the executions. - -![Inspect.gif](/images/control-flow/Inspect.gif) - - diff --git a/docs-v2/pages/workflows/building-workflows/control-flow/index.mdx b/docs-v2/pages/workflows/building-workflows/control-flow/index.mdx deleted file mode 100644 index 623c69ca71a60..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/control-flow/index.mdx +++ /dev/null @@ -1,261 +0,0 @@ -import VideoPlayer from "@/components/VideoPlayer"; - -# Overview - -Pipedream is adding powerful control flow operators so you can build and run non-linear workflows to unlock use cases that require advanced orchestration. - - - -## Operators - -| Operator | Description | -| :--- | :--- | -| [If/Else (beta)](./control-flow/ifelse/) | Supports single-path, logical branching orchestration. | -| [Delay](./control-flow/delay/) | Add a delay from 1 millisecond to 1 year before the next step of your workflow proceeds. | -| [Filter](./control-flow/filter/) | Define rules to stop or continue workflow execution. | -| [End Workflow](./control-flow/end-workflow/) | Terminate the workflow prior to the last step. | - -More operators (including parallel and looping) are coming soon. - -## Key Capabilities - -- Orchestrate execution of linear and non-linear workflows -- Normalize results and continue after a non-linear operation -- Nest control flow operators for advanced use cases -- Return HTTP responses during or after most non-linear operations -- Execute long running workflows (workflow timeout resets at each control flow boundary) - -## Execution Path - -### Context - -The execution path represents the specific steps (and the order of steps) that run when a workflow is triggered. - -- Simple linear workflows are executed from top to bottom โ€” every step is in the execution path. - - ![Linear workflow](/images/control-flow/execution_path_a_linear.png) - -- With the introduction of non-linear workflows, steps may or may not be executed depending on the rules configured for control flow operators and the results exported from prior steps. - - ![Non-linear workflow](/images/control-flow/execution_path_b_nonlinear.png) - - Therefore, we introduced new patterns to signal the execution path and help you build, test and inspect workflows. - - -### Executed Path - -Step borders, backgrounds and connectors now highlight the **executed path** โ€” the steps that are executed on the execution path. If a non-execution path step is tested, it will not be reflected as being on the execution path. - -![Linear workflow](/images/control-flow/executed_path.png) - -### Building and Testing in an Unknown or Non-Execution Path - -You may add and test steps in any path. However, Pipedream highlights that the results may not be reliable if the step is outside the executed path; the results may not match the outcome if the steps were in a known execution path and may lead to invalid or misleading results. - -![Unkonwn execution path](/images/control-flow/unknown_execution_path.png) - -### Signaling Steps are โ€œOut of Dateโ€ - -If prior steps in a workflow are modified or retested, Pipedream marks later steps in the execution path as _stale_ to signal that the results may be out of date. In the non-linear model, Pipedream only marks steps that are in the confirmed execution path as stale. - -- If a change is made to a prior step, then the executed path is cleared. - - ![Out of date](/images/control-flow/out_of_date.gif) - -- Steps in the known execution path are immediately marked as stale -- State within conditional blocks is not updated until the start phase is tested and execution path is identified. - - ![Change in state](/images/control-flow/change_in_state.gif) - - -### Test State vs Execution Path - -Steps may be tested whether or not they are in the execution path. The test state for a step reflects whether a step was successfully tested or needs attention (the step may have errored, the results may be out of date, etc) and is denoted by the icon at the top left of each step. - -- Last test was successful - - ![Success](/images/control-flow/state_success.png) - -- Results may be stale, step may be untested, etc - - ![Stale](/images/control-flow/state_stale.png) - -- **Step has an error or is not configured** - - ![Error](/images/control-flow/state_error.png) - - -## Workflow Segments - -### Context - -Workflow segments are a linear series of steps that with no control flow operators. - -- A simple linear workflow is composed of a single workflow segment. - - ![Success](/images/control-flow/state_success.png) - -- When a control flow operator is introduced, then the workflow contains multiple segments. For example, when a Delay operator is added to the simple linear workflow above the workflow goes from 1 to 2 segements. - - ![Linear Segment](/images/control-flow/segment_linear.png) - -- The following example using If/Else contains 5 workflow segments. However, since only 1 branch within the If/Else control flow block is run on each workflow execution, the maximum number of segments that will be executed for each trigger event is 3. - - ![Non-Linear Segment](/images/control-flow/segment_non_linear.png) - - -### Billing - -Pipedream compiles each workflow segment into an executable function to optimize performance and reduce credit usage; credit usage is calculated independently for each workflow segment independent of the number of steps (rather than per step like many other platforms). - -- For example, the two workflow segments below both use a single credit: - - **Trigger + 1 step workflow segment (1 credit)** - - ![1 credit](/images/control-flow/billing_1credit_a.png) - - - **Trigger + 5 step workflow segment (1 credit)** - - ![1 credit](/images/control-flow/billing_1credit_b.png) - -- The If/Else example above that contains 5 workflow segments, but only 3 workflow segments in any given execution path will only incur 3 credits of usage per execution. - - ![1 credit](/images/control-flow/billing_3credits.png) - - -### Timeout and Memory - -For the preview, all workflow segments inherit the global timeout and memory settings. In the future, Pipedream will support customization of timeout and memory settings for each segment. For example, if you need expanded memory for select steps, you will be able to restrict higher memory execution to that segment instead of having to run the entire workflow with the higher memory settings. This can help you reduce credit usage. - -### Long Running Workflows - -Users may create long running workflows that greatly exceed the upper bound timeout of 12 minutes for current workflow (each workflow segment has an upper bound of 12 minutes). - -### `/tmp` directory access - -`tmp` directory access is scoped per workflow segment (since each segment is executed as an independent function). If you need to persist files across multiple segments (or workflow executions) use File Stores. - -### Warm Workers - -Warm workers are globally configured per segment. For example, if you have a workflow with 3 segments and you configure your workflow to use 1 warm worker per segment, 3 warm workers will be used. - -### Segment Relationships - -Steps may only reference prior steps in the same workflow segment or itโ€™s direct ancestors. - -| Type | Description | -| --- | --- | -| Root | The root segment is the top level for a workflow โ€” it may have children but no parents. If you do not include any control flow blocks in your workflow, your entire workflow definition is contained within the root segment. | -| Parent | A segment that has a child. | -| Child | A flow that has a parent. | - - -## Blocks - -### Context - -**Blocks** are compound steps that are composed of a **start** and an **end** phase. Blocks may contain one or more workflow segments between the phases. - -- Most non-linear control flow operators will be structured as blocks (vs. standard steps) -- You may add steps or blocks to [workflow segments](#workflow-segments) between start and end phases of a block -- The start and end phases are independently testable - - The start phase evaluates the rules/configuration for a block; the results may influence the execution path - - The end phase exports results from the control flow block that can be referenced in future workflow steps - - For example, for the If/Else control flow operator, the start phase evaluates the branching rules while the end phase exports the results from the executed branch. - -### Testing - -When building a workflow with a control flow block, we recommend testing the start phase, followed by steps in the execution path followed by the end phase. - -![Testing](/images/control-flow/2024-07-21_20.51.37.gif) - -For a conditional operator like if/else, we then recommend generating events that trigger alternate conditions and testing those. - -![Testing](/images/control-flow/2024-07-21_20.55.09.gif) - -#### Passing data to steps in a control flow block - -Steps may only reference prior steps in the same workflow segment or itโ€™s direct ancestors. In the following example, `step_c` and `step_d` (within the if/else control flow block) can directly reference any exports from `trigger`, `step_a`, or `step_b` (in the parent/root workflow segment) via the steps object. `step_c` and `step_d` are siblings and cannot reference exports from each other. - -![Passing data](/images/control-flow/passing_data.png) - -#### Referencing data from steps in a previous block - -Steps after the end phase may not directly reference steps within a control flow block (between the start and end phases). E.g., in the following workflow there are two branches: - -![Passing data](/images/control-flow/referencing_data.png) - -In this example, `step_f` is executed after a control flow block. It can directly reference prior steps in the root workflow segment (`trigger`, `step_a` and `step_b` using the `steps` object). - -However, `step_f` cannot reference directly reference data exported by `step_c` or `step_d`. The reason is that due to the non-linear execution, `step_c` and `step_d` are not guaranteed to execute for every event. **To reference data from a control flow block, reference the exports of the end phase.** Refer to the documentation to understand how data is exported for each control flow operator (e.g., for if/else, the exports of the last step in the branch are returned as the exports for the end phase; you can easily normalize the results across branches using a code step). - -In this example, `step_f` can reference the exported data for an executed branch by referencing `steps.ifelse.$return_value`. - -### Nesting - -Control flow blocks may be nested within other control flow blocks: - -- If/Else blocks may be nested within other If/Else blocks -- In the future, Loops may be nested within If/Else blocks and vice versa. - -There is currently no limit on the number of nested elements. - -![Passing data](/images/control-flow/nesting.png) - -## Rule Builder - -### Context - -Pipedream is introducing a rule builder for comparative operations. The rule builder is currently only supported by the If/Else operator, but it will be extended to other operators including Switch and Filter. - -![Rule builder overview](/images/control-flow/rule_builder_overview.png) - -### Simple conditions - -Compare values using supported operators. - -![Rule builder simple](/images/control-flow/rule_builder_simple.png) - -### Combine multiple conditions using AND / OR - -Click โ€œAdd conditionโ€ using the menu on the right to add multiple conditions. Click on AND / OR to toggle the operator. - -![Rule builder multiple](/images/control-flow/rule_builder_multiple.png) - -### Test for multiple conditions using Groups - -Create and manage groups using the menu options to โ€œAdd groupโ€, โ€œMake condition into groupโ€, โ€œNest groupโ€ and โ€œRemove groupโ€. - -![Rule builder groups](/images/control-flow/rule_builder_groups.png) - -### Supported Operators - -- Exists -- Doesnโ€™t exist -- String - - Equals - - Doesnโ€™t equal - - Is blank - - Is not blank - - Starts with - - Contains - - Ends with -- Number - - Equals - - Does not equal - - Is greater than - - Is greater than or equal to - - Is less than - - Is less than or equal to -- Boolean (equals) -- Type checks - - Is null - - Is not null - - Is string - - Is not a string - - Is a number - - Is not a number - - Is a boolean - - Is not a boolean -- Value checks - - Is true - - Is false diff --git a/docs-v2/pages/workflows/building-workflows/control-flow/parallel.mdx b/docs-v2/pages/workflows/building-workflows/control-flow/parallel.mdx deleted file mode 100644 index 7f9469ca5be50..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/control-flow/parallel.mdx +++ /dev/null @@ -1,99 +0,0 @@ -import Callout from '@/components/Callout' -import VideoPlayer from "@/components/VideoPlayer"; -import { Steps } from 'nextra/components' - -# Parallel - -## Overview - -**Parallel** is multi-path branching operator. It allows you to create multiple execution branches with optional filtering rules and Pipedream will execute **all** matching branches. Unlike [Switch](./switch/) and [If/Else](./ifelse/), the order in which rules are defined will not affect the path of execution. - -![Parallel](/images/control-flow/parallel/parallel.png) - -## Capabilities - -- Create non-linear workflows that execute steps in parallel branches -- Define when branches run โ€” always, conditionally or never (to disable a branch) -- Merge and continue execution in the parent flow after the branching operation - - -The Parallel operator is a control flow **Block** with **start** and **end** phases. [Learn more about Blocks](./#blocks). - - -### Add Parallel operator to workflow - -Select **Parallel** from the **Control Flow** section of the step selector: - -![add parallel block](/images/control-flow/parallel/add_parallel_block.png) - -### Create Branches - -To create new branches, click the `+` button: - -![add branch](/images/control-flow/parallel/add_branch.png) - -### Rename Branches - -Edit the branch's nameslug on the canvas or in the right pane after selecting the **Start** phase of the parallel block. The nameslug communicates the branch's purpose and affects workflow executionโ€”the end phase exports an object, with each key corresponding to a branch name. - -![rename branch](/images/control-flow/parallel/rename_branch.png) - -### Export Data to the Parent Flow - -You can export data from a parallel operation and continue execution in the parent flow. -- The parallel block exports data as a JSON object -- Branch exports are assigned to a key corresponding to the branch name slug (in the object exported from the block) -- Only the exports from the last step of each executed branch are included in the parallel block's return value -- To preview the exported data, test the **End** phase of the parallel block - -### Beta Limitations - -Workflow queue settings (concurrency, execution rate) may not work as expected with workflows using the parallel operator. - -## Getting Started - - - -### Generate a test event - -Add a trigger and generate an event to help you build and test your workflow: - -![trigger.gif](/images/control-flow/parallel/01_trigger.gif) - -### Add the Parallel control flow block - -Click the + button to add a step to the canvas and select Parallel from the Control Flow section on the right. You can optionally add or remove branches and configure conditions defining when each branch should run. - -![add parallel.gif](/images/control-flow/parallel/02_add_parallel.gif) - -### Test to identify the execution path(s) - -Test the **Start** phase to identify which branches will execute for the current event. - -![configure and test.gif](/images/control-flow/parallel/03_configure_and_test.gif) - -### Add steps to branches - -Add steps to the branches. These steps will be executed in parallel when the workflow runs. - -![add steps.gif](/images/control-flow/parallel/04_add_steps.gif) - -### Optionally merge and continue to the parent flow - -Test the **End** phase to export the results of the last step of each branch that was executed. This makes data from the branches available to reference in the parent flow. - -![export_data_to_parent](/images/control-flow/parallel/05_test_end_phase.gif) - -### Use exports in parent flow - -Optionally add steps after the parallel block and use data from individual branches by referencing the return value of the **End** phase. - -![use exports in parent flow](/images/control-flow/parallel/06_use_exports_in_parent_flow.gif) - -### Deploy and test the live workflow - -Deploy the workflow and trigger it to inspect the executions. - -![Inspect](/images/control-flow/parallel/07_deploy_and_run.gif) - - diff --git a/docs-v2/pages/workflows/building-workflows/control-flow/switch.mdx b/docs-v2/pages/workflows/building-workflows/control-flow/switch.mdx deleted file mode 100644 index 5e812b495ff46..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/control-flow/switch.mdx +++ /dev/null @@ -1,86 +0,0 @@ -import Callout from '@/components/Callout' -import VideoPlayer from "@/components/VideoPlayer"; -import { Steps } from 'nextra/components' - -# Switch - -## Overview - -**Switch** is single path branching operator. You can create multiple execution branches, but Pipedream will execute the **first** branch that matches the configured rules. The order in which rules are defined will affect the path of execution. - -Switch is useful when you need to make a branching decision based on the value of a single input variable (e.g., based on the path of an inbound request). You can define the input variable once and then branch based on the value(s). If you need to branch based on the values of multiple input variables use the [If/Else operator](./ifelse/). - -![Switch Configuration](/images/control-flow/switch/switch-configuration.png) - -## Capabilities - -- Define cases to conditionally execute one of many branches -- Define the expression to evaluate once and configure cases to compare values (use boolean operators to combine muliple rules for each case) -- Use the **Default** case as a fallback -- Merge and continue execution in the parent flow after the branching operation - - -If you disable the **Default** branch and there are no matching cases, the workflow will continue execution in the parent workflow after the **end** phase of the Switch block - - - -The Switch operator is a control flow **Block** with **start** and **end** phases. [Learn more about Blocks](./#blocks). - - -## Getting Started - - - -### Generate a test event - -Add a trigger and generate an event to help you build and test your workflow: - -![trigger.gif](/images/control-flow/switch/trigger.gif) - -### Add the Switch control flow block - -Click the + button to add a step to the canvas and select Switch from the Control Flow section on the right. In the โ€œstartโ€ phase, configure rules for a case. - -![add switch.gif](/images/control-flow/switch/add_switch.gif) - - -**IMPORTANT:** If you disable the **Default** condition and an event does not match any of the rules, the workflow will continue to the next step after the **Switch** section. If you want to end workflow execution if no other conditions evaluate to `true`, enable the Default condition and add a **Terminate Workflow** action. - - -### Optionally add additional cases - -To add additional cases, click the **+** button. - -![add another case.gif](/images/control-flow/switch/add_another_case.gif) - -### Test and build along the execution path - -Test the **start** phase and add a step to the branch in the execution path, - -![test_and_build_success_path.gif](/images/control-flow/switch/test_and_build_success_path.gif) - -### Optionally merge and continue the parent flow - -Test the **end** phase to export the results of the last step in the execution path. This makes them available to reference in the parent flow. - -![export_data_to_parent.gif](/images/control-flow/switch/export_data_to_parent.gif) - -### Scaffold alternate paths - -You may add steps to alternate paths and test them. Pipedream will signal that the results may not be reliable if the branch is not in the execution path. - -![build_and_test_alternate_paths.gif](/images/control-flow/switch/build_and_test_alternate_paths.gif) - -### Validate alternate paths - -Generate or select alternate events to trigger and validate alternate paths. - -![test_different_trigger_events.gif](/images/control-flow/switch/test_different_trigger_events.gif) - -### Deploy and test the live workflow - -Deploy the workflow and trigger it to inspect the executions. - -![Inspect.gif](/images/control-flow/switch/deploy_and_test.gif) - - diff --git a/docs-v2/pages/workflows/building-workflows/errors.mdx b/docs-v2/pages/workflows/building-workflows/errors.mdx deleted file mode 100644 index 594694aa40068..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/errors.mdx +++ /dev/null @@ -1,152 +0,0 @@ -import VideoPlayer from "@/components/VideoPlayer"; -import Callout from '@/components/Callout' - -# Handling errors - -Two types of errors are raised in Pipedream workflows: - -- **Workflow errors** โ€” Errors in the workflow execution environment, like [Timeouts](/troubleshooting/#timeout) or [Out of Memory](/troubleshooting/#out-of-memory) errors. Often, you can change your workflow's configuration to fix them. You can find more details on these errors [in our troubleshooting guide](/troubleshooting). -- **Step errors** โ€” Errors raised by individual [code](/workflows/building-workflows/code/) or [action](/workflows/building-workflows/actions/) steps. These can be syntax errors, errors raised by the Node or Python runtime, errors with input data, and more. Pipedream will surface details about the error and the stack trace, and you can even [debug these errors with AI](#debug-with-ai). - -Both types of errors will trigger [error notifications](#error-notifications), can be handled by [custom error handlers](#handle-errors-with-custom-logic), and will show up in [the REST API](#poll-the-rest-api-for-workflow-errors). - -## Auto-retry - -You can [automatically retry events](/workflows/building-workflows/settings/#auto-retry-errors) that yield an error. This can help for transient errors that occur when making API requests, like when a service is down or your request times out. - -## Apply conditional logic - -Many errors result from the data you're processing. You might only receive certain data from a webhook under certain conditions, or have malformed data in the payload that causes an error. - -You can apply conditional logic in code, or using the [If / Else operator](/workflows/building-workflows/control-flow/ifelse/), handling these conditions accordingly. - -## Error notifications - -By default, [Pipedream sends an email](#default-system-emails) when a workflow throws an unhandled error. But you can: - -- Send error notifications to Slack -- Handle errors from one workflow in a specific way -- Fetch errors asynchronously using the REST API, instead of handling the event in real-time - -These docs describe the default error behavior, and how to handle custom use cases like these. - - -Email notifications are sent to the address specified in your [workspace settings](https://pipedream.com/settings/account) under the **Notifications** section. We recommend using a group email address so everyone can monitor workflow errors. - - -Before you jump into the examples below, remember that all Pipedream workflows are just code. You can always use the built-in error handling logic native to your programming language, for example: using JavaScript's [`try / catch` statement](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch). In the future, Pipedream plans to support this kind of error-handling for built-in actions, as well. - -### Default system emails - -Any time your workflow throws an unhandled error, you'll receive an email like this: - -![Example error email](https://res.cloudinary.com/pipedreamin/image/upload/v1656630943/docs/Screen_Shot_2022-06-29_at_6.20.42_PM_kmsjbr.png) - -This email includes a link to the error so you can see the data and logs associated with the run. When you inspect the data in the Pipedream UI, you'll see details on the error below the step that threw the error, e.g. the full stack trace. - -#### Duplicate errors do not trigger duplicate emails - -High-volume errors can lead to lots of notifications, so Pipedream only sends at most one email, per error, per workflow, per 24 hour period. - -For example, if your workflow throws a `TypeError`, we'll send you an email, but if it continues to throw that same `TypeError`, we won't email you about the duplicate errors until the next day. If a different workflow throws a `TypeError`, you **will** receive an email about that. - -### Test mode vs. live mode - -When you're editing and testing your workflow, any unhandled errors will **not** raise errors as emails, nor are they forwarded to [error listeners](#handle-errors-with-custom-logic). Error notifications are only sent when a deployed workflow encounters an error on a live event. - -## Debug with AI - -You can debug errors in [code](/workflows/building-workflows/code/) or [action](/workflows/building-workflows/actions/) steps with AI by pressing the **Debug with AI** button at the bottom of any error. - -### Data we send with errors - -When you debug an error with AI, Pipedream sends the following information to OpenAI: - -- The error code, message, and stack trace -- The step's code -- The input added to the step configuration. This **does not** contain the event data that triggered your workflow, just the static input entered in the step configuration, like the URL of an HTTP request, or the names of [step exports](/workflows/#step-exports). - -We explicitly **do not** send the event data that triggered the error, or any other information about your account or workflow. - -## Handle errors with custom logic - -Pipedream exposes a global stream of all errors, raised from all workflows. You can subscribe to this stream, triggering a workflow on every event. This lets you handle errors in a custom way. Instead of sending all errors to email, you can send them to Slack, Discord, AWS, or any other service, and handle them in any custom way. - -To do this: - -1. Create a new workflow. -2. Add a new trigger. Search for the `Pipedream` app. -3. Select the custom source `Workspace $error events`. -4. Generate an error in a live version of any workflow (errors raised while you're testing your workflow [do not send errors to the `$errors` stream](#test-mode-vs-live-mode)). You should see this error trigger the workflow in step #1. From there, you can build any logic you want to handle errors across workflows. - -### Duplicate errors _do_ trigger duplicate error events on custom workflows - -Unlike [the default system emails](#duplicate-errors-do-not-trigger-duplicate-emails), duplicate errors are sent to any workflow listeners. - -## Poll the REST API for workflow errors - -Pipedream provides a REST API endpoint to [list the most recent 100 workflow errors](/rest-api/#get-workflow-errors) for any given workflow. For example, to list the errors from workflow `p_abc123`, run: - -```bash -curl 'https://api.pipedream.com/v1/workflows/p_abc123/$errors/event_summaries?expand=event' \ - -H 'Authorization: Bearer ' -``` - -By including the `expand=event` query string param, Pipedream will return the full error data, along with the original event that triggered your workflow: - -```json -{ - "page_info": { - "total_count": 100, - "start_cursor": "1606370816223-0", - "end_cursor": "1606370816223-0", - "count": 1 - }, - "data": [ - { - "id": "1606370816223-0", - "indexed_at_ms": 1606370816223, - "event": { - "original_event": { - "name": "Luke", - "title": "Jedi" - }, - "original_context": { - "id": "2po8fyMMKF4SZFrOThm0Ex4zv6M", - "ts": "2024-12-05T17:52:54.117Z", - "pipeline_id": null, - "workflow_id": "p_abc1234", - "deployment_id": "d_abc1234", - "source_type": "COMPONENT", - "verified": false, - "hops": null, - "test": false, - "replay": false, - "owner_id": "o_abc1234", - "platform_version": "3.50.4", - "workflow_name": "error", - "resume": null, - "emitter_id": "hi_abc1234", - "external_user_id": null, - "external_user_environment": null, - "trace_id": "2po8fwtzKHVr0VZpJc3EUmdTAms", - "project_id": "proj_abc1234" - }, - "error": { - "code": "InternalFailure", - "cellId": "c_abc123", - "ts": "2020-11-26T06:06:56.077Z", - "stack": " at Request.extractError ..." - } - }, - "metadata": { - "emitter_id": "p_abc123", - "emit_id": "1kodKnAdWGeJyhqYbqyW6lEXVAo", - "name": "$errors" - } - } - ] -} -``` - -By listing these errors, you may be able to replay them against your workflow programmatically. For example, if your workflow is triggered by HTTP requests, you can send an HTTP request with the data found in `event.original_event` (see the example above) for every event that errored. diff --git a/docs-v2/pages/workflows/building-workflows/http.mdx b/docs-v2/pages/workflows/building-workflows/http.mdx deleted file mode 100644 index ed0a0bbc8df6f..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/http.mdx +++ /dev/null @@ -1,235 +0,0 @@ -import Callout from '@/components/Callout' - -# HTTP - -Integrate and automate any API using Pipedream workflows. Use app specific pre-built actions, or an HTTP request action for a no code interface. If you need more control over error handling, then use your same connected accounts with code in Node.js or Python. - -## Pre-built actions - -Pre-built actions are the most convenient option for integrating your workflow with an API. Pre-built actions can use your connected accounts to perform API requests, and are configured through props. - -Pre-built actions are the fastest way to get started building workflows, but they may not fit your use case if a prop is missing or is handling data in a way that doesn't fit your needs. - -For example, to send a message using Slack just search for Slack and use the **Send Message to a Public Channel** action: - -![Finding the Slack - Send Message to a Public Channel action](/images/http/selecting-pre-built-actions.png) - -Then connect your Slack account, select a channel and write your message: - -![Configuring a Slack - Send Message to a Public Channel action](/images/http/configure-slack-pre-built-action-props.png) - -Now with a few clicks and some text you've integrated Slack into a Pipedream workflow. - - -Pre-built actions are open source - -All pre-built actions are published from the [Pipedream Component Registry](/components/contributing/), so you can read and modify their source code. You can even publish your own from [Node.js code steps privately to your own workspace](/workflows/building-workflows/code/nodejs/sharing-code/). - - -## HTTP Request Action - -The HTTP request action is the next most convenient option. Use a Postman-like interface to configure an HTTP request - including the headers, body, and even connecting an account. - -![Finding the HTTP request builder action](/images/http/selecting-the-slack-api-http-request-builder.png) - -Selecting this action will display an HTTP request builder, with the Slack app slot to connect your account with. - -![Connecting a Slack account to the http request action builder](/images/http/connect-slack-account-to-http-request-action.png) - -Once you connect your account to the step, it will automatically configure the authorization headers to match. - -For example, the Slack API expects a Bearer token with the `Authorization` header. So Pipedream automatically configures this HTTP request to pass your token to that specific header: - -![Showing how Pipedream passes the managed auth token to the header](/images/http/viewing-authorization-configuration.png) - -The configuration of the request and management of your token is automatically handled for you. So you can simply modify the request to match the API endpoint you're seeking to interact with. - -### Adding apps to an HTTP request builder action - -You can also attach apps to the *Send any HTTP Request* action from the action selection menu. After adding a new step to your workflow, select the *Send any HTTP Request* action: - -![Selecting the HTTP request builder action from the step selector menu](/images/http/selecting-the-http-request-builder-action.png) - -Then within the HTTP request builder, click the *Autorization Type* dropdown to select a method, and click **Select an app**: - -![Selecting a connected account for a HTTP request step](https://res.cloudinary.com/pipedreamin/image/upload/v1684259987/docs/docs/event%20histories/CleanShot_2023-05-16_at_13.50.53_fv3caw.png) - -Then you can choose **Slack** as the service to connect the HTTP request with: - -![Connecting the HTTP Request step to Slack](https://res.cloudinary.com/pipedreamin/image/upload/v1684420551/docs/docs/http/CleanShot_2023-05-18_at_10.35.41_dxyipl.png) - -The HTTP request action will automatically be configured with the Slack connection, you'll just need to select your account to finish the authentication. - -Then it's simply updating the URL to send a message which is [`https://slack.com/api/chat.postMessage`](https://api.slack.com/methods/chat.postMessage): - -![Defining the Slack API endpoint URL and connecting an account](https://res.cloudinary.com/pipedreamin/image/upload/v1684263130/docs/docs/CleanShot_2023-05-16_at_14.35.05_mame6o.png) - -Finally modify the body of the request to specify the `channel` and `message` for the request: - -![Configuring the Slack body for sending the request](https://res.cloudinary.com/pipedreamin/image/upload/v1684263128/docs/docs/CleanShot_2023-05-16_at_14.34.56_kpk2vp.png) - -HTTP Request actions can be used to quickly scaffold API requests, but are not as flexible as code for a few reasons: - -* Conditionally sending requests - The HTTP request action will always request, to send requests conditionally you'll need to use code. -* Workflow execution halts - if an HTTP request fails, the entire workflow cancels -* Automatically retrying - `$.flow.retry` isn't available in the HTTP Request action to retry automatically if the request fails -* Error handling - It's not possible to set up a secondary action if an HTTP request fails. - -## HTTP Requests in code - -When you need more control, use code. You can use your connected accounts with Node.js or Python code steps. - -This gives you the flexibility to catch errors, use retries, or send multiple API requests in a single step. - -First, connect your account to the code step: - -* [Connecting any account to a Node.js step](/workflows/building-workflows/code/nodejs/auth/#accessing-connected-account-data-with-thisappnameauth) -* [Connecting any account to a Python step](/workflows/building-workflows/code/python/auth/) - -### Conditionally sending an API Request - -You may only want to send a Slack message on a certain condition, in this example we'll only send a Slack message if the HTTP request triggering the workflow passes a special variable: `steps.trigger.event.body.send_message` - -```javascript -import { axios } from "@pipedream/platform" - -export default defineComponent({ - props: { - slack: { - type: "app", - app: "slack", - } - }, - async run({steps, $}) { - // only send the Slack message if the HTTP request has a `send_message` property in the body - if(steps.trigger.body.send_message) { - return await axios($, { - headers: { - Authorization: `Bearer ${this.slack.$auth.oauth_access_token}`, - }, - - url: `https://slack.com/api/chat.postMessage`, - - method: 'post', - data: { - channel: 'C123456', - text: 'Hi from a Pipedream Node.js code step' - } - }) - } - }, -}) - -``` - -### Error Handling - -The other advantage of using code is handling error messages using `try...catch` blocks. In this example, we'll only send a Slack message if another API request fails: - -```javascript -import { axios } from "@pipedream/platform" - -export default defineComponent({ - props: { - openai: { - type: "app", - app: "openai" - }, - slack: { - type: "app", - app: "slack", - } - }, - async run({steps, $}) { - try { - return await axios($, { - url: `https://api.openai.com/v1/completions`, - method: 'post', - headers: { - Authorization: `Bearer ${this.openai.$auth.api_key}`, - }, - data: { - "model": "text-davinci-003", - "prompt": "Say this is a test", - "max_tokens": 7, - "temperature": 0 - } - }) - } catch(error) { - return await axios($, { - url: `https://slack.com/api/chat.postMessage`, - method: 'post', - headers: { - Authorization: `Bearer ${this.slack.$auth.oauth_access_token}`, - }, - data: { - channel: 'C123456', - text: `OpenAI returned an error: ${error}` - } - }) - } - }, -}) -``` - - -Subscribing to all errors - -[You can use a subscription](/rest-api/#subscriptions) to subscribe a workflow to all errors through the `$errors` channel, instead of handling each error individually. - - -### Automatically retrying an HTTP request - -You can leverage `$.flow.rerun` within a `try...catch` block in order to retry a failed API request. - -[See the example in the `$.flow.rerun` docs](/workflows/building-workflows/code/nodejs/rerun/#pause-resume-and-rerun-a-workflow) for Node.js. - -## Platform axios - -### Why `@pipedream/platform` axios? - -`axios` is an HTTP client for Node.js ([see these docs](/workflows/building-workflows/code/nodejs/http-requests/) for usage examples). - -`axios` has a simple programming API and works well for most use cases. But its default error handling behavior isn't easy to use. When you make an HTTP request and the server responds with an error code in the 4XX or 5XX range of status codes, `axios` returns this stack trace: - -![default axios stack trace](/images/http/default-axios-stack.png) - -This only communicates the error code, and not any other information (like the body or headers) returned from the server. - -Pipedream publishes an `axios` wrapper as a part of [the `@pipedream/platform` package](https://github.com/PipedreamHQ/pipedream/tree/master/platform). This presents the same programming API as `axios`, but implements two helpful features: - -1. When the HTTP request succeeds (response code < `400`), it returns only the `data` property of the response object โ€” the HTTP response body. This is typically what users want to see when they make an HTTP request: - -![pipedream axios success case](/images/http/pipedream-axios-success.png) - -2. When the HTTP request _fails_ (response code >= `400`), it displays a detailed error message in the Pipedream UI (the HTTP response body), and returns the whole `axios` response object so users can review details on the HTTP request and response: - -![pipedream axios error case](/images/http/pipedream-axios-stack.png) - -### Using `@pipedream/platform` axios in component actions - -To use `@pipedream/platform` axios in component actions, import it: - -```javascript -import { axios } from "@pipedream/platform" -``` - -`@pipedream/platform` axios uses methods [provided by the `$` object](/components/contributing/api/#actions), so you'll need to pass that as the first argument to `axios` when making HTTP requests, and pass the [standard `axios` request config](https://github.com/axios/axios#request-config) as the second argument. - -Here's an example action: - -```javascript -import { axios } from "@pipedream/platform" - -export default { - key: "my-test-component", - name: "My Test component", - version: "0.0.1", - type: "action", - async run({ $ }) { - return await axios($, { - url: "https://httpstat.us/200", - }) - } -} -``` diff --git a/docs-v2/pages/workflows/building-workflows/inspect.mdx b/docs-v2/pages/workflows/building-workflows/inspect.mdx deleted file mode 100644 index 9fc08103d7eda..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/inspect.mdx +++ /dev/null @@ -1,39 +0,0 @@ -import VideoPlayer from "@/components/VideoPlayer"; - -# Inspect Events - - - -[The inspector](#the-inspector) lists the events you send to a [workflow](/workflows/building-workflows/). Once you choose a [trigger](/workflows/building-workflows/triggers/) and send events to it, you'll see those events in the inspector, to the left of your workflow. - -Clicking on an event from the list lets you [review the incoming event data and workflow execution logs](/workflows/building-workflows/triggers/#examining-event-data) for that event. - -You can use the inspector to replay events, delete them, and more. - -## The inspector - -The inspector lists your workflow's events: - -![Event inspector in a deployed workflow](https://res.cloudinary.com/pipedreamin/image/upload/v1648759565/docs/components/CleanShot_2022-03-31_at_16.45.52_vwwhaj.png) - -## Event Duration - -The duration shown when clicking an individual event notes the time it took to run your code, in addition to the time it took Pipedream to handle the execution of that code and manage its output. Specifically, - -**Duration = Time Your Code Ran + Pipedream Execution Time** - -## Replaying and deleting events - -Hover over an event, and you'll see two buttons: - -![Replaying and deleting events](https://res.cloudinary.com/pipedreamin/image/upload/v1648759778/docs/components/CleanShot_2022-03-31_at_16.49.24_ska5vo.gif) - -The blue button with the arrow **replays** the event against the newest version of your workflow. The red button with the X **deletes** the event. - -## Messages - -Any `console.log()` statements or other output of code steps is attached to the associated code cells. But [`$.flow.exit()`](/workflows/building-workflows/code/nodejs/#ending-a-workflow-early) or [errors](/workflows/building-workflows/code/nodejs/#errors) end a workflow's execution, so their details appear in the inspector. - -## Limits - -Pipedream retains a limited history of events for a given workflow. See the [limits docs](/workflows/limits/#event-history) for more information. diff --git a/docs-v2/pages/workflows/building-workflows/settings/_meta.tsx b/docs-v2/pages/workflows/building-workflows/settings/_meta.tsx deleted file mode 100644 index 0c9157a1cadfe..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/settings/_meta.tsx +++ /dev/null @@ -1,4 +0,0 @@ -export default { - "index": "Overview", - "concurrency-and-throttling": "Concurrency and Throttling", -} as const diff --git a/docs-v2/pages/workflows/building-workflows/settings/concurrency-and-throttling.mdx b/docs-v2/pages/workflows/building-workflows/settings/concurrency-and-throttling.mdx deleted file mode 100644 index a42512de18866..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/settings/concurrency-and-throttling.mdx +++ /dev/null @@ -1,92 +0,0 @@ -import Callout from "@/components/Callout"; - -# Concurrency and Throttling - -Pipedream makes it easy to manage the concurrency and rate at which events trigger your workflow code using execution controls. - -## Overview - -Workflows listen for events and execute as soon as they are triggered. While this behavior is expected for many use cases, there can be unintended consequences. - -### Concurrency - -Without restricting concurrency, events can be processed in parallel and there is no guarantee that they will execute in the order in which they were received. This can cause race conditions. - -For example, if two workflow events try to add data to Google Sheets simultaneously, they may both attempt to write data to the same row. As a result, one event can overwrite data from another event. The diagram below illustrates this example โ€” both `Event 1` and `Event 2` attempt to write data to Google Sheets concurrently โ€” as a result, they will both write to the same row and the data for one event will be overwritten and lost (and no error will be thrown). - -![image-20201027132901691](/images/concurrency-and-throttling/gsheets-1.png) - -You can avoid race conditions like this by limiting workflow concurrency to a single "worker". What this means is that only one event will be processed at a time, and the next event will not start processing until the first is complete (unprocesssed events will maintained in a queue and processed by the workflow in order). The following diagram illustrates how the events in the last diagram would executed if concurrency was limited to a single worker. - -![image-20201027133308888](/images/concurrency-and-throttling/gsheets-2.png) - -While the first example resulted in only two rows of data in Google Sheets, this time data for all three events are recorded to three separate rows. - -### Throttling - -If your workflow integrates with any APIs, then you may need to limit the rate at which your workflow executes to avoid hitting rate limits from your API provider. Since event-driven workflows are stateless, you can't manage the rate of execution from within your workflow code. Pipedream's execution controls solve this problem by allowing you to control the maximum number of times a workflow may be invoked over a specific period of time (e.g., up to 1 event every second). - - -Pipedream controls the frequency of workflow invocations over a specified time interval using fixed window throttling. For example, if the execution rate limit is set at 1 execution every 5 seconds, this means that your workflow will be invoked no more than once within a fixed 5-second time box. This doesnโ€™t mean that executions will occur 5 seconds apart. - - -## Usage - -Events emitted from a source to a workflow are placed in a queue, and Pipedream triggers your workflow with events from the queue based on your concurrency and throttling settings. These settings may be customized per workflow (so the same events may be processed at different rates by different workflows). - -![image-20201027145847752](/images/concurrency-and-throttling/amazon-v-google-sheets.png) - -The maximum number of events Pipedream will queue per workflow depends on your account type. - -- Up to 100 events will be queued per workflow for the workspaces on the free tier. -- Workflows owned by paid plans may have custom limits. If you need a larger queue size, [see here](#increasing-the-queue-size-for-a-workflow). - -**IMPORTANT:** If the number of events emitted to a workflow exceeds the queue size, events will be lost. If that happens, you'll see an error in your workflow, and you'll receive an error email. - -To learn more about how the feature works and technical details, check out our [engineering blog post](https://blog.pipedream.com/concurrency-controls-design/). - -### Where Do I Manage Concurrency and Throttling? - -Concurrency and throttling can be managed in the **Execution Controls** section of your **Workflow Settings**. Event queues are currently supported for any workflow that is triggered by an event source. Event queues are not currently supported for native workflow triggers (native HTTP, cron, SDK and email). - -![image-20201027120141750](/images/concurrency-and-throttling/image-20201027120141750.png) - -### Managing Event Concurrency - -Concurrency controls define how many events can be executed in parallel. To enforce serialized, in-order execution, limit concurrency to `1` worker. This guarantees that each event will only be processed once the execution for the previous event is complete. - -To execute events in parallel, increase the number of workers (the number of workers defines the maximum number of concurrent events that may be processed), or disable concurrency controls for unlimited parallelization. - -### Throttling Workflow Execution - -To throttle workflow execution, enable it in your workflow settings and configure the **limit** and **interval**. - -The limit defines how many events (from `0-10000`) to process in a given time period. - -The interval defines the time period over which the limit will be enforced. You may specify the time period as a number of seconds, minutes or hours (ranging from `1-10000`) - -### Applying Concurrency and Throttling Together - -The conditions for both concurrency and throttling must be met in order for a new event to trigger a workflow execution. Here are some examples: - -| Concurrency | Throttling | Result | -| ----------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Off | Off | Events will trigger your workflow **as soon as they are received**. Events may execute in parallel. | -| 1 Worker | Off | Events will trigger your workflow in a **serialized pattern** (a maximum of 1 event will be processed at a time). As soon as one event finishes processing, the next event in the queue will be processed. | -| 1 Worker | 1 Event per Second | Events will trigger your workflow in a **serialized pattern** at a **maximum rate** of 1 event per second.

If an event takes less than one second to finish processing, the next event in the queue will not being processing until 1 second from the start of the most recently processed event.
If an event takes longer than one second to process, the next event in the queue will begin processing immediately. | -| 1 Worker | 10 Events per Minute | Events will trigger your workflow in a **serialized pattern** at a **maximum rate** of 10 events per minute.

If an event takes less than one minute to finish processing, the next event in the queue immediately begin processing. If 10 events been processed in less than one minute, the remaining events will be queued until 1 minute from the start of the initial event.
| -| 5 Workers | Off | Up to 5 events will trigger your workflow in parallel as soon as they are received. If more events arrive while 5 events are being processed, they will be queued and executed in order as soon as an event completes processing. | - -### Pausing Workflow Execution - -To stop the queue from invoking your workflow, throttle workflow execution and set the limit to `0`. - -### Increasing the queue size for a workflow - -By default, your workflow can hold up to {process.env.DEFAULT_WORKFLOW_QUEUE_SIZE} events in its queue at once. Any events that arrive once the queue is full will be dropped, and you'll see an [Event Queue Full](/troubleshooting/#event-queue-full) error. - -For example, if you serialize the execution of your workflow by setting a concurrency of `1`, but receive 200 events from your workflow's event source at once, the workflow's queue can only hold the first 100 events. The last 100 events will be dropped. - -Users on [paid tiers](https://pipedream.com/pricing) can increase their queue size up to {process.env.MAX_WORKFLOW_QUEUE_SIZE} events for a given workflow, just below the **Concurrency** section of your **Execution Controls** settings: - -![Queue size](/images/concurrency-and-throttling/queue-size.png) diff --git a/docs-v2/pages/workflows/building-workflows/settings/index.mdx b/docs-v2/pages/workflows/building-workflows/settings/index.mdx deleted file mode 100644 index f96d08fc34302..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/settings/index.mdx +++ /dev/null @@ -1,216 +0,0 @@ -import Callout from "@/components/Callout"; - -# Settings - -You can control workflow-specific settings in your workflow's **Settings**: - -1. Visit your workflow -2. Click on Workflow Settings on the top left: - -
-Click on Workflow Settings on the top left -
- - -You can also open the workflow settings using `CMD` + `,` on Mac, or `Ctrl` + `,` on Windows. - - -## Enable Workflow - -If you'd like to pause your workflow from executing completely, you can disable it or reenable it here. - -## Error Handling - -By default, you'll receive notifications when your workflow throws an unhandled error. See the [error docs](/workflows/building-workflows/errors/) for more detail on these notifications. - -You can disable these notifications for your workflow by disabling the **Notify me on errors** toggle: - -Notify me on errors toggle - -
-Notify me on errors toggle -
- -## Auto-retry Errors - - -**Out of Memory and Timeout Errors** - -Pipedream will not automatically retry if an execution fails due to an Out of Memory (OOM) error or a timeout. If you encounter these errors frequently, consider increasing the configuration settings for your workflow. - - -Customers on the [Advanced Plan](https://pipedream.com/pricing) can automatically retry workflows on errors. If any step in your workflow throws an error, Pipedream will retry the workflow from that failed step, re-rerunning the step up to 8 times over a 10 hour span with an [exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff) strategy. - -On error, the step will export a `$summary` property that tells you how many times the step has been retried, and an `$attempt` object with the following properties: - -1. `error` โ€” All the details of the error the step threw โ€” the error, the stack, etc. -2. `cancel_url` โ€” You can call this URL to cancel the retry -3. `rerun_url` โ€” You can call this URL to proceed with the execution immediately -4. `resume_ts` โ€” An ISO 8601 timestamp that tells you the timestamp of the next retry - -
-Step exports for failed auto-retry -
- -If the step execution succeeds during any retry, the execution will proceed to the next step of the workflow. - -If the step fails on all 8 retries and throws a final error, you'll receive [an error notification](/workflows/building-workflows/errors/) through your standard notification channel. - -### Send error notifications on the first error - -By default, if a step fails on all 8 retries, and throws a final error, you'll receive [an error notification](/workflows/building-workflows/errors/) through your standard notification channel. But sometimes you need to investigate errors as soon as they happen. If you're connecting to your database, and receive an error that the DB is down, you may want to investigate that immediately. - -On any workflow with auto-retry enabled, you can optionally choose to **Send notification on first error**. This is disabled by default so you don't get emails for transient errors, but you can enable for critical workflows where you want visibility into all errors. - -For custom control over error handling, you can implement error logic in code steps (e.g. `try` / `catch` statements in Node.js code), or [create your own custom error workflow](/workflows/building-workflows/errors/#handle-errors-with-custom-logic). - -## Data Retention Controls - -By default, Pipedream stores exports, logs, and other data tied to workflow executions. You can view these logs in two places: - -1. [The workflow inspector](/workflows/building-workflows/inspect/#the-inspector) -2. [Event History](/workflows/event-history/) - -But if you're processing sensitive data, you may not want to store those logs. You can **Disable data retention** in your workflow settings to disable **all** logging. Since Pipedream stores no workflow logs with this setting enabled, you'll see no logs in the inspector or event history UI. - -![Disable data retention setting](/images/settings/disable-data-retention-settings.png) - -Refer to our [pricing page](https://pipedream.com/pricing) to understand the latest limits based on your plan. - -### Constraints - -- **Data Retention Controls do not apply to sources**: Even with data retention disabled on your workflow, Pipedream will still log inbound events for the source. -- **No events will be shown in the UI**: When data retention is disabled for your workflow, the Pipedream UI will not show any new events in the inspector or Event History for that workflow. - - -**Avoid surfacing events in the builder** - -Even with data retention disabled on your workflow, the builder will still surface inbound events when in build mode. To avoid surfacing potentially sensitive data here as well, refer to [these docs](/workflows/building-workflows/triggers/#pipedream-specific-request-parameters). - - - -## Execution Controls - -### Execution Timeout Limit - -Workflows have a default [execution limit](/workflows/limits/#time-per-execution), which defines the time the workflow can run for a single execution until it's timed out. - -If your workflow times out, and needs to run for longer than the [default limit](/workflows/limits/#time-per-execution), you can change that limit here. - -### Memory - -By default, workflows run with {process.env.MEMORY_LIMIT} of memory. If you're processing a lot of data in memory, you might need to raise that limit. Here, you can increase the memory of your workflow up to {process.env.MEMORY_ABSOLUTE_LIMIT}. - -Increasing your workflow's memory gives you a proportional increase in CPU, so increasing your workflow's memory can reduce its overall runtime and make it more performant. - - -**How can my workflow run faster?** - -See [our guide on running workflows faster](/troubleshooting/#how-can-my-workflow-run-faster). - - -**Pipedream charges credits proportional to your memory configuration**. When you modify your memory settings, Pipedream will show you the number of credits you'll be charged per execution. [Read more here](/pricing/faq/#how-does-workflow-memory-affect-credits). - -### Concurrency and Throttling - -[Manage the concurrency and rate](/workflows/building-workflows/settings/concurrency-and-throttling/) at which events from a source trigger your workflow code. - -## Eliminate cold starts - -A **cold start** refers to the delay between the invocation of workflow and the execution of the workflow code. Cold starts happen when Pipedream spins up a new [execution environment](/privacy-and-security/#execution-environment) to handle incoming events. - -Specifically, cold starts occur on the first request to your workflow after a period of inactivity (roughly 5 minutes), or if your initial worker is already busy and a new worker needs to be initialized. In these cases, Pipedream creates a new execution environment to process your event. **Initializing this environment takes a few seconds, which delays the execution of this first event**. - -You can reduce cold starts by configuring a number of dedicated **workers**: - -1. Visit your workflow's **Settings** -2. Under **Execution Controls**, select the toggle to **Eliminate cold starts** -3. Configure [the appropriate number of workers](#how-many-workers-should-i-configure) for your use case - -
-Warm workers configuration -
- -When you configure workers for a specific workflow, Pipedream initializes dedicated workers โ€” virtual machines that run Pipedream's [execution environment](/privacy-and-security/#execution-environment). [It can take a few minutes](#how-long-does-it-take-to-spin-up-a-dedicated-worker) for new dedicated workers to deploy. Once deployed, these workers are available at all times to respond to workflow executions, with no cold starts. - - -You may need to configure [multiple dedicated workers](#how-many-workers-should-i-configure) to handle multiple, concurrent requests. - -Pipedream also performs some initialization operations on new workflow runs, so you may still observe a small startup time (typically around 50ms per workflow step) on dedicated workers. - - - -### When should I configure dedicated workers? - -You should configure dedicated workers when you need to process requests as soon as possible, with no latency. - -For example, you may build an HTTP-triggered workflow that returns a synchronous HTTP response to a user, without delay. Or you may be building a Slack bot and need to respond to Slack's webhook within a few seconds. Since these workflows need to respond quickly, they're good cases to use dedicated workers. - -### How many workers should I configure? - -Incoming requests are handled by a single worker, one at a time. If you only receive one request a minute, and the workflow finishes execution in a few seconds, you may only need one worker. - -But you might have a higher-volume app that receives two concurrent requests. In that case, Pipedream spins up **two** workers to handle each request. - -For many user-facing (even internal) applications, the number of requests over time can be modeled with a [Poisson distrubution](https://en.wikipedia.org/wiki/Poisson_distribution). You can use that distribution to estimate the number of workers you need at an average time, or set it higher if you want to ensure a specific percentage of requests hit a dedicated worker. You can also save a record of all workflow runs to your own database, with the timestamp they ran ([see `steps.trigger.context.ts`](/workflows/building-workflows/triggers/#stepstriggercontext)), and look at your own pattern of requests, to compute the optimal number of workers. - -### Do compute budgets apply to dedicated workers? - -No, compute budgets do not apply to dedicated workers, they only apply to credits incurred by compute from running workflows, sources, etc. - -### How long does it take to spin up a dedicated worker? - -It can take 5-10 minutes for Pipedream to fully configure a new dedicated worker. Before that time, you may still observe cold starts with new incoming requests. - -### Pricing for dedicated workers - -You're charged {process.env.WARM_WORKERS_CREDITS_PER_INTERVAL} credits for every {process.env.WARM_WORKERS_INTERVAL} a dedicated worker is live, per worker, per {process.env.MEMORY_LIMIT} memory. You can view the credits used by dedicated workers [in your billing settings](https://pipedream.com/settings/billing): - -
-Warm workers credit usage in billing -
- -For example, if you run a single dedicated worker for 24 hours, that would cost 720 credits: - -``` -5 credits per 10 min -* 6 10-min periods per hour -* 24 hours -= 720 credits -``` - -{process.env.WARM_WORKERS_INTERVAL} is the _minimum_ interval that Pipedream charges for usage. If you have a dedicated worker live for 1 minute, Pipedream will still charge {process.env.WARM_WORKERS_CREDITS_PER_INTERVAL} credits. - -Additionally, any change to dedicated worker configuration, (including worklow deploys) will result in an extra {process.env.WARM_WORKERS_CREDITS_PER_INTERVAL} credits of usage. - -
-Dedicated worker overlap -
- -### Limits - -Each attachment is limited to `25MB` in size. The total size of all attachments within a single workflow cannot exceed `200MB`. diff --git a/docs-v2/pages/workflows/building-workflows/sharing.mdx b/docs-v2/pages/workflows/building-workflows/sharing.mdx deleted file mode 100644 index 1f777eeedf711..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/sharing.mdx +++ /dev/null @@ -1,148 +0,0 @@ -import { Cards, Steps } from 'nextra/components' -import Callout from '@/components/Callout' -import RocketShip from '@/components/RocketShip' -import Image from 'next/image' - -# Sharing Workflows - -Pipedream provides a few ways to share your workflow: -1. [Share a workflow as a link with anyone](#creating-a-share-link-for-a-workflow) -2. [Publish as a public template](#publish-to-the-templates-gallery) - -You can share your workflows as templates with other Pipedream accounts with a unique shareable link. - -Creating a share link for your workflow will allow anyone with the link to create a template version of your workflow in their own Pipedream account. This will allow others to use your workflow with their own Pipedream account and also their own connected accounts. - -[Here's an example of a workflow](https://pipedream.com/new?h=tch_OYWfjz) that sends you a daily SMS message with today's schedule: - -![Daily Schedule SMS Reminder workflow](https://res.cloudinary.com/pipedreamin/image/upload/v1685116771/docs/docs/share%20workflows/New_Project_6_n63kju.png) - -Click **Deploy to Pipedream** below to create a copy of this workflow in your own Pipedream account. - - - } title="Deploy to Pipedream" href="https://pipedream.com/new?h=tch_OYWfjz" /> - - -The copied workflow includes the same trigger, steps, and connected account configuration, but it has a separate event history and versioning from the original. - - -Steps that are paused within your workflow will be omitted from the generated share link. - - -## Creating a share link for a workflow - -To share a workflow, open the workflow in your browser. Then in the top right menu, select **Create Share Link**. - -Click Create Share Link - -Now you can define which prop values should be included in this shareable link. - -### Including props - -Optionally, you can include the actual individual prop configurations as well. This helps speed up workflow development if the workflow relies on specific prop values to function properly. - -You can choose to **Include all** prop values if you'd like, or only select specific props. - -For the daily schedule reminder workflow, we included the props for filtering Google Calendar events, but we did _not_ include the SMS number to send the message to. This is because the end user of this workflow will use their own phone number instead: - -
- -Sharing a workflow that will send a daily SMS message of your Google Calendar schedule for today - - -**Your connected accounts are not shared.** When other users configure your workflow from the shared link they'll be prompted to connect their own accounts. - - -### Versioning - -- When you create a shared link for your workflow, that link is frozen to the version of your workflow at the time the link was created -- If you make changes to the original workflow, those changes will _not_ be included in the shared workflow link, nor in any workflows copied from the original shared link -- To push out new changes to a workflow, you'll need to generate a new share link - - -**Share links persist**. You can create multiple share links for the same workflow with different prop configurations, or even different steps. Share links do not expire, nor do newly created link overwrite existing ones. - - -## Publish to the templates gallery - -We're excited to highlight the various use cases our community and partners have enabled using Pipedream. To do this, we've created a [Templates Gallery](https://pipedream.com/templates/) with a growing number of high-quality templates to help you discover your next workflow. - -The process to publish your own workflow to the Templates Gallery is similar to [creating a share link](#creating-a-share-link-for-a-workflow): - - - -### Open the workflow you'd like to share - -To get started, open the workflow in your browser. Then in the top right menu, select **Publish as a template**. - -
- -Click Publish as a template - -### Configure which prop values to include in the template - -Follow the same steps as above to select the prop input values you'd like to include in the template, then click **Continue** - -### Enter the required information for the template title, description, and tags - -On the next screen, you'll be prompted for additional information about your template: - -- **Developer name**: This is probably you โ€”ย this name will be displayed as the author of the template. -- **Template name**: The name of the template. -- **Brief description**: A short description of the template, which will be displayed on the listing page (maximum 256 characters). [See here](https://pipedream.com/templates) for examples. -- **Longer description**: Use Markdown to create a more in-depth description. We recommend including distinct sections as H2s, for you to provide an **Overview**, **Steps**, and **Use Cases**. This will be displayed on the details page for the template. Here's an example: [Notion Voice Notes (Google Drive)](https://pipedream.com/templates/notion-voice-notes-google-drive-version-mpt_2WRFKY). -- **Use cases**: Select one or more categories that align with the use cases for your template to help users discover it. -- **Affiliate token**: If you're a [Pipedream affiliate](https://pipedream.com/affiliates), you can enter your unique token here to earn commissions on any users who sign up for Pipedream after using your template. - -### Click **Submit** - -- Once you've filled out the required information, click **Submit**. -- We'll review your template and will email you once it goes live! - -
- -## FAQ - -### If changes are made to the original workflow, will copied versions of the workflow from the shared link also change? - -No, workflows copied from a shared link will have separate version histories from the original workflow. You can modify your original workflow and it will not affect copied workflows. - -### Will my connected accounts be shared with the workflow? - -No, your connected accounts are not shared. Instead, copied workflows display a slot in actions that require a connected account, so the user of the copied workflow can provide their own accounts instead. - -For example, if one of your steps relies on a Slack connected account to send a message, then the copied workflow will display the need to connect a Slack account. - -### I haven't made any changes to my workflow, but if I generate another shared link will it override my original link? - -No, if the steps and prop configuration of the workflow is exactly the same, then the shared link URL will also be exactly the same. - -The shared workflow link is determined by the configuration of your workflow, it's not a randomly generated ID. - -### Will generating new shared links disable or delete old links? - -No, each link you generate will be available even if you create new versions based on changes or included props from the original workflow. - -### What plan is this feature available on? - -Sharing workflows via link is available on all plans, including the Free plan. - -### Do users of my workflow need to have a subscription? - -To copy a workflow, a subscription is not required. However, the copied workflow is subject to the current workspace's plan limits. - -For example, if a workflow requires more connected accounts than what's available on the [Free plan](/pricing/#free-plan), then users of your workflow will require a plan to run the workflow properly. - -### Will copies of my workflow use my credits? - -No. Copied workflows have entirely separate versioning, connected accounts, and billing. Sharing workflow copies is free, and the user of the copy usage is responsible for credit usage. Your original workflow is entirely separate from the copy. - -### How can I transfer all of my workflows from one account to another? - -It's only possible to share a single workflow at time with a link at this time. - -If you're trying to migrate all resources from one workspace to another [please contact us for help](mailto:support@pipedream.com). - -### Are step notes included when I share a workflow? - -Yes any [step notes](/workflows/#step-notes) you've added to your workflow are included in the copied version. diff --git a/docs-v2/pages/workflows/building-workflows/sources.mdx b/docs-v2/pages/workflows/building-workflows/sources.mdx deleted file mode 100644 index 29c80d8387111..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/sources.mdx +++ /dev/null @@ -1,155 +0,0 @@ -import Callout from '@/components/Callout' -import VideoPlayer from '@/components/VideoPlayer' - -# Sources - - - -Event sources operate primarily as workflow triggers. When you add a new app-based [trigger](/workflows/building-workflows/triggers/) to your workflow, you're creating an event source. - -![Adding a new trigger to a workflow](https://res.cloudinary.com/pipedreamin/image/upload/v1710512637/docs/sources/CleanShot_2024-03-15_at_10.23.07_tyjswb.png) - -Event sources run as their own resources, separate from workflows, for two reasons: - -- A single event sources can trigger more than one workflow. If you have a data source that you want to run _multiple_ workflows, you can create an event source once and use it as the trigger for each workflow. -- If you need to consume events emitted by event sources in your own application, you don't need to run a workflow: you can use Pipedream's [REST API](/rest-api/) or a [private, real-time SSE stream](/workflows/data-management/destinations/sse/) to access the event data directly. - -You can view your event sources at [https://pipedream.com/sources](https://pipedream.com/sources). Here, you'll see the events a specific source has emitted, as well as the logs and configuration for that source. - -## Overview - -Event sources collect data from apps or service like Github, Twitter, and Google Calendar, then **emit** this data as individual events. These events trigger linked workflows, and [can be retrieved using the API or SSE interfaces](#consuming-events-from-sources). - -If the service supports webhooks or another mechanism for real-time data delivery, the event source uses it. For example, Google Sheets supports webhooks, which allows Google Sheets event sources to emit updates instantly. - -If a service doesn't support real-time event delivery, Pipedream polls the API for updates every few minutes, emitting events as the API produces them. For example, Airtable doesn't support webhooks, so we poll their API for new records added to a table. - -## Creating event sources - -You can create event sources from the Pipedream UI or CLI. - -### Creating a source from the UI - -Visit [https://pipedream.com/sources](https://pipedream.com/sources) and click the **New +** button at the top right to create a new event source. You'll see a list of sources tied to apps (like Twitter and Github) and generic interfaces (like HTTP). Select your source, and you'll be asked to connect any necessary accounts (for example, the Twitter source requires you authorize Pipedream access to your Twitter account), and enter the values for any configuration settings tied to the source. - -Once you've created a source, you can use it to trigger [Pipedream workflows](/workflows/building-workflows/) or [consume its events](#consuming-events-from-sources) using Pipedream's APIs. - -### Creating a source from the CLI - -[Download the CLI](/components/contributing/cli/install/) and run: - -```bash -pd deploy -``` - -This will bring up an interactive menu prompting you to select a source. Once selected, you'll be asked to connect any necessary accounts (for example, the Twitter source requires you authorize Pipedream access to your Twitter account), and enter the values for any configuration settings tied to the source. - -Once you've created a source, you can use it to trigger [Pipedream workflows](/workflows/building-workflows/) or [consume its events](#consuming-events-from-sources) using Pipedream's APIs. - -## Consuming events from sources - -You can view the events for a source in the sources UI, under the **Events** section of that source. - -You can also trigger a [Pipedream workflow](/workflows/building-workflows/) every time your source emits a new event. This lets you run workflows for every new tweet, every new item in an RSS feed, and more. - -Finally, you can consume events programmatically, outside the Pipedream platform, in a few different ways: - -- In real-time, using the [SSE stream](/workflows/data-management/destinations/sse/) linked to your source -- In real-time, via the CLI's [`pd events` command](/components/contributing/cli/reference/#pd-events) -- In batch, using the [REST API](/rest-api/) - -## Example: HTTP source - -The simplest event source is an **HTTP source**. - -When you create an HTTP source: - -- You get a unique HTTP endpoint that you can send any HTTP request to. -- You can view the details of any HTTP request sent to your endpoint: its payload, headers, and more. -- You can delete the source and its associated events once you're done. - -HTTP sources are essentially [request bins](https://requestbin.com) that can be managed via API. - -HTTP sources are a good example of how you can turn an event stream into an API: the HTTP requests are the **event stream**, generated from your application, client browsers, webhooks, etc. Then, you can retrieve HTTP requests via Pipedream's [**REST API**](/rest-api/), or stream them directly to other apps using the [SSE interface](/workflows/data-management/destinations/sse/). - -[**See the Github quickstart for more information on HTTP event sources**](https://github.com/PipedreamHQ/pipedream/tree/master/components/http#quickstart). - -## Example: Cron jobs - -You can also use event sources to run any Node code on a schedule, allowing you to poll a service or API for data and emit that data as an event. The emitted events can trigger Pipedream workflows, and can be retrieved using Pipedream's [**REST API**](/rest-api/) or [SSE interface](/workflows/data-management/destinations/sse/). - -## Example: RSS - -You can run an event source that polls an RSS for new items and emits them in real time as formatted JSON. - -[**Create an RSS event source here**](https://pipedream.com/sources/new?app=rss&key=rss-new-item-in-feed). - -## Test Events - - - -Test events are critical for developing workflows effectively. Without a test event, you won't be able to test your workflow end to end in the workflow builder or see the shape of the event data that triggers the workflow. - -Test events can be sourced from recent data, generated by real actions, or generated manually. - -### Recent past events -During creation, most sources will attempt to fetch up to 50 of the most recent events. - - -Not all sources will fetch events automatically - -Not all sources support pre-fetched events currently, but you can still generate test events yourself by performing the action that triggers the source. - - - -![Select an event](https://res.cloudinary.com/pipedreamin/image/upload/v1692160381/select-event_jhogxp.gif) - -### Generate a real event manually -If there aren't any existing events for the source to fetch, the next best way to produce a test event for your workflow is to generate one in the relevant application. - -For example, if your workflow is triggered by [New Files in Dropbox](https://pipedream.com/apps/dropbox/triggers/new-file), try adding a file to your Dropbox account. - -![Waiting for test event](https://res.cloudinary.com/pipedreamin/image/upload/v1710512807/docs/sources/CleanShot_2024-03-15_at_10.26.11_hsreft.gif) - -### Generate a sample test event -Certain event sources support the ability to generate test events using static sample event data. - -#### Hardcoded sample events -For example, the [New Message from Discord source](https://pipedream.com/apps/discord/triggers/new-message) references [this static event](https://github.com/PipedreamHQ/pipedream/blob/master/components/discord/sources/new-message/test-event.mjs), which is a hardcoded file with purely representative data. The goal for this feature is to provide your workflow with the **expected event shape** to expect, but **without the expected values**. - -![Generating a sample test event](https://res.cloudinary.com/pipedreamin/image/upload/v1692203722/generate-test-event-standard_a3psoj.gif) - -#### Customizing the sample event -If the provided static event is not sufficient for you to develop your workflow because you need to check against specific values (but are not able to generate real triggering events in the application), you can also customize the sample event. - -1. Select the arrow on the right side of the "Generate Test Event" button -2. Select "Modify Test Event" -3. Make whatever changes you'd like to the sample event -4. Click "Send Custom Test Event" - -![Generating a custom test event](https://res.cloudinary.com/pipedreamin/image/upload/v1692386947/generate-test-event-custom-updated_gv0xwg.gif) - -To reset the custom event JSON back to the sample event, click the "Reset" button at the top right of the test event window: - -![Resetting the Sample Event](https://res.cloudinary.com/pipedreamin/image/upload/v1692387426/Google_Chrome_-_Untitled_Workflow_-_Pipedream_2023-08-18_at_12.33.18_PM_kimrh9.png) - - -Sample data may contain inconsistencies - -Whenever possible, we recommend using a recent real event, either retrieved automatically or generated manually by an action. - -Generating test data manually can result in typos or missing fields that your workflow depends on. - - -## Publishing a new event source, or modifying an existing source - -Anyone can create an event source or edit an existing one. The code for all event sources is public, and kept in the [`PipedreamHQ/pipedream` repo](https://github.com/PipedreamHQ/pipedream). [Read this quickstart](/components/contributing/sources-quickstart/) and see the [event source API docs](/components/contributing/api/) to learn more about the source development process. - -You can chat about source development with the Pipedream team in the `#contribute` channel of our [public Slack](https://join.slack.com/t/pipedream-users/shared_invite/zt-ernlymsn-UHfPg~Dfp08uGkAd8dpkww), and in the `#dev` topic in the [Pipedream community](https://pipedream.com/community/c/dev/11). - -## Limits - -Event sources are subject to the [same limits as Pipedream workflows](/workflows/limits/), except: - -- Sources have a default timeout of 5 min. -- Memory is fixed at 256MB. diff --git a/docs-v2/pages/workflows/building-workflows/triggers.mdx b/docs-v2/pages/workflows/building-workflows/triggers.mdx deleted file mode 100644 index 1144ad30ce44f..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/triggers.mdx +++ /dev/null @@ -1,853 +0,0 @@ -import Image from 'next/image' -import Callout from '@/components/Callout' -import { Tabs } from 'nextra/components' -import PipedreamImg from '@/components/PipedreamImg' -import VideoPlayer from "@/components/VideoPlayer"; - -# Triggers - - - -**Triggers** define the type of event that runs your workflow. For example, HTTP triggers expose a URL where you can send any HTTP requests. Pipedream will run your workflow on each request. The Scheduler trigger runs your workflow on a schedule, like a cron job. - -Today, we support the following triggers: - -- [Triggers for apps like Twitter, GitHub, and more](#app-based-triggers) -- [HTTP / Webhook](#http) -- [Schedule](#schedule) -- [Email](#email) -- [RSS](#rss) - -If there's a specific trigger you'd like supported, please [let us know](https://pipedream.com/support/). - -## App-based Triggers - -You can trigger a workflow on events from apps like Twitter, Google Calendar, and more using [event sources](/workflows/building-workflows/triggers/). Event sources run as separate resources from your workflow, which allows you to trigger _multiple_ workflows using the same source. Here, we'll refer to event sources and workflow triggers interchangeably. - -When you create a workflow, click **Add Trigger** to view the available triggers: - -![Add Trigger button on a new workflow](/images/triggers/add-trigger-button.png) - -This will open a new menu to search and choose a trigger for your workflow: - -![App triggers](/images/triggers/select-a-trigger.png) - -Search by **app name** to find triggers associated with your app. For Google Calendar, for example, you can run your workflow every time a new event is **added** to your calendar, each time an event **starts**, **ends**, and more: - -![Google Calendar sources](/images/triggers/gcal-triggers.png) - -Once you select your trigger, you'll be asked to connect any necessary accounts (for example, Google Calendar sources require you authorize Pipedream access to your Google account), and enter the values for any configuration settings. - -Some sources are configured to retrieve an initial set of events when they're created. Others require you to generate events in the app to trigger your workflow. If your source generates an initial set of events, you'll see them appear in the **Select events** dropdown in the **Select Event** step: - -![Choose an event to test your workflow steps against](https://res.cloudinary.com/pipedreamin/image/upload/v1647957381/docs/components/CleanShot_2022-03-22_at_09.55.57_2x_upj35r.png) - -Then you can select a specific test event and manually trigger your workflow with that event data by clicking **Send Test Event**. Now you're ready to build your workflow with the selected test event. - -### What's the difference between an event source and a trigger? - -You'll notice the docs use the terms **event source** and **trigger** interchangeably above. It's useful to clarify the distinction in the context of workflows. - -[Event sources](/workflows/building-workflows/triggers/) run code that collects events from some app or service and emits events as the source produces them. An event source can be used to **trigger** any number of workflows. - -For example, you might create a single source to listen for new Twitter mentions for a keyword, then trigger multiple workflows each time a new tweet is found: one to [send new tweets to Slack](https://pipedream.com/@pravin/twitter-mentions-slack-p_dDCA5e/edit), another to [save those tweets to an Amazon S3 bucket](https://pipedream.com/@dylan/twitter-to-s3-p_KwCZGA/readme), etc. - -**This model allows you to separate the data produced by a service (the event source) from the logic to process those events in different contexts (the workflow)**. - -Moreover, you can access events emitted by sources using Pipedream's [SSE](/workflows/data-management/destinations/sse/) and [REST APIs](/rest-api/). This allows you to access these events in your own app, outside Pipedream's platform. - -### Can I add multiple triggers to a workflow? - -Yes, you can add any number of triggers to a workflow. Click the top right menu in the trigger step and select **Add trigger**. - -![Add multiple triggers to a workflow](/images/triggers/add-multiple-triggers.png) - -### Shape of the `steps.trigger.event` object - -In all workflows, you have access to [event data](/workflows/building-workflows/triggers/#event-format) using the variable `steps.trigger.event`. - -The shape of the event is specific to the source. For example, RSS sources produce events with a `url` and `title` property representing the data provided by new items from a feed. Google Calendar sources produce events with a meeting title, start date, etc. - -## HTTP - -When you select the **HTTP** trigger: - -![HTTP API Trigger](/images/triggers/select-http-trigger.png) - -Pipedream creates a URL endpoint specific to your workflow: - -![HTTP API trigger URL](/images/triggers/http-trigger-url.png) - -You can send any HTTP requests to this endpoint, from anywhere on the web. You can configure the endpoint as the destination URL for a webhook or send HTTP traffic from your application - we'll accept any [valid HTTP request](#valid-requests). - - - -Pipedream also supports [custom domains](/workflows/domains/). This lets you host endpoints on `https://endpoint.yourdomain.com` instead of the default \`{process.env.ENDPOINT_BASE_URL}\` domain. - - -### Accessing HTTP request data - -You can access properties of the HTTP request, like the method, payload, headers, and more, in [the `event` object](/workflows/building-workflows/triggers/#event-format), accessible in any [code](/workflows/building-workflows/code/) or [action](/components/contributing/#actions) step. - -### Valid Requests - -You can send a request to your endpoint using any valid HTTP method: `GET`, `POST`, `HEAD`, and more. - -We default to generating HTTPS URLs in the UI, but will accept HTTP requests against the same endpoint URL. - -You can send data to any path on this host, with any query string parameters. You can access the full URL in the `event` object if you'd like to write code that interprets requests with different URLs differently. - -You can send data of any [Media Type](https://www.iana.org/assignments/media-types/media-types.xhtml) in the body of your request. - -The primary limit we impose is on the size of the request body: we'll issue a `413 Payload Too Large` status when the body [exceeds our specified limit](#request-entity-too-large). - -### Authorizing HTTP requests - -By default, HTTP triggers are public and require no authorization to invoke. Anyone with the endpoint URL can trigger your workflow. When possible, we recommend adding authorization. - -HTTP triggers support two built-in authorization types in the **Authorization** section of the HTTP trigger configuration: a [static, custom token](#custom-token) and [OAuth](#oauth). - -#### Custom token - -To configure a static, custom token for HTTP auth: - -1. Open the **Configure** section of the HTTP trigger -2. Select **Custom token**. -3. Enter whatever secret you'd like and click **Save and Continue**. - -![Custom token auth](https://res.cloudinary.com/pipedreamin/image/upload/v1729791152/Google_Chrome_-_Untitled_Workflow_-_10-24-2024_10-30_AM_-_Build_-_Pipedream_2024-10-24_at_10.31.01_AM_pkh8dk.png) - -When making HTTP requests, pass the custom token as a `Bearer` token in the `Authorization` header: - -```bash -curl -H 'Authorization: Bearer ' https://myendpoint.m.pipedream.net -``` - -#### OAuth - -You can also authorize requests using [Pipedream OAuth clients](/rest-api/auth/#oauth): - -1. Open the **Configure** section of the HTTP trigger. -2. Select **OAuth**. -3. If you don't have an existing OAuth client, [create one in your workspace's API settings](/rest-api/auth#creating-an-oauth-client). - -![OAuth authorization](https://res.cloudinary.com/pipedreamin/image/upload/v1729791415/Google_Chrome_-_Untitled_Workflow_-_10-24-2024_10-30_AM_-_Build_-_Pipedream_2024-10-24_at_10.36.04_AM_ujx34e.png) - -Next, you'll need to [generate an OAuth access token](/rest-api/auth/#how-to-get-an-access-token). - -When making HTTP requests, pass the OAuth access token as a `Bearer` token in the `Authorization` header: - -```bash -curl -H 'Authorization: Bearer ' https://myendpoint.m.pipedream.net -``` - -You can use the Pipedream SDK to automatically refresh access tokens and invoke workflows, or make HTTP requests directly to the workflow's URL: - - - -```typescript -import { createBackendClient, HTTPAuthType } from "@pipedream/sdk/server"; - -// These secrets should be saved securely and passed to your environment -const pd = createBackendClient({ - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, -}); - -await pd.invokeWorkflow( - "enabc123", // pass the endpoint ID or full URL here - { - method: "POST", - body: { - key: "value", - } - }, - HTTPAuthType.OAuth // Will automatically send the Authorization header with a fresh token -) -``` - - -```javascript -import { createBackendClient } from "@pipedream/sdk/server"; - -// These secrets should be saved securely and passed to your environment -const pd = createBackendClient({ - credentials: { - clientId: "{oauth_client_id}", - clientSecret: "{oauth_client_secret}", - }, -}); - -await pd.invokeWorkflow( - "enabc123", // pass the endpoint ID or full URL here - { - method: "POST", - body: { - key: "value", - } - }, - "oauth" // Will automatically send the Authorization header with a fresh token -) -``` - - -```bash -# First, obtain an OAuth access token -curl -X POST https://api.pipedream.com/v1/oauth/token \ - -H "Content-Type: application/json" \ - -d '{ - "grant_type": "client_credentials", - "client_id": "{oauth_client_id}", - "client_secret": "{oauth_client_secret}" - }' - -# The response will include an access_token. Use it in the Authorization header below. - -curl -X POST https://{your-endpoint-url} \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer {access_token}" \ - -d '{ - "message": "Hello, world" - }' -``` - - - - -#### Implement your own authorization logic - -Since you have access to the entire request object, and can issue any HTTP response from a workflow, you can implement custom logic to validate requests. - -For example, you could require JWT tokens and validate those tokens using the [`jsonwebtoken` package](https://www.npmjs.com/package/jsonwebtoken) at the start of your workflow. - -### Custom domains - -To configure endpoints on your own domain, e.g. `endpoint.yourdomain.com` instead of the default `*.m.pipedream.net` domain, see the [custom domains](/workflows/domains/) docs. - -### How Pipedream handles JSON payloads - -When you send JSON in the HTTP payload, or when JSON data is sent in the payload from a webhook provider, **Pipedream converts that JSON to its equivalent JavaScript object**. The trigger data can be referenced using [the `steps` object](#shape-of-the-stepstriggerevent-object). - -In the [Inspector](/workflows/building-workflows/inspect/), we present `steps.trigger.event` cleanly, indenting nested properties, to make the payload easy to read. Since `steps.trigger.event` is a JavaScript object, it's easy to reference and manipulate properties of the payload using dot-notation. - -### How Pipedream handles `multipart/form-data` - -When you send [form data](https://ec.haxx.se/http/http-multipart) to Pipedream using a `Content-Type` of `multipart/form-data`, Pipedream parses the payload and converts it to a JavaScript object with a property per form field. For example, if you send a request with two fields: - -```bash -curl -F 'name=Leia' -F 'title=General' https://myendpoint.m.pipedream.net -``` - -Pipedream will convert that to a JavaScript object, `event.body`, with the following shape: - -```js -{ - name: "Leia", - title: "General", -} -``` - -### How Pipedream handles HTTP headers - -HTTP request headers will be available in the `steps.trigger.event.headers` steps export in your downstream steps. - -Pipedream will automatically lowercase header keys for consistency. - -### Pipedream-specific request parameters - -These params can be set as headers or query string parameters on any request to a Pipedream HTTP endpoint. - -#### `x-pd-nostore` - -Set to `1` to prevent logging any data for this execution. Pipedream will execute all steps of the workflow, but no data will be logged to Pipedream. No event will show up in the inspector or the Event History UI. - -If you need to disable logging for _all_ requests, use the workflow's [Data Retention controls](/workflows/building-workflows/settings/#data-retention-controls), instead. - -#### `x-pd-notrigger` - -Set to `1` to send an event to the workflow for testing. Pipedream will **not** trigger the production version of the workflow, but will display the event in the [list of test events](/workflows/building-workflows/triggers/#selecting-a-test-event) on the HTTP trigger. - -#### Limits - -You can send any content, up to the [HTTP payload size limit](/workflows/limits/#http-request-body-size), as a part of the form request. The content of uploaded images or other binary files does not contribute to this limit โ€” the contents of the file will be uploaded at a Pipedream URL you have access to within your source or workflow. See the section on [Large File Support](#large-file-support) for more detail. - -### Sending large payloads - -_If you're uploading files, like images or videos, you should use the [large file upload interface](#large-file-support), instead_. - -By default, the body of HTTP requests sent to a source or workflow is limited to {process.env.PAYLOAD_SIZE_LIMIT}. **But you can send an HTTP payload of any size to a [workflow](/workflows/building-workflows/) or an [event source](/workflows/building-workflows/triggers/) by including the `pipedream_upload_body=1` query string or an `x-pd-upload-body: 1` HTTP header in your request**. - -```bash -curl -d '{ "name": "Yoda" }' \ - https://endpoint.m.pipedream.net\?pipedream_upload_body\=1 - -curl -d '{ "name": "Yoda" }' \ - -H "x-pd-upload-body: 1" \ - https://endpoint.m.pipedream.net -``` - -In workflows, Pipedream saves the raw payload data in a file whose URL you can reference in the variable `steps.trigger.event.body.raw_body_url`. - -![Raw body URL in the event data under steps.trigger.event.body.raw_body_url](https://res.cloudinary.com/pipedreamin/image/upload/v1647895357/docs/components/CleanShot_2022-03-21_at_16.42.01_2x_w6dmqk.png) - -Within your workflow, you can download the contents of this data using the **Send HTTP Request** action, or [by saving the data as a file to the `/tmp` directory](/workflows/building-workflows/code/nodejs/working-with-files/). - -#### Example: Download the HTTP payload using the Send HTTP Request action - -_Note: you can only download payloads at most {process.env.FUNCTION_PAYLOAD_LIMIT} in size using this method. Otherwise, you may encounter a [Function Payload Limit Exceeded](/troubleshooting/#function-payload-limit-exceeded) error._ - -You can download the large HTTP payload using the **Send HTTP Request** action. [Copy this workflow to see how this works](https://pipedream.com/new?h=tch_egfAby). - -The payload from the trigger of the workflow is exported to the variable `steps.retrieve_large_payload.$return_value`: - -![HTTP response data](/images/triggers/send_http_request_action.png) - -#### Example: Download the HTTP payload to the `/tmp` directory - -[This workflow](https://pipedream.com/new?h=tch_5ofXkX) downloads the HTTP payload, saving it as a file to the [`/tmp` directory](/workflows/building-workflows/code/nodejs/working-with-files/#the-tmp-directory). - -```javascript -import stream from "stream"; -import { promisify } from "util"; -import fs from "fs"; -import got from "got"; - -export default defineComponent({ - async run({ steps, $ }) { - const pipeline = promisify(stream.pipeline); - await pipeline( - got.stream(steps.trigger.event.body.raw_body_url), - fs.createWriteStream(`/tmp/raw_body`) - ); - }, -}) -``` - -You can [read this file](/workflows/building-workflows/code/nodejs/working-with-files/#reading-a-file-from-tmp) in subsequent steps of your workflow. - -#### How the payload data is saved - -Your raw payload is saved to a Pipedream-owned [Amazon S3 bucket](https://aws.amazon.com/s3/). Pipedream generates a [signed URL](https://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html) that allows you to access to that file for up to 30 minutes. After 30 minutes, the signed URL will be invalidated, and the file will be deleted. - -#### Limits - -**You can upload payloads up to 5TB in size**. However, payloads that large may trigger [other Pipedream limits](/workflows/limits/). Please [reach out](https://pipedream.com/support/) with any specific questions or issues. - -### Large File Support - -_This interface is best used for uploading large files, like images or videos. If you're sending JSON or other data directly in the HTTP payload, and encountering a **Request Entity Too Large** error, review the section above for [sending large payloads](#sending-large-payloads)_. - -You can upload any file to a [workflow](/workflows/building-workflows/) or an [event source](/workflows/building-workflows/triggers/) by making a `multipart/form-data` HTTP request with the file as one of the form parts. **Pipedream saves that file to a Pipedream-owned [Amazon S3 bucket](https://aws.amazon.com/s3/), generating a [signed URL](https://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html) that allows you to access to that file for up to 30 minutes**. After 30 minutes, the signed URL will be invalidated, and the file will be deleted. - -In workflows, these file URLs are provided in the `steps.trigger.event.body` variable, so you can download the file using the URL within your workflow, or pass the URL on to another third-party system for it to process. - -![Raw file URL in event data](/images/triggers/file-upload-urls.png) - -Within your workflow, you can download the contents of this data using the **Send HTTP Request** action, or [by saving the data as a file to the `/tmp` directory](/workflows/building-workflows/code/nodejs/working-with-files/). - -#### Example: upload a file using `cURL` - -For example, you can upload an image to a workflow using `cURL`: - -```bash -curl -F 'image=@my_image.png' https://myendpoint.m.pipedream.net -``` - -The `-F` tells `cURL` we're sending form data, with a single "part": a field named `image`, with the content of the image as the value (the `@` allows `cURL` to reference a local file). - -When you send this image to a workflow, Pipedream [parses the form data](#how-pipedream-handles-multipartform-data) and converts it to a JavaScript object, `event.body`. Select the event from the [inspector](/workflows/building-workflows/inspect/#the-inspector), and you'll see the `image` property under `event.body`: - -![Image form data](/images/triggers/image_form_data.png) - -When you upload a file as a part of the form request, Pipedream saves it to a Pipedream-owned [Amazon S3 bucket](https://aws.amazon.com/s3/), generating a [signed URL](https://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html) that allows you to access to that file for up to 30 minutes. After 30 minutes, the signed URL will be invalidated, and the file will be deleted. - -Within the `image` property of `event.body`, you'll see the value of this URL in the `url` property, along with the `filename` and `mimetype` of the file. Within your workflow, you can download the file, or pass the URL to a third party system to handle, and more. - -#### Example: Download this file to the `/tmp` directory - -[This workflow](https://pipedream.com/@dylburger/example-download-an-image-to-tmp-p_KwC2Ad/edit) downloads an image passed in the `image` field in the form request, saving it to the [`/tmp` directory](/workflows/building-workflows/code/nodejs/working-with-files/#the-tmp-directory). - -```javascript -import stream from "stream"; -import { promisify } from "util"; -import fs from "fs"; -import got from "got"; - -const pipeline = promisify(stream.pipeline); -await pipeline( - got.stream(steps.trigger.event.body.image.url), - fs.createWriteStream(`/tmp/${steps.trigger.event.body.image.filename}`) -); -``` - -#### Example: Upload image to your own Amazon S3 bucket - -[This workflow](https://pipedream.com/@dylburger/example-save-uploaded-file-to-amazon-s3-p_o7Cm9z/edit) streams the uploaded file to an Amazon S3 bucket you specify, allowing you to save the file to long-term storage. - -#### Limits - -Since large files are uploaded using a `Content-Type` of `multipart/form-data`, the limits that apply to [form data](#how-pipedream-handles-multipartform-data) also apply here. - -The content of the file itself does not contribute to the HTTP payload limit imposed for forms. **You can upload files up to 5TB in size**. However, files that large may trigger [other Pipedream limits](/workflows/limits/). Please [reach out](https://pipedream.com/support/) with any specific questions or issues. - -### Cross-Origin HTTP Requests - -We return the following headers on HTTP `OPTIONS` requests: - -``` -Access-Control-Allow-Origin: * -Access-Control-Allow-Methods: GET,HEAD,PUT,PATCH,POST,DELETE -``` - -Thus, your endpoint will accept [cross-origin HTTP requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) from any domain, using any standard HTTP method. - -### HTTP Responses - -#### Default HTTP response - -By default, when you send a [valid HTTP request](#valid-requests) to your endpoint URL, you should expect to receive a `200 OK` status code with the following payload: - -``` -

Success!

-

To customize this response, check out our docs here

-``` - -When you're processing HTTP requests, you often don't need to issue any special response to the client. We issue this default response so you don't have to write any code to do it yourself. - - - -**How can my workflow run faster?** - -See [our guide on running workflows faster](/troubleshooting/#how-can-my-workflow-run-faster). - - -#### Customizing the HTTP response - -If you need to issue a custom HTTP response from a workflow, you can either: - -- Use the **Return HTTP response** action, available on the **HTTP / Webhook** app, or -- **Use the `$.respond()` function in a Code or Action step**. - -#### Using the HTTP Response Action - -The HTTP Response action lets you return HTTP responses without the need to write code. You can customize the response status code, and optionally specify response headers and body. - -This action uses `$.respond()` and will always [respond immediately](#returning-a-response-immediately) when called in your workflow. A [response error](#errors-with-http-responses) will still occur if your workflow throws an Error before this action runs. - -#### Using custom code with `$.respond()` - -You can return HTTP responses in Node.js code with the `$.respond()` function. - -`$.respond()` takes a single argument: an object with properties that specify the body, headers, and HTTP status code you'd like to respond with: - -```javascript -defineComponent({ - async run({ steps, $ }) { - await $.respond({ - status: 200, - headers: { "my-custom-header": "value" }, - body: { message: "My custom response" }, // This can be any string, object, Buffer, or Readable stream - }); - }, -}); -``` - -The value of the `body` property can be either a string, object, a [Buffer](https://nodejs.org/api/buffer.html#buffer_buffer) (binary data), or a [Readable stream](https://nodejs.org/api/stream.html#stream_readable_streams). Attempting to return any other data may yield an error. - -In the case where you return a Readable stream: - -- You must `await` the `$.respond` function (`await $.respond({ ... }`) -- The stream must close and be finished reading within your [workflow execution timeout](/workflows/limits/#time-per-execution). -- You cannot return a Readable and use the [`immediate: true`](#returning-a-response-immediately) property of `$.respond`. - -#### Timing of `$.respond()` execution - -You may notice some response latency calling workflows that use `$.respond()` from your HTTP client. By default, `$.respond()` is called at the end of your workflow, after all other code is done executing, so it may take some time to issue the response back. - -If you need to issue an HTTP response in the middle of a workflow, see the section on [returning a response immediately](#returning-a-response-immediately). - -#### Returning a response immediately - -You can issue an HTTP response within a workflow, and continue the rest of the workflow execution, by setting the `immediate` property to `true`: - -```javascript -defineComponent({ - async run({ steps, $ }) { - await $.respond({ - immediate: true, - status: 200, - headers: { "my-custom-header": "value" }, - body: { message: "My custom response" }, - }); - }, -}); -``` - -Passing `immediate: true` tells `$.respond()` to issue a response back to the client at this point in the workflow. After the HTTP response has been issued, the remaining code in your workflow runs. - -This can be helpful, for example, when you're building a Slack bot. When you send a message to a bot, Slack requires a `200 OK` response be issued immediately, to confirm receipt: - -```javascript -defineComponent({ - async run({ steps, $ }) { - await $.respond({ - immediate: true, - status: 200, - body: "", - }); - }, -}); -``` - -Once you issue the response, you'll probably want to process the message from the user and respond back with another message or data requested by the user. - -[Here's an example workflow](https://pipedream.com/@dylburger/issue-http-response-immediately-continue-running-workflow-p_pWCWGJ) that shows how to use `immediate: true` and run code after the HTTP response is issued. - -#### Errors with HTTP Responses - -If you use `$.respond()` in a workflow, **you must always make sure `$.respond()` is called in your code**. If you make an HTTP request to a workflow, and run code where `$.respond()` is _not_ called, your endpoint URL will issue a `400 Bad Request` error with the following body: - -``` -No $.respond called in workflow -``` - -This might happen if: - -- You call `$.respond()` conditionally, where it does not run under certain conditions. -- Your workflow throws an Error before you run `$.respond()`. -- You return data in the `body` property that isn't a string, object, or Buffer. - -If you can't handle the `400 Bad Request` error in the application calling your workflow, you can implement `try` / `finally` logic to ensure `$.respond()` always gets called with some default message. For example: - -```javascript -defineComponent({ - async run({ steps, $ }) { - try { - // Your code here that might throw an exception or not run - throw new Error("Whoops, something unexpected happened."); - } finally { - await $.respond({ - status: 200, - body: { - msg: "Default response", - }, - }); - } - }, -}); -``` - -### Errors - -Occasionally, you may encounter errors when sending requests to your endpoint: - -#### Request Entity Too Large - -The endpoint will issue a `413 Payload Too Large` status code when the body of your request exceeds {process.env.PAYLOAD_SIZE_LIMIT}. - -In this case, the request will still appear in the inspector, with information on the error. - -#### API key does not exist - -Your API key is the host part of the endpoint, e.g. the `eniqtww30717` in `eniqtww30717.m.pipedream.net`. If you attempt to send a request to an endpoint that does not exist, we'll return a `404 Not Found` error. - -We'll also issue a 404 response on workflows with an HTTP trigger that have been disabled. - -#### Too Many Requests - -If you send too many requests to your HTTP source within a small period of time, we may issue a `429 Too Many Requests` response. [Review our limits](/workflows/limits/) to understand the conditions where you might be throttled. - -You can also [reach out](https://pipedream.com/support/) to inquire about raising this rate limit. - -If you control the application sending requests, you should implement [a backoff strategy](https://medium.com/clover-platform-blog/conquering-api-rate-limiting-dcac5552714d) to temporarily slow the rate of events. - -## Schedule - -Pipedream allows you to run hosted scheduled jobs โ€” commonly-referred to as a "cron job" โ€” [for free](/pricing/). You can think of workflows like scripts that run on a schedule. - -You can write scheduled job to send an HTTP request, send a scheduled email, run any Node.js or Python code, connect to any API, and much more. Pipedream manages the servers where these jobs run, so you don't have to worry about setting up a server of your own or operating some service just to run code on a schedule. You write the workflow, we take care of the rest. - -### Choosing a Schedule trigger - -To create a new scheduled job, create a new workflow and search for the **Schedule** trigger: - -![Cron Scheduler source](/images/triggers/select-schedule-trigger.png) - -By default, your trigger will be turned **Off**. **To enable it, select either of the scheduling options**: - -- **Every** : run the job every N days, hours, minutes (e.g. every 1 day, every 3 hours). -- **Cron Expression** : schedule your job using a cron expression. For example, the expression `0 0 * * *` will run the job every day at midnight. Cron expressions can be tied to any timezone. - -### Testing a scheduled job - -If you're running a scheduled job once a day, you probably don't want to wait until the next day's run to test your new code. You can manually run the workflow associated with a scheduled job at any time by pressing the **Run Now** button. - -### Job History - -You'll see the history of job executions under the **Job History** section of the [Inspector](/workflows/building-workflows/inspect/). - -Clicking on a specific job shows the execution details for that job โ€” all the logs and observability associated with that run of the workflow. - -### Trigger a notification to an external service (email, Slack, etc.) - -You can send yourself a notification โ€” for example, an email or a Slack message โ€” at any point in a workflow by using the relevant [Action](/components/contributing/#actions) or [Destination](/workflows/data-management/destinations/). - -If you'd like to email yourself when a job finishes successfully, you can use the [Email Destination](/workflows/data-management/destinations/email/). You can send yourself a Slack message using the Slack Action, or trigger an [HTTP request](/workflows/data-management/destinations/http/) to an external service. - -You can also [write code](/workflows/building-workflows/code/) to trigger any complex notification logic you'd like. - -### Troubleshooting your scheduled jobs - -When you run a scheduled job, you may need to troubleshoot errors or other execution issues. Pipedream offers built-in, step-level logs that show you detailed execution information that should aid troubleshooting. - -Any time a scheduled job runs, you'll see a new execution appear in the [Inspector](/workflows/building-workflows/inspect/). This shows you when the job ran, how long it took to run, and any errors that might have occurred. **Click on any of these lines in the Inspector to view the details for a given run**. - -Code steps show [logs](/workflows/building-workflows/code/nodejs/#logs) below the step itself. Any time you run `console.log()` or other functions that print output, you should see the logs appear directly below the step where the code ran. - -[Actions](/components/contributing/#actions) and [Destinations](/workflows/data-management/destinations/) also show execution details relevant to the specific Action or Destination. For example, when you use the [HTTP Destination](/workflows/data-management/destinations/http/) to make an HTTP request, you'll see the HTTP request and response details tied to that Destination step: - -## Email - -When you select the **Email** trigger: - -![Selecting the new email trigger](/images/triggers/select-email-trigger.png) - -Pipedream creates an email address specific to your workflow. Any email sent to this address triggers your workflow: - -![Custom workflow email address](/images/triggers/email-trigger.png) - -As soon as you send an email to the workflow-specific address, Pipedream parses its body, headers, and attachments into a JavaScript object it exposes in the `steps.trigger.event` variable that you can access within your workflow. This transformation can take a few seconds to perform. Once done, Pipedream will immediately trigger your workflow with the transformed payload. - -[Read more about the shape of the email trigger event](/workflows/building-workflows/triggers/#email). - -### Sending large emails - -By default, you can send emails up to {process.env.EMAIL_PAYLOAD_SIZE_LIMIT} in total size (content, headers, attachments). Emails over this size will be rejected, and you will not see them appear in your workflow. - -**You can send emails up to `30MB` in size by sending emails to `[YOUR EMAIL ENDPOINT]@upload.pipedream.net`**. If your workflow-specific email address is `endpoint@pipedream.net`, your "large email address" is `endpoint@upload.pipedream.net`. - -Emails delivered to this address are uploaded to a private URL you have access to within your workflow, at the variable `steps.trigger.event.mail.content_url`. You can download and parse the email within your workflow using that URL. This content contains the _raw_ email. Unlike the standard email interface, you must parse this email on your own - see the examples below. - -#### Example: Download the email using the Send HTTP Request action - -_Note: you can only download emails at most {process.env.FUNCTION_PAYLOAD_LIMIT} in size using this method. Otherwise, you may encounter a [Function Payload Limit Exceeded](/troubleshooting/#function-payload-limit-exceeded) error._ - -You can download the email using the **Send HTTP Request** action. [Copy this workflow to see how this works](https://pipedream.com/new?h=tch_1AfMyl). - -This workflow also parses the contents of the email and exposes it as a JavaScript object using the [`mailparser` library](https://nodemailer.com/extras/mailparser/): - -```javascript -import { simpleParser } from "mailparser"; - -export default defineComponent({ - async run({ steps, $ }) { - return await simpleParser(steps.get_large_email_content.$return_value); - }, -}); -``` - -#### Example: Download the email to the `/tmp` directory, read it and parse it - -[This workflow](https://pipedream.com/new?h=tch_jPfaEJ) downloads the email, saving it as a file to the [`/tmp` directory](/workflows/building-workflows/code/nodejs/working-with-files/#the-tmp-directory). Then it reads the same file (as an example), and parses it using the [`mailparser` library](https://nodemailer.com/extras/mailparser/): - -```javascript -import stream from "stream"; -import { promisify } from "util"; -import fs from "fs"; -import got from "got"; -import { simpleParser } from "mailparser"; - -// To use previous step data, pass the `steps` object to the run() function -export default defineComponent({ - async run({ steps, $ }) { - const pipeline = promisify(stream.pipeline); - await pipeline( - got.stream(steps.trigger.event.mail.content_url), - fs.createWriteStream(`/tmp/raw_email`) - ); - - // Now read the file and parse its contents into the `parsed` variable - // See https://nodemailer.com/extras/mailparser/ for parsing options - const f = fs.readFileSync(`/tmp/raw_email`); - return await simpleParser(f); - }, -}); -``` - -#### How the email is saved - -Your email is saved to a Pipedream-owned [Amazon S3 bucket](https://aws.amazon.com/s3/). Pipedream generates a [signed URL](https://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html) that allows you to access to that file for up to 30 minutes. After 30 minutes, the signed URL will be invalidated, and the file will be deleted. - -### Email attachments - -You can attach any files to your email, up to [the total email size limit](/workflows/limits/#email-triggers). - -Attachments are stored in `steps.trigger.event.attachments`, which provides an array of attachment objects. Each attachment in that array exposes key properties: - -- `contentUrl`: a URL that hosts your attachment. You can [download this file to the `/tmp` directory](/workflows/building-workflows/code/nodejs/http-requests/#download-a-file-to-the-tmp-directory) and process it in your workflow. -- `content`: If the attachment contains text-based content, Pipedream renders the attachment in `content`, up to 10,000 bytes. -- `contentTruncated`: `true` if the attachment contained text-based content larger than 10,000 bytes. If `true`, the data in `content` will be truncated, and you should fetch the full attachment from `contentUrl`. - -### Appending metadata to the incoming email address with `+data` - -Pipedream provides a way to append metadata to incoming emails by adding a `+` sign to the incoming email key, followed by any arbitrary string: - -``` -myemailaddr+test@pipedream.net -``` - -Any emails sent to your workflow-specific email address will resolve to that address, triggering your workflow, no matter the data you add after the `+` sign. Sending an email to both of these addresses triggers the workflow with the address `myemailaddr@pipedream.net`: - -``` -myemailaddr+test@pipedream.net -myemailaddr+unsubscribe@pipedream.net -``` - -This allows you implement conditional logic in your workflow based on the data in that string. - -### Troubleshooting - -#### I'm receiving an `Expired Token` error when trying to read an email attachment - -Email attachments are saved to S3, and are accessible in your workflows over [pre-signed URLs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html). - -If the presigned URL for the attachment has expired, then you'll need to send another email to create a brand new pre-signed URL. - -If you're using email attachments in combination with [`$.flow.delay`](/workflows/building-workflows/code/nodejs/delay/) or [`$.flow.rerun`](/workflows/building-workflows/code/nodejs/rerun/) which introduces a gap of time between steps in your workflow, then there's a chance the email attachment's URL will expire. - -To overcome this, we suggest uploading your email attachments to your Project's [File Store](/workflows/data-management/file-stores/) for persistent storage. - -## RSS - -Choose the RSS trigger to watch an RSS feed for new items: - -![Selecting the RSS feed trigger](/images/triggers/select-rss-trigger.png) - -This will create an RSS [event source](/workflows/building-workflows/triggers/) that polls the feed for new items on the schedule you select. Every time a new item is found, your workflow will run. - -## Events - -Events trigger workflow executions. The event that triggers your workflow depends on the trigger you select for your workflow: - -- [HTTP triggers](/workflows/building-workflows/triggers/#http) invoke your workflow on HTTP requests. -- [Cron triggers](/workflows/building-workflows/triggers/#schedule) invoke your workflow on a time schedule (e.g., on an interval). -- [Email triggers](/workflows/building-workflows/triggers/#email) invoke your workflow on inbound emails. -- [Event sources](/workflows/building-workflows/triggers/#app-based-triggers) invoke your workflow on events from apps like Twitter, Google Calendar, and more. - -### Selecting a test event - -When you test any step in your workflow, Pipedream passes the test event you select in the trigger step: - -![Selecting a test event in the trigger](/images/triggers/select-an-event.png) - -You can select any event you've previously sent to your trigger as your test event, or send a new one. - -### Examining event data - -When you select an event, you'll see [the incoming event data](#event-format) and the [event context](#stepstriggercontext) for that event: - -![The event and context in a trigger initiation](https://res.cloudinary.com/pipedreamin/image/upload/v1648759141/docs/components/CleanShot_2022-03-31_at_16.30.37_jwwwdy.png) - -Pipedream parses your incoming data and exposes it in the variable [`steps.trigger.event`](#event-format), which you can access in any [workflow step](/workflows/#steps). - -### Copying references to event data - -When you're [examining event data](#examining-event-data), you'll commonly want to copy the name of the variable that points to the data you need to reference in another step. - -Hover over the property whose data you want to reference, and click the **Copy Path** button to its right: - -![Copy an event path](https://res.cloudinary.com/pipedreamin/image/upload/v1648759215/docs/components/CleanShot_2022-03-31_at_16.39.56_lsus2o.gif) - -### Copying the values of event data - -You can also copy the value of specific properties of your event data. Hover over the property whose data you want to copy, and click the **Copy Value** button to its right: - -![Copy event attribute value](https://res.cloudinary.com/pipedreamin/image/upload/v1648759275/docs/components/CleanShot_2022-03-31_at_16.41.02_xgzcsa.gif) - -### Event format - -When you send an event to your workflow, Pipedream takes the trigger data โ€” for example, the HTTP payload, headers, etc. โ€” and adds our own Pipedream metadata to it. - -**This data is exposed in the `steps.trigger.event` variable. You can reference this variable in any step of your workflow**. - -You can reference your event data in any [code](/workflows/building-workflows/code/) or [action](/components/contributing/#actions) step. See those docs or the general [docs on passing data between steps](/workflows/#steps) for more information. - -The specific shape of `steps.trigger.event` depends on the trigger type: - -#### HTTP - -| Property | Description | -| ----------- | :---------------------------------------------------: | -| `body` | A string or object representation of the HTTP payload | -| `client_ip` | IP address of the client that made the request | -| `headers` | HTTP headers, represented as an object | -| `method` | HTTP method | -| `path` | HTTP request path | -| `query` | Query string | -| `url` | Request host + path | - -#### Cron Scheduler - -| Property | Description | -| --------------------- | :---------------------------------------------------------------------------------------------: | -| `interval_seconds` | The number of seconds between scheduled executions | -| `cron` | When you've configured a custom cron schedule, the cron string | -| `timestamp` | The epoch timestamp when the workflow ran | -| `timezone_configured` | An object with formatted datetime data for the given execution, tied to the schedule's timezone | -| `timezone_utc` | An object with formatted datetime data for the given execution, tied to the UTC timezone | - -#### Email - -We use Amazon SES to receive emails for the email trigger. You can find the shape of the event in the [SES docs](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-notifications-contents.html). - -### `steps.trigger.context` - -`steps.trigger.event` contain your event's **data**. `steps.trigger.context` contains _metadata_ about the workflow and the execution tied to this event. - -You can use the data in `steps.trigger.context` to uniquely identify the Pipedream event ID, the timestamp at which the event invoked the workflow, and more: - -| Property | Description | -| ------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------: | -| `deployment_id` | A globally-unique string representing the current version of the workflow | -| `emitter_id` | The ID of the workflow trigger that emitted this event, e.g. the [event source](/workflows/building-workflows/triggers/) ID. | -| `id` | A unique, Pipedream-provided identifier for the event that triggered this workflow | -| `owner_id` | The Pipedream-assigned [workspace ID](/workspaces/#finding-your-workspaces-id) that owns the workflow | -| `platform_version` | The version of the Pipedream execution environment this event ran on | -| `replay` | A boolean, whether the event was replayed via the UI | -| `trace_id` | Holds the same value for all executions tied to an original event. [See below for more details](#how-do-i-retrieve-the-execution-id-for-a-workflow). | -| `ts` | The ISO 8601 timestamp at which the event invoked the workflow | -| `workflow_id` | The workflow ID | -| `workflow_name` | The workflow name | - -#### How do I retrieve the execution ID for a workflow? - -Pipedream exposes two identifies for workflow executions: one for the execution, and one for the "trace". - -`steps.trigger.context.id` should be unique for every execution of a workflow. - -`steps.trigger.context.trace_id` will hold the same value for all executions tied to the same original event, e.g. if you have auto-retry enabled and it retries a workflow three times, the `id` will change, but the `trace_id` will remain the same. For example, if you call `$.flow.suspend()` on a workflow, we run a new execution after the suspend, so you'd see two total executions: `id` will be unique before and after the suspend, but `trace_id` will be the same. - -You may notice other properties in `context`. These are used internally by Pipedream, and are subject to change. - -### Event retention - -On the Free and Basic plans, each workflow retains at most 100 events or 7 days of history. - -- After 100 events have been processed, Pipedream will delete the oldest event data as new events arrive, keeping only the last 100 events. -- Or if an event is older than 7 days, Pipedream will delete the event data. - -Other paid plans have longer retention. [See the pricing page](https://pipedream.com/pricing) for details. - -Events are also stored in [event history](/workflows/event-history/) for up to 30 days, depending on your plan. [See the pricing page](https://pipedream.com/pricing) for the retention on your plan. - -Events that are [delayed](/workflows/building-workflows/control-flow/delay/) or [suspended](/glossary/#suspend) are retained for the duration of the delay. After the delay, the workflow is executed, and the event data is retained according to the rules above. - - -For an extended history of events across all of your workflows, included processed events, with the ability to filter by status and time range, please see the [Event History](/workflows/event-history/). - - -## Don't see a trigger you need? - -If you don't see a trigger you'd like us to support, please [let us know](https://pipedream.com/support/). diff --git a/docs-v2/pages/workflows/building-workflows/using-props.mdx b/docs-v2/pages/workflows/building-workflows/using-props.mdx deleted file mode 100644 index f4d29c87c9031..0000000000000 --- a/docs-v2/pages/workflows/building-workflows/using-props.mdx +++ /dev/null @@ -1,35 +0,0 @@ -import VideoPlayer from '@/components/VideoPlayer' - -# Using Props - - - -Props are fields that can be added to code steps in a workflow to abstract data from the code and improve reusability. Most actions use props to capture user input (e.g., to allow users to customize the URL, method and payload for the Send HTTP Request action). Props support the entry of simple values (e.g., `hello world` or `123`) or expressions in `{{ }}` that can reference objects in scope or run basic Node.js code. - -## Entering Expressions - -Expressions make it easy to pass data exported from previous steps into a code step or action via props. For example, if your workflow is triggered on new Tweets and you want to send the Tweet content to an HTTP or webhook destination, you would reference `{{steps.trigger.event.body}}` to do that. - -While the data expected by each input depends on the data type (e.g., string, integer, array, etc) and the data entry mode (structured or non-structured โ€” if applicable), the format for entering expressions is always the same; expressions are always enclosed in `{{ }}`. - -There are three ways to enter expressions in a prop field โ€” you can use the object explorer, enter it manually, or paste a reference from a step export. - -### Use the object explorer - -When you click into a prop field, an object explorer expands below the input. You can explore all the objects in scope, filter for keywords (e.g., a key name), and then select the element to insert into the form as an expression. - -![Using the object explorer to select data from the step exports](https://res.cloudinary.com/pipedreamin/image/upload/v1649169376/docs/components/CleanShot_2022-04-05_at_10.35.37_nxykkx.gif) - -### Manually enter or edit an expression - -To manually enter or edit an expression, just enter or edit a value between double curly braces `{{ }}`. Pipedream provides auto-complete support as soon as you type. - -![Manually entering an expression as a param](https://res.cloudinary.com/pipedreamin/image/upload/v1710509983/docs/docs/props/CleanShot_2024-03-15_at_09.38.09_topm8f.gif) - -You can also run Node.js code in `{{ }}`. For example, if `event.foo` is a JSON object and you want to pass it to a param as a string, you can run `{{JSON.stringify(event.foo)}}`. - -### Paste a reference from a step export - -To paste a reference from a step export, find the reference you want to use, click **Copy Path** and then paste it into the input. - -![Copying the path to from a step export and pasting it as a prop in another step](https://res.cloudinary.com/pipedreamin/image/upload/v1710509995/docs/docs/props/CleanShot_2024-03-15_at_09.39.18_mfd5wa.gif) diff --git a/docs-v2/pages/workflows/data-management/_meta.tsx b/docs-v2/pages/workflows/data-management/_meta.tsx deleted file mode 100644 index aad88f99440fd..0000000000000 --- a/docs-v2/pages/workflows/data-management/_meta.tsx +++ /dev/null @@ -1,6 +0,0 @@ -export default { - "data-stores": "Data Stores", - "file-stores": "File Stores", - "destinations": "Destinations", - "databases": "Databases", -} as const diff --git a/docs-v2/pages/workflows/data-management/data-stores.mdx b/docs-v2/pages/workflows/data-management/data-stores.mdx deleted file mode 100644 index 5152f2cdf7d4f..0000000000000 --- a/docs-v2/pages/workflows/data-management/data-stores.mdx +++ /dev/null @@ -1,276 +0,0 @@ -import Callout from "@/components/Callout"; -import VideoPlayer from "@/components/VideoPlayer"; - -# Data Stores - - - -**Data stores** are Pipedream's built-in key-value store. - -Data stores are useful for: - -- Storing and retrieving data at a specific key -- Setting automatic expiration times for temporary data (TTL) -- Counting or summing values over time -- Retrieving JSON-serializable data across workflow executions -- Caching and rate limiting -- And any other case where you'd use a key-value store - -You can connect to the same data store across workflows, so they're also great for sharing state across different services. - -You can use pre-built, no-code actions to store, update, and clear data, or interact with data stores programmatically in [Node.js](/workflows/building-workflows/code/nodejs/using-data-stores/) or [Python](/workflows/building-workflows/code/python/using-data-stores/). - -## Using pre-built Data Store actions - -Pipedream provides several pre-built actions to set, get, delete, and perform other operations with data stores. - -### Inserting data - -To insert data into a data store: - -1. Add a new step to your workflow. -2. Search for the **Data Stores** app and select it. -3. Select the **Add or update a single record** pre-built action. - -![Insert a single row into a data store](/images/data-stores/add-or-update-a-single-record.png) - -Configure the action: - -1. **Select or create a Data Store** โ€” create a new data store or choose an existing data store. -2. **Key** - the unique ID for this data that you'll use for lookup later -3. **Value** - The data to store at the specified `key` -4. **Time to Live (TTL)** - (Optional) The number of seconds until this record expires and is automatically deleted. Leave blank for records that should not expire. - -![Configure the action](/images/data-stores/configuring-data-store-update-action.png) - -For example, to store the timestamp when the workflow was initially triggered, set the **Key** to **Triggered At** and the **Value** to `{{steps.trigger.context.ts}}`. - -The **Key** must evaluate to a string. You can pass a static string, reference [exports](/workflows/#step-exports) from a previous step, or use [any valid expression](/workflows/building-workflows/using-props/#entering-expressions). - -![Workflow trigger example](/images/data-stores/update-data-store-key-by-reference.png) - - - Need to store multiple records in one action? Use the **Add or update multiple - records** action instead. - - -### Retrieving Data - -The **Get record** action will retrieve the latest value of a data point in one of your data stores. - -1. Add a new step to your workflow. -2. Search for the **Data Stores** app and select it. -3. Select the **Add or update a single record** pre-built action. - -![Create a get record action](/images/data-stores/get-a-record-action-selection.png) - -Configure the action: - -1. **Select or create a Data Store** โ€” create a new data store or choose an existing data store. -2. **Key** - the unique ID for this data that you'll use for lookup later -3. **Create new record if key is not found** - if the specified key isn't found, you can create a new record -4. **Value** - The data to store at the specified `key` - -![Get record action](/images/data-stores/configure-data-store-retrieve-record.png) - -### Setting or updating record expiration (TTL) - -You can set automatic expiration times for records using the **Update record expiration** action: - -1. Add a new step to your workflow. -2. Search for the **Data Stores** app and select it. -3. Select the **Update record expiration** pre-built action. - -Configure the action: - -1. **Select a Data Store** - select the data store containing the record to modify -2. **Key** - the key for the record you want to update the expiration for -3. **Expiration Type** - choose from preset expiration times (1 hour, 1 day, 1 week, etc.) or select "Custom value" to enter a specific time in seconds -4. **Custom TTL (seconds)** - (only if "Custom value" is selected) enter the number of seconds until the record expires - -To remove expiration from a record, select "No expiration" as the expiration type. - -### Deleting Data - -To delete a single record from your data store, use the **Delete a single record** action in a step: - -![Select the delete record step](/images/data-stores/select-delete-a-record.png) - -Then configure the action: - -1. **Select a Data Store** - select the data store that contains the record to be deleted -2. **Key** - the key that identifies the individual record - -For example, you can delete the data at the **Triggered At** key that we've created in the steps above: - -![Delete a record example](/images/data-stores/delete-a-single-record.png) - -Deleting a record does not delete the entire data store. [To delete an entire data store, use the Pipedream Data Stores Dashboard](#deleting-data-stores). - -## Managing data stores - -You can view the contents of your data stores at any time in the [Pipedream Data Stores dashboard](https://pipedream.com/data-stores/). You can also add, edit, or delete data store records manually from this view. - -### Editing data store values manually - -1. Select the data store -2. Click the pencil icon on the far right of the record you want to edit. This will open a text box that will allow you to edit the contents of the value. When you're finished with your edits, save by clicking the checkmark icon. - -![Editing a data store's value manually](https://res.cloudinary.com/pipedreamin/image/upload/v1648063518/docs/components/CleanShot_2022-03-23_at_15.24.49_err0nt.gif) - -### Deleting data stores - -You can delete a data store from this dashboard as well. On the far right in the data store row, click the trash can icon. - -![Delete a Data Store](https://res.cloudinary.com/pipedreamin/image/upload/v1648063753/docs/components/CleanShot_2022-03-23_at_15.29.00_qtvdcz.gif) - -**Deleting a data store is irreversible**. - - -If the **Delete** option is greyed out and unclickable, you have workflows using the data store in a step. Click the **>** to the left of the data store's name to expand the linked workflows. - -
- -
- -Then remove the data store from any linked steps. - -
- -## Using data stores in code steps - -Refer to the [Node.js](/workflows/building-workflows/code/nodejs/using-data-stores/) and [Python](/workflows/building-workflows/code/python/using-data-stores/) data store docs to learn how to use data stores in code steps. You can get, set, delete and perform any other data store operations in code. You cannot use data stores in [Bash](/workflows/building-workflows/code/bash/) or [Go](/workflows/building-workflows/code/go/) code steps. - -## Compression - -Data saved in data stores is [Brotli-compressed](https://github.com/google/brotli), minimizing storage. The total compression ratio depends on the data being compressed. To test this on your own data, run it through a package that supports Brotli compression and measure the size of the data before and after. - -## Data store limits - -Depending on your plan, Pipedream sets limits on: - -1. The total number of data stores -2. The total number of keys across all data stores -3. The total storage used across all data stores, [after compression](#compression) - -You'll find your workspace's limits in the **Data Stores** section of usage dashboard in the bottom-left of [https://pipedream.com](https://pipedream.com). - -
- -
- -## Atomic operations - -Data store operations are not atomic or transactional, which can lead to race conditions. -To ensure atomic operations, be sure to limit access to a data store key to a [single workflow with a single worker](/workflows/building-workflows/settings/concurrency-and-throttling/) or use a service that supports atomic operations from among our [integrated apps](https://pipedream.com/apps). - -## Supported data types - -Data stores can hold any JSON-serializable data within the storage limits. This includes data types including: - -- Strings -- Objects -- Arrays -- Dates -- Integers -- Floats - -But you cannot serialize functions, classes, sets, maps, or other complex objects. - -## Exporting data to an external service - -In order to stay within the [data store limits](#data-store-limits), you may need to export the data in your data store to an external service. - -The following Node.js example action will export the data in chunks via an HTTP POST request. You may need to adapt the code to your needs. Click on [this link](https://pipedream.com/new?h=tch_egfAMv) to create a copy of the workflow in your workspace. - - - If the data contained in each key is large, consider lowering the number of - `chunkSize`. - - -- Adjust your [workflow memory and timeout settings](/workflows/building-workflows/settings/) according to the size of the data in your data store. Set the memory at 512 MB and timeout to 60 seconds and adjust higher if needed. - -- Monitor the exports of this step after each execution for any potential errors preventing a full export. Run the step as many times as needed until all your data is exported. - - - This action deletes the keys that were successfully exported. It is advisable - to first run a test without deleting the keys. In case of any unforeseen - errors, your data will still be safe. - - -```javascript -import { axios } from "@pipedream/platform"; - -export default defineComponent({ - props: { - dataStore: { - type: "data_store", - }, - chunkSize: { - type: "integer", - label: "Chunk Size", - description: "The number of items to export in one request", - default: 100, - }, - shouldDeleteKeys: { - type: "boolean", - label: "Delete keys after export", - description: "Whether the data store keys will be deleted after export", - default: true, - }, - }, - methods: { - async *chunkAsyncIterator(asyncIterator, chunkSize) { - let chunk = []; - - for await (const item of asyncIterator) { - chunk.push(item); - - if (chunk.length === chunkSize) { - yield chunk; - chunk = []; - } - } - - if (chunk.length > 0) { - yield chunk; - } - }, - }, - async run({ steps, $ }) { - const iterator = this.chunkAsyncIterator(this.dataStore, this.chunkSize); - for await (const chunk of iterator) { - try { - // export data to external service - await axios($, { - url: "https://external_service.com", - method: "POST", - data: chunk, - // may need to add authentication - }); - - // delete exported keys and values - if (this.shouldDeleteKeys) { - await Promise.all(chunk.map(([key]) => this.dataStore.delete(key))); - } - - console.log( - `number of remaining keys: ${(await this.dataStore.keys()).length}` - ); - } catch (e) { - // an error occurred, don't delete keys - console.log(`error exporting data: ${e}`); - } - } - }, -}); -``` diff --git a/docs-v2/pages/workflows/data-management/databases/_meta.tsx b/docs-v2/pages/workflows/data-management/databases/_meta.tsx deleted file mode 100644 index 5614ce8184d62..0000000000000 --- a/docs-v2/pages/workflows/data-management/databases/_meta.tsx +++ /dev/null @@ -1,4 +0,0 @@ -export default { - "index": "Connecting to Databases", - "working-with-sql": "Working with SQL", -} as const diff --git a/docs-v2/pages/workflows/data-management/databases/index.mdx b/docs-v2/pages/workflows/data-management/databases/index.mdx deleted file mode 100644 index 394034c4ace67..0000000000000 --- a/docs-v2/pages/workflows/data-management/databases/index.mdx +++ /dev/null @@ -1,41 +0,0 @@ -import Callout from '@/components/Callout' - -# Connecting to Databases -Connecting to a database is essential for developing production workflows. Whether you're storing application data, querying user information, or analyzing event logs, most workflows and serverless functions require querying data at some point. - - -Pipedream workflows run in the AWS `us-east-1` network, sending requests from standard AWS IP ranges. - - -## Connecting to Restricted Databases -**Unless your database is publicly accessible, you'll likely need to add specific IPs to its allow-list.** To do this, you can configure your database connection to use either a shared or dedicated static IP address from Pipedream: - -### Create a Dedicated Static IP for Outbound Traffic -- [Virtual Private Clouds (VPCs)](/workflows/vpc/) in Pipedream let you deploy any workflow to a private network and is the most secure and recommended approach to using a static IP. -- Once configured, the VPC will give you a dedicated egress IP that's unique to your workspace, and is available to any workflow within your workspace. - -### Send Requests from a Shared Static IP -- When configuring your database connection as a [connected account](/apps/connected-accounts) to Pipedream, you can choose to route network requests through a static IP block for [any app that's supported by Pipedream's SQL Proxy](#supported-databases) -- Pipedream's SQL Proxy routes requests to your database from the IP block below. - -#### Supported Databases -Pipedream's SQL Proxy, which enables the shared static IP, currently supports [MySQL](https://pipedream.com/apps/mysql), [PostgreSQL](https://pipedream.com/apps/postgresql), and [Snowflake](https://pipedream.com/apps/snowflake). Please let us know if you'd like to see support for other database types. - -#### Enabling the Shared Static IP -Connect your account for one of the [supported database apps](#supported-databases) and set **Use Shared Static IP** to **TRUE**, then click **Test connection** to ensure Pipedream can successfully connect to your database. - -![Connect and test your account](https://res.cloudinary.com/pipedreamin/image/upload/v1717387003/test-connection-mysql_bizpqk.png) - -#### Shared Static IP Block -Add the following IP block to your database allow-list: -``` -44.223.89.56/29 -``` - - -## FAQ - -### What's the difference between using a shared static IP with the SQL Proxy vs a dedicated IP using a VPC? -Both the SQL Proxy and VPCs enable secure database connections from a static IP. -- VPCs offer enhanced isolation and security by providing a **dedicated** static IP for workflows within your workspace -- The SQL proxy routes requests to your database connections through a set of **shared** static IPs diff --git a/docs-v2/pages/workflows/data-management/databases/working-with-sql.mdx b/docs-v2/pages/workflows/data-management/databases/working-with-sql.mdx deleted file mode 100644 index 8f5bdc5e547ce..0000000000000 --- a/docs-v2/pages/workflows/data-management/databases/working-with-sql.mdx +++ /dev/null @@ -1,79 +0,0 @@ -import Callout from '@/components/Callout' -import { Steps } from 'nextra/components' -import ArcadeEmbed from '@/components/ArcadeEmbed' - -# Working with SQL -Pipedream makes it easy to interact with SQL databases within your workflows. You can securely connect to your database and use either pre-built no-code triggers and actions to interact with your database, or execute custom SQL queries. - -## SQL Editor -With the built-in SQL editor, you access linting and auto-complete features typical of modern SQL editors. - -![SQL editor](https://res.cloudinary.com/pipedreamin/image/upload/v1717388521/sql-editor_jn2rpn.png) - -## Schema Explorer -When querying a database, you need to understand the schema of the tables you're working with. The schema explorer provides a visual interface to explore the tables in your database, view their columns, and understand the relationships between them. - -- Once you connect your account with one of the [supported database apps](#supported-databases), we automatically fetch and display the details of the database schema below -- You can **view the columns of a table**, their data types, and relationships between tables -- You can also **search and filter** the set of tables that are listed in your schema based on table or column name - -![SQL Schema Explorer](https://res.cloudinary.com/pipedreamin/image/upload/v1717388737/Screenshot_2024-06-02_at_9.23.46_PM_q5lbxo.png) - -## Prepared Statements -Prepared statements let you safely execute SQL queries with dynamic inputs that are automatically defined as parameters, in order to help prevent SQL injection attacks. - -To reference dynamic data in a SQL query, simply use the standard `{{ }}` notation just like any other code step in Pipedream. For example, - -```sql -select * - from products - where name = {{steps.get_product_info.$return_value.name}} - and created_at > {{steps.get_product_info.$return_value.created_at}} -``` - -**Prepared statement:** -![Prepared statement](https://res.cloudinary.com/pipedreamin/image/upload/v1722568229/prepared-statement_lh1cat.png) - -**Computed statement:** -![Computed statement](https://res.cloudinary.com/pipedreamin/image/upload/v1722568229/computed-statement_pth31z.png) - - -When you include step references in your SQL query, Pipedream automatically converts your query to a prepared statement using placeholders with an array of params. - - -Below your query input, you can toggle between the computed and prepared statements: - - - - -## Getting Started - - -### Select the Execute SQL Query action -- From the step selector in the builder, select the **Query a Database** action for the [relevant database app](#supported-databases) - -![Select the Execute SQL Query action](https://res.cloudinary.com/pipedreamin/image/upload/v1718918862/database-actions-step-selector_sbrnzi.png) - -### Connect your account -- If you already have a connected account, select it from the dropdown. Otherwise, click **Connect Account** to configure the database connection. -- Follow the prompts to connect your account, then click **Test connection** to ensure Pipedream can successfully connect to your database - -![Connect and test your account](https://res.cloudinary.com/pipedreamin/image/upload/v1717387003/test-connection-mysql_bizpqk.png) - -### Explore the schema -- Once you've successfully connected your account, you can explore the [database schema](#schema-explorer) to understand the tables and columns in your database - -### Write and execute your query -- Write your SQL query in the editor โ€” read more about [prepared statements](#prepared-statements) above to reference dynamic data in your query - - - -### Supported Databases -The [SQL editor](#sql-editor), [schema explorer](#schema-explorer), and support for [prepared statements](#prepared-statements) are currently supported for these datbase apps: -- [MySQL](https://pipedream.com/apps/mysql) -- [PostgreSQL](https://pipedream.com/apps/postgresql) -- [Snowflake](https://pipedream.com/apps/snowflake) - -Need to query a different database type? Let us know! \ No newline at end of file diff --git a/docs-v2/pages/workflows/data-management/destinations/_meta.tsx b/docs-v2/pages/workflows/data-management/destinations/_meta.tsx deleted file mode 100644 index 36cf8794ff41c..0000000000000 --- a/docs-v2/pages/workflows/data-management/destinations/_meta.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export default { - "index": "Overview", - "email": "Email", - "http": "HTTP", - "emit": "Emit", - "sse": "SSE", - "s3": "S3", -} as const diff --git a/docs-v2/pages/workflows/data-management/destinations/email.mdx b/docs-v2/pages/workflows/data-management/destinations/email.mdx deleted file mode 100644 index 4468c0713ec4b..0000000000000 --- a/docs-v2/pages/workflows/data-management/destinations/email.mdx +++ /dev/null @@ -1,58 +0,0 @@ -# Email - -The Email Destination allows you send an email to _yourself_ โ€” the email address tied to the account you signed up with โ€” at any step of a workflow. - -You can use this to email yourself when you receive a specific event, for example when a user signs up on your app. You can send yourself an email when a cron job finishes running, or when a job fails. Anywhere you need an email notification, you can use the Email Destination! - - - -## Adding an Email Destination - -### Adding an Email Action - -1. Add a new step to your workflow -2. Select the **Send Yourself an Email** Action. You can modify the **Subject** and the message (either **Plain Text** or **HTML**) however you want. - -### Using `$.send.email` in workflows - -You can send data to an Email Destination in [Node.js code steps](/workflows/building-workflows/code/nodejs/), too, using the `$.send.email()` function. **This allows you to send emails to yourself programmatically, if you need more control than actions provide**. - -`$.send.email()` takes the same parameters as the corresponding action: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - $.send.email({ - subject: "Your subject", - text: "Plain text email body", - html: "HTML email body" - }); - } -}); -``` - -The `html` property is optional. If you include both the `text` and `html` properties, email clients that support HTML will prefer that over the plaintext version. - -Like with any `$.send` function, you can use `$.send.email()` conditionally, within a loop, or anywhere you'd use a function normally in Node.js. - -### Using `$.send.email` in component actions - -If you're authoring a [component action](/components/contributing/#actions), you can deliver data to an email destination using `$.send.email`. - -`$.send.email` functions the same as [`$.send.email` in workflow code steps](#using-sendemail-in-workflows): - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - $.send.email({ - subject: "Your subject", - text: "Plain text email body", - html: "HTML email body" - }); - } -}) -``` - -## Delivery details - -All emails come from **notifications@pipedream.com**. diff --git a/docs-v2/pages/workflows/data-management/destinations/emit.mdx b/docs-v2/pages/workflows/data-management/destinations/emit.mdx deleted file mode 100644 index ea9c55ae75e9a..0000000000000 --- a/docs-v2/pages/workflows/data-management/destinations/emit.mdx +++ /dev/null @@ -1,126 +0,0 @@ - -# Emit events - -Like [event sources](/workflows/building-workflows/triggers/), workflows can emit events. These events can trigger other workflows, or be consumed using Pipedream's [REST API](/rest-api/#get-workflow-emits). - -## Using `$.send.emit()` in workflows - -You can emit arbitrary events from any [Node.js code steps](/workflows/building-workflows/code/nodejs/) using `$.send.emit()`. - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - $.send.emit({ - name: "Yoda", - }); - } -}); -``` - -`$.send.emit()` accepts an object with the following properties: - -```javascript -$.send.emit( - event, // An object that contains the event you'd like to emit - channel, // Optional, a string specifying the channel -); -``` - -## Emitting events to channels - -By default, events are emitted to the default channel. You can optionally emit events to a different channel, and listening sources or workflows can subscribe to events on this channel, running the source or workflow only on events emitted to that channel. - -Pass the channel as the second argument to `$.send.emit()`: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - $.send.emit( - { - name: "Yoda", - }, - 'channel_name' - ); - } -}); -``` - -## Using `$.send.emit()` in component actions - -If you're authoring a [component action](/components/contributing/#actions), you can emit data using `$.send.emit()`. - -`$.send.emit()` functions the same as [`$.send.emit()` in workflow code steps](#using-sendemit-in-workflows): - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - $.send.emit({ - name: "Yoda", - }); - } -}) -``` - -**Destination delivery is asynchronous**: emits are sent after your workflow finishes. - -You can call `$.send.emit()` multiple times within a workflow, for example: to iterate over an array of values and emit an event for each. - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - const names = ["Luke", "Han", "Leia", "Obi Wan"]; - for (const name of names) { - $.send.emit({ - name, - }); - } - } -}); -``` - -## Trigger a workflow from emitted events - -We call the events you emit from a workflow **emitted events**. Sometimes, you'll want emitted events to trigger another workflow. This can be helpful when: - -- You process events from different workflows in the same way. For example, you want to log events from many workflows to Amazon S3 or a logging service. You can write one workflow that handles logging, then `$.send.emit()` events from other workflows that are consumed by the single, logging workflow. This helps remove duplicate logic from the other workflows. -- Your workflow is complex and you want to separate it into multiple workflows to group logical functions together. You can `$.send.emit()` events from one workflow to another to chain the workflows together. - -Here's how to configure a workflow to listen for emitted events. - -1. Currently, you can't select emitted events as a workflow trigger from the Pipedream UI. We'll show you how add the trigger via API. First, pick an existing workflow where you'd like to receive emitted events. **If you want to start with a [new workflow](https://pipedream.com/new), just select the HTTP / Webhook trigger**. -2. This workflow is called the **listener**. The workflow where you'll use `$.send.emit()` is called the **emitter**. If you haven't created the emitter workflow yet, [do that now](https://pipedream.com/new). -3. Get the workflow IDs of both the listener and emitter workflows. **You'll find the workflow ID in the workflow's URL in your browser bar โ€”ย it's the `p_abc123` in `https://pipedream.com/@username/p_abc123/`**. -4. You can use the Pipedream REST API to configure the listener to receive events from the emitter. We call this [creating a subscription](/rest-api/#listen-for-events-from-another-source-or-workflow). If your listener's ID is `p_abc123` and your emitter's ID is `p_def456`, you can run the following command to create this subscription: - -```bash -curl "https://api.pipedream.com/v1/subscriptions?emitter_id=dc_def456&listener_id=p_abc123" \ - -X POST \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" -``` - -5. Run your emitter workflow, emitting an event using `$.send.emit()`: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - $.send.emit({ - name: "Yoda", - }); - } -}); -``` - -This should trigger your listener, and you should see the same event in [the event inspector](/workflows/building-workflows/inspect/#the-inspector). - -**Note**: Please upvote [this issue](https://github.com/PipedreamHQ/pipedream/issues/682) to see support for _adding_ emitted events as a workflow trigger in the UI. - -## Consuming emitted events via REST API - -`$.send.emit()` can emit any data you'd like. You can retrieve that data using Pipedream's REST API endpoint for [retrieving emitted events](/rest-api/#get-workflow-emits). - -This can be helpful when you want a workflow to process data asynchronously using a workflow. You can save the results of your workflow with `$.send.emit()`, and only retrieve the results in batch when you need to using the REST API. - -## Emit logs / troubleshooting - -Below your code step, you'll see both the data that was sent in the emit. If you ran `$.send.emit()` multiple times within the same code step, you'll see the data that was emitted for each. diff --git a/docs-v2/pages/workflows/data-management/destinations/http.mdx b/docs-v2/pages/workflows/data-management/destinations/http.mdx deleted file mode 100644 index c8e5fc4d78d7d..0000000000000 --- a/docs-v2/pages/workflows/data-management/destinations/http.mdx +++ /dev/null @@ -1,123 +0,0 @@ -import Callout from '@/components/Callout' -import PublicIPs from '@/components/PublicIPs' - -# HTTP - -HTTP Destinations allow you to send data to another HTTP endpoint URL outside of Pipedream. This can be an endpoint you own and operate, or a URL tied to a service you use (for example, a [Slack Incoming Webhook](https://api.slack.com/incoming-webhooks)). - -## Using `$.send.http` in workflows - -You can send HTTP requests in [Node.js code steps](/workflows/building-workflows/code/nodejs/) using `$.send.http()`. - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - $.send.http({ - method: "POST", - url: "[YOUR URL HERE]", - data: { - name: "Luke Skywalker", - }, - }); - } -}); -``` - -`$.send.http()` accepts an object with all of the following properties: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - $.send.http({ - method, // Required, HTTP method, a string, e.g. POST, GET - url, // Required, the URL to send the HTTP request to - data, // HTTP payload - headers, // An object containing custom headers, e.g. { "Content-Type": "application/json" } - params, // An object containing query string parameters as key-value pairs - auth, // An object that contains a username and password property, for HTTP basic auth - }); - } -}); - -``` - -**Destination delivery is asynchronous**: the HTTP requests are sent after your workflow finishes. This means **you cannot write code that operates on the HTTP response**. These HTTP requests **do not** count against your workflow's compute time. - -If you iterate over an array of values and send an HTTP request for each: - -```javascript - -export default defineComponent({ - async run({ steps, $ }) { - const names = ["Luke", "Han", "Leia", "Obi Wan"]; - names.forEach((name) => { - $.send.http({ - method: "POST", - url: "[YOUR URL HERE]", - data: { - name, - }, - }); - }); - } -}); -``` - -you won't have to `await` the execution of the HTTP requests in your workflow. We'll collect every `$.send.http()` call and defer those HTTP requests, sending them after your workflow finishes. - -## Using `$.send.http` in component actions - -If you're authoring a [component action](/components/contributing/#actions), you can deliver data to an HTTP destination using `$.send.http`. - -`$.send.http` functions the same as [`$.send.http` in workflow code steps](#using-sendhttp-in-workflows): - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - $.send.http({ - method: "GET", - url: "https://example.com" - }) - } -}); -``` - -## HTTP Destination delivery - -HTTP Destination delivery is handled asynchronously, separate from the execution of a workflow. However, we deliver the specified payload to HTTP destinations for every event sent to your workflow. - -Generally, this means it should only take a few seconds for us to send the event to the destination you specify. In some cases, delivery will take longer. - -The time it takes to make HTTP requests sent with `$.send.http()` does not count against your workflow quota. - -## HTTP request and response logs - -Below your code step, you'll see both the data that was sent in the HTTP request, and the HTTP response that was issued. If you issue multiple HTTP requests, we'll show the request and response data for each. - -## What if I need to access the HTTP response in my workflow? - -Since HTTP requests sent with `$.send.http()` are sent asynchronously, after your workflow runs, **you cannot access the HTTP response in your workflow**. - -If you need to access the HTTP response data in your workflow, [use `axios`](/workflows/building-workflows/code/nodejs/http-requests/) or another HTTP client. - -## Timeout - -The timeout on HTTP request sent with `$.send.http()` is currently **5 seconds**. This time includes DNS resolution, connecting to the host, writing the request body, server processing, and reading the response body. - -Any requests that exceed 5 seconds will yield a `timeout` error. - -## Retries - -Currently, Pipedream will not retry any failed request. If your HTTP destination endpoint is down, or returns an error response, we'll display that response in the observability associated with the Destination in the relevant step. - -## IP addresses for Pipedream HTTP requests - - -These IP addresses are tied to **requests sent with `$.send.http` only, not other HTTP requests made from workflows**. To whitelist standard HTTP requests from Pipedream workflows, [use VPCs](/workflows/vpc/). - - -When you make an HTTP request using `$.send.http()`, the traffic will come from one of the following IP addresses: - - - -This list may change over time. If you've previously whitelisted these IP addresses and are having trouble sending HTTP requests to your target service, please check to ensure this list matches your firewall rules. diff --git a/docs-v2/pages/workflows/data-management/destinations/index.mdx b/docs-v2/pages/workflows/data-management/destinations/index.mdx deleted file mode 100644 index 3d961a7bd3a92..0000000000000 --- a/docs-v2/pages/workflows/data-management/destinations/index.mdx +++ /dev/null @@ -1,99 +0,0 @@ -# Destinations - -**Destinations**, like [actions](/components/contributing/#actions), abstract the delivery and connection logic required to send events to services like Amazon S3, or targets like HTTP and email. - -However, Destinations are different than actions in two ways: - -- Events are delivered to the Destinations asynchronously, after your workflow completes. This means you don't wait for network I/O (e.g. for HTTP requests or connection overhead for data warehouses) within your workflow code, so you can process more events faster. -- In the case of data stores like S3, you typically don't want to send every event on its own. This can be costly and carries little benefit. Instead, you typically want to batch a collection of events together, sending the batch at some frequency. Destinations handle that batching for relevant services. - -The docs below discuss features common to all Destinations. See the [docs for a given destination](#available-destinations) for information specific to those destinations. - - - -## Available Destinations - -- [HTTP](/workflows/data-management/destinations/http/) -- [Email](/workflows/data-management/destinations/email/) -- [S3](/workflows/data-management/destinations/s3/) -- [SSE](/workflows/data-management/destinations/sse/) -- [Emit to another listener](/workflows/data-management/destinations/emit/) - -## Using destinations - -### Using destinations in workflows - -You can send data to Destinations in [Node.js code steps](/workflows/building-workflows/code/nodejs/), too, using `$.send` functions. - -`$.send` is an object provided by Pipedream that exposes destination-specific functions like `$.send.http()`, `$.send.s3()`, and more. This allows you to send data to destinations programmatically, if you need more control than the default actions provide. - -Let's use `$.send.http()` to send an HTTP POST request like we did in the Action example above. [Add a new action](/workflows/building-workflows/actions/), then search for "**Run custom code**": - -Create a new HTTP endpoint URL (try creating a new Pipedream workflow and adding an HTTP trigger), and add the code below to your code step, with the URL you created: - -```javascript -export default defineComponent({ - async run({ steps, $}) { - $.send.http({ - method: "POST", - url: "[YOUR URL HERE]", - data: { - name: "Luke Skywalker", - }, - }); - } -}) -``` - -See the docs for the [HTTP destination](/workflows/data-management/destinations/http/) to learn more about all the options you can pass to the `$.send.http()` function. - -Again, it's important to remember that **Destination delivery is asynchronous**. If you iterate over an array of values and send an HTTP request for each: - -```javascript -export default defineComponent({ - async run({ steps, $}) { - const names = ["Luke", "Han", "Leia", "Obi Wan"]; - for (const name of names) { - $.send.http({ - method: "POST", - url: "[YOUR URL HERE]", - data: { - name, - }, - }); - } - } -}) -``` - -you won't have to `await` the execution of the HTTP requests in your workflow. We'll collect every `$.send.http()` call and defer those HTTP requests, sending them after your workflow finishes. - -### Using destinations in actions - -If you're authoring a [component action](/components/contributing/#actions), you can deliver data to destinations, too. `$.send` isn't directly available to actions like it is for workflow code steps. Instead, you use `$.send` to access the destination-specific functions: - -```javascript -export default { - name: "Action Demo", - key: "action_demo", - version: "0.0.1", - type: "action", - async run({ $ }) { - $.send.http({ - method: "POST", - url: "[YOUR URL HERE]", - data: { - name: "Luke Skywalker", - }, - }); - } -} -``` - -[See the component action API docs](/components/contributing/api/#actions) for more details. - -## Asynchronous Delivery - -Events are delivered to destinations _asynchronously_ โ€” that is, separate from the execution of your workflow. **This means you're not waiting for network or connection I/O in the middle of your function, which can be costly**. - -Some destination payloads, like HTTP, are delivered within seconds. For other destinations, like S3 and SQL, we collect individual events into a batch and send the batch to the destination. See the [docs for a specific destination](#available-destinations) for the relevant batch delivery frequency. diff --git a/docs-v2/pages/workflows/data-management/destinations/s3.mdx b/docs-v2/pages/workflows/data-management/destinations/s3.mdx deleted file mode 100644 index 65f7369f5f343..0000000000000 --- a/docs-v2/pages/workflows/data-management/destinations/s3.mdx +++ /dev/null @@ -1,103 +0,0 @@ -import PublicIPs from '@/components/PublicIPs' - -# Amazon S3 - -[Amazon S3](https://aws.amazon.com/s3/) โ€” the Simple Storage Service โ€” is a common place to dump data for long-term storage on AWS. Pipedream supports delivery to S3 as a first-class Destination. - -## Using `$.send.s3` in workflows - -You can send data to an S3 Destination in [Node.js code steps](/workflows/building-workflows/code/nodejs/) using `$.send.s3()`. - -`$.send.s3()` takes the following parameters: - -```javascript -$.send.s3({ - bucket: "your-bucket-here", - prefix: "your-prefix/", - payload: event.body, -}); -``` - -Like with any `$.send` function, you can use `$.send.s3()` conditionally, within a loop, or anywhere you'd use a function normally. - -## Using `$.send.s3` in component actions - -If you're authoring a [component action](/components/contributing/#actions), you can deliver data to an S3 destination using `$.send.s3`. - -`$.send.s3` functions the same as [`$.send.s3` in workflow code steps](#using-sends3-in-workflows): - -```javascript -async run({ $ }) { - $.send.s3({ - bucket: "your-bucket-here", - prefix: "your-prefix/", - payload: event.body, - }); -} -``` - -## S3 Bucket Policy - -In order for us to deliver objects to your S3 bucket, you need to modify its [bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-bucket-policy.html) to allow Pipedream to upload objects. - -**Replace `[your bucket name]` with the name of your bucket** near the bottom of the policy. - -```json -{ - "Version": "2012-10-17", - "Id": "allow-pipedream-limited-access", - "Statement": [ - { - "Effect": "Allow", - "Principal": { - "AWS": "arn:aws:iam::203863770927:role/Pipedream" - }, - "Action": [ - "s3:AbortMultipartUpload", - "s3:GetBucketLocation", - "s3:PutObject", - "s3:PutObjectAcl", - "s3:ListBucketMultipartUploads" - ], - "Resource": [ - "arn:aws:s3:::[your bucket name]", - "arn:aws:s3:::[your bucket name]/*" - ] - } - ] -} -``` - -This bucket policy provides the minimum set of permissions necessary for Pipedream to deliver objects to your bucket. We use the [Multipart Upload API](https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html) to upload objects, and require the [relevant permissions](https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). - -## S3 Destination delivery - -S3 Destination delivery is handled asynchronously, separate from the execution of a workflow. **Moreover, events sent to an S3 bucket are batched and delivered once a minute**. For example, if you sent 30 events to an S3 Destination within a particular minute, we would collect all 30 events, delimit them with newlines, and write them to a single S3 object. - -In some cases, delivery will take longer than a minute. - -## S3 object format - -We upload objects using the following format: - -``` -[PREFIX]/YYYY/MM/DD/HH/YYYY-MM-DD-HH-MM-SS-IDENTIFIER.gz -``` - -That is โ€” we write objects first to your prefix, then within folders specific to the current date and hour, then upload the object with the same date information in the object, so that it's easy to tell when it was uploaded by object name alone. - -For example, if I were writing data to a prefix of `test/`, I might see an object in S3 at this path: - -``` -test/2019/05/25/16/2019-05-25-16-14-58-8f25b54462bf6eeac3ee8bde512b6c59654c454356e808167a01c43ebe4ee919.gz -``` - -As noted above, a given object contains all payloads delivered to an S3 Destination within a specific minute. Multiple events within a given object are newline-delimited. - -## Limiting S3 Uploads by IP - -S3 provides a mechanism to [limit operations only from specific IP addresses](https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-3). If you'd like to apply that filter, uploads using `$.send.s3()` should come from one of the following IP addresses: - - - -This list may change over time. If you've previously whitelisted these IP addresses and are having trouble uploading S3 objects, please check to ensure this list matches your firewall rules. diff --git a/docs-v2/pages/workflows/data-management/destinations/sse.mdx b/docs-v2/pages/workflows/data-management/destinations/sse.mdx deleted file mode 100644 index cbf92887bb19a..0000000000000 --- a/docs-v2/pages/workflows/data-management/destinations/sse.mdx +++ /dev/null @@ -1,155 +0,0 @@ -# Server-Sent Events (SSE) - -Pipedream supports [Server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) (SSE) as a destination, enabling you to send events from a workflow directly to a client subscribed to the event stream. - -## What is SSE? - -[Server-sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) (SSE) is a specification that allows servers to send events directly to clients that subscribe to those events, similar to [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) and related server to client push technologies. - -Unlike WebSockets, SSE enables one-way communication from server to clients (WebSockets enable bidirectional communication between server and client, allowing you to pass messages back and forth). Luckily, if you only need a client to subscribe to events from a server, and don't require bidirectional communication, SSE is simple way to make that happen. - -## What can I do with the SSE destination? - -SSE is typically used by web developers to update a webpage with new events in real-time, without forcing a user to reload a page to fetch new data. If you'd like to update data on a webpage in that manner, you can subscribe to your workflow's event stream and handle new events as they come in. - -Beyond web browsers, any program that's able to create an [`EventSource` interface](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) can listen for server-sent events delivered from Pipedream. You can run a Node.js script or a Ruby on Rails app that receives server-sent events, for example. - -## Sending data to an SSE Destination in workflows - -You can send data to an SSE Destination in [Node.js code steps](/workflows/building-workflows/code/nodejs/) using the `$.send.sse()` function. - -1. Add a new step to your workflow -2. Select the option to **Run custom code** and choose the Node.js runtime. -3. Add this code to that step: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - $.send.sse({ - channel: "events", // Required, corresponds to the event in the SSE spec - payload: { // Required, the event payload - name: "Luke Skywalker" - } - }); - } -}); -``` - -**See [this workflow](https://pipedream.com/new?h=tch_mp7f6q)** for an example of how to use `$.send.sse()`. - -Send a test event to your workflow, then review the section on [Receiving events](#receiving-events) to see how you can setup an `EventSource` to retrieve events sent to the SSE Destination. - -**Destination delivery is asynchronous**. If you iterate over an array of values and send an SSE for each: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - const names = ["Luke", "Han", "Leia", "Obi Wan"]; - names.forEach(name => { - $.send.sse({ - channel: "names", - payload: { - name - } - }); - }); - } -}); -``` - -you won't have to `await` the execution of the SSE Destination requests in your workflow. We'll collect every `$.send.sse()` call and defer those requests, sending them after your workflow finishes. - -## Using `$.send.sse` in component actions - -If you're authoring a [component action](/components/contributing/#actions), you can send events to an SSE destination using `$.send.sse`. - -`$.send.sse` functions the same as [`$.send.sse` in workflow code steps](#sending-data-to-an-sse-destination-in-workflows): - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - $.send.sse({ - channel: "events", - payload: { - name: "Luke Skywalker" - } - }); - } -}); -``` - -## Receiving events - -Once you've sent events to an SSE Destination, you can start receiving a stream of those events in a client by configuring an [`EventSource`](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) that connects to the Pipedream SSE stream. - -### Retrieving your workflow's event stream URL - -First, it's important to note that all events sent to an SSE destination within a workflow are sent to an SSE event stream specific to that workflow. The event stream is tied to the workflow's ID, which you can find by examining the URL of the pipeline in the Pipedream UI. For example, the `p_aBcDeF` in this URL is the pipeline ID: - -![Pipeline ID](/images/destinations/pipeline-id.png) - -**Note that the `p_` prefix is part of the workflow ID**. - -Once you have the workflow ID, you can construct the event source URL for your SSE destination. That URL is of the following format: - -``` -http://sdk.m.pipedream.net/pipelines/[YOUR WORKFLOW ID]/sse -``` - -In the example above, the URL of our event stream would be: - -``` -http://sdk.m.pipedream.net/pipelines/p_aBcDeF/sse -``` - -You should be able to open that URL in your browser. Most modern browsers support connecting to an event stream directly, and will stream events without any work on your part to help you confirm that the stream is working. - -If you've already sent events to your SSE destination, you should see those events here! We'll return the most recent 100 events delivered to the corresponding SSE destination immediately. This allows your client to catch up with events previously sent to the destination. Then, any new events sent to the SSE destination while you're connected will be delivered to the client. - -### Sample code to connect to your event stream - -It's easy to setup a simple webpage to `console.log()` all events from an event stream. You can find a lot more examples of how to work with SSE on the web, but this should help you understand the basic concepts. - -You'll need to create two files in the same directory on your machine: an `index.html` file for the HTML. - -**index.html** - -```html - - - - - - SSE test - - - - -
- - - -``` - -**Make sure to add your workflow ID and the name of your channel you specified in your SSE Destination**. Then, open the `index.html` page in your browser. In your browser's developer tools JavaScript console, you should see new events appear as you send them. - -Note that the `addEventListener` code will listen specifically for events sent to the **events** `channel` specified in our SSE destination. You can listen for multiple types of events at once by adding multiple event listeners on the client. - -**Try triggering more test events from your workflow while this page is open to see how this works end-to-end**. - -## `:keepalive` messages - -[The SSE spec](https://www.w3.org/TR/2009/WD-eventsource-20090421/#notes) notes that - -> Legacy proxy servers are known to, in certain cases, drop HTTP connections after a short timeout. To protect against such proxy servers, authors can include a comment line (one starting with a ':' character) every 15 seconds or so. - -Roughly every 15 seconds, we'll send a message with the `:keepalive` comment to keep open SSE connections alive. These comments should be ignored when you're listening for messages using the `EventSource` interface. diff --git a/docs-v2/pages/workflows/data-management/file-stores/_meta.tsx b/docs-v2/pages/workflows/data-management/file-stores/_meta.tsx deleted file mode 100644 index f9e7d5f2243d3..0000000000000 --- a/docs-v2/pages/workflows/data-management/file-stores/_meta.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default { - "index": "Overview", -} as const diff --git a/docs-v2/pages/workflows/data-management/file-stores/index.mdx b/docs-v2/pages/workflows/data-management/file-stores/index.mdx deleted file mode 100644 index c52014ff15cd9..0000000000000 --- a/docs-v2/pages/workflows/data-management/file-stores/index.mdx +++ /dev/null @@ -1,333 +0,0 @@ -import Callout from '@/components/Callout' - -# File Stores - - -In Preview - -File Stores are available in Preview. There may be changes to allowed limits in the future. - -If you have any feedback on File Stores, please let us know in our [community](https://pipedream.com/support). - - -File Stores are a filesystem that are scoped to a Project. All workflows within the same Project have access to the File Stores. - -You can interact with these files through the Pipedream Dashboard or programmatically through your Project's workflows. - -Unlike files stored within a workflow's `/tmp` directory which are subject to deletion between executions, File Stores are separate cloud storage. Files within a File Store can be long term storage accessible by your workflows. - -![File Stores are scoped to Projects, and workflows within the Project can interact with files stored](https://res.cloudinary.com/pipedreamin/image/upload/v1700156062/docs/docs/Project%20Files/Untitled_7_cn9njj.png) - - - -## Managing File Stores from the Dashboard - -You can access a File Store by opening the Project and selecting the *File Store* on the left hand navigation menu. - -![Opening a project's file store in the Pipedream Dashboard.](https://res.cloudinary.com/pipedreamin/image/upload/v1698934897/docs/docs/Project%20Files/CleanShot_2023-11-02_at_10.21.15_2x_z5q5nt.png) - -### Uploading files to the File Store - -To upload a file, select *New* then select *File*: - -![Opening the new file pop-up in a Project's File Store](https://res.cloudinary.com/pipedreamin/image/upload/v1698934655/docs/docs/Project%20Files/CleanShot_2023-11-02_at_10.16.13_fqjuv4.gif) - -Then in the new pop-up, you can either drag and drop or browser your computer to stage a file for uploading: - -![Choose to either drag and drop a file to upload or browse your local filesystem to upload the file](https://res.cloudinary.com/pipedreamin/image/upload/v1698934655/docs/docs/Project%20Files/CleanShot_2023-11-02_at_10.16.19_2x_w7z8wv.png) - -Now that the file(s) are staged for uploaded. Click *Upload* to upload them: - -![Confirm the upload to the file store](https://res.cloudinary.com/pipedreamin/image/upload/v1698934657/docs/docs/Project%20Files/CleanShot_2023-11-02_at_10.16.49_2x_ha4scn.png) - -Finally, click *Done* to close the upload pop-up: - -![Closing the file store upload modal](https://res.cloudinary.com/pipedreamin/image/upload/v1698934659/docs/docs/Project%20Files/CleanShot_2023-11-02_at_10.17.01_2x_xmfqfi.png) - -You should now see your file is uploaded and available for use within your Project: - -![The file is now uploaded to the File Store](https://res.cloudinary.com/pipedreamin/image/upload/v1698935114/docs/docs/Project%20Files/CleanShot_2023-11-02_at_10.24.56_2x_ogoh5t.png) - -### Deleting files from the File Store - -You can delete individual files from a File Store by clicking the three dot menu on the far right of the file and selecting *Delete*. - -![Deleting a Project File from the Dashboard](https://res.cloudinary.com/pipedreamin/image/upload/v1698855610/docs/docs/Project%20Files/CleanShot_2023-11-01_at_12.19.20_lb4ddt.png) - -After confirming that you want to delete the file, it will be permanently deleted. - - -File deletion is permanent - -Once a file is deleted, it's not possible to recover it. Please take care when deleting files from File Stores. - - -## Managing File Stores from Workflows - -Files uploaded to a File Store are accessible by workflows within that same project. - -You can access these files programmatically using the `$.files` helper within Node.js code steps. - - - -File Stores are scoped to Projects - -Only workflows within the same project as the File Store can access the files. Workflows outside of the project will not be able to access that project's File Store. - - -### Listing files in the File Store - -The `$.files.dir()` method allows you to list files and directories within the Project's File Store. By default it will list the files at the root directory. - -Here's an example of how to iterate over the files in the root directory and open them as `File` instances: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // list all contents of the root File Stores directory in this project - const dirs = $.files.dir(); - let files = []; - - for await(const dir of dirs) { - // if this is a file, let's open it - if(dir.isFile()) { - files.push(dir.path) - } - } - - return files - }, -}) -``` - -### Opening files - -To interact with a file uploaded to the File Store, you'll first need to open it. - -Given there's a file in the File Store called `example.png`, you can open it using the `$.files.open()` method: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // Open the file by it's path in the File Store - const file = $.files.open('example.png') - // Log the S3 url to access the file publicly - return await file.toUrl() - }, -}) -``` - -Once the file has been opened, you can [read, write, delete the file and more](/workflows/data-management/file-stores/reference/). - -### Uploading files to File Stores - -You can upload files using Node.js code in your workflows, either from URLs, from the `/tmp` directory in your workflows or directly from streams for high memory efficency. - -#### Uploading files from URLs - -`File.fromUrl()` can upload a file from a public URL to the File Store. - -First open a new file at a specific path in the File Store, and then pass a URL to the `fromUrl` method on that new file: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // Upload a file to the File Store by a URL - const file = await $.files.open('pipedream.png').fromUrl('https://res.cloudinary.com/pipedreamin/image/upload/t_logo48x48/v1597038956/docs/HzP2Yhq8_400x400_1_sqhs70.jpg') - - // display the uploaded file's URL from the File Store: - console.log(await file.toUrl()) - }, -}) -``` - -#### Uploading files from the workflow's `/tmp` directory - -`File.fromFile()` can upload a file stored within the workflow's `/tmp` directory to the File Store. - -First open a new file at a specific path in the File Store, and then pass a URL to the `fromFile` method on that new file: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // Upload a file to the File Store from the local /tmp/ directory - const file = await $.files.open('recording.mp3').fromFile('/tmp/recording.mp3') - - // Display the URL to the File Store hosted file - console.log(await file.toUrl()) - }, -}) -``` - -#### Uploading files using streams - -File Stores also support streaming to write large files. `File.createWriteStream()` creates a write stream for the file to upload to. Then you can pair this stream with a download stream from another remote location: - -```javascript -import { pipeline } from 'stream/promises'; -import got from 'got' - -export default defineComponent({ - async run({ steps, $ }) { - const writeStream = await $.files.open('logo.png').createWriteStream() - - const readStream = got.stream('https://pdrm.co/logo') - - await pipeline(readStream, writeStream); - }, -}) -``` - -Additionally, you can pass a `ReadableStream` instance directly to a File instance: - -```javascript -import got from 'got' - -export default defineComponent({ - async run({ steps, $ }) { - // Start a new read stream - const readStream = got.stream('https://pdrm.co/logo') - - // Populate the file's content from the read stream - await $.files.open("logo.png").fromReadableStream(readStream) - }, -}) -``` - - -(Recommended) Pass the contentLength if possible - -If possible, pass a `contentLength` argument, then File Store will be able to efficiently stream to use less memory. Without a `contentLength` argument, the entire file will need to be downloaded to `/tmp/` until it can be uploaded to the File store. - - - -### Downloading files - -File Stores live in cloud storage by default, but files can be downloaded to your workflows individually. - -#### Downloading files to the workflow's `/tmp` directory - -First open a new file at a specific path in the File Store, and then call the `toFile()` method to download the file to the given path: - -```javascript -import fs from 'fs'; - -export default defineComponent({ - async run({ steps, $ }) { - // Download a file from the File Store to the local /tmp/ directory - const file = await $.files.open('recording.mp3').toFile('/tmp/README.md') - - // read the file version of the file stored in /tmp - return (await fs.promises.readFile('/tmp/README.md')).toString() - }, -}) -``` - - -Only the `/tmp/` directory is readable and writable - -Make sure that your path to `toFile(path)` includes - - -### Passing files between steps - -Files can be passed between steps. Pipedream will automatically serialize the file as a JSON _description_ of the file. Then when you access the file as a step export as a prop in a Node.js code step, then you can interact with the `File` instance directly. - -For example, if you have a file stored at the path `logo.png` within your File Store, then within a Node.js code step you can open it: - -```javascript -// "open_file" Node.js code step -export default defineComponent({ - async run({ steps, $ }) { - // Return data to use it in future steps - const file = $.files.open('logo.png') - - return file - }, -}) -``` - -Then in a downstream code step, you can use it via the `steps` path: - -```javascript -// "get_file_url" Node.js code step -export default defineComponent({ - async run({ steps, $ }) { - // steps.open_file.$return_value is automatically parsed back into a File instance: - return await steps.open_file.$return_value.toUrl() - }, -}) -``` - - -Files descriptions are compatible with other workflow helpers - -Files can also be used with `$.flow.suspend()` and `$.flow.delay()`. - - -#### Handling lists of files - -One limitation of the automatic parsing of files between steps is that it currently doesn't automatically handle lists of files between steps. - -For example, if you have a step that returns an array of `File` instances: - -```javascript -// "open_files" Node.js code step -export default defineComponent({ - async run({ steps, $ }) { - // Return data to use it in future steps - const file1 = $.files.open('vue-logo.svg') - const file2 = $.files.open('react-logo.svg') - - return [file1, file] - }, -}) -``` - -Then you'll need to use `$.files.openDescriptor` to parse the JSON definition of the files back into `File` instances: - -```javascript -// "parse_files" Node.js code step -export default defineComponent({ - async run({ steps, $ }) { - const files = steps.open_files.$return_value.map(object => $.files.openDescriptor(object)) - - // log the URL to the first File - console.log(await files[0].toUrl()); - }, -}) -``` - -### Deleting files - -You can call `delete()` on the file to delete it from the File Store. - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // Open the file and delete it - const file = await $.files.open('example.png').delete() - console.log('File deleted.') - }, -}) -``` - - -Deleting files is irreversible - -It's not possible to restore deleted files. Please take care when deleting files. - - -## FAQ - -### Are there size limits for files within File Stores? - -At this time no, but File Stores are in preview and are subject to change. - -### Are helpers available for Python to download, upload and manage files? - -At this time no, only Node.js includes a helper to interact with the File Store programmatically within workflows. - -### Are File Stores generally available? - -At this time File Stores are only available to Advanced plan and above subscribed workspaces. You can change your plan within the [pricing page](https://pipedream.com/pricing). diff --git a/docs-v2/pages/workflows/data-management/file-stores/reference.mdx b/docs-v2/pages/workflows/data-management/file-stores/reference.mdx deleted file mode 100644 index 16791feca680f..0000000000000 --- a/docs-v2/pages/workflows/data-management/file-stores/reference.mdx +++ /dev/null @@ -1,247 +0,0 @@ -import Callout from '@/components/Callout' - -# File Stores Node.js Reference - -The File Stores Node.js helper allows you to manage files within Code Steps and Action components. - - - -## `$.files` - -The `$.files` helper is the main module to interact with the Project's File Store. It can instatiate new files, open files from descriptors and list the contents of the File Store. - -### `$.files.open(path)` - -*Sync.* Opens a file from the relative `path`. If the file doesn't exist, a new empty file is created. - -### `$.files.openDescriptor(fileDescriptor)` - -*Sync.* Creates a new `File` from the JSON friendly description of a file. Useful for recreating a `File` from a step export. - -For example, export a `File` as a step export which will render the `File` as JSON: - -```javascript -// create_file -// Creates a new Project File and uploads an image to it -export default defineComponent({ - async run({ steps, $ }) { - // create the new file and upload the contents to it from a URL - const file = await $.files.open("imgur.png").fromUrl("https://i.imgur.com/TVIPgNq.png") - // return the file as a step export - return file - }, -} -``` - -Then in a downstream step recreate the `File` instance from the step export friendly _description_: - -```javascript -// download_file -// Opens a file downloaded from a previous step, and saves it. -export default defineComponent({ - async run({ steps, $ }) { - // Convert the the description of the file back into a File instance - const file = $.files.openDescriptor(steps.create_file.$return_value) - // Download the file to the local /tmp directory - await $.file.download('/tmp/example.png') - console.log("File downloaded to /tmp") - }, -}) - -``` - -### `$.files.dir(?path)` - -*Sync.* Lists the files & directories at the given `path`. By default it will list the files at the root directory. - -Here's an example of how to iterate over the files in the root directory and open them as `File` instances: - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // list all contents of the root File Stores directory in this project - const dirs = $.files.dir(); - let files = []; - - for await(const dir of dirs) { - // if this is a file, let's open it - if(dir.isFile()) { - files.push(await $.files.open(dir.path)) - } - } - - return files - }, -}) -``` - -Each iteratee of `$.files.dir()` will contain the following properties: - -* `isDirectory()` - `true` if this instance is a directory. -* `isFile()` - `true` if this instance is a file. -* `path` - The path to the file. -* `size` - The size of the file in bytes. -* `modifiedAt` - The last modified at timestamp. - -## `File` - -This class describes an instance of a single file within a File Store. - -When using `$.files.open` or `$.files.openDescriptor`, you'll create a new instance of a `File` with helper methods that give you more flexibility to perform programatic actions with the file. - -### `File.toUrl()` - -*Async.* The pre-signed GET URL to retrieve the file. - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // Retrieve the pre-signed GET URL for logo.png - const url = await $.files.open('logo.png').toUrl() - - return url - }, -}) - -``` - - -Pre-signed GET URLs are short lived. - -The `File.toUrl()` will expire after 30 minutes. - - -### `File.toFile(path)` - -*Async.* Downloads the file to the local path in the current workflow. If the file doesn't exist, a new one will be created at the path specified. - - -Only `/tmp` is writable in workflow environments - -Only the `/tmp` directory is writable in your workflow's exection environment. So you must download your file to the `/tmp` directory. - - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // Download the file in the File Store to the workflow's /tmp/ directory - await $.files.open('logo.png').toFile("/tmp/logo.png") - }, -}) - -``` - -### `File.toBuffer()` - -*Async.* Downloads the file as a Buffer to create readable or writeable streams. - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // opens a file at the path "hello.txt" and downloads it as a Buffer - const buffer = await $.files.open('hello.txt').toBuffer() - // Logs the contents of the Buffer as a string - console.log(buffer.toString()) - }, -}) -``` - -### `File.fromFile(localFilePath, ?contentType)` - -*Async.* Uploads a file from the file at the `/tmp` local path. For example, if `localFilePath` is given `/tmp/recording.mp3`, it will upload that file to the current File Store File instance. - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // Upload a file to the File Store from the local /tmp/ directory - const file = await $.files.open('recording.mp3').fromFile('/tmp/recording.mp3') - - console.log(file.url) - }, -}) -``` - -### `File.fromUrl(url)` - -*Async.* Accepts a `url` to read from. - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // Upload a file to the File Store by a URL - const file = await $.files.open('pipedream.png').fromUrl('https://res.cloudinary.com/pipedreamin/image/upload/t_logo48x48/v1597038956/docs/HzP2Yhq8_400x400_1_sqhs70.jpg') - - console.log(file.url) - }, -}) -``` - -### `File.createWriteStream(?contentType, ?contentLength)` - -*Async.* Creates a write stream to populate the file with. - - -Pass the content length if possible - -The `contentLength` argument is optional, however we do recommend passing it. Otherwise the entire file will need to be written to the local `/tmp` before it can be uploaded to the File store. - - -```javascript -import { pipeline } from 'stream/promises'; -import got from 'got' - -export default defineComponent({ - async run({ steps, $ }) { - const writeStream = await $.files.open('logo.png').createWriteStream("image/png", 2153) - - const readStream = got.stream('https://pdrm.co/logo') - - await pipeline(readStream, writeStream); - }, -}) -``` - -### `File.fromReadableStream(?contentType, ?contentLength)` - -*Async.* Populates a file's contents from the `ReadableStream`. - - -Pass the content length if possible - -The `contentLength` argument is optional, however we do recommend passing it. Otherwise the entire file will need to be written to the local `/tmp` before it can be uploaded to the File store. - - -```javascript -import got from 'got' - -export default defineComponent({ - async run({ steps, $ }) { - // Start a new read stream - const readStream = got.stream('https://pdrm.co/logo') - - // Populate the file's content from the read stream - await $.files.open("logo.png").fromReadableStream(readStream, "image/png", 2153) - }, -}) -``` - -### `File.delete()` - -*Async.* Deletes the Project File. - -```javascript -export default defineComponent({ - async run({ steps, $ }) { - // Open the Project File and delete it - const file = await $.files.open('example.png').delete() - - console.log('File deleted.') - }, -}) -``` - - -Deleting files is irreversible - -It's not possible to restore deleted files. Please take care when deleting files. - diff --git a/docs-v2/pages/workflows/domains.mdx b/docs-v2/pages/workflows/domains.mdx deleted file mode 100644 index 8d0da7c81cd7d..0000000000000 --- a/docs-v2/pages/workflows/domains.mdx +++ /dev/null @@ -1,100 +0,0 @@ -# Custom Domains - -By default, all new [Pipedream HTTP endpoints](/workflows/building-workflows/triggers/#http) are hosted on the **{process.env.ENDPOINT_BASE_URL}** domain. But you can configure any domain you want: instead of `https://endpoint.m.pipedream.net`, the endpoint would be available on `https://endpoint.example.com`. - -## Configuring a new custom domain - -### 1. Choose your domain - -You can configure any domain you own to work with Pipedream HTTP endpoints. For example, you can host Pipedream HTTP endpoints on a dedicated subdomain on your core domain, like `*.eng.example.com` or `*.marketing.example.com`. This can be any domain or subdomain you own. - -In this example, endpoints would look like: - -``` -[endpoint_id].eng.example.com -[endpoint_id_1].eng.example.com -... -``` - -where `[endpoint_id]` is a uniquely-generated hostname specific to your Pipedream HTTP endpoint. - -If you own a domain that you want to _completely_ redirect to Pipedream, you can also configure `*.example.com` to point to Pipedream. In this example, endpoints would look like: - -``` -[endpoint_id].example.com -[endpoint_id_1].example.com -... -``` - -Since all traffic on `*.example.com` points to Pipedream, we can assign hosts on the root domain. This also means that **you cannot use other hosts like www.example.com** without conflicting with Pipedream endpoints. Choose this option only if you're serving all traffic from `example.com` from Pipedream. - -Before you move on, make sure you have access to manage DNS records for your domain. If you don't, please coordinate with the team at your company that manages DNS records, and feel free to [reach out to our Support team](https://pipedream.com/support) with any questions. - -#### A note on domain wildcards - -Note that the records referenced above use the wildcard (`*`) for the host portion of the domain. When you configure DNS records in [step 3](#3-add-your-dns-records), this allows you to point all traffic for a specific domain to Pipedream and create any number of Pipedream HTTP endpoints that will work with your domain. - -### 2. Reach out to Pipedream Support - -Once you've chosen your domain and are in an [eligible plan](https://pipedream.com/pricing), [reach out to Pipedream Support](https://pipedream.com/support) and let us know what domain you'd like to configure for your workspace. We'll configure a TLS/SSL certificate for that domain, and give you two DNS CNAME records to add for that domain in [step 3](#3-add-your-dns-records). - -### 3. Add your DNS records - -Once we configure your domain, we'll ask you to create two DNS CNAME records: - -- [One record to prove ownership of your domain](#add-the-cname-validation-record) (a `CNAME` record) -- [Another record to point traffic on your domain to Pipedream](#add-the-dns-cname-wildcard-record) (a `CNAME` record) - -#### Add the CNAME validation record - -Pipedream uses [AWS Certificate Manager](https://aws.amazon.com/certificate-manager/) to create the TLS certificate for your domain. To validate the certificate, you need to add a specific DNS record provided by Certificate Manager. Pipedream will provide the name and value. - -For example, if you requested `*.eng.example.com` as your custom domain, Pipedream will provide the details of the record, like in this example: - -- **Type**: `CNAME` -- **Name**: `_2kf9s72kjfskjflsdf989234nsd0b.eng.example.com` -- **Value**: `_7ghslkjsdfnc82374kshflasfhlf.vvykbvdtpk.acm-validations.aws.` -- **TTL (seconds)**: 300 - -Consult the docs for your DNS service for more information on adding CNAME records. Here's an example configuration using AWS's Route53 service: - -
- -
- -#### Add the DNS CNAME wildcard record - -Now you'll need to add the wildcard record that points all traffic for your domain to Pipedream. Pipedream will also provide the details of this record, like in this example: - -- **Type**: `CNAME` -- **Name**: `*.eng.example.com` -- **Value**: `id123.cd.pdrm.net.` -- **TTL (seconds)**: 300 - -Once you've finished adding these DNS records, please **reach out to the Pipedream team**. We'll validate the records and finalize the configuration for your domain. - -### 4. Send a test request to your custom domain - -Any traffic to existing **{process.env.ENDPOINT_BASE_URL}** endpoints will continue to work uninterrupted. - -To confirm traffic to your new domain works, take any Pipedream endpoint URL and replace the **{process.env.ENDPOINT_BASE_URL}** with your custom domain. For example, if you configured a custom domain of `pipedream.example.com` and have an existing endpoint at - -``` -https://[endpoint_id].m.pipedream.net -``` - -Try making a test request to - -``` -https://[endpoint_id].eng.example.com -``` - -## Security - -### How Pipedream manages the TLS/SSL certificate - -See our [TLS/SSL security docs](/privacy-and-security/#encryption-of-data-in-transit-tls-ssl-certificates) for more detail on how we create and manage the certificates for custom domains. - -### Requests to custom domains are allowed only for your endpoints - -Custom domains are mapped directly to customer endpoints. This means no other customer can send requests to their endpoints on _your_ custom domain. Requests to `example.com` are restricted specifically to HTTP endpoints in your Pipedream workspace. diff --git a/docs-v2/pages/workflows/environment-variables.mdx b/docs-v2/pages/workflows/environment-variables.mdx deleted file mode 100644 index 56e0cca3e136b..0000000000000 --- a/docs-v2/pages/workflows/environment-variables.mdx +++ /dev/null @@ -1,136 +0,0 @@ -import Callout from "@/components/Callout"; - -# Environment Variables - -Environment variables (env vars) enable you to separate secrets and other static configuration data from your code. - -You shouldn't include API keys or other sensitive data directly in your workflow's code. By referencing the value of an environment variable instead, your workflow includes a reference to that variable โ€” for example, `process.env.API_KEY` instead of the API key itself. - -You can reference env vars and secrets in [workflow code](/workflows/building-workflows/code/) or in the object explorer when passing data to steps, and you can define them either globally for the entire workspace, or scope them to individual projects. - -| Scope | Description | -| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Workspace** | All environment variables are available to all workflows within the workspace. All workspace members can manage workspace-wide variables [in the UI](https://pipedream.com/settings/env-vars). | -| **Project** | Environment variables defined within a project are only accessible to the workflows within that project. Only workspace members who have [access to the project](/projects/access-controls) can manage project variables. | - -## Creating and updating environment variables - -- To manage **global** environment variables for the workspace, navigate to **Settings**, then click **Environment Variables**: [https://pipedream.com/settings/env-vars](https://pipedream.com/settings/env-vars) -- To manage environment variables within a project, open the project, then click **Variables** from the project nav on the left - -Project Variables - -Click **New Variable** to add a new environment variable or secret: - -Add new variable - -**Configure the required fields**: - -Configure new variable - -| Input field | Description | -| :-------------- | :--------------------------------------------------------------------------------------------------------------------------- | -| **Key** | Name of the variable โ€” for example, `CLIENT_ID` | -| **Value** | The value, which can contain any string with a max limit of 64KB | -| **Description** | Optionally add a description of the variable. This is only visible in the UI, and is not accessible within a workflow. | -| **Secret** | New variables default to **secret**. If configured as a secret, the value is never exposed in the UI and cannot be modified. | - -To edit an environment variable, click the **Edit** button from the three dots to the right of a specific variable. - -Edit variable - -- Updates to environment variables will be made available to your workflows as soon as the save operation is complete โ€” typically a few seconds after you click **Save**. -- If you update the value of an environment variable in the UI, your workflow should automatically use that new value where it's referenced. -- If you delete a variable in the UI, any deployed workflows that reference it will return `undefined`. - -## Referencing environment variables in code - -You can reference the value of any environment variable using the object [`process.env`](https://nodejs.org/dist/latest-v10.x/docs/api/process.html#process_process_env). This object contains environment variables as key-value pairs. - -For example, let's say you have an environment variable named `API_KEY`. You can reference its value in Node.js using `process.env.API_KEY`: - -```javascript -const url = `http://yourapi.com/endpoint/?api_key=${process.env.API_KEY}`; -``` - -Reference the same environment variable in Python: - -```python -import os -print(os.environ["API_KEY"]) -``` - -Variable names are case-sensitive. Use the key name you defined when referencing your variable in `process.env`. - -Referencing an environment variable that doesn't exist returns the value `undefined` in Node.js. For example, if you try to reference `process.env.API_KEY` without first defining the `API_KEY` environment variable in the UI, it will return the value `undefined`. - -### Using autocomplete to reference env vars - -When referencing env vars directly in code within your Pipedream workflow, you can also take advantage of autocomplete: - -Autocomplete env variable - - - Logging the value of any environment variables โ€” for example, using - `console.log` โ€” will include that value in the logs associated with the cell. - Please keep this in mind and take care not to print the values of sensitive - secrets. - - - - `process.env` will always return `undefined` when used outside of the - `defineComponent` export. - - -## Referencing environment variables in actions - -[Actions](/components/contributing/#actions) are pre-built code steps that let you provide input in a form, selecting the correct params to send to the action. - -You can reference the value of environment variables using `{{process.env.YOUR_ENV_VAR}}`. You'll see a list of your environment variables in the object explorer when selecting a variable to pass to a step. - -Env Vars in object explorer - - - [Private components](/components/contributing/#using-components) (actions or triggers) do not have direct access to workspace or project variables as public components or code steps. Add a prop specifically for the variable you need. For sensitive data like API keys, [configure the prop as a secret](/components/contributing/api/#props). In your prop configuration, set the value to `{{process.env.YOUR_ENV_VAR}}` to securely reference the environment variable. - - -## FAQ - -### What if I define the same variable key in my workspace env vars and project env vars? - -The project-scoped variable will take priority if the same variable key exists at both the workspace and project level. If a workflow _outside_ of the relevant project references that variable, it'll use the value of the environment variable defined for the workspace. - -### What happens if I share a workflow that references an environment variable? - -If you [share a workflow](/workflows/building-workflows/sharing/) that references an environment variable, **only the reference is included, and not the actual value**. - -## Limits - -- Currently, environment variables are only exposed in Pipedream workflows, [not event sources](https://github.com/PipedreamHQ/pipedream/issues/583). -- The value of any environment variable may be no longer than `64KB`. -- The names of environment variables must start with a letter or underscore. -- Pipedream reserves environment variables that start with `PIPEDREAM_` for internal use. You cannot create an environment variable that begins with that prefix. diff --git a/docs-v2/pages/workflows/event-history.mdx b/docs-v2/pages/workflows/event-history.mdx deleted file mode 100644 index e94728358d447..0000000000000 --- a/docs-v2/pages/workflows/event-history.mdx +++ /dev/null @@ -1,101 +0,0 @@ -import Callout from '@/components/Callout' -import Image from 'next/image' -import ArcadeEmbed from '@/components/ArcadeEmbed' - -# Event History - -Monitor all workflow events and their stack traces in one centralized view under the [**Event History**](https://pipedream.com/event-history) section in the dashboard. - -Within the **Event History**, you'll be able to filter your events by workflow, execution status, within a specific time range. - - -Workspace admins are able to view events for all workflows, but members are required to select a workflow since they might not have [access to certain projects](/projects/access-controls/#permissions). - - -## Filtering Events - -The filters at the top of the screen allow you to search all events processed by your workflows. - -You can filter by the event's **Status**, **time of initiation** or by the **Workflow name**. - - -The filters are scoped to the current [workspace](/workspaces/). If you're not seeing the events or workflow you're expecting, try [switching workspaces](/workspaces/#switching-between-workspaces). - - -### Filtering by status - -- The **Status** filter controls which events are shown by their status -- For example selecting the **Success** status, you'll see all workflow events that were successfully executed - -
- -Only showing workflow events by current execution status - -#### All failed workflow executions - -- You can view all failed workflow executions by applying the **Error** status filter -- This will only display the failed workflow executions in the selected time period -- This view in particular is helpful for identifying trends of errors, or workflows with persistent problems - -Viewing all failed workflow executions by the filter in the Event History - -#### All paused workflow executions - -- Workflow executions that are currently in a suspended state from `$.flow.delay` or `$.flow.suspend` will be shown when this filter is selected - -Only showing workflows that are currently paused - - -If you're using `setTimeout` or `sleep` in Node.js or Python steps, the event will not be considered **Paused**. Using those language native execution holding controls leaves your workflow in a **Executing** state. - - -### Within a timeframe - -- Filtering by time frame will include workflow events that _began_ execution within the defined range -- Using this dropdown, you can select between convenient time ranges, or specify a custom range on the right side - -How to filter events by a timerange - -### Filtering by workflow - -You can also filter events by a specific workflow. You can search by the workflow's name in the search bar in the top right. - -![Search by workflow name in the search bar](https://res.cloudinary.com/pipedreamin/image/upload/v1683747588/docs/docs/event%20histories/CleanShot_2023-05-10_at_15.39.30_2x_yoa1k6.png) - -Alternatively, you can filter by workflow from a specific event. First, open the menu on the far right, then select **Filter By Workflow**. Then only events processed by that workflow will appear. - -![Filtering events by workflow by selecting the workflow on the right](https://res.cloudinary.com/pipedreamin/image/upload/v1683747695/docs/docs/event%20histories/CleanShot_2023-05-10_at_15.41.20_2x_ulvdns.png) - -## Inspecting events - -- Clicking on an individual event will open a panel that displays the steps executed, their individual configurations, as well as the overall performance and results of the entire workflow. -- The top of the event history details will display details including the overall status of that particular event execution and errors if any. -- If there is an error message, the link at the bottom of the error message will link to the corresponding workflow step that threw the error. -- From here you can easily **Build from event** or **Replay event** - -![Viewing individual event executions](https://res.cloudinary.com/pipedreamin/image/upload/v1683748495/docs/docs/event%20histories/CleanShot_2023-05-10_at_15.53.44_2x_t30gsb.png) - -## Bulk actions -You can select multiple events and perform bulk actions on them. - -- **Replay**: Replays the selected events. This is useful for example when you have multiple errored events that you want to execute again after fixing a bug in your workflow. -- **Delete**: Deletes the selected events. This may be useful if you have certain events you want to scrub from the event history, or when you've successfully replayed events that had originally errored. - - - - - -When you replay multiple events at once, they'll be replayed in the order they were originally executed. This means the first event that came in will be replayed first, followed by the second, and so on. - - -## Limits - -The number of events recorded and available for viewing in the Event History depends on your plan. [Please see the pricing page](https://pipedream.com/pricing) for more details. - -## FAQ - -### Is Event History available on all plans? - -Yes, event history is available for all workspace plans, including free plans. However, the length of searchable or viewable history changes depending on your plan. [Please see the pricing page](https://pipedream.com/pricing) for more details. diff --git a/docs-v2/pages/workflows/git.mdx b/docs-v2/pages/workflows/git.mdx deleted file mode 100644 index eb4c7730d04ac..0000000000000 --- a/docs-v2/pages/workflows/git.mdx +++ /dev/null @@ -1,306 +0,0 @@ -import Callout from '@/components/Callout' -import PipedreamCode from "@/components/PipedreamCode"; - -# GitHub Sync - -When GitHub Syncing is enabled on your project, Pipedream will serialize your workflows and synchronize changes to a GitHub repo. - -Capabilities include: - -- Bi-directional GitHub sync (push and pull changes) -- Edit in development branches -- Track commit and merge history -- Link users to commits -- Merge from Pipedream or create PRs and merge from GitHub -- Edit in Pipedream or use a local editor and synchronize via GitHub (e.g., edit code, find and replace across multiple steps or workflows) -- Organize workflows into projects with support for nested folders - -## Getting Started - -### Create a new project and enable GitHub Sync - -A project may contain one or more workflows and may be further organized using nested folders. Each project may be synchronized to a single GitHub repo. - -- Go to `https://pipedream.com/projects` -- Create a new project -- Enter a project name and check the box to **Configure GitHub Sync** - - To use **OAuth** - - Select a connected account, GitHub scope and repo name - - Pipedream will automatically create a new, empty repo in GitHub - - ![Enabling GitHub on a Pipedream project](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F6b546c6b-2f90-4ec4-9188-320c01576259%2FUntitled.png?id=5db64a5f-e762-431e-bfb7-cdd495ad458c&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=860&userId=&cache=v2) - - To use **Deploy Keys** - - Create a new repo in GitHub - - Follow the instructions to configure the deploy key - - Test your setup and create a new project - - ![Enabling GitHub sync with a Deploy Key](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F6be64329-bb8b-43eb-a278-a11ad93113c0%2FUntitled.png?id=37f9afd8-ba14-431b-bd40-1846421440b6&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=860&userId=&cache=v2) - -### Create a branch to edit a project - - -Branches are required to make changes - -All changes to resources in a project must be made in a development branch. - -Examples of changes include creating, editing, deleting, enabling, disabling and renaming workflows. This also includes changing workflow settings like concurrency, VPC assignment and auto-retries. - - -To edit a git-backed project you must create a development branch by clicking **Edit > Create Branch** - -![Creating a new git backed development branch in a workflow](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fcf1e386b-7674-4843-8709-f1d5eef8ef00%2FUntitled.png?id=3af32b86-6ca2-4051-98cc-de31940eb609&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=2000&userId=&cache=v2) - -Next, name the branch and click **Create**: - -![Enter your desired branch name, and click create to create the branch](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F5d404d86-3f35-4db8-a2e8-e8d7bdb3e2c0%2FUntitled.png?id=33ebf62f-cde3-43fb-a76b-5c869338226f&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=2000&userId=&cache=v2) - -To exit development mode without merging to production, click **Exit Development Mode**: - -![Exiting the branch without committing the changes](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F7e72331c-54b8-453a-ae47-36f4b2355fac%2FUntitled.png?id=a55ea908-d904-4218-bfd3-72e568fee6ea&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=2000&userId=&cache=v2) - -Your changes will be saved to the branch, if you choose to revisit them later. - -### Merge changes to production - -Once you've committed your changes, you can deploy your changes by merging them into the `production` branch through the Pipedream UI or GitHub. - -When you merge a Git-backed project to production, all modified resources in the project will be deployed. Multiple workflows may be deployed, modified, or deleted in production through a single merge action. - -#### Merge via the Pipedream UI - -To merge changes to production, click on **Merge to production:** - -![Click on the Merge to production button in the top right of the UI to merge the changes](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F7ffe8211-90de-4512-824a-f3cc1b5a9382%2FUntitled.png?id=0043c13f-ade3-4e0e-b9ae-a98b9f293885&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=2000&userId=&cache=v2) - -Pipedream will present a diff between the development branch and the `production`. Validate your changes and click **Merge to production** to complete the merge: - -![In the confirmation modal, click Merge to production to confirm the changes](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fac27c067-f948-424c-9d6e-6360a759730c%2FUntitled.png?id=19f8d51c-82fb-47d6-a183-b84e2173b72d&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=2000&userId=&cache=v2) - -#### Create a Pull Request in GitHub - -To create a pull request in GitHub, either choose Open GitHub pull request from the git-actions menu in Pipedream or in GitHub: - -Opening a PR request in Pipedream - -You can also review and merge changes directly from GitHub using the standard pull request process. - - -Pull request reviews cannot be required - -PR reviews cannot be required. That feature is on the roadmap for the Business tier. - - -### Commit changes - -To commit changes without merging to production, select **Commit Changes** from the Git Actions menu: - -![Select commit changes from the dropdown menu to make a commit](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F2523c3fb-d832-4e99-b5cc-5c3b7275c9fe%2FUntitled.png?id=9f871c2d-12f4-4484-a76f-b0d83c4d8ee9&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=2000&userId=&cache=v2) - -You can review the diff and enter a commit message: - -![Preview your changes and approve them with a commit message](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F01f0b4f8-36d6-43a8-8568-99183a7a1d4c%2FUntitled.png?id=77f5b85a-c14d-47aa-8cbe-2e3d5ea64786&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=2000&userId=&cache=v2) - -### Pull changes and resolve conflicts - -If remote changes are detected, you'll be prompted to pull the changes: - -![Click the Pull `` to pull in the latest changes to your current branch](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fac13c163-7816-4e67-bb4a-ccbfb97471c4%2FUntitled.png?id=434ad559-bf3c-4e9c-96a3-c784122793a9&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=2000&userId=&cache=v2) - -Pipedream will attempt to automatically merge changes. If there are conflicts, you will be prompted to manually resolve it: - -![Example of a commit that requires manual resolution to continue with the commit](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F7849edd0-ee5f-47e9-9a23-b245435faf2b%2FUntitled.png?id=35308854-6572-4575-8fef-6531986fdb7f&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=2000&userId=&cache=v2) - -### Move existing workflows to projects - - -Not available for v1 workflows - -Legacy (v1) workflows are not supported in projects. - - -First, select the workflow(s) you want to move from the [workflows listing page](https://pipedream.com/workflows) and click **Move** in the top action menu: - -![Select your workflows you'd like to transfer to a project, then click the Move button in the top right](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F70c4da87-2aa3-435d-9226-c29fcc1cd881%2FUntitled.png?id=10fbba0c-2a92-49da-b7f1-22b1b46fb96c&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=2000&userId=&cache=v2) - -Then, select the project to move the selected workflows to: - -![Select which project to move the selected workflows into in the dropdown in the top right of the screen](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F5fcb3357-9957-4307-aac9-e28ed59f85b0%2FUntitled.png?id=7fca27aa-28ec-4bcc-940d-9b66d1d692be&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=2000&userId=&cache=v2) - - -Undeployed changes are automatically assigned a development branch - -If any moved workflows have undeployed changes, those changes will staged in a branch prefixed with `undeployed-changes` (e.g., `undeployed-changes-27361`). - - -### Use the changelog - -The changelog tracks all git activity (for projects with GitHub sync enabled). If you encounter an error merging your project, go to the changelog and explore the log details to help you troubleshoot issues in your workflows: - -![Opening the changelog of commits on the left hand menu](https://pipedream.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fe7043a8c-597c-4722-86f6-464f582faf6f%2FUntitled.png?id=6e2f00f1-c768-4d13-9800-d6361afbe26d&table=block&spaceId=6e16aa4c-a31f-4db8-a947-0d80bcdcf984&width=2000&userId=&cache=v2) - -### Local development - -Projects that use GitHub sync may be edited outside of Pipedream. You can edit and commit directly via GitHubโ€™s UI or clone the repo locally and use your preferred editor (e.g., VSCode). - -To test external edits in Pipedream: - -1. Commit and push local changes to your development branch in GitHub -2. Open the project in Pipedream's UI and load your development branch -3. Use the Git Actions menu to pull changes from GitHub - -## Known Issues - -Below are a list of known issues that do not currently have solutions, but are in progress: - -- Project branches on Pipedream cannot be deleted. -- If a workflow uses an action that has been deprecated, merging to production will fail. -- Legacy (v1) workflows are not supported in projects. -- Self-hosted GitHub Server instances are not yet supported. [Please contact us for help](https://pipedream.com/support). -- Workflow attachments are not supported - -## GitHub Enterprise Cloud - -If your repository is hosted on an GitHub Enterprise account, you can allow Pipedream's address range to sync your project changes. - -[Follow the directions here](https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization) and add the following IP range: - -
-  {process.env.PD_EGRESS_IP_RANGE}
-
- - -GitHub Sync is available on Business plan - -To use this public IP address and connect to GitHub Enterprise Cloud hosted repositories, you'll need to have a Pipedream Business plan. [View our plans](https://pipedream.com/pricing). - - -## FAQ - -### How are Pipedream workflows synchronized to GitHub? - -Pipedream will serialize your project's workflows and their configuration into a standard YAML format for storage in GitHub. - -Then Pipedream will commit your changes to your connected GitHub account. - -### Do you have a definition of this YAML? - -Not yet, please stay tuned! - -### Can I sync multiple workflows to a single GitHub Repository? - -Yes, _projects_ are synced to a single GitHub Repository which allows you to store multiple workflows into a single GitHub Repository for easier organization and management. - -### Can I use this feature to develop workflows locally? - -Yes, you can use the GitHub Syncing feature to develop your workflows from YAML files checked into your Pipedream connected GitHub Repository. - -Then pushing changes to the `production` branch will trigger a deploy for your Pipedream workflows. - -### Why am I seeing the error "could not resolve step[index].uses: component-key@version" when merging to production? -This error occurs when a workflow references a [private component](/components/contributing/#using-private-actions) without properly prefixing the component key with your workspace name in the `workflow.yaml` configuration file. Pipedream requires this prefix to correctly identify and resolve components specific to your workspace. - -For example, if you modified a [registry action](/components/contributing/) and published it privately, the correct component key should be formatted as `@workspacename/component-key@version` (e.g., `@pipedream/github-update-issue@0.1.0`). - -To resolve this error: - -1. Clone your repository locally and create a development branch. -2. Locate the error in your `workflow.yaml` file where the component key is specified. -3. Add your workspace name prefix to the component key, ensuring it follows the format `@workspacename/component-key@version`. -4. Commit your changes and push them to your repository. -5. Open your project in the Pipedream UI and select your development branch. -6. Click on **Merge to Production** and verify the deployment success in the [Changelog](/workflows/git/#use-the-changelog). -7. If the issue persists, [reach out to Pipedream Support](https://pipedream.com/support) for further assistance. - -### Why am I seeing an error about "private auth mismatch" when trying to merge a branch to production? -![Private Auth Mismatch](https://res.cloudinary.com/pipedreamin/image/upload/v1704258143/private_auth_mismatch_kzdd7e.png) - -This error occurs when **both** of the below conditions are met: -1. The referenced workflow is using a connected account that's not shared with the entire workspace -2. The change was merged from outside the Pipedream UI (via github.com or locally) - -Since Pipedream can't verify the person who merged that change should have access to use the connected account in a workflow in this case, we block these deploys. - -To resolve this error: -1. Make sure all the connected accounts in the project's workflows are [accessible to the entire workspace](/apps/connected-accounts/#access-control) -2. Re-trigger a sync with Pipedream by making a nominal change to the workflow **from outside the Pipedream UI** (via github.com or locally), then merge that change to production - -### Can I sync an existing GitHub Repository with workflows to a new Pipedream Project? - -No, at this time it's not possible because of how resources are connected during the bootstrapping process from the workflow YAML specification. -However, this is on our roadmap, [please subscribe to this issue](https://github.com/PipedreamHQ/pipedream/issues/9255) for the latest details. - -### Migrating Github Repositories - -You can migrate Pipedream project's Github repository to a new repository, while preserving history. You may want to do this when migrating a repository from a personal Github account to an organization account, without affecting the workflows within the Pipedream project. - -#### Assumptions -- **Current GitHub Repository**: `previous_github_repo` -- **New GitHub Repository**: `new_github_repo` -- Basic familiarity with git and GitHub -- Access to a local terminal (e.g., Bash, Zsh, PowerShell) -- Necessary permissions to modify both the Pipedream project and associated GitHub repositories - -#### Steps - -1. **Access Project Settings in Pipedream:** - - Navigate to your Pipedream project. - - Use the dropdown menu on the "Edit" button in the top right corner to access `previous_github_repo` in GitHub. - - ![Accessing GitHub repository](https://res.cloudinary.com/pipedreamin/image/upload/v1714749205/Screenshot_2024-05-03_at_12.12.36_PM_sxkrng.png) - -2. **Clone the Current Repository Locally:** - ``` - git clone previous_github_repo_clone_url - ``` -3. Reset GitHub Sync in Pipedream: - - In Pipedream, go to your project settings. - - Click on "Reset GitHub Connection". - - ![Resetting GitHub connection](https://res.cloudinary.com/pipedreamin/image/upload/v1714749323/Screenshot_2024-05-03_at_12.15.03_PM_icdppb.png) - -4. Set Up New repository connection: - - Configure the project's GitHub repository to use `new_github_repo`. -5. Clone the new repository locally: - ``` - git clone new_github_repo_clone_url - cd new_github_repo - ``` -6. Link to the old repository: - ``` - git remote add old_github_repo previous_github_repo_clone_url - git fetch --all - ``` -7. Prepare for migration: - - Create and switch to a new branch for migration: - ``` - git checkout -b migration - ``` - - Merge the main branch of `old_github_repo` into migration, allowing for unrelated histories: - ``` - git merge --allow-unrelated-histories old_github_repo/production - # Resolve any conflicts, such as in README.md - git commit - ``` -8. Finalize the migration: - - Optionally push the `migration` branch to the remote: - ``` - git push --set-upstream origin migration - ``` - - Switch to the `production` branch and merge: - ``` - git checkout production - git merge --no-ff migration - git push - ``` -9. Cleanup: - - Remove the connection to the old repository: - ``` - git remote remove old_github_repo - ``` - - Optionally, you may now safely delete `previous_github_repo` from GitHub. - -### How does the `production` branch work? - -Anything merged to the `production` branch will be deployed to your production workflows on Pipedream. - -From a design perspective, we want to let you manage any branching strategy on your end, since you may be making commits to the repo outside of Pipedream. Once we support managing Pipedream workflows in a monorepo, where you may have other changes, we wanted to use a branch that didn't conflict with a conventional main branch (like `main` or `master`). - -In the future, we also plan to support you changing the default branch name. diff --git a/docs-v2/pages/workflows/index.mdx b/docs-v2/pages/workflows/index.mdx deleted file mode 100644 index 1b40f01bf98ad..0000000000000 --- a/docs-v2/pages/workflows/index.mdx +++ /dev/null @@ -1,101 +0,0 @@ -import VideoPlayer from '@/components/VideoPlayer'; -import Callout from '@/components/Callout' - -# What are workflows? - - - -Workflows make it easy to integrate your apps, data, and APIs - all with no servers or infrastructure to manage. They're sequences of [steps](/workflows/#steps) [triggered by an event](/workflows/building-workflows/triggers/), like an HTTP request, or new rows in a Google sheet. - -You can use [pre-built actions](/workflows/building-workflows/actions/) or custom [Node.js](/workflows/building-workflows/code/nodejs/), [Python](/workflows/building-workflows/code/python/), [Golang](/workflows/building-workflows/code/go/), or [Bash](/workflows/building-workflows/code/bash/) code in workflows and connect to any of our {process.env.PUBLIC_APPS} integrated apps. - -Read [our quickstart](/quickstart/) or watch our videos on [Pipedream University](https://pipedream.com/university) to learn more. - -## Steps - -Steps are the building blocks you use to create workflows. - -- Use [triggers](/workflows/building-workflows/triggers/), [code](/workflows/building-workflows/code/), and [pre-built actions](/components/contributing/#actions) -- Steps are run linearly, in the order they appear in your workflow -- You can pass data between steps using [the `steps` object](#step-exports) -- Observe the logs, errors, timing, and other execution details for every step - -### Triggers - -Every workflow begins with a [trigger](/workflows/building-workflows/triggers/) step. Trigger steps initiate the execution of a workflow; i.e., workflows execute on each trigger event. For example, you can create an [HTTP trigger](/workflows/building-workflows/triggers/#http) to accept HTTP requests. We give you a unique URL where you can send HTTP requests, and your workflow is executed on each request. - -You can add [multiple triggers](/workflows/building-workflows/triggers/#can-i-add-multiple-triggers-to-a-workflow) to a workflow, allowing you to run it on distinct events. - -### Code, Actions - -[Actions](/components/contributing/#actions) and [code](/workflows/building-workflows/code/) steps drive the logic of your workflow. Anytime your workflow runs, Pipedream executes each step of your workflow in order. Actions are prebuilt code steps that let you connect to hundreds of APIs without writing code. When you need more control than the default actions provide, code steps let you write any custom Node.js code. - -Code and action steps cannot precede triggers, since they'll have no data to operate on. - -Once you save a workflow, we deploy it to our servers. Each event triggers the workflow code, whether you have the workflow open in your browser, or not. - -## Step Names - -Steps have names, which appear at the top of the step: - -![The name of the step is on the top of the step](/images/workflows/steps/step-name.png) - -When you [share data between steps](#step-exports), you'll use this name to reference that shared data. For example, `steps.trigger.event` contains the event that triggered your workflow. If you exported a property called `myData` from this code step, you'd reference that in other steps using `steps.code.myData`. See the docs on [step exports](#step-exports) to learn more. - -You can rename a step by clicking on its name and typing a new one in its place: - -![Renaming a code step to "get_data"](https://res.cloudinary.com/pipedreamin/image/upload/v1647959120/docs/components/CleanShot_2022-03-22_at_10.24.32_zfxrwd.gif) - -After changing a step name, you'll need to update any references to the old step. In this example, you'd now reference this step as `steps.get_data`. - - -Step names cannot contain spaces or dashes. Please use underscores or camel casing for your step names, like `getData` or `get_data`. - - -## Passing data to steps from the workflow builder - -You can generate form based inputs for steps using `props`. This allows the step reuse in across many workflows with different provided arguments - all without changing code. - -Learn more about using `props` in our [Node.js code step documentation.](/workflows/building-workflows/code/nodejs/#passing-props-to-code-steps) - - -Passing props from the workflow builder to workflow steps are only available in Node.js code steps. - -We do not currently offer this feature for Python, Bash or Go powered code steps. - - -## Step Exports - -Step exports allow you to pass data between steps. Any data exported from a step must be JSON serializable; the data must be able to stored as JSON so it can be read by downstream steps. - -For examples of supported data types in your steps language, see the examples below. - -* [Node.js (Javascript)](/workflows/building-workflows/code/nodejs/#sharing-data-between-steps) -* [Python](/workflows/building-workflows/code/python/#sharing-data-between-steps) -* [Bash](/workflows/building-workflows/code/bash/#sharing-data-between-steps) -* [Go](/workflows/building-workflows/code/go/#sharing-data-between-steps) - -## Step Notes - -Pipedream lets you add notes to individual steps in your workflow so you can include helpful context to other workspace members or even yourself, and you can even write markdown! - -![Viewing step notes](/images/workflows/steps/step-notes.png) - -### Adding or editing a note -1. Enter build mode on any workflow -2. Click into the overflow menu (3 dots) at the top right of any step -3. Select **Add note** (or **Edit note** if making changes to an existing note) -4. Add any text or markdown, then click **Update** - -![Add note](https://res.cloudinary.com/pipedreamin/image/upload/v1698167274/add_note_kvvxju.png) - -![Adding step notes](/images/workflows/steps/adding-step-note.gif) - -### Showing notes -Any step that has a note will have a **Note** section in the top panel in the editor pane. - -![Viewing step notes](/images/workflows/steps/step-notes.png) - -### Current limitations - -- Step notes are only accessible in Build mode, not in the Inspector. diff --git a/docs-v2/pages/workflows/limits.mdx b/docs-v2/pages/workflows/limits.mdx deleted file mode 100644 index 4bc6bebde4be6..0000000000000 --- a/docs-v2/pages/workflows/limits.mdx +++ /dev/null @@ -1,141 +0,0 @@ -# Limits - -Pipedream imposes limits on source and workflow execution, the events you send to Pipedream, and other properties. You'll receive an error if you encounter these limits. See our [troubleshooting guide](/troubleshooting/) for more information on these specific errors. - -Some of these limits apply only on the free tier. For example, Pipedream limits the daily number of credits and active workflows you can use on the free tier. **On paid tiers, you can run an unlimited number of credits per day, for any amount of execution time**. - -Other limits apply across the free and paid tiers. Please see the details on each limit below. - -**These limits are subject to change at any time**. - -## Number of Workflows - -The limit of active workflows depends on your current plan. [See our pricing page](https://pipedream.com/pricing) for more details. - -## Number of Event Sources - -**You can run an unlimited number of event sources**, as long as each operates under the limits below. - -## Daily Credits Limit - -Free Pipedream accounts are limited on daily credits. Paid plans do not have a credit limit. - -You can view your credits usage at the bottom-left of [the Pipedream UI](https://pipedream.com). - -You can also see more detailed usage in [Billing and Usage Settings](https://pipedream.com/settings/billing). Here you'll find your usage for the last 30 days, broken out by day, by resource (e.g. your source / workflow). - -Your included credits count is reset daily at 00:00 (midnight) UTC. - -### Included Credits Usage Notifications - -| Tier | Notifications | -| :--------: | :-------------------------------------------------------------------------------------------------------------------------------------------------: | -| Free tiers | You'll receive an email when you reach 100% of your daily usage. | -| Paid tiers | You'll receive an email at 80% and 100% of your [included credits](/pricing/#included-credits) for your [billing period](/pricing/#billing-period). | - -## Daily workflow testing limit - -You **do not** use credits testing workflows, but workspaces on the **Free** plan are limited to {process.env.DAILY_TESTING_LIMIT} of test runtime per day. If you exceed this limit when testing in the builder, you'll see a **Runtime Quota Exceeded** error. - -## Data stores - -Depending on your plan, Pipedream sets limits on: - -1. The total number of data stores -2. The total number of keys across all data stores -3. The total storage used across all data stores - -You'll find your workspace's limits in the **Data Stores** section of usage dashboard in the bottom-left of [the Pipedream UI](https://pipedream.com). - -
- -
- -## HTTP Triggers - -The following limits apply to [HTTP triggers](/workflows/building-workflows/triggers/#http). - -### HTTP Request Body Size - -By default, the body of HTTP requests sent to a source or workflow is limited to {process.env.PAYLOAD_SIZE_LIMIT}. - -Your endpoint will issue a `413 Payload Too Large` status code when the body of your request exceeds {process.env.PAYLOAD_SIZE_LIMIT}. - -**Pipedream supports two different ways to bypass this limit**. Both of these interfaces support uploading data up to `5TB`, though you may encounter other platform limits. - -- You can send large HTTP payloads by passing the `pipedream_upload_body=1` query string or an `x-pd-upload-body: 1` HTTP header in your HTTP request. [Read more here](/workflows/building-workflows/triggers/#sending-large-payloads). -- You can upload multiple large files, like images and videos, using the [large file upload interface](/workflows/building-workflows/triggers/#large-file-support). - -### QPS (Queries Per Second) - -Generally the rate of HTTP requests sent to an endpoint is quantified by QPS, or _queries per second_. A query refers to an HTTP request. - -**You can send an average of 10 requests per second to your HTTP trigger**. Any requests that exceed that threshold may trigger rate limiting. If you're rate limited, we'll return a `429 Too Many Requests` response. If you control the application sending requests, you should retry the request with [exponential backoff](https://cloud.google.com/storage/docs/exponential-backoff) or a similar technique. - -We'll also accept short bursts of traffic, as long as you remain close to an average of 10 QPS (e.g. sending a batch of 50 requests every 30 seconds should not trigger rate limiting). - -**This limit can be raised for paying customers**. To request an increase, [reach out to our Support team](https://pipedream.com/support/) with the HTTP endpoint whose QPS you'd like to increase, with the new, desired limit. - -## Email Triggers - -Currently, most of the [limits that apply to HTTP triggers](#http-triggers) also apply to [email triggers](/workflows/building-workflows/triggers/#email). - -The only limit that differs between email and HTTP triggers is the payload size: the total size of an email sent to a workflow - its body, headers, and attachments - is limited to {process.env.EMAIL_PAYLOAD_SIZE_LIMIT}. - -## Memory - -By default, workflows run with {process.env.MEMORY_LIMIT} of memory. You can modify a workflow's memory [in your workflow's Settings](/workflows/building-workflows/settings/#memory), up to {process.env.MEMORY_ABSOLUTE_LIMIT}. - -Increasing your workflow's memory gives you a proportional increase in CPU. If your workflow is limited by memory or compute, increasing your workflow's memory can reduce its overall runtime and make it more performant. - -**Pipedream charges credits proportional to your memory configuration**. [Read more here](/pricing/faq/#how-does-workflow-memory-affect-credits). - -## Disk - -Your code, or a third party library, may need access to disk during the execution of your workflow or event source. **You have access to {process.env.TMP_SIZE_LIMIT} of disk in the `/tmp` directory**. - -This limit cannot be raised. - -## Workflows - -### Time per execution - -Every event sent to a workflow triggers a new execution of that workflow. Workflows have a default execution limit that varies with the trigger type: - -- HTTP and Email-triggered workflows default to **30 seconds** per execution. -- Cron-triggered workflows default to **60 seconds** per execution. - -If your code exceeds your workflow-level limit, we'll throw a **Timeout** error and stop your workflow. Any partial logs and observability associated with code cells that ran successfully before the timeout will be attached to the event in the UI, so you can examine the state of your workflow and troubleshoot where it may have failed. - -You can increase the timeout limit, up to a max value set by your plan: - -| Tier | Maximum time per execution | -| :--------: | :------------------------: | -| Free tiers | 300 seconds (5 min) | -| Paid tiers | 750 seconds (12.5 min) | - -Events that trigger a **Timeout** error will appear in red in the [Inspector](/workflows/building-workflows/inspect/). You'll see the timeout error, also in red, in the cell at which the code timed out. - -### Event History - -The [Inspector](/workflows/building-workflows/inspect/#the-inspector) shows the execution history for a given workflow. Events have a limited retention period, depending on your plan: - -| Tier | Events retained per workflow | -| :--------: | :------------------------------------------------------------------------------: | -| Free tiers | {process.env.FREE_INSPECTOR_EVENT_LIMIT} | -| Paid tiers | [View breakdown of events history per paid plan](https://pipedream.com/pricing/) | - -The execution details for a specific event also expires after {process.env.INSPECTOR_EVENT_EXPIRY_DAYS} days. - -### Logs, Step Exports, and other observability - -The total size of `console.log()` statements, [step exports](/workflows/#step-exports), and the original event data sent to the workflow cannot exceed a combined size of {process.env.FUNCTION_PAYLOAD_LIMIT}. If you produce logs or step exports larger than this - for example, passing around large API responses, CSVs, or other data - you may encounter a **Function Payload Limit Exceeded** in your workflow. - -This limit cannot be raised. - -## Acceptable Use - -We ask that you abide by our [Acceptable Use](https://pipedream.com/terms/#b-acceptable-use) policy. In short this means: don't use Pipedream to break the law; don't abuse the platform; and don't use the platform to harm others. diff --git a/docs-v2/pages/workflows/quickstart.mdx b/docs-v2/pages/workflows/quickstart.mdx deleted file mode 100644 index 9e819f669a172..0000000000000 --- a/docs-v2/pages/workflows/quickstart.mdx +++ /dev/null @@ -1,253 +0,0 @@ -import Callout from '@/components/Callout' -import { Steps } from 'nextra/components' - -# Workflow Development - -Sign up for a [free Pipedream account](https://pipedream.com/auth/signup) (no credit card required) and complete this quickstart guide to learn the basic patterns for workflow development: - - -### Create a project - -Workflows must be created in **Projects**. Projects make it easy to organize your workflows and collaborate with your team. - -Go to [https://pipedream.com/projects](https://pipedream.com/projects) and click on **Create Project**. - -![create project](/images/quickstart/create-project.png) - -Next, enter a project name and click **Create Project**. For this example, we'll name our project **Getting Started**. You may also click the icon to the right to generate a random project name. - -![configure project](/images/quickstart/configure-project.png) - - -[Configure GitHub Sync](/workflows/git/) for projects to enable git-based version control and unlock the ability to develop in branches, commit to or pull changes from GitHub, view diffs, create PRs and more. - - -### Create a workflow - -After the project is created, use the **New** button to create a new workflow. - -![Create a new workflow](/images/quickstart/new-workflow.png) - -Name the workflow and click **Create Workflow** to use the default settings. For this example, we'll name the workflow **Pipedream Quickstart**. - -![Configure new workflow](/images/quickstart/configure-workflow.png) - -### Add an HTTP / Webhook trigger - -Next, Pipedream will launch the workflow builder and prompt you to add a trigger. - -![Create a new Trigger for the workflow](/images/quickstart/add-trigger.png) - -Clicking the trigger opens a new menu to select the trigger. For this example, select **New HTTP / Webhook Requests**. - -![Add HTTP trigger](/images/quickstart/create-http-trigger.png) - -Click **Save and continue** in the step editor on the right to accept the default settings. - -![Save trigger](/images/quickstart/save-http-trigger.png) - -Pipedream will generate a unique URL to trigger this workflow. Once your workflow is deployed, your workflow will run on every request to this URL. - -![Unique URL](/images/quickstart/unique-url.png) - -### Generate a test event - -Next, generate a test event to help you build the workflow. - - -The test event will be used to provide autocomplete suggestion as you build your workflow. The data will also be used when testing later steps. You may generate or select a different test event at any time when building a workflow. - - -For this example, let's use the following test event data: - -```json -{ - "message": "Pipedream is awesome!" -} -``` - -Pipedream makes it easy to generate test events for your HTTP trigger. Click on **Generate Test Event** to open the HTTP request builder. Copy and paste the JSON data above into the **Raw Request Body** field and click **Send HTTP Request**. - -![Generate Test Event](/images/quickstart/generate-test-event.png) - -Pipedream will automatically select and display the contents of the selected event. Validate that the `message` was received as part the event `body`. - -![Inspect trigger event](/images/quickstart/inspect-trigger-event.png) - - - -You may also send live data to the unique URL for your workflow using your favorite HTTP tool or by running a `cURL` command, e.g., - -```bash -curl -d '{"message": "Pipedream is awesome!"}' \ - -H "Content-Type: application/json" \ - YOUR_ENDPOINT_URL -``` - - -### Enrich trigger data using Node.js and npm - -Before we send data to Google Sheets, let's use the npm [`sentiment`](https://www.npmjs.com/package/sentiment) package to generate a sentiment score for our message. To do that, click **Continue** or the **+** button. - -![Continue from trigger](/images/quickstart/trigger-continue.png) - -That will open the **Add a step** menu. Select **Run custom code**. - -![Add step](/images/quickstart/step-selector-code.png) - -Pipedream will add a Node.js code step to the workflow. - -![The new code step is added to the workflow after the HTTP trigger](/images/quickstart/new-code-step-added.png) - - -Rename the step to **sentiment**. - -![Rename step to sentiment](/images/quickstart/rename-code-step.gif) - -Next, add the following code to the code step: - -```javascript -import Sentiment from "sentiment" - -export default defineComponent({ - async run({ steps, $ }) { - let sentiment = new Sentiment() - return sentiment.analyze(steps.trigger.event.body.message) - }, -}) -``` - -This code imports the npm package, passes the message we sent to our trigger to the `analyze()` function by referencing `steps.trigger.event.body.message` and then returns the result. - - -To use any npm package on Pipedream, just `import` it. There's no `npm install` or `package.json` required. - - - -Any data you `return` from a step is exported so it can be inspected and referenced it in future steps via the `steps` object. In this example, return values will be exported to `steps.sentiment.$return_value` because we renamed the step to **sentiment** . - - -Your code step should now look like the screenshot below. To run the step and test the code, click the **Test** button. - -![Test code step](/images/quickstart/test-code-step.png) - -You should see the results of the sentiment analysis when the test is complete. - -![Test results](/images/quickstart/sentiment-results.png) - - - -When you **Test** a step, only the current step is executed. Use the caret to test different ranges of steps including the entire workflow. - - -### Save data to Google Sheets - -Next, create a Google Sheet and add **Timestamp**, **Message** and **Sentiment Score** to the first row. These labels act as our column headers amd will help us configure the Google Sheets step of the workflow. - -![Empty Sheet](/images/quickstart/empty-sheet.png) - -Next, let's add a step to the workflow to send the data to Google Sheets. First, click **+** after the `sentiment` code step and select the **Google Sheets** app. - -![Step Selector - Google Sheets](/images/quickstart/select-google-sheets-app.png) - -Then select the **Add Single Row** action. - -![Select Add Single Row](/images/quickstart/select-add-single-row.png) - -Click to connect you Google Sheets account to Pipedream (or select it from the dropdown if you previously connected an account). - -![Connect Google Sheets](/images/quickstart/connect-google-sheets-account.png) - -Pipedream will open Google's sign in flow in a new window. Sign in with the account you want to connect. - -![Google OAuth Window](/images/quickstart/google-oauth.png) - - -If prompted, you must check the box for Pipedream to **See, edit, create and delete all of your Google Drive files**. These permissions are required for configure and use the pre-built actions for Google Sheets. - - -![Google Permissions](/images/quickstart/google-permissions.png) - -Learn more about Pipedream's [privacy and security policy](/privacy-and-security/). - -When you complete connecting your Google account, the window should close and you should return to Pipedream. Your connected account should automatically be selected. Next, select your spreadsheet from the dropdown menu: - -![Select Spreadsheet](/images/quickstart/v3/select-spreadsheet.png) - -Then select the sheet name (the default sheet name in Google Sheets is **Sheet1**): - -![Select Sheet Name](/images/quickstart/v3/select-spreadsheet-name.png) - -Next, select if the spreadsheet has headers in the first row. When a header row exists, Pipedream will automatically retrieve the header labels to make it easy to enter data (if not, you can manually construct an array of values). Since the sheet for this example contains headers, select **Yes**. - -![Has headers](/images/quickstart/v3/select-headers.png) - -Pipedream will retrieve the headers and generate a form to enter data in your sheet: - -![Additional props](/images/quickstart/v3/async-props.png) - -First, let's use the object explorer to pass the timestamp for the workflow event as the value for the first column. This data can be found in the context object on the trigger. - -When you click into the **Timestamp** field, Pipedream will display an object explorer to make it easy to find data. Scroll or search to find the `ts` key under `steps.trigger.context`. - -![Add reference to timestamp](/images/quickstart/v3/select-ts-export.png) - -Click **select path** to insert a reference to steps.trigger.context.ts: - -![Timestamp added](/images/quickstart/v3/timestamp.png) - -Next, let's use autocomplete to enter a value for the **Message** column. First, add double braces `{{` โ€” Pipedream will automatically add the closing braces `}}`. - -Then, type `steps.trigger.event.body.message` between the pairs of braces. Pipedream will provide autocomplete suggestions as you type. Press **Tab** to use a suggestion and then click `.` to get suggestions for the next key. The final value in the **Message** field should be `steps.trigger.event.body.message`. - -![Add reference to message](/images/quickstart/v3/autocomplete-export.png) - -Finally, let's copy a reference from a previous step. Click on the `sentiment` step to open the results in the editor: - -![Expand sentiment results](/images/quickstart/v3/select-sentiment-step.png) - -Next, click the **Copy Path** link next to the score. - -![Copy path to sentiment score](/images/quickstart/v3/copy-sentiment-path.png) - -Click the Google Steps step or click the open tab in the editor. Then paste the value into the **Sentiment Score** field โ€” Pipedream will automatically wrap the reference in double braces `{{ }}`. - -![Paste reference to sentiment score](/images/quickstart/v3/paste-sentiment-score.png) - -Now that the configuration is complete, click **Test** to validate the configuration for this step. When the test is complete, you will see a success message and a summary of the action performed: - -![Action results](/images/quickstart/v3/successful-test-results.png) - -If you load your spreadsheet, you should see the data Pipedream inserted. - -![Data inserted into sheets](/images/quickstart/data-inserted.png) - -Next, return to your workflow and click **Deploy** to run your workflow on every trigger event. - -![Deploy Workflow](/images/quickstart/v3/deploy-workflow.png) - -When your workflow deploys, you will be redirected to the **Inspector**. Your workflow is now live. - -![Deployed workflow](/images/quickstart/deployed-workflow.png) - -To validate your workflow is working as expected, send a new request to your workflow: You can edit and run the following `cURL` command: - -```bash -curl -d '{ "message": "Pipedream is awesome!" }' \ - -H "Content-Type: application/json" \ - YOUR-TRIGGER-URL -``` - -The event will instantly appear in the event list. Select it to inspect the workflow execution. - -![Inspect executions](/images/quickstart/inspect-executions.png) - -Finally, you can return to Google Sheets to validate that the new data was automatically inserted. - -![Live data inserted into sheets](/images/quickstart/live-test.png) - - - -## Next Steps - -Congratulations! You completed the quickstart and should now understand the basic patterns for workflow development. Next, try creating your own [workflows](/workflows/building-workflows/), learn how to [build and run workflows for your users](/connect/workflows/) or check out the rest of the [docs](/)! diff --git a/docs-v2/pages/workflows/vpc.mdx b/docs-v2/pages/workflows/vpc.mdx deleted file mode 100644 index b7dbe881ced18..0000000000000 --- a/docs-v2/pages/workflows/vpc.mdx +++ /dev/null @@ -1,83 +0,0 @@ -import VideoPlayer from '@/components/VideoPlayer'; - -# Virtual Private Clouds - - - -Pipedream VPCs enable you to run workflows in dedicated and isolated networks with static outbound egress IP addresses that are unique to your workspace (unlike other platforms that provide static IPs common to all customers on the platform). - -Outbound network requests from workflows that run in a VPC will originate from these static IP addresses, so you can whitelist access to sensitive resources (like databases and APIs) with confidence that the requests will only originate from the Pipedream workflows in your workspace. - -## Getting started - -### Create a new VPC - -1. Open the [Virtual Private Clouds tab](https://pipedream.com/settings/networks): - -![Finding the Virtual Private Cloud settings within your workspace settings](https://res.cloudinary.com/pipedreamin/image/upload/v1690914583/CleanShot_2023-08-01_at_14.29.24_slx1a7.png) - -1. Click on **New VPC** in the upper right of the page: - -![Adding a new VPC network](https://res.cloudinary.com/pipedreamin/image/upload/v1690914653/CleanShot_2023-08-01_at_14.30.47_okdiyx.png) - -2. Enter a network name and click **Create**: - -![Naming you private VPC before creating it](https://res.cloudinary.com/pipedreamin/image/upload/v1690913009/CleanShot_2023-08-01_at_14.03.24_smxujq.png) - -3. It may take 5-10 minutes to complete setting up your network. The status will change to **Available** when complete: - -![The status of the VPC changes to available when finished](https://res.cloudinary.com/pipedreamin/image/upload/v1690913069/CleanShot_2023-08-01_at_14.04.22_ro2bgx.png) - -### Run workflows within a VPC - -To run workflows in a VPC, check the **Run in Private Network** option in workflow settings and select the network you created. All outbound network requests for the workflow will originate from the static egress IP for the VPC (both when testing a workflow or when running the workflow in production). - -![Selecting a VPC within the workflow settings](https://res.cloudinary.com/pipedreamin/image/upload/v1690913944/CleanShot_2023-08-01_at_14.18.42_rihwff.png) - -If you don't see the network listed, the network setup may still be in progress. If the issue persists longer than 10 minutes, please [contact support](https://pipedream.com/support). - -### Find the static outbound IP address for a VPC - -You can view and copy the static outbound IP address for each VPC in your workspace from the [Virtual Private Cloud settings](https://pipedream.com/settings/networks). If you need to restrict access to sensitive resources (e.g., a database) by IP address, copy this address and configure it in your application with the `/32` CIDR block. Network requests from workflows running in the VPC will originate from this address. - -![Finding the egress IP address for a Pipedream VPC](https://res.cloudinary.com/pipedreamin/image/upload/v1690914910/CleanShot_2023-08-01_at_14.34.56_lp5jt3.png) - -## Managing a VPC - -To rename or delete a VPC, navigate to the [Virtual Private Cloud settings](https://pipedream.com/settings/networks) for your workspace and select the option from the menu at the the right of the VPC you want to manage. - -## Self-hosting and VPC peering - -If you're interested in running Pipedream workflows in your own infrastructure, or configure VPC peering to allow Pipedream to communicate to resources in a private network, please reach out to our [Sales team](mailto:sales@pipedream.com). - -## Limitations - -- Only workflows can run in VPCs (other resources like sources or data stores are not currently supported). For example, [sources](/workflows/building-workflows/triggers/) cannot yet run in VPCs. -- Creating a new network can take up to 5 minutes. Deploying your first workflow into a new network and testing that workflow for the first time can take up to 1 min. Subsequent operations should be as fast as normal. -- VPCs only provide static IPs for outbound network requests. This feature does not provide a static IP for or otherwise restrict inbound requests. -- You can't set a default network for all new workflows in a workspace or project (you must select the network every time you create a new workflow). Please [reach out](https://pipedream.com/support) if you're interesting in imposing controls like this in your workspace. -- Workflows running in a VPC will still route specific requests routed through [the shared Pipedream network](/workflows/data-management/destinations/http/#ip-addresses-for-pipedream-http-requests): - - [`$.send.http()`](/workflows/data-management/destinations/http/) requests - - Async options requests (these are requests that are made to populate options in drop down menus for actions while a building a workflow โ€” e.g., the option to โ€œselect a Google Sheetโ€ when using the โ€œadd row to Google Sheetsโ€ action) - -## FAQ - -### Will HTTP requests sent from Node.js, Python and the HTTP request steps use the assigned static IP address? - -Yes, all steps that send HTTP requests from a workflow assigned to a VPC will use that VPC's IP address to send HTTP requests. - -This will also include `axios`, `requests`, `fetch` or any HTTP client you prefer in your language of choice. - -The only exception are requests sent by `$.send.http()` or the HTTP requests used to populate async options that power props like "Select a Google Sheet" or "Select a Slack channel". These requests will route through the [standard set of Pipedream IP addresses.](/privacy-and-security/#hosting-details) - -### Can a single workflow live within multiple VPCs? - -No, a VPC can contain many workflows, but a single workflow can only belong to one VPC. - -### Can I modify my VPC's IP address to another address? - -No, IP addresses are assigned to VPCs for you, and they are not changeable. - -### How much will VPCs cost? - -VPCs are available on the **Business** plan. [Upgrade your plan here](https://pipedream.com/pricing). diff --git a/docs-v2/pages/workspaces/_meta.tsx b/docs-v2/pages/workspaces/_meta.tsx deleted file mode 100644 index 74a6e04201267..0000000000000 --- a/docs-v2/pages/workspaces/_meta.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default { - "index": "Managing workspaces", - "sso": "Single-Sign On", - "domain-verification": "Domain Verification", -} as const diff --git a/docs-v2/pages/workspaces/domain-verification.mdx b/docs-v2/pages/workspaces/domain-verification.mdx deleted file mode 100644 index 130e556f33048..0000000000000 --- a/docs-v2/pages/workspaces/domain-verification.mdx +++ /dev/null @@ -1,19 +0,0 @@ -import Callout from '@/components/Callout' - -# Domain Verification - -Pipedream requires that you verify ownership of your email domain in order to [configure SAML SSO](/workspaces/sso/) for your workspace. If your email is `foo@example.com`, you need to verify ownership of `example.com`. If configuring Google OAuth (not SAML), you can disregard this section. - -## Getting started - -1. Navigate to the **[Verified Domains](https://pipedream.com/settings/domains)** section of your workspace settings -2. Enter the domain you'd like to use then click **Add Domain** -3. You'll see a modal with instructions for adding a `TXT` record in the DNS configuration for your domain -4. DNS changes may take between a few minutes and up to 72 hours to propagate. Once they're live, click the **Verify** button for the domain you've entered -5. Once Pipedream verifies the `TXT` record, we'll show a green checkmark on the domain - - -Make sure to verify all your domains. There's no limit on the number of domains you can verify for SSO, so if you use `example.com`, `example.net`, and `foo.example.com`, make sure to verify each one. - - -![Verified Domains](https://res.cloudinary.com/pipedreamin/image/upload/v1699938431/verified-domains_qcjpnb.png) diff --git a/docs-v2/pages/workspaces/index.mdx b/docs-v2/pages/workspaces/index.mdx deleted file mode 100644 index f6011fb2d3830..0000000000000 --- a/docs-v2/pages/workspaces/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ -import Callout from '@/components/Callout' - -# Managing workspaces - -When you sign up for Pipedream, you'll either create a new workspace or join an existing one if you signed up from an invitation. - -You can create and join any number of workspaces. For example, you can create one to work alone and another to collaborate with your team. You can also start working alone, then easily add others into your existing workspace to work together on workflows you've already built out. - -Once you've created a new workspace, you can invite your team to create and edit workflows together, and organize them within projects and folders. - -## Creating a new workspace - -To create a new workspace, - -1. Open the dropdown menu in the top left of the Pipedream dashboard -2. Select **New workspace** -3. You'll be prompted to name the workspace (you can [change the name later](/workspaces/#renaming-a-workspace)) - -## Workspace settings - -Find your current [workspace settings](https://pipedream.com/settings/account) like current members, under the **Settings** navigation menu item on the left hand side. This is where you can manage your workspace settings, including the workspace name, members, and member permissions. - -### Inviting others to a join a workspace - -After opening your workspace settings, open the [Membership](https://pipedream.com/settings/users) tab. - -- Invite people to your workspace by entering their email address and then clicking **Send** -- Or create an invite link to more easily share with a larger group (you can limit access to only specific email domains) - -![Creating an invite link](https://res.cloudinary.com/pipedreamin/image/upload/v1688074217/Google_Chrome_-_Settings_-_Users_-_Pipedream_2023-06-29_at_2.28.12_PM_xy33fl.png) - -### Managing member permissions - -By default, new workspace members are assigned the **Member** level permission. - -**Members** will be able to perform general tasks like viewing, developing, and deploying workflows. - -However, only **Admins** will be able to manage workspace level settings, like changing member roles, renaming workspaces, and modifying Slack error notifications. - -#### Promoting a member to admin - -To promote a member to an admin level account in your workspace, click the 3 dots to the right of their email and select "Make Admin". - -![Promoting a member to admin](https://res.cloudinary.com/pipedreamin/image/upload/v1688075628/making_admin_btkbh7.gif) - -#### Demoting an admin to a member - -To demote an admin back to a member, click the 3 dots to the right of their email address and select "Remove Admin". - -![Demoting an admin to a member](https://res.cloudinary.com/pipedreamin/image/upload/v1688075628/removing_admin_wez5km.gif) - -### Finding your workspace's ID - -Visit your [workspace settings](https://pipedream.com/settings/account) and scroll down to the **API** section. You'll see your workspace ID here. - -### Requiring Two-Factor Authentication -As a workspace admin or owner on the [Business plan](https://pipedream.com/pricing), you're able to **require** that all members in your workspace must enable 2FA on their account. - -1. Open the Authentication tab in your [workspace settings](https://pipedream.com/settings/authentication) (you must be an admin or owner to make changes here) -2. Make sure you're in the [correct workspace](/workspaces/#switching-between-workspaces) -3. Click the toggle under **Require 2FA** โ€” this will open a confirmation modal with some additional information -4. Once you enable the change in the modal, **all workspace members (including admins and owners) will immediately be required to configure 2FA on their account**. All new and existing workspace members will be required to set up 2FA the next time they sign in. - -![Require 2FA Toggle](https://res.cloudinary.com/pipedreamin/image/upload/v1695147277/require_2fa_xha6yc.png) - - -Anyone who is currently logged in to Pipedream will be temporarily signed out until they set up 2FA - -If anyone is actively making changes to a workflow, their session may be interrupted. We recommend enabling the 2FA requirement in off hours. - - - -### Configuring Single Sign-On (SSO) - -Workspaces on the Business plan can configure Single Sign-On, so your users can login to Pipedream using your identity provider. - -Pipedream supports SSO with Google, Okta, and any provider that supports the SAML protocol. See the guides below to configure SSO for your identity provider: - -- [Okta](./sso/okta) -- [Google](./sso/google/) -- [Other SAML provider](./sso/saml/) - -### SCIM - -Pipedream supports provisioning user accounts from your IdP via SCIM. Any workspace on the Business plan can configure Single Sign-On with SCIM. - -### Renaming a workspace - -To rename a workspace, open your [workspace settings](https://pipedream.com/settings/account) and navigate to the **General** tab. - -Click the save button to save the changes. - - -This action is only available to workspace **admins**. - - -### Deleting a workspace - -To delete a workspace, open your workspace settings and navigate to the **Danger Zone**. - -Click the **Delete workspace** button and confirm the action by entering in your workspace name and `delete my workspace` into the text prompt. - - -Deleting a workspace will delete all **sources**, **workflows**, and other resources in your workspace. - -Deleting a workspace is **irreversible** and permanent. - - -## Switching between workspaces - -To switch between workspaces, open the dropdown menu in the top left of the Pipedream dashboard. - -Select which workspace you'd like to start working within, and your Pipedream dashboard context will change to that workspace. diff --git a/docs-v2/pages/workspaces/sso/_meta.tsx b/docs-v2/pages/workspaces/sso/_meta.tsx deleted file mode 100644 index c7401c2cb175d..0000000000000 --- a/docs-v2/pages/workspaces/sso/_meta.tsx +++ /dev/null @@ -1,6 +0,0 @@ -export default { - "index": "Overview", - "google": "Google Workspace", - "okta": "Okta", - "saml": "SAML", -} as const diff --git a/docs-v2/pages/workspaces/sso/google.mdx b/docs-v2/pages/workspaces/sso/google.mdx deleted file mode 100644 index 5d98d62191865..0000000000000 --- a/docs-v2/pages/workspaces/sso/google.mdx +++ /dev/null @@ -1,134 +0,0 @@ -import { Steps } from "nextra/components"; - -# Configure SSO with Google Workspace - -Pipedream supports Single Sign-On (SSO) with Google Workspace. This guide shows you how to configure SSO in Pipedream to authenticate with your Google org. - -## Requirements - -- SSO is only supported for [workspaces](/workspaces/) on the Business plan. Visit the [Pipedream pricing page](https://pipedream.com/pricing) to upgrade. -- You need an administrator of your Pipedream workspace and someone who can [create SAML apps in Google Workspace](https://apps.google.com/supportwidget/articlehome?hl=en&article_url=https%3A%2F%2Fsupport.google.com%2Fa%2Fanswer%2F6087519%3Fhl%3Den&assistant_id=generic-unu&product_context=6087519&product_name=UnuFlow&trigger_context=a) to configure SSO. - -## Configuration - -To configure SSO in Pipedream, you need to set up a [SAML application](https://apps.google.com/supportwidget/articlehome?hl=en&article_url=https%3A%2F%2Fsupport.google.com%2Fa%2Fanswer%2F6087519%3Fhl%3Den&assistant_id=generic-unu&product_context=6087519&product_name=UnuFlow&trigger_context=a) in Google Workspace. If you're a Google Workspace admin, you're all set. Otherwise, coordinate with a Google Workspace admin before you continue. - - - -### Find Web and Mobile apps in Google Workspace - -In your **Google Workspace** admin console, select **Apps** > **Web and Mobile apps** - -
-Create a new SAML app in Google Workspace -
- -### Add a custom SAML app - -In the **Add app** menu, select the option to **Add custom SAML app**: - -
-Add app > Add custom SAML app -
- -### Configure the app - -First, add **Pipedream** as the app name, and an app description that makes sense for your organization: - -
-App name + description -
- -### Continue past the configuration step - -
-App name + description -
- -### Configure the Service provider details - -In the **Service provider details**, provide the following values: - -- **ACS URL** โ€” `https://api.pipedream.com/auth/saml/consume` -- **Entity ID** โ€” Pipedream -- **Start URL** โ€” `https://api.pipedream.com/auth/saml/` - -replacing `` with the workspace name at [https://pipedream.com/settings/account](https://pipedream.com/settings/account). For example, if your workspace name is `example-workspace`, your start URL will be `https://api.pipedream.com/auth/saml/example-workspace`. - -
-SAML settings for Google Workspace -
- -In the **Name ID** section, provide these values: - -- **Name ID format** โ€” `EMAIL` -- **Name ID** โ€” Basic Information > Primary email - -then press **Continue**. - -
-SAML settings for Google Workspace -
- -### Configure the Attribute mapping - -Once the app is configured, visit the **User access** section to add Google Workspace users to your Pipedream SAML app. See [step 14 of the Google Workspace SAML docs](https://apps.google.com/supportwidget/articlehome?hl=en&article_url=https%3A%2F%2Fsupport.google.com%2Fa%2Fanswer%2F6087519%3Fhl%3Den&assistant_id=generic-unu&product_context=6087519&product_name=UnuFlow&trigger_context=a) for more detail. - -### Download and host the SAML metadata - -Pipedream requires access to SAML metadata at a publicly-accessible URL. This communicates public metadata about the identity provider (Google Workspace) that Pipedream can use to configure the SAML setup in Pipedream. - -First, click the **Download Metadata** button on the left of the app configuration page: - -
-Download Metadata -
- -**Host this file on a public web server where Pipedream can access it via URL**, for example: `https://example.com/metadata.xml`. You'll use that URL in the next step. - -### Visit your workspace's authentication settings - -In Pipedream, visit your workspace's [authentication settings](https://pipedream.com/settings/authentication). - -### Add the SAML metadata URL - -In the **Single Sign-On** section, select **SAML**, and add the URL from step 7 above in the **Metadata URL** field, then click Save. - -
-Pipedream SAML Metadata URL -
-
- -Any user in your workspace can now log into Pipedream at [https://pipedream.com/auth/sso](https://pipedream.com/auth/sso) by entering your workspaces's name (found in your [Settings](https://pipedream.com/settings/account)). You can also access your SSO sign in URL directly by visiting [https://pipedream.com/auth/org/your-workspace-name](https://pipedream.com/auth/org), where `your-workspace-name` is the name of your workspace. - -## Important details - -Before you configure the application in Google, make sure all your users have matching email addresses for their Pipedream user profile and their Google Workspace profile. Once SSO is enabled, they will not be able to change their Pipedream email address. - -If a user's Pipedream email does not match the email in their Google profile, they will not be able to log in. - -If existing users signed up for Pipedream using an email and password, they will no longer be able to do so. They will only be able to sign in using SSO. diff --git a/docs-v2/pages/workspaces/sso/index.mdx b/docs-v2/pages/workspaces/sso/index.mdx deleted file mode 100644 index 5591d2dd7d73a..0000000000000 --- a/docs-v2/pages/workspaces/sso/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ -import Callout from '@/components/Callout' - -# Single Sign-On Overview - -Pipedream supports Single Sign-On (SSO) with [Okta](./sso/okta/), [Google](./sso/google/), or [any provider](./sso/saml/) that supports SAML or Google OAuth, which allows IT and workspace administrators easier controls to manage access and security. - -Using SSO with your Identity Provider (IdP) centralizes user login management and provides a single point of control for IT teams and employees. - -## Requirements for SSO - -- Your workspace must be on a [Business plan](https://pipedream.com/pricing) -- If using SAML, your Identity Provider must support SAML 2.0 -- Only workspace admins and owners can configure SSO -- Your workspace admin or owner must [verify ownership](#verifying-your-email-domain) of the SSO email domain - - -The below content is for workspace admins and owners. Only workspace admins and owners have access to add verified domains, set up SSO, and configure workspace login methods. - - -## Verifying your Email Domain - -In order to configure SAML SSO for your workspace, you first need to verify ownership of the email domain. If configuring Google OAuth (not SAML), you can skip this section. - -[Refer to the guide here](/workspaces/domain-verification/) to verify your email domain. - -## Setting up SSO - -Navigate to the [Authentication section](https://pipedream.com/settings/domains) in your workspace settings to get started. - -### SAML SSO - -1. First, make sure you've verified the domain(s) you intend to use for SSO ([see above](#verifying-your-email-domain)) -2. Click the **Enable SSO** toggle and select **SAML** -3. If setting up SAML SSO, you'll need to enter a metadata URL, which contains all the necessary configuration for Pipedream. Refer to the provider-specific docs for the detailed walk-through ([Okta](./sso/okta/), [Google Workspace](./sso/google/), [any other SAML provider](./sso/saml/)). -4. Click **Save** - -### Google OAuth - -1. Click the **Enable SSO** toggle and select **Google** -2. Enter the domain that you use with Google OAuth. For example, `vandalayindustries.com` -3. Click **Save** - -## Restricting Login Methods - -Once you've configured SSO for your workspace, you can restrict the allowed login methods for [non-workspace owners](#workspace-owners-can-always-sign-in-using-any-login-method). - -![Restrict Login Methods](https://res.cloudinary.com/pipedreamin/image/upload/v1699914460/Google_Chrome_-_Settings_-_Authentication_-_Pipedream_2023-11-13_at_2.27.08_PM_x1ahod.png) - - -| Login Method | Description | -| -- | -- | -| **Any login method** | Everyone in the workspace can sign in either using SSO or via the login method they used to create their account (email and password, Google OAuth, GitHub) | -| **SSO only** | Workspace members and admins must [sign in using SSO](https://pipedream.com/auth/sso) | -| **SSO with guests** | When siging in using a verified email domain, members and admins must [sign in using SSO](https://pipedream.com/auth/sso). If signing in with a different domain (`gmail.com` for example), members (guests) can sign in using any login method. | - -### Workspace owners can always sign in using any login method - -In order to ensure you don't get locked out of your Pipedream workspace in the event of an outage with your identity provider, workspace owners can always sign in via the login method they used to create the account (email and password, Google, or GitHub). - -### Login methods are enforced when signing in to pipedream.com - -This means if you are a member of 2 workspaces and one of them allows **any login method** but the other **requires SSO**, you will be required to sign in to Pipedream using SSO every time, independent of the workspace you are trying to access. diff --git a/docs-v2/pages/workspaces/sso/okta.mdx b/docs-v2/pages/workspaces/sso/okta.mdx deleted file mode 100644 index 4aeb4a949edbe..0000000000000 --- a/docs-v2/pages/workspaces/sso/okta.mdx +++ /dev/null @@ -1,95 +0,0 @@ -import PipedreamImg from '@/components/PipedreamImg' -import { Steps } from 'nextra/components' - -# Configure SSO with Okta - -Pipedream supports Single Sign-On (SSO) with Okta. This guide shows you how to configure SSO in Pipedream to authenticate with your Okta org. - -## Requirements - -- SSO is only supported for [workspaces](/workspaces/) on the Business plan. Visit the [Pipedream pricing page](https://pipedream.com/pricing) to upgrade. -- You must be an administrator of your Pipedream workspace -- You must have an Okta account - -## Configuration - - - -### Visit your Okta dashboard - -In your Okta **Admin** dashboard, select the **Applications** section and click **Applications** below that: - - - -### Browse App Catalog - -Click **Browse App Catalog**: - -![Okta - browser app catalog](https://res.cloudinary.com/pipedreamin/image/upload/v1708206192/docs/step-2_iv1a2c.png) - -### Search for Pipedream - -Search for "Pipedream" and select the Pipedream app: - -![Okta - Pipedream app](https://res.cloudinary.com/pipedreamin/image/upload/v1708206192/docs/step-3_z2buml.png) - -### Click Add - -![Okta - Add Pipedream app](https://res.cloudinary.com/pipedreamin/image/upload/v1708206216/docs/step-4_mfd5bs.png) - -### Configure General Settings - -Fill out the **General Settings** that Okta presents, and click **Done**: - -![Okta - General Settings](https://res.cloudinary.com/pipedreamin/image/upload/v1708206216/docs/step-5_fqmywz.png) - -### Edit Sign On - -Select the **Sign On** tab, and click **Edit** at the top right: - -![Okta - Edit Sign In](https://res.cloudinary.com/pipedreamin/image/upload/v1708206216/docs/step-6_zzeeul.png) - -### Configure Default Relay State - -Scroll down to the **SAML 2.0** settings. In the **Default Relay State** section, enter `organization_username`: - -![Okta - Default Relay State](https://res.cloudinary.com/pipedreamin/image/upload/v1708206217/docs/step-7_dqtq43.png) - -### Save your configuration - -Set any other configuration options you need in that section or in the **Credentials Details** section, and click **Save**. - -### Copy the Identity Provider metadata URL - -In the **Sign On** section, you'll see a section that includes the setup instructions for SAML: - -![Okta - SAML](https://res.cloudinary.com/pipedreamin/image/upload/v1708206217/docs/step-9-1_ucbq6e.png) - -Click the **Identity Provider metadata** link and copy the URL from your browser's address bar: - -![Okta - Identity Metadata URL](https://res.cloudinary.com/pipedreamin/image/upload/v1708206217/docs/step-9-2_nlrois.png) - -### Enable SSO in Pipedream - -Visit your [Pipedream workspace authentication settings](https://pipedream.com/settings/authentication). Click the toggle to **Enable SSO**, then click **Edit SSO Configuration**, and add the metadata URL in the **SAML** section and click **Save**: - -![Pipedream - SAML Metadata URL](https://res.cloudinary.com/pipedreamin/image/upload/v1712252695/pipedream.com_settings_authentication_3_dtt5fa.png) - -### Assign the application to users - -Back in Okta, click on the **Assignments** tab of the Pipedream application. Click on the **Assign** dropdown and select **Assign to People**: - -![Okta - Assign Users](https://res.cloudinary.com/pipedreamin/image/upload/v1708206217/docs/step-11_i8wm6k.png) - -Assign the application to the relevant users in Okta, and Pipedream will configure the associated accounts on our end. - - -Users configured in your Okta app can log into Pipedream at [https://pipedream.com/auth/sso](https://pipedream.com/auth/sso) by entering your workspaces's name (found in your [Settings](https://pipedream.com/settings/account)). You can also access your SSO sign in URL directly by visiting [https://pipedream.com/auth/org/your-workspace-name](https://pipedream.com/auth/org), where `your-workspace-name` is the name of your workspace. - -## Important details - -Before you configure the application in Okta, make sure all your users have matching email addresses for their Pipedream user profile and their Okta profile. Once SSO is enabled, they will not be able to change their Pipedream email address. - -If a user's Pipedream email does not match the email in their IDP profile, they will not be able to log in. - -If existing users signed up for Pipedream using an email and password, they will no longer be able to do so. They will only be able to sign in using SSO. diff --git a/docs-v2/pages/workspaces/sso/saml.mdx b/docs-v2/pages/workspaces/sso/saml.mdx deleted file mode 100644 index e17162d39de21..0000000000000 --- a/docs-v2/pages/workspaces/sso/saml.mdx +++ /dev/null @@ -1,48 +0,0 @@ -# Configure SSO with another SAML provider - -Pipedream supports Single Sign-On (SSO) with any identity provider that supports SAML 2.0. This guide shows you how to configure SSO in Pipedream to authenticate with your SAML provider. - -If you use [Okta](./okta/) or [Google Workspace](./google/), please review the guides for those apps. - -## Requirements - -- SSO is only supported for [workspaces](/workspaces/) on the Business plan. Visit the [Pipedream pricing page](https://pipedream.com/pricing) to upgrade. -- You need an administrator of your Pipedream workspace and someone who can create SAML apps in your identity provider to configure SSO. - -## SAML metadata - -| Name | Other names | Value | -| --------------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| SP Entity ID | Audience, Audience Restriction, SP URL | `Pipedream` | -| SP Assertion Consumer Service (ACS) URL | Reply or destination URL | `https://api.pipedream.com/auth/saml/consume` | -| SP Single Sign-on URL | Start URL | `https://api.pipedream.com/auth/saml/`

replacing `` with the workspace name at [https://pipedream.com/settings/account](https://pipedream.com/settings/account). For example, if your workspace name is `example-workspace`, your start URL will be `https://api.pipedream.com/auth/saml/example-workspace`. | - -## SAML attributes - -- `NameID` โ€”ย email - -## Providing SAML metadata to Pipedream - -Pipedream requires access to SAML metadata at a publicly-accessible URL. This communicates public metadata about the identity provider (your SSO provider) that Pipedream can use to configure the SAML setup in Pipedream. - -Most SSO providers will provide a publicly-accessible metadata URL. If not, they should provide a mechanism to download the SAML metadata XML file. **Once you've configured your SAML app using the settings above, host this file on a public web server where Pipedream can access it via URL**, for example: `https://example.com/metadata.xml`. - -Once you have a publicly-accessible URL that hosts your SAML metadata, visit your workspace's [authentication settings](https://pipedream.com/settings/authentication) in Pipedream. In the **Single Sign-On** section, select **SAML**, and add your metadata URL to the **Metadata URL** field, then click **Save**. - -
-Pipedream metadata URL -
- -Any user in your workspace can now log into Pipedream at [https://pipedream.com/auth/sso](https://pipedream.com/auth/sso) by entering your workspaces's name (found in your [Settings](https://pipedream.com/settings/account)). You can also access your SSO sign in URL directly by visiting [https://pipedream.com/auth/org/your-workspace-name](https://pipedream.com/auth/org), where `your-workspace-name` is the name of your workspace. - -## Important details - -Before you configure the application in your IdP, make sure all your users have matching email addresses for their Pipedream user profile and their IdP profile. Once SSO is enabled, they will not be able to change their Pipedream email address. - -If a user's Pipedream email does not match the email in their IdP profile, they will not be able to log in. - -If existing users signed up for Pipedream using an email and password, they will no longer be able to do so. They will only be able to sign in using SSO. diff --git a/docs-v2/postcss.config.js b/docs-v2/postcss.config.js deleted file mode 100644 index 12a703d900da8..0000000000000 --- a/docs-v2/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -}; diff --git a/docs-v2/public/favicon.ico b/docs-v2/public/favicon.ico deleted file mode 100644 index b854b21bb03af..0000000000000 Binary files a/docs-v2/public/favicon.ico and /dev/null differ diff --git a/docs-v2/public/images/account/daily-invocations-tooltip.png b/docs-v2/public/images/account/daily-invocations-tooltip.png deleted file mode 100644 index c2fa604878c23..0000000000000 Binary files a/docs-v2/public/images/account/daily-invocations-tooltip.png and /dev/null differ diff --git a/docs-v2/public/images/account/usage-by-resource.png b/docs-v2/public/images/account/usage-by-resource.png deleted file mode 100644 index 66a0941abd0d0..0000000000000 Binary files a/docs-v2/public/images/account/usage-by-resource.png and /dev/null differ diff --git a/docs-v2/public/images/actions/update-action-button.png b/docs-v2/public/images/actions/update-action-button.png deleted file mode 100644 index 5b242f04efd5b..0000000000000 Binary files a/docs-v2/public/images/actions/update-action-button.png and /dev/null differ diff --git a/docs-v2/public/images/active.png b/docs-v2/public/images/active.png deleted file mode 100644 index 9e65253ebf0d0..0000000000000 Binary files a/docs-v2/public/images/active.png and /dev/null differ diff --git a/docs-v2/public/images/apps/select-external-auth.png b/docs-v2/public/images/apps/select-external-auth.png deleted file mode 100644 index e38d00d59c1c5..0000000000000 Binary files a/docs-v2/public/images/apps/select-external-auth.png and /dev/null differ diff --git a/docs-v2/public/images/archive-workflow.png b/docs-v2/public/images/archive-workflow.png deleted file mode 100644 index b07ecbb2e9b90..0000000000000 Binary files a/docs-v2/public/images/archive-workflow.png and /dev/null differ diff --git a/docs-v2/public/images/auth/refresh-fields-after-connecting-slack.png b/docs-v2/public/images/auth/refresh-fields-after-connecting-slack.png deleted file mode 100644 index e5f0eb5dd70b8..0000000000000 Binary files a/docs-v2/public/images/auth/refresh-fields-after-connecting-slack.png and /dev/null differ diff --git a/docs-v2/public/images/auth/slack-field-rendered.png b/docs-v2/public/images/auth/slack-field-rendered.png deleted file mode 100644 index 7fc8b1e784583..0000000000000 Binary files a/docs-v2/public/images/auth/slack-field-rendered.png and /dev/null differ diff --git a/docs-v2/public/images/code/nodejs/auth/auths-property.png b/docs-v2/public/images/code/nodejs/auth/auths-property.png deleted file mode 100644 index 57ccd53ea8bdb..0000000000000 Binary files a/docs-v2/public/images/code/nodejs/auth/auths-property.png and /dev/null differ diff --git a/docs-v2/public/images/code/nodejs/auth/run-node-js-code-with-slack.png b/docs-v2/public/images/code/nodejs/auth/run-node-js-code-with-slack.png deleted file mode 100644 index c4a13c2a4de71..0000000000000 Binary files a/docs-v2/public/images/code/nodejs/auth/run-node-js-code-with-slack.png and /dev/null differ diff --git a/docs-v2/public/images/code/nodejs/auth/run-node-with-slack.png b/docs-v2/public/images/code/nodejs/auth/run-node-with-slack.png deleted file mode 100644 index 4abddab741b56..0000000000000 Binary files a/docs-v2/public/images/code/nodejs/auth/run-node-with-slack.png and /dev/null differ diff --git a/docs-v2/public/images/code/nodejs/auth/search-for-slack.png b/docs-v2/public/images/code/nodejs/auth/search-for-slack.png deleted file mode 100644 index fff6e360a54ae..0000000000000 Binary files a/docs-v2/public/images/code/nodejs/auth/search-for-slack.png and /dev/null differ diff --git a/docs-v2/public/images/code/nodejs/auth/slack-auth-prop-example.png b/docs-v2/public/images/code/nodejs/auth/slack-auth-prop-example.png deleted file mode 100644 index 640d36ba5f5c2..0000000000000 Binary files a/docs-v2/public/images/code/nodejs/auth/slack-auth-prop-example.png and /dev/null differ diff --git a/docs-v2/public/images/code/nodejs/auth/slack-test-request.png b/docs-v2/public/images/code/nodejs/auth/slack-test-request.png deleted file mode 100644 index 80a71b9be04cd..0000000000000 Binary files a/docs-v2/public/images/code/nodejs/auth/slack-test-request.png and /dev/null differ diff --git a/docs-v2/public/images/code/nodejs/auth/slack-token.png b/docs-v2/public/images/code/nodejs/auth/slack-token.png deleted file mode 100644 index 3da976a2eea78..0000000000000 Binary files a/docs-v2/public/images/code/nodejs/auth/slack-token.png and /dev/null differ diff --git a/docs-v2/public/images/code/nodejs/user-input-props-example.png b/docs-v2/public/images/code/nodejs/user-input-props-example.png deleted file mode 100644 index ef987b0cc1afb..0000000000000 Binary files a/docs-v2/public/images/code/nodejs/user-input-props-example.png and /dev/null differ diff --git a/docs-v2/public/images/components/image-20200819210516311.png b/docs-v2/public/images/components/image-20200819210516311.png deleted file mode 100644 index a7229260e7592..0000000000000 Binary files a/docs-v2/public/images/components/image-20200819210516311.png and /dev/null differ diff --git a/docs-v2/public/images/components/image-20210326151557417.png b/docs-v2/public/images/components/image-20210326151557417.png deleted file mode 100644 index ec68e3ba88741..0000000000000 Binary files a/docs-v2/public/images/components/image-20210326151557417.png and /dev/null differ diff --git a/docs-v2/public/images/components/image-20210326151706682.png b/docs-v2/public/images/components/image-20210326151706682.png deleted file mode 100644 index 8a9401a798e76..0000000000000 Binary files a/docs-v2/public/images/components/image-20210326151706682.png and /dev/null differ diff --git a/docs-v2/public/images/components/image-20210326151930885.png b/docs-v2/public/images/components/image-20210326151930885.png deleted file mode 100644 index 0cc8c4fbd5698..0000000000000 Binary files a/docs-v2/public/images/components/image-20210326151930885.png and /dev/null differ diff --git a/docs-v2/public/images/components/info-alert-prop-github.png b/docs-v2/public/images/components/info-alert-prop-github.png deleted file mode 100644 index f4e4b22be0406..0000000000000 Binary files a/docs-v2/public/images/components/info-alert-prop-github.png and /dev/null differ diff --git a/docs-v2/public/images/components/quickstart/hello-world-1.gif b/docs-v2/public/images/components/quickstart/hello-world-1.gif deleted file mode 100644 index c9b20fbaf2d2b..0000000000000 Binary files a/docs-v2/public/images/components/quickstart/hello-world-1.gif and /dev/null differ diff --git a/docs-v2/public/images/components/quickstart/hello-world-2.gif b/docs-v2/public/images/components/quickstart/hello-world-2.gif deleted file mode 100644 index 1c2414c752f4c..0000000000000 Binary files a/docs-v2/public/images/components/quickstart/hello-world-2.gif and /dev/null differ diff --git a/docs-v2/public/images/components/quickstart/hello-world-3.gif b/docs-v2/public/images/components/quickstart/hello-world-3.gif deleted file mode 100644 index a973464bebb01..0000000000000 Binary files a/docs-v2/public/images/components/quickstart/hello-world-3.gif and /dev/null differ diff --git a/docs-v2/public/images/components/quickstart/hello-world-4.gif b/docs-v2/public/images/components/quickstart/hello-world-4.gif deleted file mode 100644 index 39573cd0620bb..0000000000000 Binary files a/docs-v2/public/images/components/quickstart/hello-world-4.gif and /dev/null differ diff --git a/docs-v2/public/images/components/quickstart/uncompressed/hello-world-1.gif b/docs-v2/public/images/components/quickstart/uncompressed/hello-world-1.gif deleted file mode 100644 index b2f8053e836a8..0000000000000 Binary files a/docs-v2/public/images/components/quickstart/uncompressed/hello-world-1.gif and /dev/null differ diff --git a/docs-v2/public/images/components/quickstart/uncompressed/hello-world-2.gif b/docs-v2/public/images/components/quickstart/uncompressed/hello-world-2.gif deleted file mode 100644 index 88d323a92bb3f..0000000000000 Binary files a/docs-v2/public/images/components/quickstart/uncompressed/hello-world-2.gif and /dev/null differ diff --git a/docs-v2/public/images/components/quickstart/uncompressed/hello-world-3.gif b/docs-v2/public/images/components/quickstart/uncompressed/hello-world-3.gif deleted file mode 100644 index 5f56de5ce981b..0000000000000 Binary files a/docs-v2/public/images/components/quickstart/uncompressed/hello-world-3.gif and /dev/null differ diff --git a/docs-v2/public/images/components/quickstart/uncompressed/hello-world-4.gif b/docs-v2/public/images/components/quickstart/uncompressed/hello-world-4.gif deleted file mode 100644 index 29308afd64e87..0000000000000 Binary files a/docs-v2/public/images/components/quickstart/uncompressed/hello-world-4.gif and /dev/null differ diff --git a/docs-v2/public/images/components/spotify-$summary-example.png b/docs-v2/public/images/components/spotify-$summary-example.png deleted file mode 100644 index 88fde970576f4..0000000000000 Binary files a/docs-v2/public/images/components/spotify-$summary-example.png and /dev/null differ diff --git a/docs-v2/public/images/components/trello-board-example.png b/docs-v2/public/images/components/trello-board-example.png deleted file mode 100644 index 7dfbdf5e33d33..0000000000000 Binary files a/docs-v2/public/images/components/trello-board-example.png and /dev/null differ diff --git a/docs-v2/public/images/components/trello-props.png b/docs-v2/public/images/components/trello-props.png deleted file mode 100644 index f9e1dffcf6c70..0000000000000 Binary files a/docs-v2/public/images/components/trello-props.png and /dev/null differ diff --git a/docs-v2/public/images/components/v3/using-private-actions.png b/docs-v2/public/images/components/v3/using-private-actions.png deleted file mode 100644 index 4b4eea652cdf2..0000000000000 Binary files a/docs-v2/public/images/components/v3/using-private-actions.png and /dev/null differ diff --git a/docs-v2/public/images/components/v3/using-private-sources.png b/docs-v2/public/images/components/v3/using-private-sources.png deleted file mode 100644 index 02c0fc4993514..0000000000000 Binary files a/docs-v2/public/images/components/v3/using-private-sources.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/amazon-v-google-sheets.png b/docs-v2/public/images/concurrency-and-throttling/amazon-v-google-sheets.png deleted file mode 100644 index 65481bca7d5c0..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/amazon-v-google-sheets.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/gsheets-1.png b/docs-v2/public/images/concurrency-and-throttling/gsheets-1.png deleted file mode 100644 index dc61835c76c67..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/gsheets-1.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/gsheets-2.png b/docs-v2/public/images/concurrency-and-throttling/gsheets-2.png deleted file mode 100644 index 9dbcfa25118ed..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/gsheets-2.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/image-20201007113139913.png b/docs-v2/public/images/concurrency-and-throttling/image-20201007113139913.png deleted file mode 100644 index 829c043cca9a8..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/image-20201007113139913.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/image-20201027120141750.png b/docs-v2/public/images/concurrency-and-throttling/image-20201027120141750.png deleted file mode 100644 index 1a10996a9a830..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/image-20201027120141750.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/image-20201027124356486.png b/docs-v2/public/images/concurrency-and-throttling/image-20201027124356486.png deleted file mode 100644 index 82cbef45a7927..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/image-20201027124356486.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/image-20201027124419520.png b/docs-v2/public/images/concurrency-and-throttling/image-20201027124419520.png deleted file mode 100644 index 51264dec7a0f9..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/image-20201027124419520.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/image-20201027124745363.png b/docs-v2/public/images/concurrency-and-throttling/image-20201027124745363.png deleted file mode 100644 index 13b099dd33ed4..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/image-20201027124745363.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/image-20201027124755082.png b/docs-v2/public/images/concurrency-and-throttling/image-20201027124755082.png deleted file mode 100644 index 413e41c399ede..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/image-20201027124755082.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/image-20201027124959905.png b/docs-v2/public/images/concurrency-and-throttling/image-20201027124959905.png deleted file mode 100644 index 20ed048ae76f9..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/image-20201027124959905.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/image-20201027125010252.png b/docs-v2/public/images/concurrency-and-throttling/image-20201027125010252.png deleted file mode 100644 index e2691af173c6a..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/image-20201027125010252.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/image-20201027132901691.png b/docs-v2/public/images/concurrency-and-throttling/image-20201027132901691.png deleted file mode 100644 index 23cfb496a4175..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/image-20201027132901691.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/image-20201027133308888.png b/docs-v2/public/images/concurrency-and-throttling/image-20201027133308888.png deleted file mode 100644 index 8c1bb138b512c..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/image-20201027133308888.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/image-20201027145818255.png b/docs-v2/public/images/concurrency-and-throttling/image-20201027145818255.png deleted file mode 100644 index 3bd395cddd77f..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/image-20201027145818255.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/image-20201027145847752.png b/docs-v2/public/images/concurrency-and-throttling/image-20201027145847752.png deleted file mode 100644 index 7a5e2be4373ff..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/image-20201027145847752.png and /dev/null differ diff --git a/docs-v2/public/images/concurrency-and-throttling/queue-size.png b/docs-v2/public/images/concurrency-and-throttling/queue-size.png deleted file mode 100644 index 7e71b66184fc2..0000000000000 Binary files a/docs-v2/public/images/concurrency-and-throttling/queue-size.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/2024-07-21_20.51.37.gif b/docs-v2/public/images/control-flow/2024-07-21_20.51.37.gif deleted file mode 100644 index 49f5a9bc192d8..0000000000000 Binary files a/docs-v2/public/images/control-flow/2024-07-21_20.51.37.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/2024-07-21_20.55.09.gif b/docs-v2/public/images/control-flow/2024-07-21_20.55.09.gif deleted file mode 100644 index 7e374f702cf22..0000000000000 Binary files a/docs-v2/public/images/control-flow/2024-07-21_20.55.09.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/Inspect.gif b/docs-v2/public/images/control-flow/Inspect.gif deleted file mode 100644 index 4d6b5feacc936..0000000000000 Binary files a/docs-v2/public/images/control-flow/Inspect.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/add_if_else.gif b/docs-v2/public/images/control-flow/add_if_else.gif deleted file mode 100644 index aa89413917bef..0000000000000 Binary files a/docs-v2/public/images/control-flow/add_if_else.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/add_step_to_branch.gif b/docs-v2/public/images/control-flow/add_step_to_branch.gif deleted file mode 100644 index 4e78dc9100b90..0000000000000 Binary files a/docs-v2/public/images/control-flow/add_step_to_branch.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/billing_1credit_a.png b/docs-v2/public/images/control-flow/billing_1credit_a.png deleted file mode 100644 index 433bb0177380e..0000000000000 Binary files a/docs-v2/public/images/control-flow/billing_1credit_a.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/billing_1credit_b.png b/docs-v2/public/images/control-flow/billing_1credit_b.png deleted file mode 100644 index 0e1493ac5dff7..0000000000000 Binary files a/docs-v2/public/images/control-flow/billing_1credit_b.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/billing_3credits.png b/docs-v2/public/images/control-flow/billing_3credits.png deleted file mode 100644 index 68495811d8fe3..0000000000000 Binary files a/docs-v2/public/images/control-flow/billing_3credits.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/change_in_state.gif b/docs-v2/public/images/control-flow/change_in_state.gif deleted file mode 100644 index 4f21337cab30b..0000000000000 Binary files a/docs-v2/public/images/control-flow/change_in_state.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/delay-step-props.png b/docs-v2/public/images/control-flow/delay-step-props.png deleted file mode 100644 index 423f5bd031136..0000000000000 Binary files a/docs-v2/public/images/control-flow/delay-step-props.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/end_workflow.png b/docs-v2/public/images/control-flow/end_workflow.png deleted file mode 100644 index e9a94f10fd08c..0000000000000 Binary files a/docs-v2/public/images/control-flow/end_workflow.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/executed_path.png b/docs-v2/public/images/control-flow/executed_path.png deleted file mode 100644 index c60d7adf6b7c3..0000000000000 Binary files a/docs-v2/public/images/control-flow/executed_path.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/execution_path_a_linear.png b/docs-v2/public/images/control-flow/execution_path_a_linear.png deleted file mode 100644 index 880c653023e17..0000000000000 Binary files a/docs-v2/public/images/control-flow/execution_path_a_linear.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/execution_path_b_nonlinear.png b/docs-v2/public/images/control-flow/execution_path_b_nonlinear.png deleted file mode 100644 index 0bec6e8f91294..0000000000000 Binary files a/docs-v2/public/images/control-flow/execution_path_b_nonlinear.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/ifelse-configuration.png b/docs-v2/public/images/control-flow/ifelse-configuration.png deleted file mode 100644 index 58fed5d8e5ed2..0000000000000 Binary files a/docs-v2/public/images/control-flow/ifelse-configuration.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/nesting.png b/docs-v2/public/images/control-flow/nesting.png deleted file mode 100644 index 9fbab992cb07a..0000000000000 Binary files a/docs-v2/public/images/control-flow/nesting.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/out_of_date.gif b/docs-v2/public/images/control-flow/out_of_date.gif deleted file mode 100644 index 536d68d391025..0000000000000 Binary files a/docs-v2/public/images/control-flow/out_of_date.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/parallel/01_trigger.gif b/docs-v2/public/images/control-flow/parallel/01_trigger.gif deleted file mode 100644 index fa5576ba52a19..0000000000000 Binary files a/docs-v2/public/images/control-flow/parallel/01_trigger.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/parallel/02_add_parallel.gif b/docs-v2/public/images/control-flow/parallel/02_add_parallel.gif deleted file mode 100644 index b12abcb83398d..0000000000000 Binary files a/docs-v2/public/images/control-flow/parallel/02_add_parallel.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/parallel/03_configure_and_test.gif b/docs-v2/public/images/control-flow/parallel/03_configure_and_test.gif deleted file mode 100644 index 001f944b1f0b7..0000000000000 Binary files a/docs-v2/public/images/control-flow/parallel/03_configure_and_test.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/parallel/04_add_steps.gif b/docs-v2/public/images/control-flow/parallel/04_add_steps.gif deleted file mode 100644 index f48aa1a64f699..0000000000000 Binary files a/docs-v2/public/images/control-flow/parallel/04_add_steps.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/parallel/05_test_end_phase.gif b/docs-v2/public/images/control-flow/parallel/05_test_end_phase.gif deleted file mode 100644 index 263f21125d519..0000000000000 Binary files a/docs-v2/public/images/control-flow/parallel/05_test_end_phase.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/parallel/06_use_exports_in_parent_flow.gif b/docs-v2/public/images/control-flow/parallel/06_use_exports_in_parent_flow.gif deleted file mode 100644 index e472567b8fd1e..0000000000000 Binary files a/docs-v2/public/images/control-flow/parallel/06_use_exports_in_parent_flow.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/parallel/07_deploy_and_run.gif b/docs-v2/public/images/control-flow/parallel/07_deploy_and_run.gif deleted file mode 100644 index b0adc1ccc36df..0000000000000 Binary files a/docs-v2/public/images/control-flow/parallel/07_deploy_and_run.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/parallel/add_branch.png b/docs-v2/public/images/control-flow/parallel/add_branch.png deleted file mode 100644 index d1ddc48472e04..0000000000000 Binary files a/docs-v2/public/images/control-flow/parallel/add_branch.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/parallel/add_parallel_block.png b/docs-v2/public/images/control-flow/parallel/add_parallel_block.png deleted file mode 100644 index 0dbe975150717..0000000000000 Binary files a/docs-v2/public/images/control-flow/parallel/add_parallel_block.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/parallel/parallel.png b/docs-v2/public/images/control-flow/parallel/parallel.png deleted file mode 100644 index 46520fd497c26..0000000000000 Binary files a/docs-v2/public/images/control-flow/parallel/parallel.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/parallel/rename_branch.png b/docs-v2/public/images/control-flow/parallel/rename_branch.png deleted file mode 100644 index 3a9f1c43b718a..0000000000000 Binary files a/docs-v2/public/images/control-flow/parallel/rename_branch.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/passing_data.png b/docs-v2/public/images/control-flow/passing_data.png deleted file mode 100644 index d6485f5a96b35..0000000000000 Binary files a/docs-v2/public/images/control-flow/passing_data.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/reason.png b/docs-v2/public/images/control-flow/reason.png deleted file mode 100644 index 4b07352dd8405..0000000000000 Binary files a/docs-v2/public/images/control-flow/reason.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/reference_end_exports.gif b/docs-v2/public/images/control-flow/reference_end_exports.gif deleted file mode 100644 index fffa5dd2735ad..0000000000000 Binary files a/docs-v2/public/images/control-flow/reference_end_exports.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/referencing_data.png b/docs-v2/public/images/control-flow/referencing_data.png deleted file mode 100644 index cd0ccf3be367f..0000000000000 Binary files a/docs-v2/public/images/control-flow/referencing_data.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/return_response_after_block.png b/docs-v2/public/images/control-flow/return_response_after_block.png deleted file mode 100644 index 371f3016e119e..0000000000000 Binary files a/docs-v2/public/images/control-flow/return_response_after_block.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/return_response_conditional.png b/docs-v2/public/images/control-flow/return_response_conditional.png deleted file mode 100644 index fd8dd5cca805e..0000000000000 Binary files a/docs-v2/public/images/control-flow/return_response_conditional.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/return_response_in_block.png b/docs-v2/public/images/control-flow/return_response_in_block.png deleted file mode 100644 index 9af13e1b46ab1..0000000000000 Binary files a/docs-v2/public/images/control-flow/return_response_in_block.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/rule_builder_groups.png b/docs-v2/public/images/control-flow/rule_builder_groups.png deleted file mode 100644 index 2401d206723dc..0000000000000 Binary files a/docs-v2/public/images/control-flow/rule_builder_groups.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/rule_builder_multiple.png b/docs-v2/public/images/control-flow/rule_builder_multiple.png deleted file mode 100644 index d09608642b8c2..0000000000000 Binary files a/docs-v2/public/images/control-flow/rule_builder_multiple.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/rule_builder_overview.png b/docs-v2/public/images/control-flow/rule_builder_overview.png deleted file mode 100644 index d804fa7028026..0000000000000 Binary files a/docs-v2/public/images/control-flow/rule_builder_overview.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/rule_builder_simple.png b/docs-v2/public/images/control-flow/rule_builder_simple.png deleted file mode 100644 index 84660e2a3108b..0000000000000 Binary files a/docs-v2/public/images/control-flow/rule_builder_simple.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/segment_delay.png b/docs-v2/public/images/control-flow/segment_delay.png deleted file mode 100644 index 81282a9b4157f..0000000000000 Binary files a/docs-v2/public/images/control-flow/segment_delay.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/segment_linear.png b/docs-v2/public/images/control-flow/segment_linear.png deleted file mode 100644 index 28ee860ecbbc1..0000000000000 Binary files a/docs-v2/public/images/control-flow/segment_linear.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/segment_non_linear.png b/docs-v2/public/images/control-flow/segment_non_linear.png deleted file mode 100644 index 68495811d8fe3..0000000000000 Binary files a/docs-v2/public/images/control-flow/segment_non_linear.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/select_different_event.gif b/docs-v2/public/images/control-flow/select_different_event.gif deleted file mode 100644 index 2e4ad762e82d7..0000000000000 Binary files a/docs-v2/public/images/control-flow/select_different_event.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/state_error.png b/docs-v2/public/images/control-flow/state_error.png deleted file mode 100644 index 627cfbf320446..0000000000000 Binary files a/docs-v2/public/images/control-flow/state_error.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/state_stale.png b/docs-v2/public/images/control-flow/state_stale.png deleted file mode 100644 index 9b367406a032e..0000000000000 Binary files a/docs-v2/public/images/control-flow/state_stale.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/state_success.png b/docs-v2/public/images/control-flow/state_success.png deleted file mode 100644 index bbc1670123c8b..0000000000000 Binary files a/docs-v2/public/images/control-flow/state_success.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/switch/add_another_case.gif b/docs-v2/public/images/control-flow/switch/add_another_case.gif deleted file mode 100644 index 6f3ac9fd779eb..0000000000000 Binary files a/docs-v2/public/images/control-flow/switch/add_another_case.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/switch/add_switch.gif b/docs-v2/public/images/control-flow/switch/add_switch.gif deleted file mode 100644 index 6f399864f6663..0000000000000 Binary files a/docs-v2/public/images/control-flow/switch/add_switch.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/switch/build_and_test_alternate_paths.gif b/docs-v2/public/images/control-flow/switch/build_and_test_alternate_paths.gif deleted file mode 100644 index e988de80d5384..0000000000000 Binary files a/docs-v2/public/images/control-flow/switch/build_and_test_alternate_paths.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/switch/deploy_and_test.gif b/docs-v2/public/images/control-flow/switch/deploy_and_test.gif deleted file mode 100644 index 39e8a42d2157b..0000000000000 Binary files a/docs-v2/public/images/control-flow/switch/deploy_and_test.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/switch/export_data_to_parent.gif b/docs-v2/public/images/control-flow/switch/export_data_to_parent.gif deleted file mode 100644 index 82330fa2e667b..0000000000000 Binary files a/docs-v2/public/images/control-flow/switch/export_data_to_parent.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/switch/switch-configuration.png b/docs-v2/public/images/control-flow/switch/switch-configuration.png deleted file mode 100644 index fd01a7f64ab67..0000000000000 Binary files a/docs-v2/public/images/control-flow/switch/switch-configuration.png and /dev/null differ diff --git a/docs-v2/public/images/control-flow/switch/test_and_build_success_path.gif b/docs-v2/public/images/control-flow/switch/test_and_build_success_path.gif deleted file mode 100644 index 6fe707ceb04b0..0000000000000 Binary files a/docs-v2/public/images/control-flow/switch/test_and_build_success_path.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/switch/test_different_trigger_events.gif b/docs-v2/public/images/control-flow/switch/test_different_trigger_events.gif deleted file mode 100644 index d70c16d66ae65..0000000000000 Binary files a/docs-v2/public/images/control-flow/switch/test_different_trigger_events.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/switch/trigger.gif b/docs-v2/public/images/control-flow/switch/trigger.gif deleted file mode 100644 index ddeff4a0f4f0e..0000000000000 Binary files a/docs-v2/public/images/control-flow/switch/trigger.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/test_and_deploy.gif b/docs-v2/public/images/control-flow/test_and_deploy.gif deleted file mode 100644 index c96e2e8d84f84..0000000000000 Binary files a/docs-v2/public/images/control-flow/test_and_deploy.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/test_end_phase.gif b/docs-v2/public/images/control-flow/test_end_phase.gif deleted file mode 100644 index 7a0f72878ffa2..0000000000000 Binary files a/docs-v2/public/images/control-flow/test_end_phase.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/trigger.gif b/docs-v2/public/images/control-flow/trigger.gif deleted file mode 100644 index c3b74d5f03e54..0000000000000 Binary files a/docs-v2/public/images/control-flow/trigger.gif and /dev/null differ diff --git a/docs-v2/public/images/control-flow/unknown_execution_path.png b/docs-v2/public/images/control-flow/unknown_execution_path.png deleted file mode 100644 index 7e9cad0dc9976..0000000000000 Binary files a/docs-v2/public/images/control-flow/unknown_execution_path.png and /dev/null differ diff --git a/docs-v2/public/images/data-stores/add-or-update-a-single-record.png b/docs-v2/public/images/data-stores/add-or-update-a-single-record.png deleted file mode 100644 index ad4421357a9b1..0000000000000 Binary files a/docs-v2/public/images/data-stores/add-or-update-a-single-record.png and /dev/null differ diff --git a/docs-v2/public/images/data-stores/configure-data-store-retrieve-record.png b/docs-v2/public/images/data-stores/configure-data-store-retrieve-record.png deleted file mode 100644 index 19b4ea6e9dd23..0000000000000 Binary files a/docs-v2/public/images/data-stores/configure-data-store-retrieve-record.png and /dev/null differ diff --git a/docs-v2/public/images/data-stores/configuring-data-store-update-action.png b/docs-v2/public/images/data-stores/configuring-data-store-update-action.png deleted file mode 100644 index e79fb4136511a..0000000000000 Binary files a/docs-v2/public/images/data-stores/configuring-data-store-update-action.png and /dev/null differ diff --git a/docs-v2/public/images/data-stores/delete-a-single-record.png b/docs-v2/public/images/data-stores/delete-a-single-record.png deleted file mode 100644 index 77f30f364cfaf..0000000000000 Binary files a/docs-v2/public/images/data-stores/delete-a-single-record.png and /dev/null differ diff --git a/docs-v2/public/images/data-stores/get-a-record-action-selection.png b/docs-v2/public/images/data-stores/get-a-record-action-selection.png deleted file mode 100644 index b3d16f0a5ff5a..0000000000000 Binary files a/docs-v2/public/images/data-stores/get-a-record-action-selection.png and /dev/null differ diff --git a/docs-v2/public/images/data-stores/nodejs-example.png b/docs-v2/public/images/data-stores/nodejs-example.png deleted file mode 100644 index 60cff583ebb78..0000000000000 Binary files a/docs-v2/public/images/data-stores/nodejs-example.png and /dev/null differ diff --git a/docs-v2/public/images/data-stores/select-delete-a-record.png b/docs-v2/public/images/data-stores/select-delete-a-record.png deleted file mode 100644 index 423478b18e36e..0000000000000 Binary files a/docs-v2/public/images/data-stores/select-delete-a-record.png and /dev/null differ diff --git a/docs-v2/public/images/data-stores/update-data-store-key-by-reference.png b/docs-v2/public/images/data-stores/update-data-store-key-by-reference.png deleted file mode 100644 index 6f76189fb6178..0000000000000 Binary files a/docs-v2/public/images/data-stores/update-data-store-key-by-reference.png and /dev/null differ diff --git a/docs-v2/public/images/destinations/conditional-payload-expression.png b/docs-v2/public/images/destinations/conditional-payload-expression.png deleted file mode 100644 index 74d4fb6681122..0000000000000 Binary files a/docs-v2/public/images/destinations/conditional-payload-expression.png and /dev/null differ diff --git a/docs-v2/public/images/destinations/dollar-event-body-payload.png b/docs-v2/public/images/destinations/dollar-event-body-payload.png deleted file mode 100644 index e824299a67b24..0000000000000 Binary files a/docs-v2/public/images/destinations/dollar-event-body-payload.png and /dev/null differ diff --git a/docs-v2/public/images/destinations/dollar-event-payload.png b/docs-v2/public/images/destinations/dollar-event-payload.png deleted file mode 100644 index 27a6a21b74bfc..0000000000000 Binary files a/docs-v2/public/images/destinations/dollar-event-payload.png and /dev/null differ diff --git a/docs-v2/public/images/destinations/email-payload.png b/docs-v2/public/images/destinations/email-payload.png deleted file mode 100644 index c902179cb96f1..0000000000000 Binary files a/docs-v2/public/images/destinations/email-payload.png and /dev/null differ diff --git a/docs-v2/public/images/destinations/new-code-step.png b/docs-v2/public/images/destinations/new-code-step.png deleted file mode 100644 index 52d32efb8f0d5..0000000000000 Binary files a/docs-v2/public/images/destinations/new-code-step.png and /dev/null differ diff --git a/docs-v2/public/images/destinations/new-code.png b/docs-v2/public/images/destinations/new-code.png deleted file mode 100644 index 63f234e40ad2f..0000000000000 Binary files a/docs-v2/public/images/destinations/new-code.png and /dev/null differ diff --git a/docs-v2/public/images/destinations/pipeline-id.png b/docs-v2/public/images/destinations/pipeline-id.png deleted file mode 100644 index 950e7691e307d..0000000000000 Binary files a/docs-v2/public/images/destinations/pipeline-id.png and /dev/null differ diff --git a/docs-v2/public/images/destinations/webhook-action-params.png b/docs-v2/public/images/destinations/webhook-action-params.png deleted file mode 100644 index 0bc68405d6fa8..0000000000000 Binary files a/docs-v2/public/images/destinations/webhook-action-params.png and /dev/null differ diff --git a/docs-v2/public/images/destinations/webhook-action.png b/docs-v2/public/images/destinations/webhook-action.png deleted file mode 100644 index 8823b1c212d04..0000000000000 Binary files a/docs-v2/public/images/destinations/webhook-action.png and /dev/null differ diff --git a/docs-v2/public/images/events/cmd-click-to-get-path.png b/docs-v2/public/images/events/cmd-click-to-get-path.png deleted file mode 100644 index ee0d8e5a0e444..0000000000000 Binary files a/docs-v2/public/images/events/cmd-click-to-get-path.png and /dev/null differ diff --git a/docs-v2/public/images/events/complex-dollar-event.png b/docs-v2/public/images/events/complex-dollar-event.png deleted file mode 100644 index 9d2548d2a7c21..0000000000000 Binary files a/docs-v2/public/images/events/complex-dollar-event.png and /dev/null differ diff --git a/docs-v2/public/images/events/copy-path.gif b/docs-v2/public/images/events/copy-path.gif deleted file mode 100644 index e7d6140e861b5..0000000000000 Binary files a/docs-v2/public/images/events/copy-path.gif and /dev/null differ diff --git a/docs-v2/public/images/events/copy-value.gif b/docs-v2/public/images/events/copy-value.gif deleted file mode 100644 index 777fffd05d18e..0000000000000 Binary files a/docs-v2/public/images/events/copy-value.gif and /dev/null differ diff --git a/docs-v2/public/images/events/diff.png b/docs-v2/public/images/events/diff.png deleted file mode 100644 index 3712bd3cea5b2..0000000000000 Binary files a/docs-v2/public/images/events/diff.png and /dev/null differ diff --git a/docs-v2/public/images/events/dollar-event.png b/docs-v2/public/images/events/dollar-event.png deleted file mode 100644 index 86139f481c114..0000000000000 Binary files a/docs-v2/public/images/events/dollar-event.png and /dev/null differ diff --git a/docs-v2/public/images/events/event-and-context.png b/docs-v2/public/images/events/event-and-context.png deleted file mode 100644 index ab797ae9fa239..0000000000000 Binary files a/docs-v2/public/images/events/event-and-context.png and /dev/null differ diff --git a/docs-v2/public/images/events/event-in-inspector.png b/docs-v2/public/images/events/event-in-inspector.png deleted file mode 100644 index 731f64970e595..0000000000000 Binary files a/docs-v2/public/images/events/event-in-inspector.png and /dev/null differ diff --git a/docs-v2/public/images/events/step-execution-data.png b/docs-v2/public/images/events/step-execution-data.png deleted file mode 100644 index fc1b2e980ea26..0000000000000 Binary files a/docs-v2/public/images/events/step-execution-data.png and /dev/null differ diff --git a/docs-v2/public/images/events/test-event.png b/docs-v2/public/images/events/test-event.png deleted file mode 100644 index 1735ff90bfeaa..0000000000000 Binary files a/docs-v2/public/images/events/test-event.png and /dev/null differ diff --git a/docs-v2/public/images/events/trigger-event-data.png b/docs-v2/public/images/events/trigger-event-data.png deleted file mode 100644 index b172e30a49837..0000000000000 Binary files a/docs-v2/public/images/events/trigger-event-data.png and /dev/null differ diff --git a/docs-v2/public/images/examples/configured-task-scheduler-step.png b/docs-v2/public/images/examples/configured-task-scheduler-step.png deleted file mode 100644 index 1792db9744def..0000000000000 Binary files a/docs-v2/public/images/examples/configured-task-scheduler-step.png and /dev/null differ diff --git a/docs-v2/public/images/examples/create-task-scheduler.gif b/docs-v2/public/images/examples/create-task-scheduler.gif deleted file mode 100644 index 8b6db1d802aef..0000000000000 Binary files a/docs-v2/public/images/examples/create-task-scheduler.gif and /dev/null differ diff --git a/docs-v2/public/images/examples/email-reference.png b/docs-v2/public/images/examples/email-reference.png deleted file mode 100644 index 73a7295d95a1c..0000000000000 Binary files a/docs-v2/public/images/examples/email-reference.png and /dev/null differ diff --git a/docs-v2/public/images/examples/endpoint.png b/docs-v2/public/images/examples/endpoint.png deleted file mode 100644 index f4dff65760233..0000000000000 Binary files a/docs-v2/public/images/examples/endpoint.png and /dev/null differ diff --git a/docs-v2/public/images/examples/find-task-scheduler-step.gif b/docs-v2/public/images/examples/find-task-scheduler-step.gif deleted file mode 100644 index 3486138a94235..0000000000000 Binary files a/docs-v2/public/images/examples/find-task-scheduler-step.gif and /dev/null differ diff --git a/docs-v2/public/images/examples/select-task-scheduler-as-trigger.gif b/docs-v2/public/images/examples/select-task-scheduler-as-trigger.gif deleted file mode 100644 index e8167e6a89bf2..0000000000000 Binary files a/docs-v2/public/images/examples/select-task-scheduler-as-trigger.gif and /dev/null differ diff --git a/docs-v2/public/images/examples/task-scheduler-event.png b/docs-v2/public/images/examples/task-scheduler-event.png deleted file mode 100644 index ff5e63d774392..0000000000000 Binary files a/docs-v2/public/images/examples/task-scheduler-event.png and /dev/null differ diff --git a/docs-v2/public/images/examples/toggle-trigger-step-on.gif b/docs-v2/public/images/examples/toggle-trigger-step-on.gif deleted file mode 100644 index 08ef99af62384..0000000000000 Binary files a/docs-v2/public/images/examples/toggle-trigger-step-on.gif and /dev/null differ diff --git a/docs-v2/public/images/http/configure-slack-pre-built-action-props.png b/docs-v2/public/images/http/configure-slack-pre-built-action-props.png deleted file mode 100644 index e2a9d711a351e..0000000000000 Binary files a/docs-v2/public/images/http/configure-slack-pre-built-action-props.png and /dev/null differ diff --git a/docs-v2/public/images/http/connect-slack-account-to-http-request-action.png b/docs-v2/public/images/http/connect-slack-account-to-http-request-action.png deleted file mode 100644 index c43e4ed7f3e84..0000000000000 Binary files a/docs-v2/public/images/http/connect-slack-account-to-http-request-action.png and /dev/null differ diff --git a/docs-v2/public/images/http/default-axios-stack.png b/docs-v2/public/images/http/default-axios-stack.png deleted file mode 100644 index 88035fa157dd0..0000000000000 Binary files a/docs-v2/public/images/http/default-axios-stack.png and /dev/null differ diff --git a/docs-v2/public/images/http/pipedream-axios-stack.png b/docs-v2/public/images/http/pipedream-axios-stack.png deleted file mode 100644 index 2460c06f49991..0000000000000 Binary files a/docs-v2/public/images/http/pipedream-axios-stack.png and /dev/null differ diff --git a/docs-v2/public/images/http/pipedream-axios-success.png b/docs-v2/public/images/http/pipedream-axios-success.png deleted file mode 100644 index 66f64c63ad679..0000000000000 Binary files a/docs-v2/public/images/http/pipedream-axios-success.png and /dev/null differ diff --git a/docs-v2/public/images/http/select-an-app-inside-http-request-builder.png b/docs-v2/public/images/http/select-an-app-inside-http-request-builder.png deleted file mode 100644 index 50f6be639b558..0000000000000 Binary files a/docs-v2/public/images/http/select-an-app-inside-http-request-builder.png and /dev/null differ diff --git a/docs-v2/public/images/http/selecting-pre-built-actions.png b/docs-v2/public/images/http/selecting-pre-built-actions.png deleted file mode 100644 index 70acd6003980c..0000000000000 Binary files a/docs-v2/public/images/http/selecting-pre-built-actions.png and /dev/null differ diff --git a/docs-v2/public/images/http/selecting-the-http-request-builder-action.png b/docs-v2/public/images/http/selecting-the-http-request-builder-action.png deleted file mode 100644 index 4b252a0bf19c0..0000000000000 Binary files a/docs-v2/public/images/http/selecting-the-http-request-builder-action.png and /dev/null differ diff --git a/docs-v2/public/images/http/selecting-the-slack-api-http-request-builder.png b/docs-v2/public/images/http/selecting-the-slack-api-http-request-builder.png deleted file mode 100644 index 09e57c7518f1d..0000000000000 Binary files a/docs-v2/public/images/http/selecting-the-slack-api-http-request-builder.png and /dev/null differ diff --git a/docs-v2/public/images/http/viewing-authorization-configuration.png b/docs-v2/public/images/http/viewing-authorization-configuration.png deleted file mode 100644 index 7e88af722fc72..0000000000000 Binary files a/docs-v2/public/images/http/viewing-authorization-configuration.png and /dev/null differ diff --git a/docs-v2/public/images/image-20201007113139913.png b/docs-v2/public/images/image-20201007113139913.png deleted file mode 100644 index 829c043cca9a8..0000000000000 Binary files a/docs-v2/public/images/image-20201007113139913.png and /dev/null differ diff --git a/docs-v2/public/images/image-20201027120141750.png b/docs-v2/public/images/image-20201027120141750.png deleted file mode 100644 index 1a10996a9a830..0000000000000 Binary files a/docs-v2/public/images/image-20201027120141750.png and /dev/null differ diff --git a/docs-v2/public/images/image-20201027124356486.png b/docs-v2/public/images/image-20201027124356486.png deleted file mode 100644 index 82cbef45a7927..0000000000000 Binary files a/docs-v2/public/images/image-20201027124356486.png and /dev/null differ diff --git a/docs-v2/public/images/image-20201027124419520.png b/docs-v2/public/images/image-20201027124419520.png deleted file mode 100644 index 51264dec7a0f9..0000000000000 Binary files a/docs-v2/public/images/image-20201027124419520.png and /dev/null differ diff --git a/docs-v2/public/images/image-20201027124745363.png b/docs-v2/public/images/image-20201027124745363.png deleted file mode 100644 index 13b099dd33ed4..0000000000000 Binary files a/docs-v2/public/images/image-20201027124745363.png and /dev/null differ diff --git a/docs-v2/public/images/image-20201027124755082.png b/docs-v2/public/images/image-20201027124755082.png deleted file mode 100644 index 413e41c399ede..0000000000000 Binary files a/docs-v2/public/images/image-20201027124755082.png and /dev/null differ diff --git a/docs-v2/public/images/image-20201027124959905.png b/docs-v2/public/images/image-20201027124959905.png deleted file mode 100644 index 20ed048ae76f9..0000000000000 Binary files a/docs-v2/public/images/image-20201027124959905.png and /dev/null differ diff --git a/docs-v2/public/images/image-20201027125010252.png b/docs-v2/public/images/image-20201027125010252.png deleted file mode 100644 index e2691af173c6a..0000000000000 Binary files a/docs-v2/public/images/image-20201027125010252.png and /dev/null differ diff --git a/docs-v2/public/images/image-20201027132901691.png b/docs-v2/public/images/image-20201027132901691.png deleted file mode 100644 index 23cfb496a4175..0000000000000 Binary files a/docs-v2/public/images/image-20201027132901691.png and /dev/null differ diff --git a/docs-v2/public/images/image-20201027133308888.png b/docs-v2/public/images/image-20201027133308888.png deleted file mode 100644 index 8c1bb138b512c..0000000000000 Binary files a/docs-v2/public/images/image-20201027133308888.png and /dev/null differ diff --git a/docs-v2/public/images/image-20201027145818255.png b/docs-v2/public/images/image-20201027145818255.png deleted file mode 100644 index 3bd395cddd77f..0000000000000 Binary files a/docs-v2/public/images/image-20201027145818255.png and /dev/null differ diff --git a/docs-v2/public/images/image-20201027145847752.png b/docs-v2/public/images/image-20201027145847752.png deleted file mode 100644 index 7a5e2be4373ff..0000000000000 Binary files a/docs-v2/public/images/image-20201027145847752.png and /dev/null differ diff --git a/docs-v2/public/images/inactive.png b/docs-v2/public/images/inactive.png deleted file mode 100644 index 123dd802921e3..0000000000000 Binary files a/docs-v2/public/images/inactive.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/dest-field.png b/docs-v2/public/images/inspect/dest-field.png deleted file mode 100644 index 1e31e04aa05bf..0000000000000 Binary files a/docs-v2/public/images/inspect/dest-field.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/dollar-end.png b/docs-v2/public/images/inspect/dollar-end.png deleted file mode 100644 index 71507c0950878..0000000000000 Binary files a/docs-v2/public/images/inspect/dollar-end.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/duration.png b/docs-v2/public/images/inspect/duration.png deleted file mode 100644 index 7a88f4315b68d..0000000000000 Binary files a/docs-v2/public/images/inspect/duration.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/edit-test-event.png b/docs-v2/public/images/inspect/edit-test-event.png deleted file mode 100644 index 0331ad02ff4f0..0000000000000 Binary files a/docs-v2/public/images/inspect/edit-test-event.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/event-date-grouping.png b/docs-v2/public/images/inspect/event-date-grouping.png deleted file mode 100644 index 99aeb117fb7ce..0000000000000 Binary files a/docs-v2/public/images/inspect/event-date-grouping.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/event-in-inspector.png b/docs-v2/public/images/inspect/event-in-inspector.png deleted file mode 100644 index 731f64970e595..0000000000000 Binary files a/docs-v2/public/images/inspect/event-in-inspector.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/exception.png b/docs-v2/public/images/inspect/exception.png deleted file mode 100644 index c88d101ebb930..0000000000000 Binary files a/docs-v2/public/images/inspect/exception.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/new-old-events.png b/docs-v2/public/images/inspect/new-old-events.png deleted file mode 100644 index 74f15e293d813..0000000000000 Binary files a/docs-v2/public/images/inspect/new-old-events.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/pause.gif b/docs-v2/public/images/inspect/pause.gif deleted file mode 100644 index 37799c6accf52..0000000000000 Binary files a/docs-v2/public/images/inspect/pause.gif and /dev/null differ diff --git a/docs-v2/public/images/inspect/paused-event-count.png b/docs-v2/public/images/inspect/paused-event-count.png deleted file mode 100644 index 34ac722cf1169..0000000000000 Binary files a/docs-v2/public/images/inspect/paused-event-count.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/replay-and-delete.png b/docs-v2/public/images/inspect/replay-and-delete.png deleted file mode 100644 index 347d4eb6eed9d..0000000000000 Binary files a/docs-v2/public/images/inspect/replay-and-delete.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/replay.png b/docs-v2/public/images/inspect/replay.png deleted file mode 100644 index a1874d9a020a1..0000000000000 Binary files a/docs-v2/public/images/inspect/replay.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/search-box.png b/docs-v2/public/images/inspect/search-box.png deleted file mode 100644 index 57da2f7aa6686..0000000000000 Binary files a/docs-v2/public/images/inspect/search-box.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/search.gif b/docs-v2/public/images/inspect/search.gif deleted file mode 100644 index 08da90a090527..0000000000000 Binary files a/docs-v2/public/images/inspect/search.gif and /dev/null differ diff --git a/docs-v2/public/images/inspect/send-test-event-button.png b/docs-v2/public/images/inspect/send-test-event-button.png deleted file mode 100644 index 725b5d2d4dec8..0000000000000 Binary files a/docs-v2/public/images/inspect/send-test-event-button.png and /dev/null differ diff --git a/docs-v2/public/images/inspect/version.png b/docs-v2/public/images/inspect/version.png deleted file mode 100644 index de74869bb0640..0000000000000 Binary files a/docs-v2/public/images/inspect/version.png and /dev/null differ diff --git a/docs-v2/public/images/integrations/add-new-app.png b/docs-v2/public/images/integrations/add-new-app.png deleted file mode 100644 index 845d93269a115..0000000000000 Binary files a/docs-v2/public/images/integrations/add-new-app.png and /dev/null differ diff --git a/docs-v2/public/images/integrations/api-key.png b/docs-v2/public/images/integrations/api-key.png deleted file mode 100644 index 1f30efc7cd320..0000000000000 Binary files a/docs-v2/public/images/integrations/api-key.png and /dev/null differ diff --git a/docs-v2/public/images/integrations/connect-existing-account.png b/docs-v2/public/images/integrations/connect-existing-account.png deleted file mode 100644 index e62035a971367..0000000000000 Binary files a/docs-v2/public/images/integrations/connect-existing-account.png and /dev/null differ diff --git a/docs-v2/public/images/integrations/manage-connected-account.png b/docs-v2/public/images/integrations/manage-connected-account.png deleted file mode 100644 index a19c57dc1a50b..0000000000000 Binary files a/docs-v2/public/images/integrations/manage-connected-account.png and /dev/null differ diff --git a/docs-v2/public/images/integrations/search-for-slack.png b/docs-v2/public/images/integrations/search-for-slack.png deleted file mode 100644 index 86e39d58b9836..0000000000000 Binary files a/docs-v2/public/images/integrations/search-for-slack.png and /dev/null differ diff --git a/docs-v2/public/images/integrations/select-external-auth.png b/docs-v2/public/images/integrations/select-external-auth.png deleted file mode 100644 index e38d00d59c1c5..0000000000000 Binary files a/docs-v2/public/images/integrations/select-external-auth.png and /dev/null differ diff --git a/docs-v2/public/images/integrations/slack-connect-account.png b/docs-v2/public/images/integrations/slack-connect-account.png deleted file mode 100644 index d861fe7c61e15..0000000000000 Binary files a/docs-v2/public/images/integrations/slack-connect-account.png and /dev/null differ diff --git a/docs-v2/public/images/integrations/slack-token.png b/docs-v2/public/images/integrations/slack-token.png deleted file mode 100644 index 3da976a2eea78..0000000000000 Binary files a/docs-v2/public/images/integrations/slack-token.png and /dev/null differ diff --git a/docs-v2/public/images/list-of-active-inactive-workflows.png b/docs-v2/public/images/list-of-active-inactive-workflows.png deleted file mode 100644 index 4f144c616f79b..0000000000000 Binary files a/docs-v2/public/images/list-of-active-inactive-workflows.png and /dev/null differ diff --git a/docs-v2/public/images/migrate-from-v1/app-props-example.png b/docs-v2/public/images/migrate-from-v1/app-props-example.png deleted file mode 100644 index ae0a1aabbc034..0000000000000 Binary files a/docs-v2/public/images/migrate-from-v1/app-props-example.png and /dev/null differ diff --git a/docs-v2/public/images/migrate-from-v1/builder-mode-sample.png b/docs-v2/public/images/migrate-from-v1/builder-mode-sample.png deleted file mode 100644 index fbb7877c25362..0000000000000 Binary files a/docs-v2/public/images/migrate-from-v1/builder-mode-sample.png and /dev/null differ diff --git a/docs-v2/public/images/migrate-from-v1/custom-http-response-option.png b/docs-v2/public/images/migrate-from-v1/custom-http-response-option.png deleted file mode 100644 index 174cd7e6eac3e..0000000000000 Binary files a/docs-v2/public/images/migrate-from-v1/custom-http-response-option.png and /dev/null differ diff --git a/docs-v2/public/images/migrate-from-v1/custom-string-prop.png b/docs-v2/public/images/migrate-from-v1/custom-string-prop.png deleted file mode 100644 index c1789ce67c5d8..0000000000000 Binary files a/docs-v2/public/images/migrate-from-v1/custom-string-prop.png and /dev/null differ diff --git a/docs-v2/public/images/migrate-from-v1/demo-poster.png b/docs-v2/public/images/migrate-from-v1/demo-poster.png deleted file mode 100644 index 75190d0b4dec5..0000000000000 Binary files a/docs-v2/public/images/migrate-from-v1/demo-poster.png and /dev/null differ diff --git a/docs-v2/public/images/migrate-from-v1/inspector-sample.png b/docs-v2/public/images/migrate-from-v1/inspector-sample.png deleted file mode 100644 index 504cbb6f8f55c..0000000000000 Binary files a/docs-v2/public/images/migrate-from-v1/inspector-sample.png and /dev/null differ diff --git a/docs-v2/public/images/migrate-from-v1/new-builder-context-switcher.gif b/docs-v2/public/images/migrate-from-v1/new-builder-context-switcher.gif deleted file mode 100644 index 1f7093a7f77ed..0000000000000 Binary files a/docs-v2/public/images/migrate-from-v1/new-builder-context-switcher.gif and /dev/null differ diff --git a/docs-v2/public/images/migrate-from-v1/test-workflow-portions.png b/docs-v2/public/images/migrate-from-v1/test-workflow-portions.png deleted file mode 100644 index 315920027327f..0000000000000 Binary files a/docs-v2/public/images/migrate-from-v1/test-workflow-portions.png and /dev/null differ diff --git a/docs-v2/public/images/migrate-from-v1/testing-individual-events.gif b/docs-v2/public/images/migrate-from-v1/testing-individual-events.gif deleted file mode 100644 index 20cc473ffe4d0..0000000000000 Binary files a/docs-v2/public/images/migrate-from-v1/testing-individual-events.gif and /dev/null differ diff --git a/docs-v2/public/images/my-pipelines.png b/docs-v2/public/images/my-pipelines.png deleted file mode 100644 index 1906ff9ceacc8..0000000000000 Binary files a/docs-v2/public/images/my-pipelines.png and /dev/null differ diff --git a/docs-v2/public/images/new-pipeline-url.png b/docs-v2/public/images/new-pipeline-url.png deleted file mode 100644 index a1c378fdd4b0e..0000000000000 Binary files a/docs-v2/public/images/new-pipeline-url.png and /dev/null differ diff --git a/docs-v2/public/images/nodejs/ai-code-generation/generating-slack-actions-with-ai.png b/docs-v2/public/images/nodejs/ai-code-generation/generating-slack-actions-with-ai.png deleted file mode 100644 index f85ea82e4c7e2..0000000000000 Binary files a/docs-v2/public/images/nodejs/ai-code-generation/generating-slack-actions-with-ai.png and /dev/null differ diff --git a/docs-v2/public/images/nodejs/configuration-error-example.png b/docs-v2/public/images/nodejs/configuration-error-example.png deleted file mode 100644 index 8727f0a836bfb..0000000000000 Binary files a/docs-v2/public/images/nodejs/configuration-error-example.png and /dev/null differ diff --git a/docs-v2/public/images/nodejs/first-name-prop-example.png b/docs-v2/public/images/nodejs/first-name-prop-example.png deleted file mode 100644 index e819f5faf78e9..0000000000000 Binary files a/docs-v2/public/images/nodejs/first-name-prop-example.png and /dev/null differ diff --git a/docs-v2/public/images/pipeline-version.png b/docs-v2/public/images/pipeline-version.png deleted file mode 100644 index 977b3fe0d4394..0000000000000 Binary files a/docs-v2/public/images/pipeline-version.png and /dev/null differ diff --git a/docs-v2/public/images/pipeline.png b/docs-v2/public/images/pipeline.png deleted file mode 100644 index 1ab800010bc66..0000000000000 Binary files a/docs-v2/public/images/pipeline.png and /dev/null differ diff --git a/docs-v2/public/images/projects/access-badge-click.png b/docs-v2/public/images/projects/access-badge-click.png deleted file mode 100644 index c95e29ea4d2f9..0000000000000 Binary files a/docs-v2/public/images/projects/access-badge-click.png and /dev/null differ diff --git a/docs-v2/public/images/projects/import-workflows-into-projects.png b/docs-v2/public/images/projects/import-workflows-into-projects.png deleted file mode 100644 index a4bebe7843289..0000000000000 Binary files a/docs-v2/public/images/projects/import-workflows-into-projects.png and /dev/null differ diff --git a/docs-v2/public/images/projects/manage-access-overflow-menu.png b/docs-v2/public/images/projects/manage-access-overflow-menu.png deleted file mode 100644 index e4915d70f7df0..0000000000000 Binary files a/docs-v2/public/images/projects/manage-access-overflow-menu.png and /dev/null differ diff --git a/docs-v2/public/images/projects/project-listing-access.png b/docs-v2/public/images/projects/project-listing-access.png deleted file mode 100644 index 6abf5b426b491..0000000000000 Binary files a/docs-v2/public/images/projects/project-listing-access.png and /dev/null differ diff --git a/docs-v2/public/images/projects/project-listing-owner.png b/docs-v2/public/images/projects/project-listing-owner.png deleted file mode 100644 index 9ec46c547728c..0000000000000 Binary files a/docs-v2/public/images/projects/project-listing-owner.png and /dev/null differ diff --git a/docs-v2/public/images/projects/slideout-member-dropdown.png b/docs-v2/public/images/projects/slideout-member-dropdown.png deleted file mode 100644 index 398131ce4d44a..0000000000000 Binary files a/docs-v2/public/images/projects/slideout-member-dropdown.png and /dev/null differ diff --git a/docs-v2/public/images/projects/slideout-member-list.png b/docs-v2/public/images/projects/slideout-member-list.png deleted file mode 100644 index ced48f865edb1..0000000000000 Binary files a/docs-v2/public/images/projects/slideout-member-list.png and /dev/null differ diff --git a/docs-v2/public/images/projects/slideout-restricted.png b/docs-v2/public/images/projects/slideout-restricted.png deleted file mode 100644 index 6e60633516c59..0000000000000 Binary files a/docs-v2/public/images/projects/slideout-restricted.png and /dev/null differ diff --git a/docs-v2/public/images/projects/slideout-workspace-share.png b/docs-v2/public/images/projects/slideout-workspace-share.png deleted file mode 100644 index 54da1ca7a22b5..0000000000000 Binary files a/docs-v2/public/images/projects/slideout-workspace-share.png and /dev/null differ diff --git a/docs-v2/public/images/python/auth/connected-slack-account.png b/docs-v2/public/images/python/auth/connected-slack-account.png deleted file mode 100644 index defb7cce56d63..0000000000000 Binary files a/docs-v2/public/images/python/auth/connected-slack-account.png and /dev/null differ diff --git a/docs-v2/public/images/python/auth/step-selector-python-example.png b/docs-v2/public/images/python/auth/step-selector-python-example.png deleted file mode 100644 index 62f5373f28e87..0000000000000 Binary files a/docs-v2/public/images/python/auth/step-selector-python-example.png and /dev/null differ diff --git a/docs-v2/public/images/python/print-logs.png b/docs-v2/public/images/python/print-logs.png deleted file mode 100644 index d22ed0b76ff19..0000000000000 Binary files a/docs-v2/public/images/python/print-logs.png and /dev/null differ diff --git a/docs-v2/public/images/queue-size.png b/docs-v2/public/images/queue-size.png deleted file mode 100644 index 7e71b66184fc2..0000000000000 Binary files a/docs-v2/public/images/queue-size.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/action-configuration-complete.png b/docs-v2/public/images/quickstart/action-configuration-complete.png deleted file mode 100644 index 98f7fc38e43c9..0000000000000 Binary files a/docs-v2/public/images/quickstart/action-configuration-complete.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/action_diff.png b/docs-v2/public/images/quickstart/action_diff.png deleted file mode 100644 index 3560598d1eb53..0000000000000 Binary files a/docs-v2/public/images/quickstart/action_diff.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/add-step.png b/docs-v2/public/images/quickstart/add-step.png deleted file mode 100644 index 72b48177d4457..0000000000000 Binary files a/docs-v2/public/images/quickstart/add-step.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/add-timestamp.png b/docs-v2/public/images/quickstart/add-timestamp.png deleted file mode 100644 index 566a78519622c..0000000000000 Binary files a/docs-v2/public/images/quickstart/add-timestamp.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/add-trigger.png b/docs-v2/public/images/quickstart/add-trigger.png deleted file mode 100644 index 3296b37ebd5a7..0000000000000 Binary files a/docs-v2/public/images/quickstart/add-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/add_action.png b/docs-v2/public/images/quickstart/add_action.png deleted file mode 100644 index e28fb37e875e7..0000000000000 Binary files a/docs-v2/public/images/quickstart/add_action.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/additional-props.png b/docs-v2/public/images/quickstart/additional-props.png deleted file mode 100644 index b1e4aea70e831..0000000000000 Binary files a/docs-v2/public/images/quickstart/additional-props.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/autocomplete-message.png b/docs-v2/public/images/quickstart/autocomplete-message.png deleted file mode 100644 index a4d30712f6178..0000000000000 Binary files a/docs-v2/public/images/quickstart/autocomplete-message.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/basic_workflow.png b/docs-v2/public/images/quickstart/basic_workflow.png deleted file mode 100644 index a4116e697dc4c..0000000000000 Binary files a/docs-v2/public/images/quickstart/basic_workflow.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/changelog.png b/docs-v2/public/images/quickstart/changelog.png deleted file mode 100644 index 703a79450113a..0000000000000 Binary files a/docs-v2/public/images/quickstart/changelog.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/commit_changes_1.png b/docs-v2/public/images/quickstart/commit_changes_1.png deleted file mode 100644 index a8eaecf5abd9c..0000000000000 Binary files a/docs-v2/public/images/quickstart/commit_changes_1.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/commit_diff_1.png b/docs-v2/public/images/quickstart/commit_diff_1.png deleted file mode 100644 index 6cec8e54e36ae..0000000000000 Binary files a/docs-v2/public/images/quickstart/commit_diff_1.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/commit_diff_2.png b/docs-v2/public/images/quickstart/commit_diff_2.png deleted file mode 100644 index c2195615bf57a..0000000000000 Binary files a/docs-v2/public/images/quickstart/commit_diff_2.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/configure-project.png b/docs-v2/public/images/quickstart/configure-project.png deleted file mode 100644 index 9ff40967889b5..0000000000000 Binary files a/docs-v2/public/images/quickstart/configure-project.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/configure-workflow.png b/docs-v2/public/images/quickstart/configure-workflow.png deleted file mode 100644 index 45d7afb2a8d87..0000000000000 Binary files a/docs-v2/public/images/quickstart/configure-workflow.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/configure_project.png b/docs-v2/public/images/quickstart/configure_project.png deleted file mode 100644 index 51fd1c1418658..0000000000000 Binary files a/docs-v2/public/images/quickstart/configure_project.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/configure_project_1.png b/docs-v2/public/images/quickstart/configure_project_1.png deleted file mode 100644 index 55738ef8ab52c..0000000000000 Binary files a/docs-v2/public/images/quickstart/configure_project_1.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/configure_project_2.png b/docs-v2/public/images/quickstart/configure_project_2.png deleted file mode 100644 index 1b9a7d786ecd1..0000000000000 Binary files a/docs-v2/public/images/quickstart/configure_project_2.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/configure_workflow.png b/docs-v2/public/images/quickstart/configure_workflow.png deleted file mode 100644 index 4fd73d592958c..0000000000000 Binary files a/docs-v2/public/images/quickstart/configure_workflow.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/connect-google-sheets-account.png b/docs-v2/public/images/quickstart/connect-google-sheets-account.png deleted file mode 100644 index 5c23d34c0c4bc..0000000000000 Binary files a/docs-v2/public/images/quickstart/connect-google-sheets-account.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/copy-path.png b/docs-v2/public/images/quickstart/copy-path.png deleted file mode 100644 index ec24a23ee9f62..0000000000000 Binary files a/docs-v2/public/images/quickstart/copy-path.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/create-http-trigger.png b/docs-v2/public/images/quickstart/create-http-trigger.png deleted file mode 100644 index 27eb86aa8b74f..0000000000000 Binary files a/docs-v2/public/images/quickstart/create-http-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/create-project.png b/docs-v2/public/images/quickstart/create-project.png deleted file mode 100644 index cf60bb63b80f9..0000000000000 Binary files a/docs-v2/public/images/quickstart/create-project.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/create-trigger.png b/docs-v2/public/images/quickstart/create-trigger.png deleted file mode 100644 index 3296b37ebd5a7..0000000000000 Binary files a/docs-v2/public/images/quickstart/create-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/create_pr.png b/docs-v2/public/images/quickstart/create_pr.png deleted file mode 100644 index 76984483f9d58..0000000000000 Binary files a/docs-v2/public/images/quickstart/create_pr.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/create_project.png b/docs-v2/public/images/quickstart/create_project.png deleted file mode 100644 index b494829dadd36..0000000000000 Binary files a/docs-v2/public/images/quickstart/create_project.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/data-inserted.png b/docs-v2/public/images/quickstart/data-inserted.png deleted file mode 100644 index e85baf594f5da..0000000000000 Binary files a/docs-v2/public/images/quickstart/data-inserted.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/deploy-workflow.png b/docs-v2/public/images/quickstart/deploy-workflow.png deleted file mode 100644 index b37c72807782e..0000000000000 Binary files a/docs-v2/public/images/quickstart/deploy-workflow.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/deployed-workflow.png b/docs-v2/public/images/quickstart/deployed-workflow.png deleted file mode 100644 index 80c7e55324218..0000000000000 Binary files a/docs-v2/public/images/quickstart/deployed-workflow.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/edit_1.png b/docs-v2/public/images/quickstart/edit_1.png deleted file mode 100644 index cad21ed19a5c5..0000000000000 Binary files a/docs-v2/public/images/quickstart/edit_1.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/edit_2.png b/docs-v2/public/images/quickstart/edit_2.png deleted file mode 100644 index 28c55af88536a..0000000000000 Binary files a/docs-v2/public/images/quickstart/edit_2.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/edit_in_github.png b/docs-v2/public/images/quickstart/edit_in_github.png deleted file mode 100644 index 9b583c11c8ace..0000000000000 Binary files a/docs-v2/public/images/quickstart/edit_in_github.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/edit_production.png b/docs-v2/public/images/quickstart/edit_production.png deleted file mode 100644 index 86a0d656b3c2c..0000000000000 Binary files a/docs-v2/public/images/quickstart/edit_production.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/empty-sheet.png b/docs-v2/public/images/quickstart/empty-sheet.png deleted file mode 100644 index 8d0d915d0970a..0000000000000 Binary files a/docs-v2/public/images/quickstart/empty-sheet.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/expand-sentiment-results.png b/docs-v2/public/images/quickstart/expand-sentiment-results.png deleted file mode 100644 index 7bb88cf3c96c0..0000000000000 Binary files a/docs-v2/public/images/quickstart/expand-sentiment-results.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/generate-test-event.png b/docs-v2/public/images/quickstart/generate-test-event.png deleted file mode 100644 index b48f8a93ed84b..0000000000000 Binary files a/docs-v2/public/images/quickstart/generate-test-event.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/github-sync-v3/commit-changes-2.png b/docs-v2/public/images/quickstart/github-sync-v3/commit-changes-2.png deleted file mode 100644 index 079312d56b6e9..0000000000000 Binary files a/docs-v2/public/images/quickstart/github-sync-v3/commit-changes-2.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/github-sync-v3/commit-changes.png b/docs-v2/public/images/quickstart/github-sync-v3/commit-changes.png deleted file mode 100644 index 73f3ad9ebbff5..0000000000000 Binary files a/docs-v2/public/images/quickstart/github-sync-v3/commit-changes.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/github-sync-v3/commit-diff-2.png b/docs-v2/public/images/quickstart/github-sync-v3/commit-diff-2.png deleted file mode 100644 index e3d9c04a1ea72..0000000000000 Binary files a/docs-v2/public/images/quickstart/github-sync-v3/commit-diff-2.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/github-sync-v3/commit-diff.png b/docs-v2/public/images/quickstart/github-sync-v3/commit-diff.png deleted file mode 100644 index 65c388c861b0d..0000000000000 Binary files a/docs-v2/public/images/quickstart/github-sync-v3/commit-diff.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/github-sync-v3/merge-to-prod-2.png b/docs-v2/public/images/quickstart/github-sync-v3/merge-to-prod-2.png deleted file mode 100644 index 2e065e6098521..0000000000000 Binary files a/docs-v2/public/images/quickstart/github-sync-v3/merge-to-prod-2.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/github-sync-v3/merge-to-prod.png b/docs-v2/public/images/quickstart/github-sync-v3/merge-to-prod.png deleted file mode 100644 index c173cebd3c242..0000000000000 Binary files a/docs-v2/public/images/quickstart/github-sync-v3/merge-to-prod.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/github-sync-v3/sample-workflow.png b/docs-v2/public/images/quickstart/github-sync-v3/sample-workflow.png deleted file mode 100644 index 211c5f5db10ad..0000000000000 Binary files a/docs-v2/public/images/quickstart/github-sync-v3/sample-workflow.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/github-sync-v3/view-branch.png b/docs-v2/public/images/quickstart/github-sync-v3/view-branch.png deleted file mode 100644 index a049a0cedd77b..0000000000000 Binary files a/docs-v2/public/images/quickstart/github-sync-v3/view-branch.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/google-oauth.png b/docs-v2/public/images/quickstart/google-oauth.png deleted file mode 100644 index fafd330b672e6..0000000000000 Binary files a/docs-v2/public/images/quickstart/google-oauth.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/google-permissions.png b/docs-v2/public/images/quickstart/google-permissions.png deleted file mode 100644 index 0162a44a068c9..0000000000000 Binary files a/docs-v2/public/images/quickstart/google-permissions.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/has-headers.png b/docs-v2/public/images/quickstart/has-headers.png deleted file mode 100644 index 91ce17e74bf21..0000000000000 Binary files a/docs-v2/public/images/quickstart/has-headers.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/inspect-executions.png b/docs-v2/public/images/quickstart/inspect-executions.png deleted file mode 100644 index 800021ee35839..0000000000000 Binary files a/docs-v2/public/images/quickstart/inspect-executions.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/inspect-trigger-event.png b/docs-v2/public/images/quickstart/inspect-trigger-event.png deleted file mode 100644 index d2914f9594100..0000000000000 Binary files a/docs-v2/public/images/quickstart/inspect-trigger-event.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/live-test.png b/docs-v2/public/images/quickstart/live-test.png deleted file mode 100644 index ad7fc298e5858..0000000000000 Binary files a/docs-v2/public/images/quickstart/live-test.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/merge_pr.png b/docs-v2/public/images/quickstart/merge_pr.png deleted file mode 100644 index 85cdfaf8b16b7..0000000000000 Binary files a/docs-v2/public/images/quickstart/merge_pr.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/merge_to_production_1.png b/docs-v2/public/images/quickstart/merge_to_production_1.png deleted file mode 100644 index ec70ca6420614..0000000000000 Binary files a/docs-v2/public/images/quickstart/merge_to_production_1.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/merge_to_production_2.png b/docs-v2/public/images/quickstart/merge_to_production_2.png deleted file mode 100644 index 000f90928c18b..0000000000000 Binary files a/docs-v2/public/images/quickstart/merge_to_production_2.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/merging_to_production.png b/docs-v2/public/images/quickstart/merging_to_production.png deleted file mode 100644 index 42040d2a62994..0000000000000 Binary files a/docs-v2/public/images/quickstart/merging_to_production.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/message-completed.png b/docs-v2/public/images/quickstart/message-completed.png deleted file mode 100644 index c62d4b170a784..0000000000000 Binary files a/docs-v2/public/images/quickstart/message-completed.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/new-code-step-added.png b/docs-v2/public/images/quickstart/new-code-step-added.png deleted file mode 100644 index 80f6ec4b3a4f3..0000000000000 Binary files a/docs-v2/public/images/quickstart/new-code-step-added.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/new-workflow.png b/docs-v2/public/images/quickstart/new-workflow.png deleted file mode 100644 index 6d9c05bdc59cd..0000000000000 Binary files a/docs-v2/public/images/quickstart/new-workflow.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/new_workflow.png b/docs-v2/public/images/quickstart/new_workflow.png deleted file mode 100644 index f7e3e46efaced..0000000000000 Binary files a/docs-v2/public/images/quickstart/new_workflow.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/pr_deployed.png b/docs-v2/public/images/quickstart/pr_deployed.png deleted file mode 100644 index f598de9f1c62f..0000000000000 Binary files a/docs-v2/public/images/quickstart/pr_deployed.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/production.png b/docs-v2/public/images/quickstart/production.png deleted file mode 100644 index 1c285358aa4fe..0000000000000 Binary files a/docs-v2/public/images/quickstart/production.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/rename-code-step.gif b/docs-v2/public/images/quickstart/rename-code-step.gif deleted file mode 100644 index 520ebcdb2b417..0000000000000 Binary files a/docs-v2/public/images/quickstart/rename-code-step.gif and /dev/null differ diff --git a/docs-v2/public/images/quickstart/rename-code-step.png b/docs-v2/public/images/quickstart/rename-code-step.png deleted file mode 100644 index e647b79fb9fe5..0000000000000 Binary files a/docs-v2/public/images/quickstart/rename-code-step.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/review_pr.png b/docs-v2/public/images/quickstart/review_pr.png deleted file mode 100644 index 4ce9c0da7025b..0000000000000 Binary files a/docs-v2/public/images/quickstart/review_pr.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/save-http-trigger.png b/docs-v2/public/images/quickstart/save-http-trigger.png deleted file mode 100644 index f9f6bf1a08474..0000000000000 Binary files a/docs-v2/public/images/quickstart/save-http-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/select-add-single-row.png b/docs-v2/public/images/quickstart/select-add-single-row.png deleted file mode 100644 index d23d6b5aeea3c..0000000000000 Binary files a/docs-v2/public/images/quickstart/select-add-single-row.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/select-google-sheets-app.png b/docs-v2/public/images/quickstart/select-google-sheets-app.png deleted file mode 100644 index dad4cda2b821b..0000000000000 Binary files a/docs-v2/public/images/quickstart/select-google-sheets-app.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/select-sheet-name.png b/docs-v2/public/images/quickstart/select-sheet-name.png deleted file mode 100644 index 27fc3f7e14b01..0000000000000 Binary files a/docs-v2/public/images/quickstart/select-sheet-name.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/select-spreadsheet.png b/docs-v2/public/images/quickstart/select-spreadsheet.png deleted file mode 100644 index cb6be0f45083b..0000000000000 Binary files a/docs-v2/public/images/quickstart/select-spreadsheet.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/sentiment-results.png b/docs-v2/public/images/quickstart/sentiment-results.png deleted file mode 100644 index 8b93f255dee73..0000000000000 Binary files a/docs-v2/public/images/quickstart/sentiment-results.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/step-selector-code.png b/docs-v2/public/images/quickstart/step-selector-code.png deleted file mode 100644 index a3abaf16cae30..0000000000000 Binary files a/docs-v2/public/images/quickstart/step-selector-code.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/test-code-step.png b/docs-v2/public/images/quickstart/test-code-step.png deleted file mode 100644 index 0efeb0171fada..0000000000000 Binary files a/docs-v2/public/images/quickstart/test-code-step.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/test-successful.png b/docs-v2/public/images/quickstart/test-successful.png deleted file mode 100644 index 363d0a947119c..0000000000000 Binary files a/docs-v2/public/images/quickstart/test-successful.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/timestamp-added.png b/docs-v2/public/images/quickstart/timestamp-added.png deleted file mode 100644 index 7821017fbc4fb..0000000000000 Binary files a/docs-v2/public/images/quickstart/timestamp-added.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/trigger-continue.png b/docs-v2/public/images/quickstart/trigger-continue.png deleted file mode 100644 index 3467c284831d7..0000000000000 Binary files a/docs-v2/public/images/quickstart/trigger-continue.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/unique-url.png b/docs-v2/public/images/quickstart/unique-url.png deleted file mode 100644 index 0575b818c2632..0000000000000 Binary files a/docs-v2/public/images/quickstart/unique-url.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/v3/async-props.png b/docs-v2/public/images/quickstart/v3/async-props.png deleted file mode 100644 index 8c5459b4bb0a6..0000000000000 Binary files a/docs-v2/public/images/quickstart/v3/async-props.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/v3/autocomplete-export.png b/docs-v2/public/images/quickstart/v3/autocomplete-export.png deleted file mode 100644 index 2ba1aae347743..0000000000000 Binary files a/docs-v2/public/images/quickstart/v3/autocomplete-export.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/v3/copy-sentiment-path.png b/docs-v2/public/images/quickstart/v3/copy-sentiment-path.png deleted file mode 100644 index 9a7e11e33915b..0000000000000 Binary files a/docs-v2/public/images/quickstart/v3/copy-sentiment-path.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/v3/deploy-workflow.png b/docs-v2/public/images/quickstart/v3/deploy-workflow.png deleted file mode 100644 index bbfed0bc8a4b9..0000000000000 Binary files a/docs-v2/public/images/quickstart/v3/deploy-workflow.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/v3/paste-sentiment-score.png b/docs-v2/public/images/quickstart/v3/paste-sentiment-score.png deleted file mode 100644 index 4ad8c66420771..0000000000000 Binary files a/docs-v2/public/images/quickstart/v3/paste-sentiment-score.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/v3/select-headers.png b/docs-v2/public/images/quickstart/v3/select-headers.png deleted file mode 100644 index 9fd9b9e0e5e70..0000000000000 Binary files a/docs-v2/public/images/quickstart/v3/select-headers.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/v3/select-sentiment-step.png b/docs-v2/public/images/quickstart/v3/select-sentiment-step.png deleted file mode 100644 index 5349a1ed7c25e..0000000000000 Binary files a/docs-v2/public/images/quickstart/v3/select-sentiment-step.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/v3/select-spreadsheet-name.png b/docs-v2/public/images/quickstart/v3/select-spreadsheet-name.png deleted file mode 100644 index 2d1bc827c25b9..0000000000000 Binary files a/docs-v2/public/images/quickstart/v3/select-spreadsheet-name.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/v3/select-spreadsheet.png b/docs-v2/public/images/quickstart/v3/select-spreadsheet.png deleted file mode 100644 index 39aad5db35595..0000000000000 Binary files a/docs-v2/public/images/quickstart/v3/select-spreadsheet.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/v3/select-ts-export.png b/docs-v2/public/images/quickstart/v3/select-ts-export.png deleted file mode 100644 index c5ebdae148022..0000000000000 Binary files a/docs-v2/public/images/quickstart/v3/select-ts-export.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/v3/successful-test-results.png b/docs-v2/public/images/quickstart/v3/successful-test-results.png deleted file mode 100644 index 9ebb32c98be54..0000000000000 Binary files a/docs-v2/public/images/quickstart/v3/successful-test-results.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/v3/timestamp.png b/docs-v2/public/images/quickstart/v3/timestamp.png deleted file mode 100644 index 84ec4ff8656f0..0000000000000 Binary files a/docs-v2/public/images/quickstart/v3/timestamp.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/view_branch_on_github_1.png b/docs-v2/public/images/quickstart/view_branch_on_github_1.png deleted file mode 100644 index c36bcd2ce2d80..0000000000000 Binary files a/docs-v2/public/images/quickstart/view_branch_on_github_1.png and /dev/null differ diff --git a/docs-v2/public/images/quickstart/view_branch_on_github_2.png b/docs-v2/public/images/quickstart/view_branch_on_github_2.png deleted file mode 100644 index 033109f44bcef..0000000000000 Binary files a/docs-v2/public/images/quickstart/view_branch_on_github_2.png and /dev/null differ diff --git a/docs-v2/public/images/rest-api/source-id.png b/docs-v2/public/images/rest-api/source-id.png deleted file mode 100644 index a90c9a5ee4282..0000000000000 Binary files a/docs-v2/public/images/rest-api/source-id.png and /dev/null differ diff --git a/docs-v2/public/images/rest-api/webhook-proxy.png b/docs-v2/public/images/rest-api/webhook-proxy.png deleted file mode 100644 index ccf8b7cf93014..0000000000000 Binary files a/docs-v2/public/images/rest-api/webhook-proxy.png and /dev/null differ diff --git a/docs-v2/public/images/settings/attachment-file-data.png b/docs-v2/public/images/settings/attachment-file-data.png deleted file mode 100644 index cfea2a7c323d0..0000000000000 Binary files a/docs-v2/public/images/settings/attachment-file-data.png and /dev/null differ diff --git a/docs-v2/public/images/settings/disable-data-retention-settings.png b/docs-v2/public/images/settings/disable-data-retention-settings.png deleted file mode 100644 index 1038871e3f948..0000000000000 Binary files a/docs-v2/public/images/settings/disable-data-retention-settings.png and /dev/null differ diff --git a/docs-v2/public/images/settings/shared-with-me.png b/docs-v2/public/images/settings/shared-with-me.png deleted file mode 100644 index 0c2d00ca39d2a..0000000000000 Binary files a/docs-v2/public/images/settings/shared-with-me.png and /dev/null differ diff --git a/docs-v2/public/images/settings/workflow-settings.png b/docs-v2/public/images/settings/workflow-settings.png deleted file mode 100644 index 859dad03dfa43..0000000000000 Binary files a/docs-v2/public/images/settings/workflow-settings.png and /dev/null differ diff --git a/docs-v2/public/images/steps/active.png b/docs-v2/public/images/steps/active.png deleted file mode 100644 index 9e65253ebf0d0..0000000000000 Binary files a/docs-v2/public/images/steps/active.png and /dev/null differ diff --git a/docs-v2/public/images/steps/adding-step-note.gif b/docs-v2/public/images/steps/adding-step-note.gif deleted file mode 100644 index 1311366f7bf89..0000000000000 Binary files a/docs-v2/public/images/steps/adding-step-note.gif and /dev/null differ diff --git a/docs-v2/public/images/steps/archive-workflow.png b/docs-v2/public/images/steps/archive-workflow.png deleted file mode 100644 index b07ecbb2e9b90..0000000000000 Binary files a/docs-v2/public/images/steps/archive-workflow.png and /dev/null differ diff --git a/docs-v2/public/images/steps/edit-params-schema.png b/docs-v2/public/images/steps/edit-params-schema.png deleted file mode 100644 index 54a76bce33d79..0000000000000 Binary files a/docs-v2/public/images/steps/edit-params-schema.png and /dev/null differ diff --git a/docs-v2/public/images/steps/inactive.png b/docs-v2/public/images/steps/inactive.png deleted file mode 100644 index 123dd802921e3..0000000000000 Binary files a/docs-v2/public/images/steps/inactive.png and /dev/null differ diff --git a/docs-v2/public/images/steps/list-of-active-inactive-workflows.png b/docs-v2/public/images/steps/list-of-active-inactive-workflows.png deleted file mode 100644 index 4f144c616f79b..0000000000000 Binary files a/docs-v2/public/images/steps/list-of-active-inactive-workflows.png and /dev/null differ diff --git a/docs-v2/public/images/steps/my-pipelines.png b/docs-v2/public/images/steps/my-pipelines.png deleted file mode 100644 index 1906ff9ceacc8..0000000000000 Binary files a/docs-v2/public/images/steps/my-pipelines.png and /dev/null differ diff --git a/docs-v2/public/images/steps/new-pipeline-url.png b/docs-v2/public/images/steps/new-pipeline-url.png deleted file mode 100644 index a1c378fdd4b0e..0000000000000 Binary files a/docs-v2/public/images/steps/new-pipeline-url.png and /dev/null differ diff --git a/docs-v2/public/images/steps/new-step-name.png b/docs-v2/public/images/steps/new-step-name.png deleted file mode 100644 index 458527191a498..0000000000000 Binary files a/docs-v2/public/images/steps/new-step-name.png and /dev/null differ diff --git a/docs-v2/public/images/steps/param-visibility.png b/docs-v2/public/images/steps/param-visibility.png deleted file mode 100644 index 325ca08a48ab8..0000000000000 Binary files a/docs-v2/public/images/steps/param-visibility.png and /dev/null differ diff --git a/docs-v2/public/images/steps/params-foo.png b/docs-v2/public/images/steps/params-foo.png deleted file mode 100644 index eeefe0e80b213..0000000000000 Binary files a/docs-v2/public/images/steps/params-foo.png and /dev/null differ diff --git a/docs-v2/public/images/steps/params-name.png b/docs-v2/public/images/steps/params-name.png deleted file mode 100644 index 6e2f2dde93233..0000000000000 Binary files a/docs-v2/public/images/steps/params-name.png and /dev/null differ diff --git a/docs-v2/public/images/steps/pipeline-version.png b/docs-v2/public/images/steps/pipeline-version.png deleted file mode 100644 index 977b3fe0d4394..0000000000000 Binary files a/docs-v2/public/images/steps/pipeline-version.png and /dev/null differ diff --git a/docs-v2/public/images/steps/pipeline.png b/docs-v2/public/images/steps/pipeline.png deleted file mode 100644 index 1ab800010bc66..0000000000000 Binary files a/docs-v2/public/images/steps/pipeline.png and /dev/null differ diff --git a/docs-v2/public/images/steps/show-hide-note.gif b/docs-v2/public/images/steps/show-hide-note.gif deleted file mode 100644 index bc721533f9856..0000000000000 Binary files a/docs-v2/public/images/steps/show-hide-note.gif and /dev/null differ diff --git a/docs-v2/public/images/steps/step-name.png b/docs-v2/public/images/steps/step-name.png deleted file mode 100644 index d54fa8d9ba4f1..0000000000000 Binary files a/docs-v2/public/images/steps/step-name.png and /dev/null differ diff --git a/docs-v2/public/images/steps/step-notes-example.png b/docs-v2/public/images/steps/step-notes-example.png deleted file mode 100644 index 54b2cb4011f78..0000000000000 Binary files a/docs-v2/public/images/steps/step-notes-example.png and /dev/null differ diff --git a/docs-v2/public/images/steps/text-description.png b/docs-v2/public/images/steps/text-description.png deleted file mode 100644 index f020407506d70..0000000000000 Binary files a/docs-v2/public/images/steps/text-description.png and /dev/null differ diff --git a/docs-v2/public/images/steps/workflow-url.png b/docs-v2/public/images/steps/workflow-url.png deleted file mode 100644 index 6386fadb3a31b..0000000000000 Binary files a/docs-v2/public/images/steps/workflow-url.png and /dev/null differ diff --git a/docs-v2/public/images/text-description.png b/docs-v2/public/images/text-description.png deleted file mode 100644 index f020407506d70..0000000000000 Binary files a/docs-v2/public/images/text-description.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/add-multi-trigger.gif b/docs-v2/public/images/triggers/add-multi-trigger.gif deleted file mode 100644 index 6f94bc1c39786..0000000000000 Binary files a/docs-v2/public/images/triggers/add-multi-trigger.gif and /dev/null differ diff --git a/docs-v2/public/images/triggers/add-multiple-triggers.png b/docs-v2/public/images/triggers/add-multiple-triggers.png deleted file mode 100644 index 1c46b2f7c6e6d..0000000000000 Binary files a/docs-v2/public/images/triggers/add-multiple-triggers.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/add-trigger-button.png b/docs-v2/public/images/triggers/add-trigger-button.png deleted file mode 100644 index 0d95bb535b2b9..0000000000000 Binary files a/docs-v2/public/images/triggers/add-trigger-button.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/airtable-test-events.png b/docs-v2/public/images/triggers/airtable-test-events.png deleted file mode 100644 index 30903e406f623..0000000000000 Binary files a/docs-v2/public/images/triggers/airtable-test-events.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/app-triggers.png b/docs-v2/public/images/triggers/app-triggers.png deleted file mode 100644 index 1345dcf92e35c..0000000000000 Binary files a/docs-v2/public/images/triggers/app-triggers.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/cron-scheduler-source.png b/docs-v2/public/images/triggers/cron-scheduler-source.png deleted file mode 100644 index cec8ebf687c6f..0000000000000 Binary files a/docs-v2/public/images/triggers/cron-scheduler-source.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/email-addr.png b/docs-v2/public/images/triggers/email-addr.png deleted file mode 100644 index 652a8db7b0dd2..0000000000000 Binary files a/docs-v2/public/images/triggers/email-addr.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/email-trigger.png b/docs-v2/public/images/triggers/email-trigger.png deleted file mode 100644 index 79ec9bbb34237..0000000000000 Binary files a/docs-v2/public/images/triggers/email-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/file-upload-urls.png b/docs-v2/public/images/triggers/file-upload-urls.png deleted file mode 100644 index 1f03c39ca5eb2..0000000000000 Binary files a/docs-v2/public/images/triggers/file-upload-urls.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/gcal-triggers.png b/docs-v2/public/images/triggers/gcal-triggers.png deleted file mode 100644 index f9d0737824687..0000000000000 Binary files a/docs-v2/public/images/triggers/gcal-triggers.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/github-source.png b/docs-v2/public/images/triggers/github-source.png deleted file mode 100644 index 884c270d91de7..0000000000000 Binary files a/docs-v2/public/images/triggers/github-source.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/google-calendar-triggers.png b/docs-v2/public/images/triggers/google-calendar-triggers.png deleted file mode 100644 index caa82f8c52930..0000000000000 Binary files a/docs-v2/public/images/triggers/google-calendar-triggers.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/http-api-trigger.png b/docs-v2/public/images/triggers/http-api-trigger.png deleted file mode 100644 index 9e3c7b160294f..0000000000000 Binary files a/docs-v2/public/images/triggers/http-api-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/http-endpoint.png b/docs-v2/public/images/triggers/http-endpoint.png deleted file mode 100644 index 5a46ce8a4c339..0000000000000 Binary files a/docs-v2/public/images/triggers/http-endpoint.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/http-trigger-url.png b/docs-v2/public/images/triggers/http-trigger-url.png deleted file mode 100644 index b3c30b9b82cf8..0000000000000 Binary files a/docs-v2/public/images/triggers/http-trigger-url.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/image_form_data.png b/docs-v2/public/images/triggers/image_form_data.png deleted file mode 100644 index 48c2b6b6285ff..0000000000000 Binary files a/docs-v2/public/images/triggers/image_form_data.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/list-of-sources.png b/docs-v2/public/images/triggers/list-of-sources.png deleted file mode 100644 index f0cfc9eaf2a48..0000000000000 Binary files a/docs-v2/public/images/triggers/list-of-sources.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/proto.png b/docs-v2/public/images/triggers/proto.png deleted file mode 100644 index 0223218cad92b..0000000000000 Binary files a/docs-v2/public/images/triggers/proto.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/raw_body_url.png b/docs-v2/public/images/triggers/raw_body_url.png deleted file mode 100644 index 1b4eafb8454f2..0000000000000 Binary files a/docs-v2/public/images/triggers/raw_body_url.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/retrieve-large-payload.png b/docs-v2/public/images/triggers/retrieve-large-payload.png deleted file mode 100644 index a5805a36af075..0000000000000 Binary files a/docs-v2/public/images/triggers/retrieve-large-payload.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/rss.png b/docs-v2/public/images/triggers/rss.png deleted file mode 100644 index afb5a779c73b0..0000000000000 Binary files a/docs-v2/public/images/triggers/rss.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/schedule.png b/docs-v2/public/images/triggers/schedule.png deleted file mode 100644 index 9bebe9f2e1906..0000000000000 Binary files a/docs-v2/public/images/triggers/schedule.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/select-a-trigger.png b/docs-v2/public/images/triggers/select-a-trigger.png deleted file mode 100644 index f44082ed79dd2..0000000000000 Binary files a/docs-v2/public/images/triggers/select-a-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/select-an-event.png b/docs-v2/public/images/triggers/select-an-event.png deleted file mode 100644 index 0baad2f053759..0000000000000 Binary files a/docs-v2/public/images/triggers/select-an-event.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/select-email-trigger.png b/docs-v2/public/images/triggers/select-email-trigger.png deleted file mode 100644 index 324edd1085058..0000000000000 Binary files a/docs-v2/public/images/triggers/select-email-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/select-http-trigger.png b/docs-v2/public/images/triggers/select-http-trigger.png deleted file mode 100644 index dda1e2c4f697c..0000000000000 Binary files a/docs-v2/public/images/triggers/select-http-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/select-rss-trigger.png b/docs-v2/public/images/triggers/select-rss-trigger.png deleted file mode 100644 index 530086617ba7f..0000000000000 Binary files a/docs-v2/public/images/triggers/select-rss-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/select-schedule-trigger.png b/docs-v2/public/images/triggers/select-schedule-trigger.png deleted file mode 100644 index 9aca826a4d9c5..0000000000000 Binary files a/docs-v2/public/images/triggers/select-schedule-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/send_http_request_action.png b/docs-v2/public/images/triggers/send_http_request_action.png deleted file mode 100644 index 9db4cd36f2646..0000000000000 Binary files a/docs-v2/public/images/triggers/send_http_request_action.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/syntax-error.png b/docs-v2/public/images/triggers/syntax-error.png deleted file mode 100644 index 8557e0d96e796..0000000000000 Binary files a/docs-v2/public/images/triggers/syntax-error.png and /dev/null differ diff --git a/docs-v2/public/images/triggers/turn-trigger-on.gif b/docs-v2/public/images/triggers/turn-trigger-on.gif deleted file mode 100644 index f592ad9e44e74..0000000000000 Binary files a/docs-v2/public/images/triggers/turn-trigger-on.gif and /dev/null differ diff --git a/docs-v2/public/images/workflow-diagram.png b/docs-v2/public/images/workflow-diagram.png deleted file mode 100644 index 13d863173ee8c..0000000000000 Binary files a/docs-v2/public/images/workflow-diagram.png and /dev/null differ diff --git a/docs-v2/public/images/workflow-url.png b/docs-v2/public/images/workflow-url.png deleted file mode 100644 index 6386fadb3a31b..0000000000000 Binary files a/docs-v2/public/images/workflow-url.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/actions/update-action-button.png b/docs-v2/public/images/workflows/actions/update-action-button.png deleted file mode 100644 index 5b242f04efd5b..0000000000000 Binary files a/docs-v2/public/images/workflows/actions/update-action-button.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/default-axios-stack.png b/docs-v2/public/images/workflows/default-axios-stack.png deleted file mode 100644 index 88035fa157dd0..0000000000000 Binary files a/docs-v2/public/images/workflows/default-axios-stack.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/delay/delay-step-props.png b/docs-v2/public/images/workflows/delay/delay-step-props.png deleted file mode 100644 index 423f5bd031136..0000000000000 Binary files a/docs-v2/public/images/workflows/delay/delay-step-props.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/pipedream-axios-stack.png b/docs-v2/public/images/workflows/pipedream-axios-stack.png deleted file mode 100644 index 2460c06f49991..0000000000000 Binary files a/docs-v2/public/images/workflows/pipedream-axios-stack.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/pipedream-axios-success.png b/docs-v2/public/images/workflows/pipedream-axios-success.png deleted file mode 100644 index 66f64c63ad679..0000000000000 Binary files a/docs-v2/public/images/workflows/pipedream-axios-success.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/select-an-event.png b/docs-v2/public/images/workflows/select-an-event.png deleted file mode 100644 index 0baad2f053759..0000000000000 Binary files a/docs-v2/public/images/workflows/select-an-event.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/sharing/create-share-link.png b/docs-v2/public/images/workflows/sharing/create-share-link.png deleted file mode 100644 index 6f33800dcefe5..0000000000000 Binary files a/docs-v2/public/images/workflows/sharing/create-share-link.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/sharing/publish-as-template.png b/docs-v2/public/images/workflows/sharing/publish-as-template.png deleted file mode 100644 index 55865b90530a6..0000000000000 Binary files a/docs-v2/public/images/workflows/sharing/publish-as-template.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/sharing/sharing-workflow-button.png b/docs-v2/public/images/workflows/sharing/sharing-workflow-button.png deleted file mode 100644 index cec5a3ccca0b2..0000000000000 Binary files a/docs-v2/public/images/workflows/sharing/sharing-workflow-button.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/steps/adding-step-note.gif b/docs-v2/public/images/workflows/steps/adding-step-note.gif deleted file mode 100644 index 1311366f7bf89..0000000000000 Binary files a/docs-v2/public/images/workflows/steps/adding-step-note.gif and /dev/null differ diff --git a/docs-v2/public/images/workflows/steps/step-name.png b/docs-v2/public/images/workflows/steps/step-name.png deleted file mode 100644 index df84a63d5f970..0000000000000 Binary files a/docs-v2/public/images/workflows/steps/step-name.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/steps/step-notes.png b/docs-v2/public/images/workflows/steps/step-notes.png deleted file mode 100644 index 86d5cdbd99f71..0000000000000 Binary files a/docs-v2/public/images/workflows/steps/step-notes.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/triggers/add-multiple-triggers.png b/docs-v2/public/images/workflows/triggers/add-multiple-triggers.png deleted file mode 100644 index 1c46b2f7c6e6d..0000000000000 Binary files a/docs-v2/public/images/workflows/triggers/add-multiple-triggers.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/triggers/add-trigger-button.png b/docs-v2/public/images/workflows/triggers/add-trigger-button.png deleted file mode 100644 index 0d95bb535b2b9..0000000000000 Binary files a/docs-v2/public/images/workflows/triggers/add-trigger-button.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/triggers/email-trigger.png b/docs-v2/public/images/workflows/triggers/email-trigger.png deleted file mode 100644 index 79ec9bbb34237..0000000000000 Binary files a/docs-v2/public/images/workflows/triggers/email-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/triggers/gcal-triggers.png b/docs-v2/public/images/workflows/triggers/gcal-triggers.png deleted file mode 100644 index f9d0737824687..0000000000000 Binary files a/docs-v2/public/images/workflows/triggers/gcal-triggers.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/triggers/http-trigger-url.png b/docs-v2/public/images/workflows/triggers/http-trigger-url.png deleted file mode 100644 index b3c30b9b82cf8..0000000000000 Binary files a/docs-v2/public/images/workflows/triggers/http-trigger-url.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/triggers/retrieve-large-payload.png b/docs-v2/public/images/workflows/triggers/retrieve-large-payload.png deleted file mode 100644 index a5805a36af075..0000000000000 Binary files a/docs-v2/public/images/workflows/triggers/retrieve-large-payload.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/triggers/select-a-trigger.png b/docs-v2/public/images/workflows/triggers/select-a-trigger.png deleted file mode 100644 index f44082ed79dd2..0000000000000 Binary files a/docs-v2/public/images/workflows/triggers/select-a-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/triggers/select-email-trigger.png b/docs-v2/public/images/workflows/triggers/select-email-trigger.png deleted file mode 100644 index 324edd1085058..0000000000000 Binary files a/docs-v2/public/images/workflows/triggers/select-email-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/triggers/select-http-trigger.png b/docs-v2/public/images/workflows/triggers/select-http-trigger.png deleted file mode 100644 index dda1e2c4f697c..0000000000000 Binary files a/docs-v2/public/images/workflows/triggers/select-http-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/triggers/select-rss-trigger.png b/docs-v2/public/images/workflows/triggers/select-rss-trigger.png deleted file mode 100644 index 530086617ba7f..0000000000000 Binary files a/docs-v2/public/images/workflows/triggers/select-rss-trigger.png and /dev/null differ diff --git a/docs-v2/public/images/workflows/triggers/select-schedule-trigger.png b/docs-v2/public/images/workflows/triggers/select-schedule-trigger.png deleted file mode 100644 index 9aca826a4d9c5..0000000000000 Binary files a/docs-v2/public/images/workflows/triggers/select-schedule-trigger.png and /dev/null differ diff --git a/docs-v2/styles/globals.css b/docs-v2/styles/globals.css deleted file mode 100644 index af94805218b0a..0000000000000 --- a/docs-v2/styles/globals.css +++ /dev/null @@ -1,60 +0,0 @@ -/* Import custom Prism styles */ -@import './prism-custom.css'; - -@tailwind base; -@tailwind components; -@tailwind utilities; - -:not(pre,h1,h2,h3,h4,h5,h6,td) > code::before, :not(pre,h1,h2,h3,h4,h5,h6,td) > code::after { - content: '`'; -} - -pre { - font-variant-ligatures: none; -} - -:not(pre) > code { - font-size: calc(1em - 2px) !important; -} - -:root { - --docsearch-primary-color: hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)30%) !important; -} - -html.dark { - --docsearch-text-color: rgba(243,244,246,var(--tw-text-opacity)); - --docsearch-container-background: rgba(10, 10, 10, 0.8); - --docsearch-modal-background: rgb(17,17,17); - --docsearch-modal-shadow: inset 1px 1px 0 0 rgb(50, 50, 50), - 0 3px 8px 0 rgb(3, 3, 3); - --docsearch-searchbox-background: rgb(10, 10, 10); - --docsearch-searchbox-focus-background: #000; - --docsearch-hit-color: rgb(226, 232, 240); - --docsearch-hit-shadow: none; - --docsearch-hit-background: rgb(10, 10, 10); - --docsearch-key-gradient: linear-gradient( - -26.5deg, - rgb(99, 99, 99) 0%, - rgb(69, 69, 69) 100% - ); - --docsearch-key-shadow: inset 0 -2px 0 0 rgb(64, 64, 64), - inset 0 0 1px 1px rgb(81, 87, 125), 0 2px 2px 0 rgba(5, 5, 5, 0.3); - --docsearch-key-pressed-shadow: inset 0 -2px 0 0 #424242, inset 0 0 1px 1px #646464, 0 1px 1px 0 #0505054d; - --docsearch-footer-background: rgb(41, 41, 41); - --docsearch-footer-shadow: inset 0 1px 0 0 rgba(89, 89, 89, 0.5), - 0 -4px 8px 0 rgba(0, 0, 0, 0.2); - --docsearch-logo-color: rgb(255, 255, 255); - --docsearch-muted-color: rgb(140, 140, 140); -} - -.DocSearch input.DocSearch-Input:focus-visible { - box-shadow: none; -} - -.highlightHeaderRowTable th { - @apply bg-gray-50 dark:bg-gray-800; -} - -.highlightHeaderRowTable td:last-child { - white-space: nowrap; -} \ No newline at end of file diff --git a/docs-v2/styles/prism-custom.css b/docs-v2/styles/prism-custom.css deleted file mode 100644 index 1c0e818511def..0000000000000 --- a/docs-v2/styles/prism-custom.css +++ /dev/null @@ -1,158 +0,0 @@ -/* Custom Prism styles for code blocks */ - -code[class*="language-"], -pre[class*="language-"] { - color: #2a2a2a; - background: none; - font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; - text-shadow: none !important; -} - -/* Dark mode overrides */ -html.dark code[class*="language-"], -html.dark pre[class*="language-"] { - color: #e0e0e0; - background: none; - text-shadow: none !important; -} - -.token.comment, -.token.prolog, -.token.doctype, -.token.cdata { - color: #708090; -} - -.token.punctuation { - color: #999; -} - -.token.namespace { - opacity: 0.7; -} - -.token.property, -.token.tag, -.token.boolean, -.token.number, -.token.constant, -.token.symbol, -.token.deleted { - color: #905; -} - -.token.selector, -.token.attr-name, -.token.string, -.token.char, -.token.builtin, -.token.inserted { - color: #690; -} - -.token.operator, -.token.entity, -.token.url, -.language-css .token.string, -.style .token.string { - color: #9a6e3a; -} - -.token.atrule, -.token.attr-value, -.token.keyword { - color: #07a; -} - -.token.function, -.token.class-name { - color: #DD4A68; -} - -.token.regex, -.token.important, -.token.variable { - color: #e90; -} - -/* Dark mode token styles */ -html.dark .token.comment, -html.dark .token.prolog, -html.dark .token.doctype, -html.dark .token.cdata { - color: #8b9cb3; -} - -html.dark .token.punctuation { - color: #bbb; -} - -html.dark .token.property, -html.dark .token.tag, -html.dark .token.boolean, -html.dark .token.number, -html.dark .token.constant, -html.dark .token.symbol, -html.dark .token.deleted { - color: #f76d82; -} - -html.dark .token.selector, -html.dark .token.attr-name, -html.dark .token.string, -html.dark .token.char, -html.dark .token.builtin, -html.dark .token.inserted { - color: #a5d6a7; -} - -html.dark .token.operator, -html.dark .token.entity, -html.dark .token.url, -html.dark .language-css .token.string, -html.dark .style .token.string { - color: #e6c07b; -} - -html.dark .token.atrule, -html.dark .token.attr-value, -html.dark .token.keyword { - color: #61afef; -} - -html.dark .token.function, -html.dark .token.class-name { - color: #f06292; -} - -html.dark .token.regex, -html.dark .token.important, -html.dark .token.variable { - color: #ffb74d; -} - -.token.important, -.token.bold { - font-weight: bold; -} - -.token.italic { - font-style: italic; -} - -.token.entity { - cursor: help; -} \ No newline at end of file diff --git a/docs-v2/tailwind.config.js b/docs-v2/tailwind.config.js deleted file mode 100644 index b47ef771d5786..0000000000000 --- a/docs-v2/tailwind.config.js +++ /dev/null @@ -1,17 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - "./app/**/*.{js,ts,jsx,tsx,mdx}", - "./pages/**/*.{js,ts,jsx,tsx,mdx}", - "./components/**/*.{js,ts,jsx,tsx,mdx}", - ], - darkMode: "class", - theme: { - extend: { - textDecorationColor: { - brand: "#34D28B", - }, - }, - }, - plugins: [], -}; diff --git a/docs-v2/theme.config.tsx b/docs-v2/theme.config.tsx deleted file mode 100644 index ab02f0f801d1d..0000000000000 --- a/docs-v2/theme.config.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import React from "react"; -import { useRouter } from "next/router"; -import { - DocsThemeConfig, useConfig, -} from "nextra-theme-docs"; - -import PipedreamLink from "./components/PipedreamLink"; -import PipedreamTextLogo from "./components/PipedreamTextLogo"; -import SlackLogo from "./components/SlackLogo"; -import DocSearch from "./components/DocSearch"; - -const config: DocsThemeConfig = { - head: function Head() { - const router = useRouter() - const { title } = useConfig() - - return ( - <> - {`${title} โ€” Pipedream`} - - {router && } - - - - ) - }, - // Custom components that replace the default MDX components - components: { - "a": PipedreamLink, - }, - logo: PipedreamTextLogo, - logoLink: "https://pipedream.com", - project: { - link: "https://github.com/PipedreamHQ/pipedream", - }, - chat: { - link: "https://pipedream.com/support", - icon: SlackLogo, - }, - docsRepositoryBase: "https://github.com/PipedreamHQ/pipedream/blob/master/docs-v2", - footer: { - content: ( - - Pipedream, Inc. {new Date().getFullYear()} {" "} - - ), - }, - color: { - hue: 153, // Pipedream green - saturation: 100, - }, - feedback: { - content: null, // By default this showed a Discord support icon, this was the recommended way to disable it - }, - sidebar: { - autoCollapse: true, - defaultMenuCollapseLevel: 1, - }, - search: { - component: DocSearch, - }, - // We can add banners to the docs for product announcements - // banner: { - // key: "announcement-key", // Used for dismissible state in localStorage - // dismissible: true, // Makes the banner dismissible - // content: ( - // - // Check out the new Pipedream Connect SDK Playground โ†’ - // - // ), - // }, -}; - -export default config; diff --git a/docs-v2/tsconfig.json b/docs-v2/tsconfig.json deleted file mode 100644 index 3f0dd8b41afd1..0000000000000 --- a/docs-v2/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": false, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "incremental": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "baseUrl": ".", - "paths": { - "@/components/*": ["components/*"], - "@/utils/*": ["utils/*"], - "@/styles/*": ["styles/*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], - "exclude": ["node_modules"] -} diff --git a/docs-v2/utils/componentStyles.js b/docs-v2/utils/componentStyles.js deleted file mode 100644 index a4dd7718304a5..0000000000000 --- a/docs-v2/utils/componentStyles.js +++ /dev/null @@ -1,36 +0,0 @@ -// Shared component style utilities for Connect demo components - -export const styles = { - // Container styles - container: "border border-gray-200 dark:border-gray-700 rounded-md overflow-hidden mt-4", - - // Header styles - header: "bg-gray-100 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 px-4 py-2 font-medium text-sm text-gray-800 dark:text-gray-200", - - // Form control styles - label: "font-medium text-sm text-gray-800 dark:text-gray-200", - select: "ml-2 p-1 border border-gray-300 dark:border-gray-600 rounded text-sm bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200", - - // Button styles - primaryButton: "px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors disabled:opacity-50 font-medium text-sm", - secondaryButton: "px-4 py-2 bg-gray-100 dark:bg-gray-800 border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 rounded-md hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors font-medium text-sm inline-flex items-center", - - // Code display - codeDisplay: "p-3 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md", - codeText: "text-sm break-all text-gray-800 dark:text-gray-200 font-mono", - - // Text styles - text: { - normal: "text-sm text-gray-600 dark:text-gray-400", - muted: "text-sm text-gray-500 dark:text-gray-400", - small: "text-xs text-gray-500 dark:text-gray-400", - strong: "text-gray-800 dark:text-gray-200", - strongMuted: "text-gray-700 dark:text-gray-300", - }, - - // Status messages - statusBox: { - error: "mt-4 p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-700 text-red-800 dark:text-red-400 rounded-md", - success: "mt-4 p-3 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-700 text-green-800 dark:text-green-400 rounded-md", - }, -}; diff --git a/docs-v2/utils/icons.ts b/docs-v2/utils/icons.ts deleted file mode 100644 index f04381caaad60..0000000000000 --- a/docs-v2/utils/icons.ts +++ /dev/null @@ -1,32 +0,0 @@ -const icons = { - nodejs: { - only_icon: - "https://res.cloudinary.com/pipedreamin/image/upload/v1646761316/docs/icons/icons8-nodejs_aax6wn.svg", - with_title: - "https://res.cloudinary.com/pipedreamin/image/upload/v1646761316/docs/icons/icons8-nodejs_aax6wn.svg", - }, - python: { - only_icon: - "https://res.cloudinary.com/pipedreamin/image/upload/v1646763734/docs/icons/icons8-python_ypgmya.svg", - with_title: - "https://res.cloudinary.com/pipedreamin/image/upload/v1647356607/docs/icons/python-logo-generic_k3o5w2.svg", - }, - go: { - only_icon: - "https://res.cloudinary.com/pipedreamin/image/upload/v1646763751/docs/icons/Go-Logo_Blue_zhkchv.svg", - with_title: - "https://res.cloudinary.com/pipedreamin/image/upload/v1646763751/docs/icons/Go-Logo_Blue_zhkchv.svg", - }, - bash: { - only_icon: - "https://res.cloudinary.com/pipedreamin/image/upload/v1646763756/docs/icons/full_colored_dark_nllzkl.svg", - with_title: - "https://res.cloudinary.com/pipedreamin/image/upload/v1647356698/docs/icons/full_colored_dark_1_-svg_vyfnv7.svg", - }, - native: { - only_icon: "https://res.cloudinary.com/pipedreamin/image/upload/v1569526159/icons/pipedream_x6plab.svg", - with_title: "https://res.cloudinary.com/pipedreamin/image/upload/v1569526159/icons/pipedream_x6plab.svg", - }, -}; - -export default icons; diff --git a/docs-v2/utils/imageLoader.js b/docs-v2/utils/imageLoader.js deleted file mode 100644 index 274c3820dfe8b..0000000000000 --- a/docs-v2/utils/imageLoader.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function myImageLoader({ - src, width, quality, -}) { - return `https://pipedream.com${src}?w=${width}&q=${quality || 75}`; -} diff --git a/docs-v2/validate-mdx-links.mjs b/docs-v2/validate-mdx-links.mjs deleted file mode 100755 index 411d3242059a4..0000000000000 --- a/docs-v2/validate-mdx-links.mjs +++ /dev/null @@ -1,309 +0,0 @@ -import { promises as fs } from "fs"; -import { - dirname, join, relative, basename, -} from "path"; -import chalk from "chalk"; - -// Convert header text to anchor link format -function headerToAnchor(headerText) { - // First remove any Markdown links - replace [text](url) with just text - const textWithoutLinks = headerText.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1"); - - return textWithoutLinks - .toLowerCase() - // Remove backticks which are just formatting - .replace(/`/g, "") - // Keep underscores but remove other special characters - .replace(/[^a-z0-9_\s-]/g, "") - .trim() - // Convert spaces to hyphens - .replace(/\s+/g, "-"); -} - -// Convert relative link to absolute path -function resolveRelativeLink(relativeLink, currentFilePath) { - // If it's just an anchor link (#something), keep it relative to current file - if (relativeLink.startsWith("#")) { - const basePath = "/" + relative("pages", currentFilePath).replace(/\.mdx$/, ""); - return `${basePath}${relativeLink}`; - } - - const dirPath = dirname(currentFilePath); - const absolutePath = join(dirPath, relativeLink); - return "/" + relative("pages", absolutePath); -} - -// Normalize path handling -function normalizePath(path) { - // Special case: root path - if (path === "/") return "/"; - - // Remove trailing slash unless it's the root - if (path.endsWith("/") && path !== "/") { - path = path.slice(0, -1); - } - return path; -} - -// Find all MDX files recursively -async function findMdxFiles(dir) { - const files = await fs.readdir(dir, { - withFileTypes: true, - }); - const mdxFiles = []; - - for (const file of files) { - const filePath = join(dir, file.name); - if (file.isDirectory()) { - mdxFiles.push(...await findMdxFiles(filePath)); - } else if (file.name.endsWith(".mdx")) { - mdxFiles.push(filePath); - } - } - - return mdxFiles; -} - -// Extract links and their line numbers from MDX content -function extractLinks(content, filePath) { - const links = []; - const lines = content.split("\n"); - const linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g; - - lines.forEach((line, index) => { - let match; - while ((match = linkRegex.exec(line)) !== null) { - const [ - , , link, - ] = match; - // Only process internal links - if (link.startsWith("/") || link.startsWith("#") || !link.includes("://")) { - let normalizedLink; - if (link.startsWith("#")) { - // For same-file anchors, we'll check both with and without the file path - const basePath = "/" + relative("pages", filePath).replace(/\.mdx$/, ""); - normalizedLink = `${basePath}${link}`; - } else { - normalizedLink = link.startsWith("/") - ? link - : resolveRelativeLink(link, filePath); - } - links.push({ - originalLink: link, - link: normalizedLink, - lineNumber: index + 1, - }); - } - } - }); - - return links; -} - -// Extract valid anchors from MDX content -function extractAnchors(content, filePath) { - const anchors = new Set(); - const lines = content.split("\n"); - const headerRegex = /^#{1,6}\s+(.+)$/; - - // Calculate the base path for this file - const relativePath = relative("pages", filePath); - const basePath = "/" + relativePath.replace(/\.mdx$/, ""); - const baseDir = dirname(basePath); - - // For basePath /core/workflows/code/nodejs.mdx -> /core/workflows/code/nodejs - const normalizedBasePath = normalizePath(basePath); - anchors.add(normalizedBasePath.toLowerCase()); - - // For index files, also add the directory path - const isIndexFile = basename(filePath) === "index.mdx"; - if (isIndexFile) { - const dirPath = baseDir === "." - ? "/" - : baseDir; - anchors.add(dirPath.toLowerCase()); - } - - // Process all headers in the file - lines.forEach((line) => { - const match = line.match(headerRegex); - if (match) { - const headerText = match[1].trim(); - const anchor = headerToAnchor(headerText); - - // For headers, we need to track: - // 1. Simple #anchor for same-file references - anchors.add(`#${anchor}`.toLowerCase()); - - // 2. Full path versions for cross-file references - const anchorPaths = [ - `${normalizedBasePath}#${anchor}`, - `${normalizedBasePath}/#${anchor}`, - ]; - - // For index files, also add anchors at the directory level - if (isIndexFile) { - const dirPath = baseDir === "." - ? "/" - : baseDir; - anchorPaths.push( - `${dirPath}#${anchor}`, - `${dirPath}/#${anchor}`, - ); - } - - // Add all variants to our set of valid anchors - anchorPaths.forEach((path) => { - anchors.add(path.toLowerCase()); - }); - } - }); - - if (process.env.DEBUG) { - console.log(`File: ${filePath}`); - console.log("Valid anchors:", Array.from(anchors)); - } - - return anchors; -} - -// Try to find MDX file in direct or index format -async function findMdxFile(basePath) { - basePath = normalizePath(basePath); - - // Try direct .mdx file first - const directPath = join("pages", basePath + ".mdx"); - try { - await fs.access(directPath); - return directPath; - } catch (err) { - // Then try index.mdx - const indexPath = join("pages", basePath, "index.mdx"); - try { - await fs.access(indexPath); - return indexPath; - } catch (err) { - return null; - } - } -} - -async function main() { - try { - const mdxFiles = await findMdxFiles("pages"); - const linkMap = new Map(); - const validAnchors = new Set(); - const fileAnchorsMap = new Map(); // Track anchors by file - - // First pass: collect all links and generate valid anchors - console.log("Processing MDX files..."); - for (const filePath of mdxFiles) { - const content = await fs.readFile(filePath, "utf8"); - - // Extract and store links - const links = extractLinks(content, filePath); - if (links.length > 0) { - linkMap.set(filePath, links); - } - - // Extract and store anchors - const fileAnchors = extractAnchors(content, filePath); - fileAnchorsMap.set(filePath, fileAnchors); - for (const anchor of fileAnchors) { - validAnchors.add(anchor); - } - } - - // Second pass: validate all links - let brokenLinksFound = false; - - for (const [ - file, - links, - ] of linkMap) { - // Get anchors for the current file - const currentFileAnchors = fileAnchorsMap.get(file); - - for (const { - originalLink, link, lineNumber, - } of links) { - if (originalLink.startsWith("#")) { - // For same-file anchors, check both the simple #anchor and the full path - const anchorExists = currentFileAnchors.has(originalLink.toLowerCase()); - if (!anchorExists) { - brokenLinksFound = true; - console.log( - chalk.red("โœ—"), - `${chalk.yellow(file)}:${chalk.cyan(lineNumber)}`, - `Broken link: ${chalk.red(originalLink)} (anchor not found)`, - ); - } - continue; - } - - // Split link into path and anchor parts - const [ - path, - anchor, - ] = link.split("#"); - const normalizedPath = normalizePath(path); - - // First verify the file exists - const targetFile = await findMdxFile(normalizedPath); - if (!targetFile && anchor) { - brokenLinksFound = true; - console.log( - chalk.red("โœ—"), - `${chalk.yellow(file)}:${chalk.cyan(lineNumber)}`, - `Broken link: ${chalk.red(link)} (file not found)`, - ); - continue; - } - - // Then check anchor if present - if (anchor) { - // Generate all possible variants of how this anchor might appear - const variations = [ - `${normalizedPath}#${anchor}`, - `${normalizedPath}/#${anchor}`, - // For index files, also check directory-level anchors - basename(targetFile) === "index.mdx" - ? `${dirname(normalizedPath)}#${anchor}` - : null, - basename(targetFile) === "index.mdx" - ? `${dirname(normalizedPath)}/#${anchor}` - : null, - ].filter(Boolean).map((v) => v.toLowerCase()); - - if (process.env.DEBUG) { - console.log("\nChecking link:", link); - console.log("Checking variations:", variations); - console.log("Against anchors:", Array.from(validAnchors)); - } - - const anchorExists = variations.some((v) => validAnchors.has(v)); - - if (!anchorExists) { - brokenLinksFound = true; - console.log( - chalk.red("โœ—"), - `${chalk.yellow(file)}:${chalk.cyan(lineNumber)}`, - `Broken link: ${chalk.red(originalLink)} (anchor not found)`, - ); - } - } - } - } - - if (brokenLinksFound) { - console.log(chalk.red("\nโœ— Broken links found!")); - process.exit(1); - } - console.log(chalk.green("\nโœ“ All links are valid!")); - } catch (error) { - console.error(chalk.red("Error:"), error.message); - process.exit(1); - } -} - -main(); diff --git a/docs-v2/vercel.json b/docs-v2/vercel.json deleted file mode 100644 index e58f7232f38f8..0000000000000 --- a/docs-v2/vercel.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "installCommand": "npx pnpm@9.14.2 install --frozen-lockfile=false", - "buildCommand": "npx pnpm@9.14.2 run build" -} diff --git a/docs-v2/yarn.lock b/docs-v2/yarn.lock deleted file mode 100644 index 68425151edd5d..0000000000000 --- a/docs-v2/yarn.lock +++ /dev/null @@ -1,6429 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@algolia/autocomplete-core@1.17.7": - version "1.17.7" - resolved "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.17.7.tgz" - integrity sha512-BjiPOW6ks90UKl7TwMv7oNQMnzU+t/wk9mgIDi6b1tXpUek7MW0lbNOUHpvam9pe3lVCf4xPFT+lK7s+e+fs7Q== - dependencies: - "@algolia/autocomplete-plugin-algolia-insights" "1.17.7" - "@algolia/autocomplete-shared" "1.17.7" - -"@algolia/autocomplete-plugin-algolia-insights@1.17.7": - version "1.17.7" - resolved "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.17.7.tgz" - integrity sha512-Jca5Ude6yUOuyzjnz57og7Et3aXjbwCSDf/8onLHSQgw1qW3ALl9mrMWaXb5FmPVkV3EtkD2F/+NkT6VHyPu9A== - dependencies: - "@algolia/autocomplete-shared" "1.17.7" - -"@algolia/autocomplete-preset-algolia@1.17.7": - version "1.17.7" - resolved "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.17.7.tgz" - integrity sha512-ggOQ950+nwbWROq2MOCIL71RE0DdQZsceqrg32UqnhDz8FlO9rL8ONHNsI2R1MH0tkgVIDKI/D0sMiUchsFdWA== - dependencies: - "@algolia/autocomplete-shared" "1.17.7" - -"@algolia/autocomplete-shared@1.17.7": - version "1.17.7" - resolved "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.17.7.tgz" - integrity sha512-o/1Vurr42U/qskRSuhBH+VKxMvkkUVTLU6WZQr+L5lGZZLYWyhdzWjW0iGXY7EkwRTjBqvN2EsR81yCTGV/kmg== - -"@algolia/client-abtesting@5.23.2": - version "5.23.2" - resolved "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.23.2.tgz" - integrity sha512-EudQGeYEzviwqPH8WoqP5VTQssE/PW6sEdL0zzOyKt2bWnWoUp5Rnm67sCbxYDR44JpUchbkul0PfWrSYsBPjQ== - dependencies: - "@algolia/client-common" "5.23.2" - "@algolia/requester-browser-xhr" "5.23.2" - "@algolia/requester-fetch" "5.23.2" - "@algolia/requester-node-http" "5.23.2" - -"@algolia/client-analytics@5.23.2": - version "5.23.2" - resolved "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.23.2.tgz" - integrity sha512-zmJrkZqWFu+ft+VRcttZZJhw5ElkhBtOArRzQOu9sRnrSSodBOdPRhAfvu8tG93Hv67wh5qQaTBwLxM58AxuMg== - dependencies: - "@algolia/client-common" "5.23.2" - "@algolia/requester-browser-xhr" "5.23.2" - "@algolia/requester-fetch" "5.23.2" - "@algolia/requester-node-http" "5.23.2" - -"@algolia/client-common@5.23.2": - version "5.23.2" - resolved "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.23.2.tgz" - integrity sha512-xaE6o4BMdqYBe0iB7JjX6G9/Qeqx6TSs9T4d6VJ0JHPsEyklSwIbKRiomPeYD7vzt2P4t45Io6QBhifOUP+0qg== - -"@algolia/client-insights@5.23.2": - version "5.23.2" - resolved "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.23.2.tgz" - integrity sha512-F85hpMszbr5ZGt8gFdl7WOugELRF4z3R1nD9n3t7PZ/2alV7IR75UQY8/jMQDwij/lrnVaKbLeIvKKy6K7ncZw== - dependencies: - "@algolia/client-common" "5.23.2" - "@algolia/requester-browser-xhr" "5.23.2" - "@algolia/requester-fetch" "5.23.2" - "@algolia/requester-node-http" "5.23.2" - -"@algolia/client-personalization@5.23.2": - version "5.23.2" - resolved "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.23.2.tgz" - integrity sha512-TuGaGKiQvQqFNR4c3Vdl+JBe6dkEPmRzVyIdWLrurOPEmFmVCKRxtSnLr0TVFl6de/JfDAXuchvtvLHFxv9P2A== - dependencies: - "@algolia/client-common" "5.23.2" - "@algolia/requester-browser-xhr" "5.23.2" - "@algolia/requester-fetch" "5.23.2" - "@algolia/requester-node-http" "5.23.2" - -"@algolia/client-query-suggestions@5.23.2": - version "5.23.2" - resolved "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.23.2.tgz" - integrity sha512-fg2tZf7Sf51Icjfrea0dnfbfwlJ7kXMcRsWSJN3DZhEi/Y4mMmK9L0Cq8sby6HDzxy5T8xEWNWC3TMx5FvrJ6w== - dependencies: - "@algolia/client-common" "5.23.2" - "@algolia/requester-browser-xhr" "5.23.2" - "@algolia/requester-fetch" "5.23.2" - "@algolia/requester-node-http" "5.23.2" - -"@algolia/client-search@>= 4.9.1 < 6", "@algolia/client-search@5.23.2": - version "5.23.2" - resolved "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.23.2.tgz" - integrity sha512-XiTjt0qgsJk9OqvDpMwTgUaPAYNSQcMILRfSYiorgiyc71yYM7Lq1vRSVxhB0m51mrViWj4rIR6kSiJRXebqvQ== - dependencies: - "@algolia/client-common" "5.23.2" - "@algolia/requester-browser-xhr" "5.23.2" - "@algolia/requester-fetch" "5.23.2" - "@algolia/requester-node-http" "5.23.2" - -"@algolia/ingestion@1.23.2": - version "1.23.2" - resolved "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.23.2.tgz" - integrity sha512-7ClIghvUFZTomBipD8Kor9Z5llcAM3lHUBG3VFOvUsOxOJcaMMONlBXyoFDfI1na+u14lVaGehY2oIEfY1eB0w== - dependencies: - "@algolia/client-common" "5.23.2" - "@algolia/requester-browser-xhr" "5.23.2" - "@algolia/requester-fetch" "5.23.2" - "@algolia/requester-node-http" "5.23.2" - -"@algolia/monitoring@1.23.2": - version "1.23.2" - resolved "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.23.2.tgz" - integrity sha512-kF7KKd0iIIlaD70flFS+8+DNxRvIzrG9A22iWG5LDX225Kl6pITroq+qIUweqqyyoqJBYuIXKZGDGtnahEwQxw== - dependencies: - "@algolia/client-common" "5.23.2" - "@algolia/requester-browser-xhr" "5.23.2" - "@algolia/requester-fetch" "5.23.2" - "@algolia/requester-node-http" "5.23.2" - -"@algolia/recommend@5.23.2": - version "5.23.2" - resolved "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.23.2.tgz" - integrity sha512-nAgS2O5ww8J4fgW6GAiybAdr0uH7MV74srPdx51cPJRpQBEge4WnYBaOWx1/a53qI0xwNtQudnEyBGUzsSYaAw== - dependencies: - "@algolia/client-common" "5.23.2" - "@algolia/requester-browser-xhr" "5.23.2" - "@algolia/requester-fetch" "5.23.2" - "@algolia/requester-node-http" "5.23.2" - -"@algolia/requester-browser-xhr@5.23.2": - version "5.23.2" - resolved "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.23.2.tgz" - integrity sha512-yw6IzgQcwr4cZuoQCEoQui9G0rhVRGCyhPhW+gmrXe6oVr4qB50FV6mWGLA170+iqGVjPn/DVuOhExjBzcViTQ== - dependencies: - "@algolia/client-common" "5.23.2" - -"@algolia/requester-fetch@5.23.2": - version "5.23.2" - resolved "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.23.2.tgz" - integrity sha512-8rmSybTwIqmGx3P0qkOEUkkyeIewglaKq6yUnxnVkBJbd4USfIZsw9cME1YUEHeZI7aOhTQg9QteUHSKXclF5A== - dependencies: - "@algolia/client-common" "5.23.2" - -"@algolia/requester-node-http@5.23.2": - version "5.23.2" - resolved "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.23.2.tgz" - integrity sha512-IHpUiW3d3oVE5tCYqQN7X71/EbXI7f8WxU85eWW1UYEWEknqW3csdGctyIW7+qMHFfxeDymI1Wln/gGHHIXLIw== - dependencies: - "@algolia/client-common" "5.23.2" - -"@alloc/quick-lru@^5.2.0": - version "5.2.0" - resolved "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz" - integrity sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw== - -"@ampproject/remapping@^2.2.0": - version "2.3.0" - resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz" - integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.24" - -"@antfu/install-pkg@^1.0.0": - version "1.0.0" - resolved "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-1.0.0.tgz" - integrity sha512-xvX6P/lo1B3ej0OsaErAjqgFYzYVcJpamjLAFLYh9vRJngBrMoUG7aVnrGTeqM7yxbyTD5p3F2+0/QUEh8Vzhw== - dependencies: - package-manager-detector "^0.2.8" - tinyexec "^0.3.2" - -"@antfu/utils@^8.1.0": - version "8.1.1" - resolved "https://registry.npmjs.org/@antfu/utils/-/utils-8.1.1.tgz" - integrity sha512-Mex9nXf9vR6AhcXmMrlz/HVgYYZpVGJ6YlPgwl7UnaFpnshXs6EK/oa5Gpf3CzENMjkvEx2tQtntGnb7UtSTOQ== - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.26.2": - version "7.26.2" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz" - integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== - dependencies: - "@babel/helper-validator-identifier" "^7.25.9" - js-tokens "^4.0.0" - picocolors "^1.0.0" - -"@babel/compat-data@^7.26.8": - version "7.26.8" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz" - integrity sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ== - -"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9", "@babel/core@^7.8.0": - version "7.26.10" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz" - integrity sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.26.2" - "@babel/generator" "^7.26.10" - "@babel/helper-compilation-targets" "^7.26.5" - "@babel/helper-module-transforms" "^7.26.0" - "@babel/helpers" "^7.26.10" - "@babel/parser" "^7.26.10" - "@babel/template" "^7.26.9" - "@babel/traverse" "^7.26.10" - "@babel/types" "^7.26.10" - convert-source-map "^2.0.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.3" - semver "^6.3.1" - -"@babel/generator@^7.26.10", "@babel/generator@^7.27.0", "@babel/generator@^7.7.2": - version "7.27.0" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.27.0.tgz" - integrity sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw== - dependencies: - "@babel/parser" "^7.27.0" - "@babel/types" "^7.27.0" - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.25" - jsesc "^3.0.2" - -"@babel/helper-compilation-targets@^7.26.5": - version "7.27.0" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.0.tgz" - integrity sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA== - dependencies: - "@babel/compat-data" "^7.26.8" - "@babel/helper-validator-option" "^7.25.9" - browserslist "^4.24.0" - lru-cache "^5.1.1" - semver "^6.3.1" - -"@babel/helper-module-imports@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz" - integrity sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw== - dependencies: - "@babel/traverse" "^7.25.9" - "@babel/types" "^7.25.9" - -"@babel/helper-module-transforms@^7.26.0": - version "7.26.0" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz" - integrity sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw== - dependencies: - "@babel/helper-module-imports" "^7.25.9" - "@babel/helper-validator-identifier" "^7.25.9" - "@babel/traverse" "^7.25.9" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.25.9", "@babel/helper-plugin-utils@^7.8.0": - version "7.26.5" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz" - integrity sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg== - -"@babel/helper-string-parser@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz" - integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== - -"@babel/helper-validator-identifier@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz" - integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== - -"@babel/helper-validator-option@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz" - integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== - -"@babel/helpers@^7.26.10": - version "7.27.0" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.0.tgz" - integrity sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg== - dependencies: - "@babel/template" "^7.27.0" - "@babel/types" "^7.27.0" - -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.26.10", "@babel/parser@^7.27.0": - version "7.27.0" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz" - integrity sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg== - dependencies: - "@babel/types" "^7.27.0" - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz" - integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.12.13": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-class-static-block@^7.14.5": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz" - integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-import-attributes@^7.24.7": - version "7.26.0" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz" - integrity sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-syntax-import-meta@^7.10.4": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz" - integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-jsx@^7.7.2": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz" - integrity sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.10.4": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-private-property-in-object@^7.14.5": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz" - integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-top-level-await@^7.14.5": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-typescript@^7.7.2": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz" - integrity sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/template@^7.26.9", "@babel/template@^7.27.0", "@babel/template@^7.3.3": - version "7.27.0" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.27.0.tgz" - integrity sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA== - dependencies: - "@babel/code-frame" "^7.26.2" - "@babel/parser" "^7.27.0" - "@babel/types" "^7.27.0" - -"@babel/traverse@^7.25.9", "@babel/traverse@^7.26.10": - version "7.27.0" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.0.tgz" - integrity sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA== - dependencies: - "@babel/code-frame" "^7.26.2" - "@babel/generator" "^7.27.0" - "@babel/parser" "^7.27.0" - "@babel/template" "^7.27.0" - "@babel/types" "^7.27.0" - debug "^4.3.1" - globals "^11.1.0" - -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.10", "@babel/types@^7.27.0", "@babel/types@^7.3.3": - version "7.27.0" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz" - integrity sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg== - dependencies: - "@babel/helper-string-parser" "^7.25.9" - "@babel/helper-validator-identifier" "^7.25.9" - -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - -"@braintree/sanitize-url@^7.0.4": - version "7.1.1" - resolved "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.1.tgz" - integrity sha512-i1L7noDNxtFyL5DmZafWy1wRVhGehQmzZaz1HiN5e7iylJMSZR7ekOV7NsIqa5qBldlLrsKv4HbgFUVlQrz8Mw== - -"@chevrotain/cst-dts-gen@11.0.3": - version "11.0.3" - resolved "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz" - integrity sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ== - dependencies: - "@chevrotain/gast" "11.0.3" - "@chevrotain/types" "11.0.3" - lodash-es "4.17.21" - -"@chevrotain/gast@11.0.3": - version "11.0.3" - resolved "https://registry.npmjs.org/@chevrotain/gast/-/gast-11.0.3.tgz" - integrity sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q== - dependencies: - "@chevrotain/types" "11.0.3" - lodash-es "4.17.21" - -"@chevrotain/regexp-to-ast@11.0.3": - version "11.0.3" - resolved "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz" - integrity sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA== - -"@chevrotain/types@11.0.3": - version "11.0.3" - resolved "https://registry.npmjs.org/@chevrotain/types/-/types-11.0.3.tgz" - integrity sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ== - -"@chevrotain/utils@11.0.3": - version "11.0.3" - resolved "https://registry.npmjs.org/@chevrotain/utils/-/utils-11.0.3.tgz" - integrity sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ== - -"@corex/deepmerge@^4.0.43": - version "4.0.43" - resolved "https://registry.npmjs.org/@corex/deepmerge/-/deepmerge-4.0.43.tgz" - integrity sha512-N8uEMrMPL0cu/bdboEWpQYb/0i2K5Qn8eCsxzOmxSggJbbQte7ljMRoXm917AbntqTGOzdTu+vP3KOOzoC70HQ== - -"@docsearch/css@3.8.1": - version "3.8.1" - resolved "https://registry.npmjs.org/@docsearch/css/-/css-3.8.1.tgz" - integrity sha512-XiPhKT+ghUi4pEi/ACE9iDmwWsLA6d6xSwtR5ab48iB63OtYWFLZHUKdH7jHKTmwOs0Eg22TX4Kb3H5liFm5bQ== - -"@docsearch/react@^3.8.1": - version "3.8.1" - resolved "https://registry.npmjs.org/@docsearch/react/-/react-3.8.1.tgz" - integrity sha512-7vgQuktQNBQdNWO1jbkiwgIrTZ0r5nPIHqcO3Z2neAWgkdUuldvvMfEOEaPXT5lqcezEv7i0h+tC285nD3jpZg== - dependencies: - "@algolia/autocomplete-core" "1.17.7" - "@algolia/autocomplete-preset-algolia" "1.17.7" - "@docsearch/css" "3.8.1" - algoliasearch "^5.14.2" - -"@floating-ui/core@^1.6.0": - version "1.6.9" - resolved "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.9.tgz" - integrity sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw== - dependencies: - "@floating-ui/utils" "^0.2.9" - -"@floating-ui/dom@^1.0.0": - version "1.6.13" - resolved "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.13.tgz" - integrity sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w== - dependencies: - "@floating-ui/core" "^1.6.0" - "@floating-ui/utils" "^0.2.9" - -"@floating-ui/react-dom@^2.1.2": - version "2.1.2" - resolved "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.2.tgz" - integrity sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A== - dependencies: - "@floating-ui/dom" "^1.0.0" - -"@floating-ui/react@^0.26.16": - version "0.26.28" - resolved "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.28.tgz" - integrity sha512-yORQuuAtVpiRjpMhdc0wJj06b9JFjrYF4qp96j++v2NBpbi6SEGF7donUJ3TMieerQ6qVkAv1tgr7L4r5roTqw== - dependencies: - "@floating-ui/react-dom" "^2.1.2" - "@floating-ui/utils" "^0.2.8" - tabbable "^6.0.0" - -"@floating-ui/utils@^0.2.8", "@floating-ui/utils@^0.2.9": - version "0.2.9" - resolved "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.9.tgz" - integrity sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg== - -"@formatjs/intl-localematcher@^0.5.4": - version "0.5.10" - resolved "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.10.tgz" - integrity sha512-af3qATX+m4Rnd9+wHcjJ4w2ijq+rAVP3CCinJQvFv1kgSu1W6jypUmvleJxcewdxmutM8dmIRZFxO/IQBZmP2Q== - dependencies: - tslib "2" - -"@headlessui/react@^2.1.2": - version "2.2.1" - resolved "https://registry.npmjs.org/@headlessui/react/-/react-2.2.1.tgz" - integrity sha512-daiUqVLae8CKVjEVT19P/izW0aGK0GNhMSAeMlrDebKmoVZHcRRwbxzgtnEadUVDXyBsWo9/UH4KHeniO+0tMg== - dependencies: - "@floating-ui/react" "^0.26.16" - "@react-aria/focus" "^3.17.1" - "@react-aria/interactions" "^3.21.3" - "@tanstack/react-virtual" "^3.11.1" - -"@iconify/types@^2.0.0": - version "2.0.0" - resolved "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz" - integrity sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg== - -"@iconify/utils@^2.1.33": - version "2.3.0" - resolved "https://registry.npmjs.org/@iconify/utils/-/utils-2.3.0.tgz" - integrity sha512-GmQ78prtwYW6EtzXRU1rY+KwOKfz32PD7iJh6Iyqw68GiKuoZ2A6pRtzWONz5VQJbp50mEjXh/7NkumtrAgRKA== - dependencies: - "@antfu/install-pkg" "^1.0.0" - "@antfu/utils" "^8.1.0" - "@iconify/types" "^2.0.0" - debug "^4.4.0" - globals "^15.14.0" - kolorist "^1.8.0" - local-pkg "^1.0.0" - mlly "^1.7.4" - -"@img/sharp-darwin-arm64@0.33.5": - version "0.33.5" - resolved "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz" - integrity sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ== - optionalDependencies: - "@img/sharp-libvips-darwin-arm64" "1.0.4" - -"@img/sharp-libvips-darwin-arm64@1.0.4": - version "1.0.4" - resolved "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz" - integrity sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg== - -"@isaacs/cliui@^8.0.2": - version "8.0.2" - resolved "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz" - integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== - dependencies: - string-width "^5.1.2" - string-width-cjs "npm:string-width@^4.2.0" - strip-ansi "^7.0.1" - strip-ansi-cjs "npm:strip-ansi@^6.0.1" - wrap-ansi "^8.1.0" - wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": - version "0.1.3" - resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jest/console@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz" - integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - slash "^3.0.0" - -"@jest/core@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz" - integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== - dependencies: - "@jest/console" "^29.7.0" - "@jest/reporters" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - ci-info "^3.2.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^29.7.0" - jest-config "^29.7.0" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-resolve-dependencies "^29.7.0" - jest-runner "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - jest-watcher "^29.7.0" - micromatch "^4.0.4" - pretty-format "^29.7.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/environment@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz" - integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== - dependencies: - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-mock "^29.7.0" - -"@jest/expect-utils@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz" - integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== - dependencies: - jest-get-type "^29.6.3" - -"@jest/expect@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz" - integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== - dependencies: - expect "^29.7.0" - jest-snapshot "^29.7.0" - -"@jest/fake-timers@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz" - integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== - dependencies: - "@jest/types" "^29.6.3" - "@sinonjs/fake-timers" "^10.0.2" - "@types/node" "*" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-util "^29.7.0" - -"@jest/globals@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz" - integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/types" "^29.6.3" - jest-mock "^29.7.0" - -"@jest/reporters@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz" - integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" - "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^6.0.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.1.3" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - jest-worker "^29.7.0" - slash "^3.0.0" - string-length "^4.0.1" - strip-ansi "^6.0.0" - v8-to-istanbul "^9.0.1" - -"@jest/schemas@^29.6.3": - version "29.6.3" - resolved "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz" - integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== - dependencies: - "@sinclair/typebox" "^0.27.8" - -"@jest/source-map@^29.6.3": - version "29.6.3" - resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz" - integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== - dependencies: - "@jridgewell/trace-mapping" "^0.3.18" - callsites "^3.0.0" - graceful-fs "^4.2.9" - -"@jest/test-result@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz" - integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== - dependencies: - "@jest/console" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz" - integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== - dependencies: - "@jest/test-result" "^29.7.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - slash "^3.0.0" - -"@jest/transform@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz" - integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== - dependencies: - "@babel/core" "^7.11.6" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^2.0.0" - fast-json-stable-stringify "^2.1.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - micromatch "^4.0.4" - pirates "^4.0.4" - slash "^3.0.0" - write-file-atomic "^4.0.2" - -"@jest/types@^29.6.3": - version "29.6.3" - resolved "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz" - integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== - dependencies: - "@jest/schemas" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" - -"@jridgewell/gen-mapping@^0.3.2", "@jridgewell/gen-mapping@^0.3.5": - version "0.3.8" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz" - integrity sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA== - dependencies: - "@jridgewell/set-array" "^1.2.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.24" - -"@jridgewell/resolve-uri@^3.1.0": - version "3.1.2" - resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz" - integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== - -"@jridgewell/set-array@^1.2.1": - version "1.2.1" - resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz" - integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== - -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.5.0" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz" - integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== - -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": - version "0.3.25" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" - integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - -"@mdx-js/mdx@^3.0.0": - version "3.1.0" - resolved "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.1.0.tgz" - integrity sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw== - dependencies: - "@types/estree" "^1.0.0" - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^3.0.0" - "@types/mdx" "^2.0.0" - collapse-white-space "^2.0.0" - devlop "^1.0.0" - estree-util-is-identifier-name "^3.0.0" - estree-util-scope "^1.0.0" - estree-walker "^3.0.0" - hast-util-to-jsx-runtime "^2.0.0" - markdown-extensions "^2.0.0" - recma-build-jsx "^1.0.0" - recma-jsx "^1.0.0" - recma-stringify "^1.0.0" - rehype-recma "^1.0.0" - remark-mdx "^3.0.0" - remark-parse "^11.0.0" - remark-rehype "^11.0.0" - source-map "^0.7.0" - unified "^11.0.0" - unist-util-position-from-estree "^2.0.0" - unist-util-stringify-position "^4.0.0" - unist-util-visit "^5.0.0" - vfile "^6.0.0" - -"@mdx-js/react@^3.0.0": - version "3.1.0" - resolved "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.0.tgz" - integrity sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ== - dependencies: - "@types/mdx" "^2.0.0" - -"@mermaid-js/parser@^0.4.0": - version "0.4.0" - resolved "https://registry.npmjs.org/@mermaid-js/parser/-/parser-0.4.0.tgz" - integrity sha512-wla8XOWvQAwuqy+gxiZqY+c7FokraOTHRWMsbB4AgRx9Sy7zKslNyejy7E+a77qHfey5GXw/ik3IXv/NHMJgaA== - dependencies: - langium "3.3.1" - -"@napi-rs/simple-git-darwin-arm64@0.1.19": - version "0.1.19" - resolved "https://registry.npmjs.org/@napi-rs/simple-git-darwin-arm64/-/simple-git-darwin-arm64-0.1.19.tgz" - integrity sha512-viZB5TYgjA1vH+QluhxZo0WKro3xBA+1xSzYx8mcxUMO5gnAoUMwXn0ZO/6Zy6pai+aGae+cj6XihGnrBRu3Pg== - -"@napi-rs/simple-git@^0.1.9": - version "0.1.19" - resolved "https://registry.npmjs.org/@napi-rs/simple-git/-/simple-git-0.1.19.tgz" - integrity sha512-jMxvwzkKzd3cXo2EB9GM2ic0eYo2rP/BS6gJt6HnWbsDO1O8GSD4k7o2Cpr2YERtMpGF/MGcDfsfj2EbQPtrXw== - optionalDependencies: - "@napi-rs/simple-git-android-arm-eabi" "0.1.19" - "@napi-rs/simple-git-android-arm64" "0.1.19" - "@napi-rs/simple-git-darwin-arm64" "0.1.19" - "@napi-rs/simple-git-darwin-x64" "0.1.19" - "@napi-rs/simple-git-freebsd-x64" "0.1.19" - "@napi-rs/simple-git-linux-arm-gnueabihf" "0.1.19" - "@napi-rs/simple-git-linux-arm64-gnu" "0.1.19" - "@napi-rs/simple-git-linux-arm64-musl" "0.1.19" - "@napi-rs/simple-git-linux-powerpc64le-gnu" "0.1.19" - "@napi-rs/simple-git-linux-s390x-gnu" "0.1.19" - "@napi-rs/simple-git-linux-x64-gnu" "0.1.19" - "@napi-rs/simple-git-linux-x64-musl" "0.1.19" - "@napi-rs/simple-git-win32-arm64-msvc" "0.1.19" - "@napi-rs/simple-git-win32-x64-msvc" "0.1.19" - -"@next/env@^13.4.3": - version "13.5.11" - resolved "https://registry.npmjs.org/@next/env/-/env-13.5.11.tgz" - integrity sha512-fbb2C7HChgM7CemdCY+y3N1n8pcTKdqtQLbC7/EQtPdLvlMUT9JX/dBYl8MMZAtYG4uVMyPFHXckb68q/NRwqg== - -"@next/env@14.2.26": - version "14.2.26" - resolved "https://registry.npmjs.org/@next/env/-/env-14.2.26.tgz" - integrity sha512-vO//GJ/YBco+H7xdQhzJxF7ub3SUwft76jwaeOyVVQFHCi5DCnkP16WHB+JBylo4vOKPoZBlR94Z8xBxNBdNJA== - -"@next/swc-darwin-arm64@14.2.26": - version "14.2.26" - resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.26.tgz" - integrity sha512-zDJY8gsKEseGAxG+C2hTMT0w9Nk9N1Sk1qV7vXYz9MEiyRoF5ogQX2+vplyUMIfygnjn9/A04I6yrUTRTuRiyQ== - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": - version "2.0.5" - resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.8" - resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@pipedream/sdk@^1.5.3": - version "1.5.3" - resolved "https://registry.npmjs.org/@pipedream/sdk/-/sdk-1.5.3.tgz" - integrity sha512-shXEDK91RzaTAbFQCVLHCV+PuKjQaes9V1C8r1abV6hRCyAQcYnr5j6alJuKiozBnIh5BGA/OYh0JEYBWau7yA== - dependencies: - "@rails/actioncable" "^8.0.0" - commander "^12.1.0" - oauth4webapi "^3.1.4" - ws "^8.18.0" - -"@pkgjs/parseargs@^0.11.0": - version "0.11.0" - resolved "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz" - integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== - -"@rails/actioncable@^8.0.0": - version "8.0.200" - resolved "https://registry.npmjs.org/@rails/actioncable/-/actioncable-8.0.200.tgz" - integrity sha512-EDqWyxck22BHmv1e+mD8Kl6GmtNkhEPdRfGFT7kvsv1yoXd9iYrqHDVAaR8bKmU/syC5eEZ2I5aWWxtB73ukMw== - -"@react-aria/focus@^3.17.1": - version "3.20.1" - resolved "https://registry.npmjs.org/@react-aria/focus/-/focus-3.20.1.tgz" - integrity sha512-lgYs+sQ1TtBrAXnAdRBQrBo0/7o5H6IrfDxec1j+VRpcXL0xyk0xPq+m3lZp8typzIghqDgpnKkJ5Jf4OrzPIw== - dependencies: - "@react-aria/interactions" "^3.24.1" - "@react-aria/utils" "^3.28.1" - "@react-types/shared" "^3.28.0" - "@swc/helpers" "^0.5.0" - clsx "^2.0.0" - -"@react-aria/interactions@^3.21.3", "@react-aria/interactions@^3.24.1": - version "3.24.1" - resolved "https://registry.npmjs.org/@react-aria/interactions/-/interactions-3.24.1.tgz" - integrity sha512-OWEcIC6UQfWq4Td5Ptuh4PZQ4LHLJr/JL2jGYvuNL6EgL3bWvzPrRYIF/R64YbfVxIC7FeZpPSkS07sZ93/NoA== - dependencies: - "@react-aria/ssr" "^3.9.7" - "@react-aria/utils" "^3.28.1" - "@react-stately/flags" "^3.1.0" - "@react-types/shared" "^3.28.0" - "@swc/helpers" "^0.5.0" - -"@react-aria/ssr@^3.9.7": - version "3.9.7" - resolved "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.9.7.tgz" - integrity sha512-GQygZaGlmYjmYM+tiNBA5C6acmiDWF52Nqd40bBp0Znk4M4hP+LTmI0lpI1BuKMw45T8RIhrAsICIfKwZvi2Gg== - dependencies: - "@swc/helpers" "^0.5.0" - -"@react-aria/utils@^3.28.1": - version "3.28.1" - resolved "https://registry.npmjs.org/@react-aria/utils/-/utils-3.28.1.tgz" - integrity sha512-mnHFF4YOVu9BRFQ1SZSKfPhg3z+lBRYoW5mLcYTQihbKhz48+I1sqRkP7ahMITr8ANH3nb34YaMME4XWmK2Mgg== - dependencies: - "@react-aria/ssr" "^3.9.7" - "@react-stately/flags" "^3.1.0" - "@react-stately/utils" "^3.10.5" - "@react-types/shared" "^3.28.0" - "@swc/helpers" "^0.5.0" - clsx "^2.0.0" - -"@react-stately/flags@^3.1.0": - version "3.1.0" - resolved "https://registry.npmjs.org/@react-stately/flags/-/flags-3.1.0.tgz" - integrity sha512-KSHOCxTFpBtxhIRcKwsD1YDTaNxFtCYuAUb0KEihc16QwqZViq4hasgPBs2gYm7fHRbw7WYzWKf6ZSo/+YsFlg== - dependencies: - "@swc/helpers" "^0.5.0" - -"@react-stately/utils@^3.10.5": - version "3.10.5" - resolved "https://registry.npmjs.org/@react-stately/utils/-/utils-3.10.5.tgz" - integrity sha512-iMQSGcpaecghDIh3mZEpZfoFH3ExBwTtuBEcvZ2XnGzCgQjeYXcMdIUwAfVQLXFTdHUHGF6Gu6/dFrYsCzySBQ== - dependencies: - "@swc/helpers" "^0.5.0" - -"@react-types/shared@^3.28.0": - version "3.28.0" - resolved "https://registry.npmjs.org/@react-types/shared/-/shared-3.28.0.tgz" - integrity sha512-9oMEYIDc3sk0G5rysnYvdNrkSg7B04yTKl50HHSZVbokeHpnU0yRmsDaWb9B/5RprcKj8XszEk5guBO8Sa/Q+Q== - -"@shikijs/core@1.29.2": - version "1.29.2" - resolved "https://registry.npmjs.org/@shikijs/core/-/core-1.29.2.tgz" - integrity sha512-vju0lY9r27jJfOY4Z7+Rt/nIOjzJpZ3y+nYpqtUZInVoXQ/TJZcfGnNOGnKjFdVZb8qexiCuSlZRKcGfhhTTZQ== - dependencies: - "@shikijs/engine-javascript" "1.29.2" - "@shikijs/engine-oniguruma" "1.29.2" - "@shikijs/types" "1.29.2" - "@shikijs/vscode-textmate" "^10.0.1" - "@types/hast" "^3.0.4" - hast-util-to-html "^9.0.4" - -"@shikijs/engine-javascript@1.29.2": - version "1.29.2" - resolved "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.29.2.tgz" - integrity sha512-iNEZv4IrLYPv64Q6k7EPpOCE/nuvGiKl7zxdq0WFuRPF5PAE9PRo2JGq/d8crLusM59BRemJ4eOqrFrC4wiQ+A== - dependencies: - "@shikijs/types" "1.29.2" - "@shikijs/vscode-textmate" "^10.0.1" - oniguruma-to-es "^2.2.0" - -"@shikijs/engine-oniguruma@1.29.2": - version "1.29.2" - resolved "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.29.2.tgz" - integrity sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA== - dependencies: - "@shikijs/types" "1.29.2" - "@shikijs/vscode-textmate" "^10.0.1" - -"@shikijs/langs@1.29.2": - version "1.29.2" - resolved "https://registry.npmjs.org/@shikijs/langs/-/langs-1.29.2.tgz" - integrity sha512-FIBA7N3LZ+223U7cJDUYd5shmciFQlYkFXlkKVaHsCPgfVLiO+e12FmQE6Tf9vuyEsFe3dIl8qGWKXgEHL9wmQ== - dependencies: - "@shikijs/types" "1.29.2" - -"@shikijs/themes@1.29.2": - version "1.29.2" - resolved "https://registry.npmjs.org/@shikijs/themes/-/themes-1.29.2.tgz" - integrity sha512-i9TNZlsq4uoyqSbluIcZkmPL9Bfi3djVxRnofUHwvx/h6SRW3cwgBC5SML7vsDcWyukY0eCzVN980rqP6qNl9g== - dependencies: - "@shikijs/types" "1.29.2" - -"@shikijs/twoslash@^1.0.0": - version "1.29.2" - resolved "https://registry.npmjs.org/@shikijs/twoslash/-/twoslash-1.29.2.tgz" - integrity sha512-2S04ppAEa477tiaLfGEn1QJWbZUmbk8UoPbAEw4PifsrxkBXtAtOflIZJNtuCwz8ptc/TPxy7CO7gW4Uoi6o/g== - dependencies: - "@shikijs/core" "1.29.2" - "@shikijs/types" "1.29.2" - twoslash "^0.2.12" - -"@shikijs/types@1.29.2": - version "1.29.2" - resolved "https://registry.npmjs.org/@shikijs/types/-/types-1.29.2.tgz" - integrity sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw== - dependencies: - "@shikijs/vscode-textmate" "^10.0.1" - "@types/hast" "^3.0.4" - -"@shikijs/vscode-textmate@^10.0.1": - version "10.0.2" - resolved "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz" - integrity sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg== - -"@sinclair/typebox@^0.27.8": - version "0.27.8" - resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz" - integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== - -"@sinonjs/commons@^3.0.0": - version "3.0.1" - resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz" - integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== - dependencies: - type-detect "4.0.8" - -"@sinonjs/fake-timers@^10.0.2": - version "10.3.0" - resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz" - integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== - dependencies: - "@sinonjs/commons" "^3.0.0" - -"@swc/counter@^0.1.3": - version "0.1.3" - resolved "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz" - integrity sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ== - -"@swc/helpers@^0.5.0", "@swc/helpers@0.5.5": - version "0.5.5" - resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.5.tgz" - integrity sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A== - dependencies: - "@swc/counter" "^0.1.3" - tslib "^2.4.0" - -"@tanstack/react-virtual@^3.11.1": - version "3.13.6" - resolved "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.13.6.tgz" - integrity sha512-WT7nWs8ximoQ0CDx/ngoFP7HbQF9Q2wQe4nh2NB+u2486eX3nZRE40P9g6ccCVq7ZfTSH5gFOuCoVH5DLNS/aA== - dependencies: - "@tanstack/virtual-core" "3.13.6" - -"@tanstack/virtual-core@3.13.6": - version "3.13.6" - resolved "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.13.6.tgz" - integrity sha512-cnQUeWnhNP8tJ4WsGcYiX24Gjkc9ALstLbHcBj1t3E7EimN6n6kHH+DPV4PpDnuw00NApQp+ViojMj1GRdwYQg== - -"@theguild/remark-mermaid@^0.1.3": - version "0.1.3" - resolved "https://registry.npmjs.org/@theguild/remark-mermaid/-/remark-mermaid-0.1.3.tgz" - integrity sha512-2FjVlaaKXK7Zj7UJAgOVTyaahn/3/EAfqYhyXg0BfDBVUl+lXcoIWRaxzqfnDr2rv8ax6GsC5mNh6hAaT86PDw== - dependencies: - mermaid "^11.0.0" - unist-util-visit "^5.0.0" - -"@theguild/remark-npm2yarn@^0.3.2": - version "0.3.3" - resolved "https://registry.npmjs.org/@theguild/remark-npm2yarn/-/remark-npm2yarn-0.3.3.tgz" - integrity sha512-ma6DvR03gdbvwqfKx1omqhg9May/VYGdMHvTzB4VuxkyS7KzfZ/lzrj43hmcsggpMje0x7SADA/pcMph0ejRnA== - dependencies: - npm-to-yarn "^3.0.0" - unist-util-visit "^5.0.0" - -"@types/babel__core@^7.1.14": - version "7.20.5" - resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz" - integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== - dependencies: - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__generator@*": - version "7.27.0" - resolved "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz" - integrity sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg== - dependencies: - "@babel/types" "^7.0.0" - -"@types/babel__template@*": - version "7.4.4" - resolved "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz" - integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.20.7" - resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz" - integrity sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng== - dependencies: - "@babel/types" "^7.20.7" - -"@types/d3-array@*": - version "3.2.1" - resolved "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.1.tgz" - integrity sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg== - -"@types/d3-axis@*": - version "3.0.6" - resolved "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz" - integrity sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw== - dependencies: - "@types/d3-selection" "*" - -"@types/d3-brush@*": - version "3.0.6" - resolved "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz" - integrity sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A== - dependencies: - "@types/d3-selection" "*" - -"@types/d3-chord@*": - version "3.0.6" - resolved "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz" - integrity sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg== - -"@types/d3-color@*": - version "3.1.3" - resolved "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz" - integrity sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A== - -"@types/d3-contour@*": - version "3.0.6" - resolved "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz" - integrity sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg== - dependencies: - "@types/d3-array" "*" - "@types/geojson" "*" - -"@types/d3-delaunay@*": - version "6.0.4" - resolved "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz" - integrity sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw== - -"@types/d3-dispatch@*": - version "3.0.6" - resolved "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.6.tgz" - integrity sha512-4fvZhzMeeuBJYZXRXrRIQnvUYfyXwYmLsdiN7XXmVNQKKw1cM8a5WdID0g1hVFZDqT9ZqZEY5pD44p24VS7iZQ== - -"@types/d3-drag@*": - version "3.0.7" - resolved "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz" - integrity sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ== - dependencies: - "@types/d3-selection" "*" - -"@types/d3-dsv@*": - version "3.0.7" - resolved "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz" - integrity sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g== - -"@types/d3-ease@*": - version "3.0.2" - resolved "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz" - integrity sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA== - -"@types/d3-fetch@*": - version "3.0.7" - resolved "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz" - integrity sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA== - dependencies: - "@types/d3-dsv" "*" - -"@types/d3-force@*": - version "3.0.10" - resolved "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz" - integrity sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw== - -"@types/d3-format@*": - version "3.0.4" - resolved "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz" - integrity sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g== - -"@types/d3-geo@*": - version "3.1.0" - resolved "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.0.tgz" - integrity sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ== - dependencies: - "@types/geojson" "*" - -"@types/d3-hierarchy@*": - version "3.1.7" - resolved "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz" - integrity sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg== - -"@types/d3-interpolate@*": - version "3.0.4" - resolved "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz" - integrity sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA== - dependencies: - "@types/d3-color" "*" - -"@types/d3-path@*": - version "3.1.1" - resolved "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz" - integrity sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg== - -"@types/d3-polygon@*": - version "3.0.2" - resolved "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz" - integrity sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA== - -"@types/d3-quadtree@*": - version "3.0.6" - resolved "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz" - integrity sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg== - -"@types/d3-random@*": - version "3.0.3" - resolved "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.3.tgz" - integrity sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ== - -"@types/d3-scale-chromatic@*": - version "3.1.0" - resolved "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz" - integrity sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ== - -"@types/d3-scale@*": - version "4.0.9" - resolved "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz" - integrity sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw== - dependencies: - "@types/d3-time" "*" - -"@types/d3-selection@*": - version "3.0.11" - resolved "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz" - integrity sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w== - -"@types/d3-shape@*": - version "3.1.7" - resolved "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.7.tgz" - integrity sha512-VLvUQ33C+3J+8p+Daf+nYSOsjB4GXp19/S/aGo60m9h1v6XaxjiT82lKVWJCfzhtuZ3yD7i/TPeC/fuKLLOSmg== - dependencies: - "@types/d3-path" "*" - -"@types/d3-time-format@*": - version "4.0.3" - resolved "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz" - integrity sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg== - -"@types/d3-time@*": - version "3.0.4" - resolved "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz" - integrity sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g== - -"@types/d3-timer@*": - version "3.0.2" - resolved "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz" - integrity sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw== - -"@types/d3-transition@*": - version "3.0.9" - resolved "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz" - integrity sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg== - dependencies: - "@types/d3-selection" "*" - -"@types/d3-zoom@*": - version "3.0.8" - resolved "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz" - integrity sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw== - dependencies: - "@types/d3-interpolate" "*" - "@types/d3-selection" "*" - -"@types/d3@^7.4.3": - version "7.4.3" - resolved "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz" - integrity sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww== - dependencies: - "@types/d3-array" "*" - "@types/d3-axis" "*" - "@types/d3-brush" "*" - "@types/d3-chord" "*" - "@types/d3-color" "*" - "@types/d3-contour" "*" - "@types/d3-delaunay" "*" - "@types/d3-dispatch" "*" - "@types/d3-drag" "*" - "@types/d3-dsv" "*" - "@types/d3-ease" "*" - "@types/d3-fetch" "*" - "@types/d3-force" "*" - "@types/d3-format" "*" - "@types/d3-geo" "*" - "@types/d3-hierarchy" "*" - "@types/d3-interpolate" "*" - "@types/d3-path" "*" - "@types/d3-polygon" "*" - "@types/d3-quadtree" "*" - "@types/d3-random" "*" - "@types/d3-scale" "*" - "@types/d3-scale-chromatic" "*" - "@types/d3-selection" "*" - "@types/d3-shape" "*" - "@types/d3-time" "*" - "@types/d3-time-format" "*" - "@types/d3-timer" "*" - "@types/d3-transition" "*" - "@types/d3-zoom" "*" - -"@types/debug@^4.0.0": - version "4.1.12" - resolved "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz" - integrity sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ== - dependencies: - "@types/ms" "*" - -"@types/estree-jsx@^1.0.0": - version "1.0.5" - resolved "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz" - integrity sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg== - dependencies: - "@types/estree" "*" - -"@types/estree@*", "@types/estree@^1.0.0": - version "1.0.7" - resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz" - integrity sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ== - -"@types/geojson@*": - version "7946.0.16" - resolved "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz" - integrity sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg== - -"@types/graceful-fs@^4.1.3": - version "4.1.9" - resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz" - integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== - dependencies: - "@types/node" "*" - -"@types/hast@^3.0.0", "@types/hast@^3.0.4": - version "3.0.4" - resolved "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz" - integrity sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ== - dependencies: - "@types/unist" "*" - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.6" - resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz" - integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== - -"@types/istanbul-lib-report@*": - version "3.0.3" - resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz" - integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^3.0.0": - version "3.0.4" - resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz" - integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/katex@^0.16.0": - version "0.16.7" - resolved "https://registry.npmjs.org/@types/katex/-/katex-0.16.7.tgz" - integrity sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ== - -"@types/mdast@^4.0.0": - version "4.0.4" - resolved "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz" - integrity sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA== - dependencies: - "@types/unist" "*" - -"@types/mdx@^2.0.0": - version "2.0.13" - resolved "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.13.tgz" - integrity sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw== - -"@types/ms@*": - version "2.1.0" - resolved "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz" - integrity sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA== - -"@types/nlcst@^2.0.0": - version "2.0.3" - resolved "https://registry.npmjs.org/@types/nlcst/-/nlcst-2.0.3.tgz" - integrity sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA== - dependencies: - "@types/unist" "*" - -"@types/node@*", "@types/node@18.11.10": - version "18.11.10" - resolved "file:../node_modules/.pnpm/@types+node@18.11.10/node_modules/@types/node" - -"@types/prop-types@*": - version "15.7.14" - resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz" - integrity sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ== - -"@types/react@>= 16.8.0 < 19.0.0", "@types/react@>=16", "@types/react@>=18": - version "18.3.20" - resolved "https://registry.npmjs.org/@types/react/-/react-18.3.20.tgz" - integrity sha512-IPaCZN7PShZK/3t6Q87pfTkRm6oLTd4vztyoj+cbHUF1g3FfVb2tFIL79uCRKEfv16AhqDMBywP2VW3KIZUvcg== - dependencies: - "@types/prop-types" "*" - csstype "^3.0.2" - -"@types/stack-utils@^2.0.0": - version "2.0.3" - resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz" - integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== - -"@types/trusted-types@^2.0.7": - version "2.0.7" - resolved "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz" - integrity sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw== - -"@types/unist@*", "@types/unist@^3.0.0": - version "3.0.3" - resolved "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz" - integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q== - -"@types/unist@^2.0.0": - version "2.0.11" - resolved "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz" - integrity sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA== - -"@types/yargs-parser@*": - version "21.0.3" - resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz" - integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== - -"@types/yargs@^17.0.8": - version "17.0.33" - resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz" - integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== - dependencies: - "@types/yargs-parser" "*" - -"@typescript/vfs@^1.6.0": - version "1.6.1" - resolved "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.1.tgz" - integrity sha512-JwoxboBh7Oz1v38tPbkrZ62ZXNHAk9bJ7c9x0eI5zBfBnBYGhURdbnh7Z4smN/MV48Y5OCcZb58n972UtbazsA== - dependencies: - debug "^4.1.1" - -"@ungap/structured-clone@^1.0.0": - version "1.3.0" - resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz" - integrity sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g== - -"@vercel/analytics@^1.5.0": - version "1.5.0" - resolved "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.5.0.tgz" - integrity sha512-MYsBzfPki4gthY5HnYN7jgInhAZ7Ac1cYDoRWFomwGHWEX7odTEzbtg9kf/QSo7XEsEAqlQugA6gJ2WS2DEa3g== - -acorn-jsx@^5.0.0: - version "5.3.2" - resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.0.0, acorn@^8.14.0: - version "8.14.1" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz" - integrity sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg== - -algoliasearch@^5.14.2, "algoliasearch@>= 4.9.1 < 6": - version "5.23.2" - resolved "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.23.2.tgz" - integrity sha512-IhKP22Czzg8Y9HaF6aIb5aAHK2HBj4VAzLLnKEPUnxqDwxpryH9sXbm0NkeY7Cby9GlF81wF+AG/VulKDFBphg== - dependencies: - "@algolia/client-abtesting" "5.23.2" - "@algolia/client-analytics" "5.23.2" - "@algolia/client-common" "5.23.2" - "@algolia/client-insights" "5.23.2" - "@algolia/client-personalization" "5.23.2" - "@algolia/client-query-suggestions" "5.23.2" - "@algolia/client-search" "5.23.2" - "@algolia/ingestion" "1.23.2" - "@algolia/monitoring" "1.23.2" - "@algolia/recommend" "5.23.2" - "@algolia/requester-browser-xhr" "5.23.2" - "@algolia/requester-fetch" "5.23.2" - "@algolia/requester-node-http" "5.23.2" - -ansi-escapes@^4.2.1: - version "4.3.2" - resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-escapes@^7.0.0: - version "7.0.0" - dependencies: - environment "^1.0.0" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-regex@^6.0.1: - version "6.1.0" - -ansi-styles@^4.0.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - -ansi-styles@^6.0.0, ansi-styles@^6.1.0, ansi-styles@^6.2.1: - version "6.2.1" - -any-promise@^1.0.0: - version "1.3.0" - resolved "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz" - integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== - -anymatch@^3.0.3, anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -arg@^5.0.0, arg@^5.0.2: - version "5.0.2" - resolved "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz" - integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg== - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -array-iterate@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/array-iterate/-/array-iterate-2.0.1.tgz" - integrity sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg== - -astring@^1.8.0: - version "1.9.0" - resolved "https://registry.npmjs.org/astring/-/astring-1.9.0.tgz" - integrity sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg== - -autoprefixer@^10.4.19: - version "10.4.21" - resolved "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz" - integrity sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ== - dependencies: - browserslist "^4.24.4" - caniuse-lite "^1.0.30001702" - fraction.js "^4.3.7" - normalize-range "^0.1.2" - picocolors "^1.1.1" - postcss-value-parser "^4.2.0" - -babel-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz" - integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== - dependencies: - "@jest/transform" "^29.7.0" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.6.3" - chalk "^4.0.0" - graceful-fs "^4.2.9" - slash "^3.0.0" - -babel-plugin-istanbul@^6.1.1: - version "6.1.1" - resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-jest-hoist@^29.6.3: - version "29.6.3" - resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz" - integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.1.14" - "@types/babel__traverse" "^7.0.6" - -babel-preset-current-node-syntax@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz" - integrity sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw== - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.12.13" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - "@babel/plugin-syntax-import-attributes" "^7.24.7" - "@babel/plugin-syntax-import-meta" "^7.10.4" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-syntax-top-level-await" "^7.14.5" - -babel-preset-jest@^29.6.3: - version "29.6.3" - resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz" - integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== - dependencies: - babel-plugin-jest-hoist "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" - -bail@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz" - integrity sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -better-react-mathjax@^2.0.3: - version "2.1.0" - resolved "https://registry.npmjs.org/better-react-mathjax/-/better-react-mathjax-2.1.0.tgz" - integrity sha512-RrHudli76sgoVu+YtjHTKhCkjO2eH1B7Xje1sa0YPjhKzq2y/GIwOt9+tuel3s2L+mCPmFbYBFLDFfo3pEa8rQ== - dependencies: - mathjax-full "^3.2.2" - -binary-extensions@^2.0.0: - version "2.3.0" - resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz" - integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@^3.0.3, braces@~3.0.2: - version "3.0.3" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz" - integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== - dependencies: - fill-range "^7.1.1" - -browserslist@^4.24.0, browserslist@^4.24.4, "browserslist@>= 4.21.0": - version "4.24.4" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz" - integrity sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A== - dependencies: - caniuse-lite "^1.0.30001688" - electron-to-chromium "^1.5.73" - node-releases "^2.0.19" - update-browserslist-db "^1.1.1" - -bser@2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -busboy@1.6.0: - version "1.6.0" - resolved "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz" - integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== - dependencies: - streamsearch "^1.1.0" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase-css@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz" - integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.2.0: - version "6.3.0" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -caniuse-lite@^1.0.30001579, caniuse-lite@^1.0.30001688, caniuse-lite@^1.0.30001702: - version "1.0.30001710" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001710.tgz" - integrity sha512-B5C0I0UmaGqHgo5FuqJ7hBd4L57A4dDD+Xi+XX1nXOoxGeDdY4Ko38qJYOyqznBVJEqON5p8P1x5zRR3+rsnxA== - -ccount@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz" - integrity sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg== - -chalk@^4.0.0: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^5.0.0, chalk@^5.3.0, chalk@~5.3.0: - version "5.3.0" - resolved "file:../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk" - -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== - -character-entities-html4@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz" - integrity sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA== - -character-entities-legacy@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz" - integrity sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ== - -character-entities@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz" - integrity sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ== - -character-reference-invalid@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz" - integrity sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw== - -chevrotain-allstar@~0.3.0: - version "0.3.1" - resolved "https://registry.npmjs.org/chevrotain-allstar/-/chevrotain-allstar-0.3.1.tgz" - integrity sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw== - dependencies: - lodash-es "^4.17.21" - -chevrotain@^11.0.0, chevrotain@~11.0.3: - version "11.0.3" - resolved "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz" - integrity sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw== - dependencies: - "@chevrotain/cst-dts-gen" "11.0.3" - "@chevrotain/gast" "11.0.3" - "@chevrotain/regexp-to-ast" "11.0.3" - "@chevrotain/types" "11.0.3" - "@chevrotain/utils" "11.0.3" - lodash-es "4.17.21" - -chokidar@^3.6.0: - version "3.6.0" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz" - integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -ci-info@^3.2.0: - version "3.9.0" - resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz" - integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== - -cjs-module-lexer@^1.0.0: - version "1.4.3" - resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz" - integrity sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q== - -cli-cursor@^5.0.0: - version "5.0.0" - dependencies: - restore-cursor "^5.0.0" - -cli-truncate@^4.0.0: - version "4.0.0" - dependencies: - slice-ansi "^5.0.0" - string-width "^7.0.0" - -client-only@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz" - integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== - -clipboardy@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/clipboardy/-/clipboardy-4.0.0.tgz" - integrity sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w== - dependencies: - execa "^8.0.1" - is-wsl "^3.1.0" - is64bit "^2.0.0" - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - -clsx@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz" - integrity sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA== - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" - integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== - -collapse-white-space@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-2.1.0.tgz" - integrity sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw== - -collect-v8-coverage@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz" - integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@^1.0.0, color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -color-string@^1.9.0: - version "1.9.1" - resolved "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz" - integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg== - dependencies: - color-name "^1.0.0" - simple-swizzle "^0.2.2" - -color@^4.2.3: - version "4.2.3" - resolved "https://registry.npmjs.org/color/-/color-4.2.3.tgz" - integrity sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A== - dependencies: - color-convert "^2.0.1" - color-string "^1.9.0" - -colorette@^2.0.20: - version "2.0.20" - resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz" - integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== - -comma-separated-tokens@^2.0.0: - version "2.0.3" - resolved "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz" - integrity sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg== - -commander@^12.1.0, commander@~12.1.0: - version "12.1.0" - -commander@^4.0.0: - version "4.1.1" - resolved "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz" - integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== - -commander@^8.3.0: - version "8.3.0" - resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - -commander@7: - version "7.2.0" - resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - -commander@9.2.0: - version "9.2.0" - resolved "https://registry.npmjs.org/commander/-/commander-9.2.0.tgz" - integrity sha512-e2i4wANQiSXgnrBlIatyHtP1odfUp0BbV5Y5nEGbxtIrStkEOAAzCUirvLBNXHLr7kwLvJl6V+4V3XV9x7Wd9w== - -compute-scroll-into-view@^3.0.2: - version "3.1.1" - resolved "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.1.tgz" - integrity sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -confbox@^0.1.8: - version "0.1.8" - resolved "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz" - integrity sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w== - -confbox@^0.2.1: - version "0.2.2" - resolved "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz" - integrity sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ== - -convert-source-map@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz" - integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== - -cose-base@^1.0.0: - version "1.0.3" - resolved "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz" - integrity sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg== - dependencies: - layout-base "^1.0.0" - -cose-base@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/cose-base/-/cose-base-2.2.0.tgz" - integrity sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g== - dependencies: - layout-base "^2.0.0" - -create-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz" - integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-config "^29.7.0" - jest-util "^29.7.0" - prompts "^2.0.1" - -cross-spawn@^7.0.3, cross-spawn@^7.0.6: - version "7.0.6" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz" - integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - -csstype@^3.0.2: - version "3.1.3" - resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz" - integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== - -cytoscape-cose-bilkent@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz" - integrity sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ== - dependencies: - cose-base "^1.0.0" - -cytoscape-fcose@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz" - integrity sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ== - dependencies: - cose-base "^2.2.0" - -cytoscape@^3.2.0, cytoscape@^3.29.3: - version "3.31.2" - resolved "https://registry.npmjs.org/cytoscape/-/cytoscape-3.31.2.tgz" - integrity sha512-/eOXg2uGdMdpGlEes5Sf6zE+jUG+05f3htFNQIxLxduOH/SsaUZiPBfAwP1btVIVzsnhiNOdi+hvDRLYfMZjGw== - -d3-array@^3.2.0, "d3-array@2 - 3", "d3-array@2.10.0 - 3", "d3-array@2.5.0 - 3", d3-array@3: - version "3.2.4" - resolved "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz" - integrity sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg== - dependencies: - internmap "1 - 2" - -"d3-array@1 - 2": - version "2.12.1" - resolved "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz" - integrity sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ== - dependencies: - internmap "^1.0.0" - -d3-axis@3: - version "3.0.0" - resolved "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz" - integrity sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw== - -d3-brush@3: - version "3.0.0" - resolved "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz" - integrity sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ== - dependencies: - d3-dispatch "1 - 3" - d3-drag "2 - 3" - d3-interpolate "1 - 3" - d3-selection "3" - d3-transition "3" - -d3-chord@3: - version "3.0.1" - resolved "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz" - integrity sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g== - dependencies: - d3-path "1 - 3" - -"d3-color@1 - 3", d3-color@3: - version "3.1.0" - resolved "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz" - integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA== - -d3-contour@4: - version "4.0.2" - resolved "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz" - integrity sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA== - dependencies: - d3-array "^3.2.0" - -d3-delaunay@6: - version "6.0.4" - resolved "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz" - integrity sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A== - dependencies: - delaunator "5" - -"d3-dispatch@1 - 3", d3-dispatch@3: - version "3.0.1" - resolved "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz" - integrity sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg== - -"d3-drag@2 - 3", d3-drag@3: - version "3.0.0" - resolved "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz" - integrity sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg== - dependencies: - d3-dispatch "1 - 3" - d3-selection "3" - -"d3-dsv@1 - 3", d3-dsv@3: - version "3.0.1" - resolved "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz" - integrity sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q== - dependencies: - commander "7" - iconv-lite "0.6" - rw "1" - -"d3-ease@1 - 3", d3-ease@3: - version "3.0.1" - resolved "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz" - integrity sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w== - -d3-fetch@3: - version "3.0.1" - resolved "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz" - integrity sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw== - dependencies: - d3-dsv "1 - 3" - -d3-force@3: - version "3.0.0" - resolved "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz" - integrity sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg== - dependencies: - d3-dispatch "1 - 3" - d3-quadtree "1 - 3" - d3-timer "1 - 3" - -"d3-format@1 - 3", d3-format@3: - version "3.1.0" - resolved "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz" - integrity sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA== - -d3-geo@3: - version "3.1.1" - resolved "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz" - integrity sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q== - dependencies: - d3-array "2.5.0 - 3" - -d3-hierarchy@3: - version "3.1.2" - resolved "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz" - integrity sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA== - -"d3-interpolate@1 - 3", "d3-interpolate@1.2.0 - 3", d3-interpolate@3: - version "3.0.1" - resolved "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz" - integrity sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g== - dependencies: - d3-color "1 - 3" - -d3-path@^3.1.0, "d3-path@1 - 3", d3-path@3: - version "3.1.0" - resolved "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz" - integrity sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ== - -d3-path@1: - version "1.0.9" - resolved "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz" - integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg== - -d3-polygon@3: - version "3.0.1" - resolved "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz" - integrity sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg== - -"d3-quadtree@1 - 3", d3-quadtree@3: - version "3.0.1" - resolved "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz" - integrity sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw== - -d3-random@3: - version "3.0.1" - resolved "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz" - integrity sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ== - -d3-sankey@^0.12.3: - version "0.12.3" - resolved "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz" - integrity sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ== - dependencies: - d3-array "1 - 2" - d3-shape "^1.2.0" - -d3-scale-chromatic@3: - version "3.1.0" - resolved "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz" - integrity sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ== - dependencies: - d3-color "1 - 3" - d3-interpolate "1 - 3" - -d3-scale@4: - version "4.0.2" - resolved "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz" - integrity sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ== - dependencies: - d3-array "2.10.0 - 3" - d3-format "1 - 3" - d3-interpolate "1.2.0 - 3" - d3-time "2.1.1 - 3" - d3-time-format "2 - 4" - -"d3-selection@2 - 3", d3-selection@3: - version "3.0.0" - resolved "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz" - integrity sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ== - -d3-shape@^1.2.0: - version "1.3.7" - resolved "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz" - integrity sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw== - dependencies: - d3-path "1" - -d3-shape@3: - version "3.2.0" - resolved "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz" - integrity sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA== - dependencies: - d3-path "^3.1.0" - -"d3-time-format@2 - 4", d3-time-format@4: - version "4.1.0" - resolved "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz" - integrity sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg== - dependencies: - d3-time "1 - 3" - -"d3-time@1 - 3", "d3-time@2.1.1 - 3", d3-time@3: - version "3.1.0" - resolved "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz" - integrity sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q== - dependencies: - d3-array "2 - 3" - -"d3-timer@1 - 3", d3-timer@3: - version "3.0.1" - resolved "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz" - integrity sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA== - -"d3-transition@2 - 3", d3-transition@3: - version "3.0.1" - resolved "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz" - integrity sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w== - dependencies: - d3-color "1 - 3" - d3-dispatch "1 - 3" - d3-ease "1 - 3" - d3-interpolate "1 - 3" - d3-timer "1 - 3" - -d3-zoom@3: - version "3.0.0" - resolved "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz" - integrity sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw== - dependencies: - d3-dispatch "1 - 3" - d3-drag "2 - 3" - d3-interpolate "1 - 3" - d3-selection "2 - 3" - d3-transition "2 - 3" - -d3@^7.9.0: - version "7.9.0" - resolved "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz" - integrity sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA== - dependencies: - d3-array "3" - d3-axis "3" - d3-brush "3" - d3-chord "3" - d3-color "3" - d3-contour "4" - d3-delaunay "6" - d3-dispatch "3" - d3-drag "3" - d3-dsv "3" - d3-ease "3" - d3-fetch "3" - d3-force "3" - d3-format "3" - d3-geo "3" - d3-hierarchy "3" - d3-interpolate "3" - d3-path "3" - d3-polygon "3" - d3-quadtree "3" - d3-random "3" - d3-scale "4" - d3-scale-chromatic "3" - d3-selection "3" - d3-shape "3" - d3-time "3" - d3-time-format "4" - d3-timer "3" - d3-transition "3" - d3-zoom "3" - -dagre-d3-es@7.0.11: - version "7.0.11" - resolved "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.11.tgz" - integrity sha512-tvlJLyQf834SylNKax8Wkzco/1ias1OPw8DcUMDE7oUIoSEW25riQVuiu/0OWEFqT0cxHT3Pa9/D82Jr47IONw== - dependencies: - d3 "^7.9.0" - lodash-es "^4.17.21" - -dayjs@^1.11.13: - version "1.11.13" - resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz" - integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== - -debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@~4.3.6: - version "4.3.7" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz" - integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== - dependencies: - ms "^2.1.3" - -debug@^4.4.0: - version "4.4.0" - resolved "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz" - integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== - dependencies: - ms "^2.1.3" - -decode-named-character-reference@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.1.0.tgz" - integrity sha512-Wy+JTSbFThEOXQIR2L6mxJvEs+veIzpmqD7ynWxMXGpnk3smkHQOp6forLdHsKpAMW9iJpaBBIxz285t1n1C3w== - dependencies: - character-entities "^2.0.0" - -dedent@^1.0.0: - version "1.5.3" - resolved "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz" - integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== - -deepmerge@^4.2.2: - version "4.3.1" - resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz" - integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== - -delaunator@5: - version "5.0.1" - resolved "https://registry.npmjs.org/delaunator/-/delaunator-5.0.1.tgz" - integrity sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw== - dependencies: - robust-predicates "^3.0.2" - -dequal@^2.0.0: - version "2.0.3" - resolved "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz" - integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== - -detect-libc@^2.0.3: - version "2.0.3" - resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz" - integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw== - -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - -devlop@^1.0.0, devlop@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz" - integrity sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA== - dependencies: - dequal "^2.0.0" - -didyoumean@^1.2.2: - version "1.2.2" - resolved "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz" - integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== - -diff-sequences@^29.6.3: - version "29.6.3" - resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz" - integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== - -dlv@^1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz" - integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== - -dompurify@^3.2.4: - version "3.2.5" - resolved "https://registry.npmjs.org/dompurify/-/dompurify-3.2.5.tgz" - integrity sha512-mLPd29uoRe9HpvwP2TxClGQBzGXeEC/we/q+bFlmPPmj2p2Ugl3r6ATu/UU1v77DXNcehiBg9zsr1dREyA/dJQ== - optionalDependencies: - "@types/trusted-types" "^2.0.7" - -eastasianwidth@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz" - integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== - -electron-to-chromium@^1.5.73: - version "1.5.132" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.132.tgz" - integrity sha512-QgX9EBvWGmvSRa74zqfnG7+Eno0Ak0vftBll0Pt2/z5b3bEGYL6OUXLgKPtvx73dn3dvwrlyVkjPKRRlhLYTEg== - -emittery@^0.13.1: - version "0.13.1" - resolved "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz" - integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== - -emoji-regex-xs@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/emoji-regex-xs/-/emoji-regex-xs-1.0.0.tgz" - integrity sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg== - -emoji-regex@^10.3.0: - version "10.4.0" - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -emoji-regex@^9.2.2: - version "9.2.2" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz" - integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== - -entities@^4.5.0: - version "4.5.0" - resolved "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz" - integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== - -environment@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz" - integrity sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q== - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -esast-util-from-estree@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/esast-util-from-estree/-/esast-util-from-estree-2.0.0.tgz" - integrity sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ== - dependencies: - "@types/estree-jsx" "^1.0.0" - devlop "^1.0.0" - estree-util-visit "^2.0.0" - unist-util-position-from-estree "^2.0.0" - -esast-util-from-js@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/esast-util-from-js/-/esast-util-from-js-2.0.1.tgz" - integrity sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw== - dependencies: - "@types/estree-jsx" "^1.0.0" - acorn "^8.0.0" - esast-util-from-estree "^2.0.0" - vfile-message "^4.0.0" - -escalade@^3.1.1, escalade@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz" - integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== - -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - -escape-string-regexp@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz" - integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== - -esm@^3.2.25: - version "3.2.25" - resolved "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz" - integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -estree-util-attach-comments@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/estree-util-attach-comments/-/estree-util-attach-comments-3.0.0.tgz" - integrity sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw== - dependencies: - "@types/estree" "^1.0.0" - -estree-util-build-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/estree-util-build-jsx/-/estree-util-build-jsx-3.0.1.tgz" - integrity sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ== - dependencies: - "@types/estree-jsx" "^1.0.0" - devlop "^1.0.0" - estree-util-is-identifier-name "^3.0.0" - estree-walker "^3.0.0" - -estree-util-is-identifier-name@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-2.1.0.tgz" - integrity sha512-bEN9VHRyXAUOjkKVQVvArFym08BTWB0aJPppZZr0UNyAqWsLaVfAqP7hbaTJjzHifmB5ebnR8Wm7r7yGN/HonQ== - -estree-util-is-identifier-name@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz" - integrity sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg== - -estree-util-scope@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/estree-util-scope/-/estree-util-scope-1.0.0.tgz" - integrity sha512-2CAASclonf+JFWBNJPndcOpA8EMJwa0Q8LUFJEKqXLW6+qBvbFZuF5gItbQOs/umBUkjviCSDCbBwU2cXbmrhQ== - dependencies: - "@types/estree" "^1.0.0" - devlop "^1.0.0" - -estree-util-to-js@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/estree-util-to-js/-/estree-util-to-js-2.0.0.tgz" - integrity sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg== - dependencies: - "@types/estree-jsx" "^1.0.0" - astring "^1.8.0" - source-map "^0.7.0" - -estree-util-value-to-estree@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/estree-util-value-to-estree/-/estree-util-value-to-estree-1.3.0.tgz" - integrity sha512-Y+ughcF9jSUJvncXwqRageavjrNPAI+1M/L3BI3PyLp1nmgYTGUXU6t5z1Y7OWuThoDdhPME07bQU+d5LxdJqw== - dependencies: - is-plain-obj "^3.0.0" - -estree-util-value-to-estree@^3.0.1: - version "3.3.2" - resolved "https://registry.npmjs.org/estree-util-value-to-estree/-/estree-util-value-to-estree-3.3.2.tgz" - integrity sha512-hYH1aSvQI63Cvq3T3loaem6LW4u72F187zW4FHpTrReJSm6W66vYTFNO1vH/chmcOulp1HlAj1pxn8Ag0oXI5Q== - dependencies: - "@types/estree" "^1.0.0" - -estree-util-visit@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/estree-util-visit/-/estree-util-visit-2.0.0.tgz" - integrity sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/unist" "^3.0.0" - -estree-walker@^3.0.0: - version "3.0.3" - resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz" - integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== - dependencies: - "@types/estree" "^1.0.0" - -eventemitter3@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz" - integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -execa@^8.0.1, execa@~8.0.1: - version "8.0.1" - dependencies: - cross-spawn "^7.0.3" - get-stream "^8.0.1" - human-signals "^5.0.0" - is-stream "^3.0.0" - merge-stream "^2.0.0" - npm-run-path "^5.1.0" - onetime "^6.0.0" - signal-exit "^4.1.0" - strip-final-newline "^3.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" - integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== - -expect@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz" - integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== - dependencies: - "@jest/expect-utils" "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - -exsolve@^1.0.1: - version "1.0.4" - resolved "https://registry.npmjs.org/exsolve/-/exsolve-1.0.4.tgz" - integrity sha512-xsZH6PXaER4XoV+NiT7JHp1bJodJVT+cxeSH1G0f0tlT0lJqYuHUP3bUx2HtfTDvOagMINYp8rsqusxud3RXhw== - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz" - integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== - dependencies: - is-extendable "^0.1.0" - -extend@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -fast-glob@^3.2.12, fast-glob@^3.3.2: - version "3.3.3" - resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz" - integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.8" - -fast-json-stable-stringify@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fastq@^1.6.0: - version "1.19.1" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz" - integrity sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ== - dependencies: - reusify "^1.0.4" - -fault@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/fault/-/fault-2.0.1.tgz" - integrity sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ== - dependencies: - format "^0.2.0" - -fb-watchman@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz" - integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== - dependencies: - bser "2.1.1" - -fill-range@^7.1.1: - version "7.1.1" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz" - integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== - dependencies: - to-regex-range "^5.0.1" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -flexsearch@^0.7.43: - version "0.7.43" - resolved "https://registry.npmjs.org/flexsearch/-/flexsearch-0.7.43.tgz" - integrity sha512-c5o/+Um8aqCSOXGcZoqZOm+NqtVwNsvVpWv6lfmSclU954O3wvQKxxK8zj74fPaSJbXpSLTs4PRhh+wnoCXnKg== - -foreground-child@^3.1.0: - version "3.3.1" - resolved "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz" - integrity sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw== - dependencies: - cross-spawn "^7.0.6" - signal-exit "^4.0.1" - -format@^0.2.0: - version "0.2.2" - resolved "https://registry.npmjs.org/format/-/format-0.2.2.tgz" - integrity sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww== - -fraction.js@^4.3.7: - version "4.3.7" - resolved "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz" - integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@^2.3.2, fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - -function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-east-asian-width@^1.0.0: - version "1.3.0" - resolved "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz" - integrity sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ== - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-stream@^8.0.1: - version "8.0.1" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz" - integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== - -github-slugger@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz" - integrity sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw== - -glob-parent@^5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@^10.3.10: - version "10.4.5" - resolved "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz" - integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== - dependencies: - foreground-child "^3.1.0" - jackspeak "^3.1.2" - minimatch "^9.0.4" - minipass "^7.1.2" - package-json-from-dist "^1.0.0" - path-scurry "^1.11.1" - -glob@^7.1.3, glob@^7.1.4: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^15.14.0: - version "15.15.0" - resolved "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz" - integrity sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg== - -graceful-fs@^4.2.11, graceful-fs@^4.2.9: - version "4.2.11" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - -gray-matter@^4.0.3: - version "4.0.3" - resolved "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz" - integrity sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q== - dependencies: - js-yaml "^3.13.1" - kind-of "^6.0.2" - section-matter "^1.0.0" - strip-bom-string "^1.0.0" - -hachure-fill@^0.5.2: - version "0.5.2" - resolved "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz" - integrity sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -hasown@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== - dependencies: - function-bind "^1.1.2" - -hast-util-from-dom@^5.0.0: - version "5.0.1" - resolved "https://registry.npmjs.org/hast-util-from-dom/-/hast-util-from-dom-5.0.1.tgz" - integrity sha512-N+LqofjR2zuzTjCPzyDUdSshy4Ma6li7p/c3pA78uTwzFgENbgbUrm2ugwsOdcjI1muO+o6Dgzp9p8WHtn/39Q== - dependencies: - "@types/hast" "^3.0.0" - hastscript "^9.0.0" - web-namespaces "^2.0.0" - -hast-util-from-html-isomorphic@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/hast-util-from-html-isomorphic/-/hast-util-from-html-isomorphic-2.0.0.tgz" - integrity sha512-zJfpXq44yff2hmE0XmwEOzdWin5xwH+QIhMLOScpX91e/NSGPsAzNCvLQDIEPyO2TXi+lBmU6hjLIhV8MwP2kw== - dependencies: - "@types/hast" "^3.0.0" - hast-util-from-dom "^5.0.0" - hast-util-from-html "^2.0.0" - unist-util-remove-position "^5.0.0" - -hast-util-from-html@^2.0.0: - version "2.0.3" - resolved "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.3.tgz" - integrity sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw== - dependencies: - "@types/hast" "^3.0.0" - devlop "^1.1.0" - hast-util-from-parse5 "^8.0.0" - parse5 "^7.0.0" - vfile "^6.0.0" - vfile-message "^4.0.0" - -hast-util-from-parse5@^8.0.0: - version "8.0.3" - resolved "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-8.0.3.tgz" - integrity sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg== - dependencies: - "@types/hast" "^3.0.0" - "@types/unist" "^3.0.0" - devlop "^1.0.0" - hastscript "^9.0.0" - property-information "^7.0.0" - vfile "^6.0.0" - vfile-location "^5.0.0" - web-namespaces "^2.0.0" - -hast-util-is-element@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-3.0.0.tgz" - integrity sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g== - dependencies: - "@types/hast" "^3.0.0" - -hast-util-parse-selector@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-4.0.0.tgz" - integrity sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A== - dependencies: - "@types/hast" "^3.0.0" - -hast-util-raw@^9.0.0: - version "9.1.0" - resolved "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.1.0.tgz" - integrity sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw== - dependencies: - "@types/hast" "^3.0.0" - "@types/unist" "^3.0.0" - "@ungap/structured-clone" "^1.0.0" - hast-util-from-parse5 "^8.0.0" - hast-util-to-parse5 "^8.0.0" - html-void-elements "^3.0.0" - mdast-util-to-hast "^13.0.0" - parse5 "^7.0.0" - unist-util-position "^5.0.0" - unist-util-visit "^5.0.0" - vfile "^6.0.0" - web-namespaces "^2.0.0" - zwitch "^2.0.0" - -hast-util-to-estree@^3.0.0, hast-util-to-estree@^3.1.0: - version "3.1.3" - resolved "https://registry.npmjs.org/hast-util-to-estree/-/hast-util-to-estree-3.1.3.tgz" - integrity sha512-48+B/rJWAp0jamNbAAf9M7Uf//UVqAoMmgXhBdxTDJLGKY+LRnZ99qcG+Qjl5HfMpYNzS5v4EAwVEF34LeAj7w== - dependencies: - "@types/estree" "^1.0.0" - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^3.0.0" - comma-separated-tokens "^2.0.0" - devlop "^1.0.0" - estree-util-attach-comments "^3.0.0" - estree-util-is-identifier-name "^3.0.0" - hast-util-whitespace "^3.0.0" - mdast-util-mdx-expression "^2.0.0" - mdast-util-mdx-jsx "^3.0.0" - mdast-util-mdxjs-esm "^2.0.0" - property-information "^7.0.0" - space-separated-tokens "^2.0.0" - style-to-js "^1.0.0" - unist-util-position "^5.0.0" - zwitch "^2.0.0" - -hast-util-to-html@^9.0.4: - version "9.0.5" - resolved "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.5.tgz" - integrity sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw== - dependencies: - "@types/hast" "^3.0.0" - "@types/unist" "^3.0.0" - ccount "^2.0.0" - comma-separated-tokens "^2.0.0" - hast-util-whitespace "^3.0.0" - html-void-elements "^3.0.0" - mdast-util-to-hast "^13.0.0" - property-information "^7.0.0" - space-separated-tokens "^2.0.0" - stringify-entities "^4.0.0" - zwitch "^2.0.4" - -hast-util-to-jsx-runtime@^2.0.0: - version "2.3.6" - resolved "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz" - integrity sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg== - dependencies: - "@types/estree" "^1.0.0" - "@types/hast" "^3.0.0" - "@types/unist" "^3.0.0" - comma-separated-tokens "^2.0.0" - devlop "^1.0.0" - estree-util-is-identifier-name "^3.0.0" - hast-util-whitespace "^3.0.0" - mdast-util-mdx-expression "^2.0.0" - mdast-util-mdx-jsx "^3.0.0" - mdast-util-mdxjs-esm "^2.0.0" - property-information "^7.0.0" - space-separated-tokens "^2.0.0" - style-to-js "^1.0.0" - unist-util-position "^5.0.0" - vfile-message "^4.0.0" - -hast-util-to-parse5@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-8.0.0.tgz" - integrity sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw== - dependencies: - "@types/hast" "^3.0.0" - comma-separated-tokens "^2.0.0" - devlop "^1.0.0" - property-information "^6.0.0" - space-separated-tokens "^2.0.0" - web-namespaces "^2.0.0" - zwitch "^2.0.0" - -hast-util-to-string@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-3.0.1.tgz" - integrity sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A== - dependencies: - "@types/hast" "^3.0.0" - -hast-util-to-text@^4.0.0: - version "4.0.2" - resolved "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.2.tgz" - integrity sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A== - dependencies: - "@types/hast" "^3.0.0" - "@types/unist" "^3.0.0" - hast-util-is-element "^3.0.0" - unist-util-find-after "^5.0.0" - -hast-util-whitespace@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz" - integrity sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw== - dependencies: - "@types/hast" "^3.0.0" - -hastscript@^9.0.0: - version "9.0.1" - resolved "https://registry.npmjs.org/hastscript/-/hastscript-9.0.1.tgz" - integrity sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w== - dependencies: - "@types/hast" "^3.0.0" - comma-separated-tokens "^2.0.0" - hast-util-parse-selector "^4.0.0" - property-information "^7.0.0" - space-separated-tokens "^2.0.0" - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -html-url-attributes@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz" - integrity sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ== - -html-void-elements@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz" - integrity sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg== - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -human-signals@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz" - integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== - -iconv-lite@0.6: - version "0.6.3" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -import-local@^3.0.2: - version "3.2.0" - resolved "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz" - integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inline-style-parser@0.2.4: - version "0.2.4" - resolved "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.4.tgz" - integrity sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q== - -internmap@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz" - integrity sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw== - -"internmap@1 - 2": - version "2.0.3" - resolved "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz" - integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== - -is-alphabetical@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz" - integrity sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ== - -is-alphanumerical@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz" - integrity sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw== - dependencies: - is-alphabetical "^2.0.0" - is-decimal "^2.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-arrayish@^0.3.1: - version "0.3.2" - resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz" - integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-core-module@^2.16.0: - version "2.16.1" - resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz" - integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== - dependencies: - hasown "^2.0.2" - -is-decimal@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz" - integrity sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A== - -is-docker@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz" - integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== - -is-extendable@^0.1.0: - version "0.1.1" - resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" - integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-fullwidth-code-point@^4.0.0: - version "4.0.0" - -is-fullwidth-code-point@^5.0.0: - version "5.0.0" - dependencies: - get-east-asian-width "^1.0.0" - -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - -is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-hexadecimal@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz" - integrity sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg== - -is-inside-container@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz" - integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== - dependencies: - is-docker "^3.0.0" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-plain-obj@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz" - integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== - -is-plain-obj@^4.0.0: - version "4.1.0" - resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz" - integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg== - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -is-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz" - integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== - -is-wsl@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz" - integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== - dependencies: - is-inside-container "^1.0.0" - -is64bit@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/is64bit/-/is64bit-2.0.0.tgz" - integrity sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw== - dependencies: - system-architecture "^0.1.0" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.2" - resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz" - integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== - -istanbul-lib-instrument@^5.0.4: - version "5.2.1" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -istanbul-lib-instrument@^6.0.0: - version "6.0.3" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz" - integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== - dependencies: - "@babel/core" "^7.23.9" - "@babel/parser" "^7.23.9" - "@istanbuljs/schema" "^0.1.3" - istanbul-lib-coverage "^3.2.0" - semver "^7.5.4" - -istanbul-lib-report@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz" - integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^4.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.1.3: - version "3.1.7" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz" - integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -jackspeak@^3.1.2: - version "3.4.3" - resolved "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz" - integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== - dependencies: - "@isaacs/cliui" "^8.0.2" - optionalDependencies: - "@pkgjs/parseargs" "^0.11.0" - -jest-changed-files@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz" - integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== - dependencies: - execa "^5.0.0" - jest-util "^29.7.0" - p-limit "^3.1.0" - -jest-circus@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz" - integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^1.0.0" - is-generator-fn "^2.0.0" - jest-each "^29.7.0" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - p-limit "^3.1.0" - pretty-format "^29.7.0" - pure-rand "^6.0.0" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-cli@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz" - integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== - dependencies: - "@jest/core" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - chalk "^4.0.0" - create-jest "^29.7.0" - exit "^0.1.2" - import-local "^3.0.2" - jest-config "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - yargs "^17.3.1" - -jest-config@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz" - integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== - dependencies: - "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.7.0" - "@jest/types" "^29.6.3" - babel-jest "^29.7.0" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-circus "^29.7.0" - jest-environment-node "^29.7.0" - jest-get-type "^29.6.3" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-runner "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - micromatch "^4.0.4" - parse-json "^5.2.0" - pretty-format "^29.7.0" - slash "^3.0.0" - strip-json-comments "^3.1.1" - -jest-diff@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz" - integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== - dependencies: - chalk "^4.0.0" - diff-sequences "^29.6.3" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-docblock@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz" - integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== - dependencies: - detect-newline "^3.0.0" - -jest-each@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz" - integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - jest-get-type "^29.6.3" - jest-util "^29.7.0" - pretty-format "^29.7.0" - -jest-environment-node@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz" - integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-mock "^29.7.0" - jest-util "^29.7.0" - -jest-get-type@^29.6.3: - version "29.6.3" - resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz" - integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== - -jest-haste-map@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz" - integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== - dependencies: - "@jest/types" "^29.6.3" - "@types/graceful-fs" "^4.1.3" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - jest-worker "^29.7.0" - micromatch "^4.0.4" - walker "^1.0.8" - optionalDependencies: - fsevents "^2.3.2" - -jest-leak-detector@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz" - integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== - dependencies: - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-matcher-utils@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz" - integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== - dependencies: - chalk "^4.0.0" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-message-util@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz" - integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.6.3" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^29.7.0" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-mock@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz" - integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-util "^29.7.0" - -jest-pnp-resolver@^1.2.2: - version "1.2.3" - resolved "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz" - integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== - -jest-regex-util@^29.6.3: - version "29.6.3" - resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz" - integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== - -jest-resolve-dependencies@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz" - integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== - dependencies: - jest-regex-util "^29.6.3" - jest-snapshot "^29.7.0" - -jest-resolve@*, jest-resolve@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz" - integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== - dependencies: - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-pnp-resolver "^1.2.2" - jest-util "^29.7.0" - jest-validate "^29.7.0" - resolve "^1.20.0" - resolve.exports "^2.0.0" - slash "^3.0.0" - -jest-runner@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz" - integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== - dependencies: - "@jest/console" "^29.7.0" - "@jest/environment" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.13.1" - graceful-fs "^4.2.9" - jest-docblock "^29.7.0" - jest-environment-node "^29.7.0" - jest-haste-map "^29.7.0" - jest-leak-detector "^29.7.0" - jest-message-util "^29.7.0" - jest-resolve "^29.7.0" - jest-runtime "^29.7.0" - jest-util "^29.7.0" - jest-watcher "^29.7.0" - jest-worker "^29.7.0" - p-limit "^3.1.0" - source-map-support "0.5.13" - -jest-runtime@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz" - integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/globals" "^29.7.0" - "@jest/source-map" "^29.6.3" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - slash "^3.0.0" - strip-bom "^4.0.0" - -jest-snapshot@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz" - integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== - dependencies: - "@babel/core" "^7.11.6" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-jsx" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^29.7.0" - graceful-fs "^4.2.9" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - natural-compare "^1.4.0" - pretty-format "^29.7.0" - semver "^7.5.3" - -jest-util@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz" - integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - -jest-validate@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz" - integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== - dependencies: - "@jest/types" "^29.6.3" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^29.6.3" - leven "^3.1.0" - pretty-format "^29.7.0" - -jest-watcher@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz" - integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== - dependencies: - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.13.1" - jest-util "^29.7.0" - string-length "^4.0.1" - -jest-worker@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz" - integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== - dependencies: - "@types/node" "*" - jest-util "^29.7.0" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz" - integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== - dependencies: - "@jest/core" "^29.7.0" - "@jest/types" "^29.6.3" - import-local "^3.0.2" - jest-cli "^29.7.0" - -jiti@^1.21.6: - version "1.21.7" - resolved "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz" - integrity sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A== - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsesc@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz" - integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== - -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json5@^2.2.3: - version "2.2.3" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -katex@^0.16.0, katex@^0.16.9: - version "0.16.21" - resolved "https://registry.npmjs.org/katex/-/katex-0.16.21.tgz" - integrity sha512-XvqR7FgOHtWupfMiigNzmh+MgUVmDGU2kXZm899ZkPfcuoPuFxyHmXsgATDpFZDAXCI8tvinaVcDo8PIIJSo4A== - dependencies: - commander "^8.3.0" - -khroma@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/khroma/-/khroma-2.1.0.tgz" - integrity sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -kolorist@^1.8.0: - version "1.8.0" - resolved "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz" - integrity sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ== - -langium@3.3.1: - version "3.3.1" - resolved "https://registry.npmjs.org/langium/-/langium-3.3.1.tgz" - integrity sha512-QJv/h939gDpvT+9SiLVlY7tZC3xB2qK57v0J04Sh9wpMb6MP1q8gB21L3WIo8T5P1MSMg3Ep14L7KkDCFG3y4w== - dependencies: - chevrotain "~11.0.3" - chevrotain-allstar "~0.3.0" - vscode-languageserver "~9.0.1" - vscode-languageserver-textdocument "~1.0.11" - vscode-uri "~3.0.8" - -layout-base@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz" - integrity sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg== - -layout-base@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/layout-base/-/layout-base-2.0.1.tgz" - integrity sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg== - -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - -lilconfig@^3.0.0, lilconfig@^3.1.3, lilconfig@~3.1.2: - version "3.1.3" - resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz" - integrity sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw== - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -lint-staged@^15.2.7: - version "15.2.10" - resolved "file:../node_modules/.pnpm/lint-staged@15.2.10/node_modules/lint-staged" - dependencies: - chalk "~5.3.0" - commander "~12.1.0" - debug "~4.3.6" - execa "~8.0.1" - lilconfig "~3.1.2" - listr2 "~8.2.4" - micromatch "~4.0.8" - pidtree "~0.6.0" - string-argv "~0.3.2" - yaml "~2.5.0" - -listr2@~8.2.4: - version "8.2.5" - dependencies: - cli-truncate "^4.0.0" - colorette "^2.0.20" - eventemitter3 "^5.0.1" - log-update "^6.1.0" - rfdc "^1.4.1" - wrap-ansi "^9.0.0" - -local-pkg@^1.0.0: - version "1.1.1" - resolved "https://registry.npmjs.org/local-pkg/-/local-pkg-1.1.1.tgz" - integrity sha512-WunYko2W1NcdfAFpuLUoucsgULmgDBRkdxHxWQ7mK0cQqwPiy8E1enjuRBrhLtZkB5iScJ1XIPdhVEFK8aOLSg== - dependencies: - mlly "^1.7.4" - pkg-types "^2.0.1" - quansync "^0.2.8" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -lodash-es@^4.17.21, lodash-es@4.17.21: - version "4.17.21" - resolved "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz" - integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== - -log-update@^6.1.0: - version "6.1.0" - dependencies: - ansi-escapes "^7.0.0" - cli-cursor "^5.0.0" - slice-ansi "^7.1.0" - strip-ansi "^7.1.0" - wrap-ansi "^9.0.0" - -longest-streak@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz" - integrity sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g== - -loose-envify@^1.1.0: - version "1.4.0" - resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lru-cache@^10.2.0: - version "10.4.3" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz" - integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -make-dir@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz" - integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== - dependencies: - semver "^7.5.3" - -makeerror@1.0.12: - version "1.0.12" - resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz" - integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== - dependencies: - tmpl "1.0.5" - -markdown-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-2.0.0.tgz" - integrity sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q== - -markdown-table@^3.0.0: - version "3.0.4" - resolved "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz" - integrity sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw== - -marked@^15.0.7: - version "15.0.7" - resolved "https://registry.npmjs.org/marked/-/marked-15.0.7.tgz" - integrity sha512-dgLIeKGLx5FwziAnsk4ONoGwHwGPJzselimvlVskE9XLN4Orv9u2VA3GWw/lYUqjfA0rUT/6fqKwfZJapP9BEg== - -mathjax-full@^3.2.2: - version "3.2.2" - resolved "https://registry.npmjs.org/mathjax-full/-/mathjax-full-3.2.2.tgz" - integrity sha512-+LfG9Fik+OuI8SLwsiR02IVdjcnRCy5MufYLi0C3TdMT56L/pjB0alMVGgoWJF8pN9Rc7FESycZB9BMNWIid5w== - dependencies: - esm "^3.2.25" - mhchemparser "^4.1.0" - mj-context-menu "^0.6.1" - speech-rule-engine "^4.0.6" - -mdast-util-find-and-replace@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.2.tgz" - integrity sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg== - dependencies: - "@types/mdast" "^4.0.0" - escape-string-regexp "^5.0.0" - unist-util-is "^6.0.0" - unist-util-visit-parents "^6.0.0" - -mdast-util-from-markdown@^2.0.0, mdast-util-from-markdown@^2.0.1: - version "2.0.2" - resolved "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz" - integrity sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA== - dependencies: - "@types/mdast" "^4.0.0" - "@types/unist" "^3.0.0" - decode-named-character-reference "^1.0.0" - devlop "^1.0.0" - mdast-util-to-string "^4.0.0" - micromark "^4.0.0" - micromark-util-decode-numeric-character-reference "^2.0.0" - micromark-util-decode-string "^2.0.0" - micromark-util-normalize-identifier "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - unist-util-stringify-position "^4.0.0" - -mdast-util-frontmatter@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-2.0.1.tgz" - integrity sha512-LRqI9+wdgC25P0URIJY9vwocIzCcksduHQ9OF2joxQoyTNVduwLAFUzjoopuRJbJAReaKrNQKAZKL3uCMugWJA== - dependencies: - "@types/mdast" "^4.0.0" - devlop "^1.0.0" - escape-string-regexp "^5.0.0" - mdast-util-from-markdown "^2.0.0" - mdast-util-to-markdown "^2.0.0" - micromark-extension-frontmatter "^2.0.0" - -mdast-util-gfm-autolink-literal@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.1.tgz" - integrity sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ== - dependencies: - "@types/mdast" "^4.0.0" - ccount "^2.0.0" - devlop "^1.0.0" - mdast-util-find-and-replace "^3.0.0" - micromark-util-character "^2.0.0" - -mdast-util-gfm-footnote@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.1.0.tgz" - integrity sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ== - dependencies: - "@types/mdast" "^4.0.0" - devlop "^1.1.0" - mdast-util-from-markdown "^2.0.0" - mdast-util-to-markdown "^2.0.0" - micromark-util-normalize-identifier "^2.0.0" - -mdast-util-gfm-strikethrough@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.0.tgz" - integrity sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg== - dependencies: - "@types/mdast" "^4.0.0" - mdast-util-from-markdown "^2.0.0" - mdast-util-to-markdown "^2.0.0" - -mdast-util-gfm-table@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.0.tgz" - integrity sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg== - dependencies: - "@types/mdast" "^4.0.0" - devlop "^1.0.0" - markdown-table "^3.0.0" - mdast-util-from-markdown "^2.0.0" - mdast-util-to-markdown "^2.0.0" - -mdast-util-gfm-task-list-item@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.0.tgz" - integrity sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ== - dependencies: - "@types/mdast" "^4.0.0" - devlop "^1.0.0" - mdast-util-from-markdown "^2.0.0" - mdast-util-to-markdown "^2.0.0" - -mdast-util-gfm@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.1.0.tgz" - integrity sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ== - dependencies: - mdast-util-from-markdown "^2.0.0" - mdast-util-gfm-autolink-literal "^2.0.0" - mdast-util-gfm-footnote "^2.0.0" - mdast-util-gfm-strikethrough "^2.0.0" - mdast-util-gfm-table "^2.0.0" - mdast-util-gfm-task-list-item "^2.0.0" - mdast-util-to-markdown "^2.0.0" - -mdast-util-math@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/mdast-util-math/-/mdast-util-math-3.0.0.tgz" - integrity sha512-Tl9GBNeG/AhJnQM221bJR2HPvLOSnLE/T9cJI9tlc6zwQk2nPk/4f0cHkOdEixQPC/j8UtKDdITswvLAy1OZ1w== - dependencies: - "@types/hast" "^3.0.0" - "@types/mdast" "^4.0.0" - devlop "^1.0.0" - longest-streak "^3.0.0" - mdast-util-from-markdown "^2.0.0" - mdast-util-to-markdown "^2.1.0" - unist-util-remove-position "^5.0.0" - -mdast-util-mdx-expression@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz" - integrity sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^3.0.0" - "@types/mdast" "^4.0.0" - devlop "^1.0.0" - mdast-util-from-markdown "^2.0.0" - mdast-util-to-markdown "^2.0.0" - -mdast-util-mdx-jsx@^3.0.0: - version "3.2.0" - resolved "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.0.tgz" - integrity sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^3.0.0" - "@types/mdast" "^4.0.0" - "@types/unist" "^3.0.0" - ccount "^2.0.0" - devlop "^1.1.0" - mdast-util-from-markdown "^2.0.0" - mdast-util-to-markdown "^2.0.0" - parse-entities "^4.0.0" - stringify-entities "^4.0.0" - unist-util-stringify-position "^4.0.0" - vfile-message "^4.0.0" - -mdast-util-mdx@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/mdast-util-mdx/-/mdast-util-mdx-3.0.0.tgz" - integrity sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w== - dependencies: - mdast-util-from-markdown "^2.0.0" - mdast-util-mdx-expression "^2.0.0" - mdast-util-mdx-jsx "^3.0.0" - mdast-util-mdxjs-esm "^2.0.0" - mdast-util-to-markdown "^2.0.0" - -mdast-util-mdxjs-esm@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz" - integrity sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^3.0.0" - "@types/mdast" "^4.0.0" - devlop "^1.0.0" - mdast-util-from-markdown "^2.0.0" - mdast-util-to-markdown "^2.0.0" - -mdast-util-phrasing@^4.0.0: - version "4.1.0" - resolved "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz" - integrity sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w== - dependencies: - "@types/mdast" "^4.0.0" - unist-util-is "^6.0.0" - -mdast-util-to-hast@^13.0.0, mdast-util-to-hast@^13.2.0: - version "13.2.0" - resolved "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz" - integrity sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA== - dependencies: - "@types/hast" "^3.0.0" - "@types/mdast" "^4.0.0" - "@ungap/structured-clone" "^1.0.0" - devlop "^1.0.0" - micromark-util-sanitize-uri "^2.0.0" - trim-lines "^3.0.0" - unist-util-position "^5.0.0" - unist-util-visit "^5.0.0" - vfile "^6.0.0" - -mdast-util-to-markdown@^2.0.0, mdast-util-to-markdown@^2.1.0: - version "2.1.2" - resolved "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz" - integrity sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA== - dependencies: - "@types/mdast" "^4.0.0" - "@types/unist" "^3.0.0" - longest-streak "^3.0.0" - mdast-util-phrasing "^4.0.0" - mdast-util-to-string "^4.0.0" - micromark-util-classify-character "^2.0.0" - micromark-util-decode-string "^2.0.0" - unist-util-visit "^5.0.0" - zwitch "^2.0.0" - -mdast-util-to-string@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz" - integrity sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg== - dependencies: - "@types/mdast" "^4.0.0" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.3.0: - version "1.4.1" - resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -mermaid@^11.0.0: - version "11.6.0" - resolved "https://registry.npmjs.org/mermaid/-/mermaid-11.6.0.tgz" - integrity sha512-PE8hGUy1LDlWIHWBP05SFdqUHGmRcCcK4IzpOKPE35eOw+G9zZgcnMpyunJVUEOgb//KBORPjysKndw8bFLuRg== - dependencies: - "@braintree/sanitize-url" "^7.0.4" - "@iconify/utils" "^2.1.33" - "@mermaid-js/parser" "^0.4.0" - "@types/d3" "^7.4.3" - cytoscape "^3.29.3" - cytoscape-cose-bilkent "^4.1.0" - cytoscape-fcose "^2.2.0" - d3 "^7.9.0" - d3-sankey "^0.12.3" - dagre-d3-es "7.0.11" - dayjs "^1.11.13" - dompurify "^3.2.4" - katex "^0.16.9" - khroma "^2.1.0" - lodash-es "^4.17.21" - marked "^15.0.7" - roughjs "^4.6.6" - stylis "^4.3.6" - ts-dedent "^2.2.0" - uuid "^11.1.0" - -mhchemparser@^4.1.0: - version "4.2.1" - resolved "https://registry.npmjs.org/mhchemparser/-/mhchemparser-4.2.1.tgz" - integrity sha512-kYmyrCirqJf3zZ9t/0wGgRZ4/ZJw//VwaRVGA75C4nhE60vtnIzhl9J9ndkX/h6hxSN7pjg/cE0VxbnNM+bnDQ== - -micromark-core-commonmark@^2.0.0: - version "2.0.3" - resolved "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz" - integrity sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg== - dependencies: - decode-named-character-reference "^1.0.0" - devlop "^1.0.0" - micromark-factory-destination "^2.0.0" - micromark-factory-label "^2.0.0" - micromark-factory-space "^2.0.0" - micromark-factory-title "^2.0.0" - micromark-factory-whitespace "^2.0.0" - micromark-util-character "^2.0.0" - micromark-util-chunked "^2.0.0" - micromark-util-classify-character "^2.0.0" - micromark-util-html-tag-name "^2.0.0" - micromark-util-normalize-identifier "^2.0.0" - micromark-util-resolve-all "^2.0.0" - micromark-util-subtokenize "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-extension-frontmatter@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-2.0.0.tgz" - integrity sha512-C4AkuM3dA58cgZha7zVnuVxBhDsbttIMiytjgsM2XbHAB2faRVaHRle40558FBN+DJcrLNCoqG5mlrpdU4cRtg== - dependencies: - fault "^2.0.0" - micromark-util-character "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-extension-gfm-autolink-literal@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz" - integrity sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw== - dependencies: - micromark-util-character "^2.0.0" - micromark-util-sanitize-uri "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-extension-gfm-footnote@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz" - integrity sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw== - dependencies: - devlop "^1.0.0" - micromark-core-commonmark "^2.0.0" - micromark-factory-space "^2.0.0" - micromark-util-character "^2.0.0" - micromark-util-normalize-identifier "^2.0.0" - micromark-util-sanitize-uri "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-extension-gfm-strikethrough@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz" - integrity sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw== - dependencies: - devlop "^1.0.0" - micromark-util-chunked "^2.0.0" - micromark-util-classify-character "^2.0.0" - micromark-util-resolve-all "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-extension-gfm-table@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.1.tgz" - integrity sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg== - dependencies: - devlop "^1.0.0" - micromark-factory-space "^2.0.0" - micromark-util-character "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-extension-gfm-tagfilter@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-2.0.0.tgz" - integrity sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg== - dependencies: - micromark-util-types "^2.0.0" - -micromark-extension-gfm-task-list-item@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz" - integrity sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw== - dependencies: - devlop "^1.0.0" - micromark-factory-space "^2.0.0" - micromark-util-character "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-extension-gfm@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz" - integrity sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w== - dependencies: - micromark-extension-gfm-autolink-literal "^2.0.0" - micromark-extension-gfm-footnote "^2.0.0" - micromark-extension-gfm-strikethrough "^2.0.0" - micromark-extension-gfm-table "^2.0.0" - micromark-extension-gfm-tagfilter "^2.0.0" - micromark-extension-gfm-task-list-item "^2.0.0" - micromark-util-combine-extensions "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-extension-math@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/micromark-extension-math/-/micromark-extension-math-3.1.0.tgz" - integrity sha512-lvEqd+fHjATVs+2v/8kg9i5Q0AP2k85H0WUOwpIVvUML8BapsMvh1XAogmQjOCsLpoKRCVQqEkQBB3NhVBcsOg== - dependencies: - "@types/katex" "^0.16.0" - devlop "^1.0.0" - katex "^0.16.0" - micromark-factory-space "^2.0.0" - micromark-util-character "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-extension-mdx-expression@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/micromark-extension-mdx-expression/-/micromark-extension-mdx-expression-3.0.1.tgz" - integrity sha512-dD/ADLJ1AeMvSAKBwO22zG22N4ybhe7kFIZ3LsDI0GlsNr2A3KYxb0LdC1u5rj4Nw+CHKY0RVdnHX8vj8ejm4Q== - dependencies: - "@types/estree" "^1.0.0" - devlop "^1.0.0" - micromark-factory-mdx-expression "^2.0.0" - micromark-factory-space "^2.0.0" - micromark-util-character "^2.0.0" - micromark-util-events-to-acorn "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-extension-mdx-jsx@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-3.0.2.tgz" - integrity sha512-e5+q1DjMh62LZAJOnDraSSbDMvGJ8x3cbjygy2qFEi7HCeUT4BDKCvMozPozcD6WmOt6sVvYDNBKhFSz3kjOVQ== - dependencies: - "@types/estree" "^1.0.0" - devlop "^1.0.0" - estree-util-is-identifier-name "^3.0.0" - micromark-factory-mdx-expression "^2.0.0" - micromark-factory-space "^2.0.0" - micromark-util-character "^2.0.0" - micromark-util-events-to-acorn "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - vfile-message "^4.0.0" - -micromark-extension-mdx-md@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/micromark-extension-mdx-md/-/micromark-extension-mdx-md-2.0.0.tgz" - integrity sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ== - dependencies: - micromark-util-types "^2.0.0" - -micromark-extension-mdxjs-esm@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/micromark-extension-mdxjs-esm/-/micromark-extension-mdxjs-esm-3.0.0.tgz" - integrity sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A== - dependencies: - "@types/estree" "^1.0.0" - devlop "^1.0.0" - micromark-core-commonmark "^2.0.0" - micromark-util-character "^2.0.0" - micromark-util-events-to-acorn "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - unist-util-position-from-estree "^2.0.0" - vfile-message "^4.0.0" - -micromark-extension-mdxjs@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/micromark-extension-mdxjs/-/micromark-extension-mdxjs-3.0.0.tgz" - integrity sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ== - dependencies: - acorn "^8.0.0" - acorn-jsx "^5.0.0" - micromark-extension-mdx-expression "^3.0.0" - micromark-extension-mdx-jsx "^3.0.0" - micromark-extension-mdx-md "^2.0.0" - micromark-extension-mdxjs-esm "^3.0.0" - micromark-util-combine-extensions "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-factory-destination@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz" - integrity sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA== - dependencies: - micromark-util-character "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-factory-label@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz" - integrity sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg== - dependencies: - devlop "^1.0.0" - micromark-util-character "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-factory-mdx-expression@^2.0.0: - version "2.0.3" - resolved "https://registry.npmjs.org/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-2.0.3.tgz" - integrity sha512-kQnEtA3vzucU2BkrIa8/VaSAsP+EJ3CKOvhMuJgOEGg9KDC6OAY6nSnNDVRiVNRqj7Y4SlSzcStaH/5jge8JdQ== - dependencies: - "@types/estree" "^1.0.0" - devlop "^1.0.0" - micromark-factory-space "^2.0.0" - micromark-util-character "^2.0.0" - micromark-util-events-to-acorn "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - unist-util-position-from-estree "^2.0.0" - vfile-message "^4.0.0" - -micromark-factory-space@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz" - integrity sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg== - dependencies: - micromark-util-character "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-factory-title@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz" - integrity sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw== - dependencies: - micromark-factory-space "^2.0.0" - micromark-util-character "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-factory-whitespace@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz" - integrity sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ== - dependencies: - micromark-factory-space "^2.0.0" - micromark-util-character "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-util-character@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz" - integrity sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q== - dependencies: - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-util-chunked@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz" - integrity sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA== - dependencies: - micromark-util-symbol "^2.0.0" - -micromark-util-classify-character@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz" - integrity sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q== - dependencies: - micromark-util-character "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-util-combine-extensions@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz" - integrity sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg== - dependencies: - micromark-util-chunked "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-util-decode-numeric-character-reference@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz" - integrity sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw== - dependencies: - micromark-util-symbol "^2.0.0" - -micromark-util-decode-string@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz" - integrity sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ== - dependencies: - decode-named-character-reference "^1.0.0" - micromark-util-character "^2.0.0" - micromark-util-decode-numeric-character-reference "^2.0.0" - micromark-util-symbol "^2.0.0" - -micromark-util-encode@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz" - integrity sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw== - -micromark-util-events-to-acorn@^2.0.0: - version "2.0.3" - resolved "https://registry.npmjs.org/micromark-util-events-to-acorn/-/micromark-util-events-to-acorn-2.0.3.tgz" - integrity sha512-jmsiEIiZ1n7X1Rr5k8wVExBQCg5jy4UXVADItHmNk1zkwEVhBuIUKRu3fqv+hs4nxLISi2DQGlqIOGiFxgbfHg== - dependencies: - "@types/estree" "^1.0.0" - "@types/unist" "^3.0.0" - devlop "^1.0.0" - estree-util-visit "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - vfile-message "^4.0.0" - -micromark-util-html-tag-name@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz" - integrity sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA== - -micromark-util-normalize-identifier@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz" - integrity sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q== - dependencies: - micromark-util-symbol "^2.0.0" - -micromark-util-resolve-all@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz" - integrity sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg== - dependencies: - micromark-util-types "^2.0.0" - -micromark-util-sanitize-uri@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz" - integrity sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ== - dependencies: - micromark-util-character "^2.0.0" - micromark-util-encode "^2.0.0" - micromark-util-symbol "^2.0.0" - -micromark-util-subtokenize@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz" - integrity sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA== - dependencies: - devlop "^1.0.0" - micromark-util-chunked "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromark-util-symbol@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz" - integrity sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q== - -micromark-util-types@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz" - integrity sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA== - -micromark@^4.0.0: - version "4.0.2" - resolved "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz" - integrity sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA== - dependencies: - "@types/debug" "^4.0.0" - debug "^4.0.0" - decode-named-character-reference "^1.0.0" - devlop "^1.0.0" - micromark-core-commonmark "^2.0.0" - micromark-factory-space "^2.0.0" - micromark-util-character "^2.0.0" - micromark-util-chunked "^2.0.0" - micromark-util-combine-extensions "^2.0.0" - micromark-util-decode-numeric-character-reference "^2.0.0" - micromark-util-encode "^2.0.0" - micromark-util-normalize-identifier "^2.0.0" - micromark-util-resolve-all "^2.0.0" - micromark-util-sanitize-uri "^2.0.0" - micromark-util-subtokenize "^2.0.0" - micromark-util-symbol "^2.0.0" - micromark-util-types "^2.0.0" - -micromatch@^4.0.4, micromatch@^4.0.8, micromatch@~4.0.8: - version "4.0.8" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz" - integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== - dependencies: - braces "^3.0.3" - picomatch "^2.3.1" - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -mimic-fn@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz" - integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== - -mimic-function@^5.0.0: - version "5.0.1" - resolved "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz" - integrity sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA== - -minimatch@^3.0.4, minimatch@^3.1.1: - version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^9.0.4: - version "9.0.5" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz" - integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== - dependencies: - brace-expansion "^2.0.1" - -minimist@^1.2.8: - version "1.2.8" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: - version "7.1.2" - resolved "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz" - integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== - -mj-context-menu@^0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/mj-context-menu/-/mj-context-menu-0.6.1.tgz" - integrity sha512-7NO5s6n10TIV96d4g2uDpG7ZDpIhMh0QNfGdJw/W47JswFcosz457wqz/b5sAKvl12sxINGFCn80NZHKwxQEXA== - -mlly@^1.7.4: - version "1.7.4" - resolved "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz" - integrity sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw== - dependencies: - acorn "^8.14.0" - pathe "^2.0.1" - pkg-types "^1.3.0" - ufo "^1.5.4" - -ms@^2.1.3: - version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -mz@^2.7.0: - version "2.7.0" - resolved "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz" - integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== - dependencies: - any-promise "^1.0.0" - object-assign "^4.0.1" - thenify-all "^1.0.0" - -nanoid@^3.3.6, nanoid@^3.3.8: - version "3.3.11" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz" - integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -negotiator@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz" - integrity sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg== - -next-sitemap@^4.2.3: - version "4.2.3" - resolved "https://registry.npmjs.org/next-sitemap/-/next-sitemap-4.2.3.tgz" - integrity sha512-vjdCxeDuWDzldhCnyFCQipw5bfpl4HmZA7uoo3GAaYGjGgfL4Cxb1CiztPuWGmS+auYs7/8OekRS8C2cjdAsjQ== - dependencies: - "@corex/deepmerge" "^4.0.43" - "@next/env" "^13.4.3" - fast-glob "^3.2.12" - minimist "^1.2.8" - -next-themes@^0.4.0: - version "0.4.6" - resolved "https://registry.npmjs.org/next-themes/-/next-themes-0.4.6.tgz" - integrity sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA== - -next@*, next@^14.2.5, "next@>= 13", next@>=13: - version "14.2.26" - resolved "https://registry.npmjs.org/next/-/next-14.2.26.tgz" - integrity sha512-b81XSLihMwCfwiUVRRja3LphLo4uBBMZEzBBWMaISbKTwOmq3wPknIETy/8000tr7Gq4WmbuFYPS7jOYIf+ZJw== - dependencies: - "@next/env" "14.2.26" - "@swc/helpers" "0.5.5" - busboy "1.6.0" - caniuse-lite "^1.0.30001579" - graceful-fs "^4.2.11" - postcss "8.4.31" - styled-jsx "5.1.1" - optionalDependencies: - "@next/swc-darwin-arm64" "14.2.26" - "@next/swc-darwin-x64" "14.2.26" - "@next/swc-linux-arm64-gnu" "14.2.26" - "@next/swc-linux-arm64-musl" "14.2.26" - "@next/swc-linux-x64-gnu" "14.2.26" - "@next/swc-linux-x64-musl" "14.2.26" - "@next/swc-win32-arm64-msvc" "14.2.26" - "@next/swc-win32-ia32-msvc" "14.2.26" - "@next/swc-win32-x64-msvc" "14.2.26" - -nextra-theme-docs@^3: - version "3.3.1" - resolved "https://registry.npmjs.org/nextra-theme-docs/-/nextra-theme-docs-3.3.1.tgz" - integrity sha512-P305m2UcW2IDyQhjrcAu0qpdPArikofinABslUCAyixYShsmcdDRUhIMd4QBHYru4gQuVjGWX9PhWZZCbNvzDQ== - dependencies: - "@headlessui/react" "^2.1.2" - clsx "^2.0.0" - escape-string-regexp "^5.0.0" - flexsearch "^0.7.43" - next-themes "^0.4.0" - scroll-into-view-if-needed "^3.1.0" - zod "^3.22.3" - -nextra@^3, nextra@3.3.1: - version "3.3.1" - resolved "https://registry.npmjs.org/nextra/-/nextra-3.3.1.tgz" - integrity sha512-jiwj+LfUPHHeAxJAEqFuglxnbjFgzAOnDWFsjv7iv3BWiX8OksDwd3I2Sv3j2zba00iIBDEPdNeylfzTtTLZVg== - dependencies: - "@formatjs/intl-localematcher" "^0.5.4" - "@headlessui/react" "^2.1.2" - "@mdx-js/mdx" "^3.0.0" - "@mdx-js/react" "^3.0.0" - "@napi-rs/simple-git" "^0.1.9" - "@shikijs/twoslash" "^1.0.0" - "@theguild/remark-mermaid" "^0.1.3" - "@theguild/remark-npm2yarn" "^0.3.2" - better-react-mathjax "^2.0.3" - clsx "^2.0.0" - estree-util-to-js "^2.0.0" - estree-util-value-to-estree "^3.0.1" - github-slugger "^2.0.0" - graceful-fs "^4.2.11" - gray-matter "^4.0.3" - hast-util-to-estree "^3.1.0" - katex "^0.16.9" - mdast-util-from-markdown "^2.0.1" - mdast-util-gfm "^3.0.0" - mdast-util-to-hast "^13.2.0" - negotiator "^1.0.0" - p-limit "^6.0.0" - react-medium-image-zoom "^5.2.12" - rehype-katex "^7.0.0" - rehype-pretty-code "0.14.0" - rehype-raw "^7.0.0" - remark-frontmatter "^5.0.0" - remark-gfm "^4.0.0" - remark-math "^6.0.0" - remark-reading-time "^2.0.1" - remark-smartypants "^3.0.0" - shiki "^1.0.0" - slash "^5.1.0" - title "^4.0.0" - unist-util-remove "^4.0.0" - unist-util-visit "^5.0.0" - yaml "^2.3.2" - zod "^3.22.3" - zod-validation-error "^3.0.0" - -nlcst-to-string@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/nlcst-to-string/-/nlcst-to-string-4.0.0.tgz" - integrity sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA== - dependencies: - "@types/nlcst" "^2.0.0" - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" - integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== - -node-releases@^2.0.19: - version "2.0.19" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz" - integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz" - integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -npm-run-path@^5.1.0: - version "5.3.0" - dependencies: - path-key "^4.0.0" - -npm-to-yarn@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/npm-to-yarn/-/npm-to-yarn-3.0.1.tgz" - integrity sha512-tt6PvKu4WyzPwWUzy/hvPFqn+uwXO0K1ZHka8az3NnrhWJDmSqI8ncWq0fkL0k/lmmi5tAC11FXwXuh0rFbt1A== - -oauth4webapi@^3.1.4: - version "3.5.0" - resolved "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.5.0.tgz" - integrity sha512-DF3mLWNuxPkxJkHmWxbSFz4aE5CjWOsm465VBfBdWzmzX4Mg3vF8icxK+iKqfdWrIumBJ2TaoNQWx+SQc2bsPQ== - -object-assign@^4.0.1: - version "4.1.1" - resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-hash@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz" - integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -onetime@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz" - integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== - dependencies: - mimic-fn "^4.0.0" - -onetime@^7.0.0: - version "7.0.0" - dependencies: - mimic-function "^5.0.0" - -oniguruma-to-es@^2.2.0: - version "2.3.0" - resolved "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-2.3.0.tgz" - integrity sha512-bwALDxriqfKGfUufKGGepCzu9x7nJQuoRoAFp4AnwehhC2crqrDIAP/uN2qdlsAvSMpeRC3+Yzhqc7hLmle5+g== - dependencies: - emoji-regex-xs "^1.0.0" - regex "^5.1.1" - regex-recursion "^5.1.1" - -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-limit@^6.0.0: - version "6.2.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-6.2.0.tgz" - integrity sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA== - dependencies: - yocto-queue "^1.1.1" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -package-json-from-dist@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz" - integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== - -package-manager-detector@^0.2.8: - version "0.2.11" - resolved "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.11.tgz" - integrity sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ== - dependencies: - quansync "^0.2.7" - -parse-entities@^4.0.0: - version "4.0.2" - resolved "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz" - integrity sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw== - dependencies: - "@types/unist" "^2.0.0" - character-entities-legacy "^3.0.0" - character-reference-invalid "^2.0.0" - decode-named-character-reference "^1.0.0" - is-alphanumerical "^2.0.0" - is-decimal "^2.0.0" - is-hexadecimal "^2.0.0" - -parse-json@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -parse-latin@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/parse-latin/-/parse-latin-7.0.0.tgz" - integrity sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ== - dependencies: - "@types/nlcst" "^2.0.0" - "@types/unist" "^3.0.0" - nlcst-to-string "^4.0.0" - unist-util-modify-children "^4.0.0" - unist-util-visit-children "^3.0.0" - vfile "^6.0.0" - -parse-numeric-range@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz" - integrity sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ== - -parse5@^7.0.0: - version "7.2.1" - resolved "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz" - integrity sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ== - dependencies: - entities "^4.5.0" - -path-data-parser@^0.1.0, path-data-parser@0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz" - integrity sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.0.0: - version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-key@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz" - integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-scurry@^1.11.1: - version "1.11.1" - resolved "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz" - integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== - dependencies: - lru-cache "^10.2.0" - minipass "^5.0.0 || ^6.0.2 || ^7.0.0" - -pathe@^2.0.1, pathe@^2.0.3: - version "2.0.3" - resolved "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz" - integrity sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w== - -picocolors@^1.0.0, picocolors@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz" - integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pidtree@~0.6.0: - version "0.6.0" - -pify@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== - -pirates@^4.0.1, pirates@^4.0.4: - version "4.0.7" - resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz" - integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -pkg-types@^1.3.0: - version "1.3.1" - resolved "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz" - integrity sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ== - dependencies: - confbox "^0.1.8" - mlly "^1.7.4" - pathe "^2.0.1" - -pkg-types@^2.0.1: - version "2.1.0" - resolved "https://registry.npmjs.org/pkg-types/-/pkg-types-2.1.0.tgz" - integrity sha512-wmJwA+8ihJixSoHKxZJRBQG1oY8Yr9pGLzRmSsNms0iNWyHHAlZCa7mmKiFR10YPZuz/2k169JiS/inOjBCZ2A== - dependencies: - confbox "^0.2.1" - exsolve "^1.0.1" - pathe "^2.0.3" - -points-on-curve@^0.2.0, points-on-curve@0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz" - integrity sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A== - -points-on-path@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz" - integrity sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g== - dependencies: - path-data-parser "0.1.0" - points-on-curve "0.2.0" - -postcss-import@^15.1.0: - version "15.1.0" - resolved "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz" - integrity sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew== - dependencies: - postcss-value-parser "^4.0.0" - read-cache "^1.0.0" - resolve "^1.1.7" - -postcss-js@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz" - integrity sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw== - dependencies: - camelcase-css "^2.0.1" - -postcss-load-config@^4.0.2: - version "4.0.2" - resolved "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz" - integrity sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ== - dependencies: - lilconfig "^3.0.0" - yaml "^2.3.4" - -postcss-nested@^6.2.0: - version "6.2.0" - resolved "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz" - integrity sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ== - dependencies: - postcss-selector-parser "^6.1.1" - -postcss-selector-parser@^6.1.1, postcss-selector-parser@^6.1.2: - version "6.1.2" - resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz" - integrity sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg== - dependencies: - cssesc "^3.0.0" - util-deprecate "^1.0.2" - -postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" - integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== - -postcss@^8.0.0, postcss@^8.1.0, postcss@^8.2.14, postcss@^8.4.21, postcss@^8.4.40, postcss@^8.4.47, postcss@>=8.0.9: - version "8.5.3" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz" - integrity sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A== - dependencies: - nanoid "^3.3.8" - picocolors "^1.1.1" - source-map-js "^1.2.1" - -postcss@8.4.31: - version "8.4.31" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz" - integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== - dependencies: - nanoid "^3.3.6" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -prettier@^3.3.3: - version "3.5.3" - resolved "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz" - integrity sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw== - -pretty-format@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz" - integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== - dependencies: - "@jest/schemas" "^29.6.3" - ansi-styles "^5.0.0" - react-is "^18.0.0" - -prismjs@^1.30.0: - version "1.30.0" - resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz" - integrity sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw== - -prompts@^2.0.1: - version "2.4.2" - resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -property-information@^6.0.0: - version "6.5.0" - resolved "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz" - integrity sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig== - -property-information@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/property-information/-/property-information-7.0.0.tgz" - integrity sha512-7D/qOz/+Y4X/rzSB6jKxKUsQnphO046ei8qxG59mtM3RG3DHgTK81HrxrmoDVINJb8NKT5ZsRbwHvQ6B68Iyhg== - -pure-rand@^6.0.0: - version "6.1.0" - resolved "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz" - integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== - -quansync@^0.2.7, quansync@^0.2.8: - version "0.2.10" - resolved "https://registry.npmjs.org/quansync/-/quansync-0.2.10.tgz" - integrity sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -"react-dom@^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", "react-dom@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom@^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", "react-dom@^18 || ^19 || ^19.0.0-rc", react-dom@^18.2.0, react-dom@^18.3.1, "react-dom@>= 16.8.0 < 19.0.0", react-dom@>=16.8.0, react-dom@>=18: - version "18.3.1" - resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz" - integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== - dependencies: - loose-envify "^1.1.0" - scheduler "^0.23.2" - -react-is@^18.0.0: - version "18.3.1" - resolved "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz" - integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== - -react-markdown@^9.0.1: - version "9.1.0" - resolved "https://registry.npmjs.org/react-markdown/-/react-markdown-9.1.0.tgz" - integrity sha512-xaijuJB0kzGiUdG7nc2MOMDUDBWPyGAjZtUrow9XxUeua8IqeP+VlIfAZ3bphpcLTnSZXz6z9jcVC/TCwbfgdw== - dependencies: - "@types/hast" "^3.0.0" - "@types/mdast" "^4.0.0" - devlop "^1.0.0" - hast-util-to-jsx-runtime "^2.0.0" - html-url-attributes "^3.0.0" - mdast-util-to-hast "^13.0.0" - remark-parse "^11.0.0" - remark-rehype "^11.0.0" - unified "^11.0.0" - unist-util-visit "^5.0.0" - vfile "^6.0.0" - -react-medium-image-zoom@^5.2.12: - version "5.2.14" - resolved "https://registry.npmjs.org/react-medium-image-zoom/-/react-medium-image-zoom-5.2.14.tgz" - integrity sha512-nfTVYcAUnBzXQpPDcZL+cG/e6UceYUIG+zDcnemL7jtAqbJjVVkA85RgneGtJeni12dTyiRPZVM6Szkmwd/o8w== - -"react@^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", "react@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react@^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", "react@^18 || ^19 || ^19.0.0-rc", react@^18.2.0, react@^18.3.1, "react@>= 16.8.0 < 19.0.0", "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", react@>=16, react@>=16.8, react@>=16.8.0, react@>=18: - version "18.3.1" - resolved "https://registry.npmjs.org/react/-/react-18.3.1.tgz" - integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== - dependencies: - loose-envify "^1.1.0" - -read-cache@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz" - integrity sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA== - dependencies: - pify "^2.3.0" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -reading-time@^1.3.0: - version "1.5.0" - resolved "https://registry.npmjs.org/reading-time/-/reading-time-1.5.0.tgz" - integrity sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg== - -recma-build-jsx@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/recma-build-jsx/-/recma-build-jsx-1.0.0.tgz" - integrity sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew== - dependencies: - "@types/estree" "^1.0.0" - estree-util-build-jsx "^3.0.0" - vfile "^6.0.0" - -recma-jsx@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/recma-jsx/-/recma-jsx-1.0.0.tgz" - integrity sha512-5vwkv65qWwYxg+Atz95acp8DMu1JDSqdGkA2Of1j6rCreyFUE/gp15fC8MnGEuG1W68UKjM6x6+YTWIh7hZM/Q== - dependencies: - acorn-jsx "^5.0.0" - estree-util-to-js "^2.0.0" - recma-parse "^1.0.0" - recma-stringify "^1.0.0" - unified "^11.0.0" - -recma-parse@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/recma-parse/-/recma-parse-1.0.0.tgz" - integrity sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ== - dependencies: - "@types/estree" "^1.0.0" - esast-util-from-js "^2.0.0" - unified "^11.0.0" - vfile "^6.0.0" - -recma-stringify@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/recma-stringify/-/recma-stringify-1.0.0.tgz" - integrity sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g== - dependencies: - "@types/estree" "^1.0.0" - estree-util-to-js "^2.0.0" - unified "^11.0.0" - vfile "^6.0.0" - -regex-recursion@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/regex-recursion/-/regex-recursion-5.1.1.tgz" - integrity sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w== - dependencies: - regex "^5.1.1" - regex-utilities "^2.3.0" - -regex-utilities@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz" - integrity sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng== - -regex@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/regex/-/regex-5.1.1.tgz" - integrity sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw== - dependencies: - regex-utilities "^2.3.0" - -rehype-katex@^7.0.0: - version "7.0.1" - resolved "https://registry.npmjs.org/rehype-katex/-/rehype-katex-7.0.1.tgz" - integrity sha512-OiM2wrZ/wuhKkigASodFoo8wimG3H12LWQaH8qSPVJn9apWKFSH3YOCtbKpBorTVw/eI7cuT21XBbvwEswbIOA== - dependencies: - "@types/hast" "^3.0.0" - "@types/katex" "^0.16.0" - hast-util-from-html-isomorphic "^2.0.0" - hast-util-to-text "^4.0.0" - katex "^0.16.0" - unist-util-visit-parents "^6.0.0" - vfile "^6.0.0" - -rehype-parse@^9.0.0: - version "9.0.1" - resolved "https://registry.npmjs.org/rehype-parse/-/rehype-parse-9.0.1.tgz" - integrity sha512-ksCzCD0Fgfh7trPDxr2rSylbwq9iYDkSn8TCDmEJ49ljEUBxDVCzCHv7QNzZOfODanX4+bWQ4WZqLCRWYLfhag== - dependencies: - "@types/hast" "^3.0.0" - hast-util-from-html "^2.0.0" - unified "^11.0.0" - -rehype-pretty-code@0.14.0: - version "0.14.0" - resolved "https://registry.npmjs.org/rehype-pretty-code/-/rehype-pretty-code-0.14.0.tgz" - integrity sha512-hBeKF/Wkkf3zyUS8lal9RCUuhypDWLQc+h9UrP9Pav25FUm/AQAVh4m5gdvJxh4Oz+U+xKvdsV01p1LdvsZTiQ== - dependencies: - "@types/hast" "^3.0.4" - hast-util-to-string "^3.0.0" - parse-numeric-range "^1.3.0" - rehype-parse "^9.0.0" - unified "^11.0.5" - unist-util-visit "^5.0.0" - -rehype-raw@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/rehype-raw/-/rehype-raw-7.0.0.tgz" - integrity sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww== - dependencies: - "@types/hast" "^3.0.0" - hast-util-raw "^9.0.0" - vfile "^6.0.0" - -rehype-recma@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/rehype-recma/-/rehype-recma-1.0.0.tgz" - integrity sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw== - dependencies: - "@types/estree" "^1.0.0" - "@types/hast" "^3.0.0" - hast-util-to-estree "^3.0.0" - -remark-frontmatter@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-5.0.0.tgz" - integrity sha512-XTFYvNASMe5iPN0719nPrdItC9aU0ssC4v14mH1BCi1u0n1gAocqcujWUrByftZTbLhRtiKRyjYTSIOcr69UVQ== - dependencies: - "@types/mdast" "^4.0.0" - mdast-util-frontmatter "^2.0.0" - micromark-extension-frontmatter "^2.0.0" - unified "^11.0.0" - -remark-gfm@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz" - integrity sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg== - dependencies: - "@types/mdast" "^4.0.0" - mdast-util-gfm "^3.0.0" - micromark-extension-gfm "^3.0.0" - remark-parse "^11.0.0" - remark-stringify "^11.0.0" - unified "^11.0.0" - -remark-math@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/remark-math/-/remark-math-6.0.0.tgz" - integrity sha512-MMqgnP74Igy+S3WwnhQ7kqGlEerTETXMvJhrUzDikVZ2/uogJCb+WHUg97hK9/jcfc0dkD73s3LN8zU49cTEtA== - dependencies: - "@types/mdast" "^4.0.0" - mdast-util-math "^3.0.0" - micromark-extension-math "^3.0.0" - unified "^11.0.0" - -remark-mdx@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/remark-mdx/-/remark-mdx-3.1.0.tgz" - integrity sha512-Ngl/H3YXyBV9RcRNdlYsZujAmhsxwzxpDzpDEhFBVAGthS4GDgnctpDjgFl/ULx5UEDzqtW1cyBSNKqYYrqLBA== - dependencies: - mdast-util-mdx "^3.0.0" - micromark-extension-mdxjs "^3.0.0" - -remark-parse@^11.0.0: - version "11.0.0" - resolved "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz" - integrity sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA== - dependencies: - "@types/mdast" "^4.0.0" - mdast-util-from-markdown "^2.0.0" - micromark-util-types "^2.0.0" - unified "^11.0.0" - -remark-reading-time@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/remark-reading-time/-/remark-reading-time-2.0.1.tgz" - integrity sha512-fy4BKy9SRhtYbEHvp6AItbRTnrhiDGbqLQTSYVbQPGuRCncU1ubSsh9p/W5QZSxtYcUXv8KGL0xBgPLyNJA1xw== - dependencies: - estree-util-is-identifier-name "^2.0.0" - estree-util-value-to-estree "^1.3.0" - reading-time "^1.3.0" - unist-util-visit "^3.1.0" - -remark-rehype@^11.0.0: - version "11.1.2" - resolved "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz" - integrity sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw== - dependencies: - "@types/hast" "^3.0.0" - "@types/mdast" "^4.0.0" - mdast-util-to-hast "^13.0.0" - unified "^11.0.0" - vfile "^6.0.0" - -remark-smartypants@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/remark-smartypants/-/remark-smartypants-3.0.2.tgz" - integrity sha512-ILTWeOriIluwEvPjv67v7Blgrcx+LZOkAUVtKI3putuhlZm84FnqDORNXPPm+HY3NdZOMhyDwZ1E+eZB/Df5dA== - dependencies: - retext "^9.0.0" - retext-smartypants "^6.0.0" - unified "^11.0.4" - unist-util-visit "^5.0.0" - -remark-stringify@^11.0.0: - version "11.0.0" - resolved "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz" - integrity sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw== - dependencies: - "@types/mdast" "^4.0.0" - mdast-util-to-markdown "^2.0.0" - unified "^11.0.0" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve.exports@^2.0.0: - version "2.0.3" - resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz" - integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== - -resolve@^1.1.7, resolve@^1.20.0, resolve@^1.22.8: - version "1.22.10" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz" - integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w== - dependencies: - is-core-module "^2.16.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -restore-cursor@^5.0.0: - version "5.1.0" - dependencies: - onetime "^7.0.0" - signal-exit "^4.1.0" - -retext-latin@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/retext-latin/-/retext-latin-4.0.0.tgz" - integrity sha512-hv9woG7Fy0M9IlRQloq/N6atV82NxLGveq+3H2WOi79dtIYWN8OaxogDm77f8YnVXJL2VD3bbqowu5E3EMhBYA== - dependencies: - "@types/nlcst" "^2.0.0" - parse-latin "^7.0.0" - unified "^11.0.0" - -retext-smartypants@^6.0.0: - version "6.2.0" - resolved "https://registry.npmjs.org/retext-smartypants/-/retext-smartypants-6.2.0.tgz" - integrity sha512-kk0jOU7+zGv//kfjXEBjdIryL1Acl4i9XNkHxtM7Tm5lFiCog576fjNC9hjoR7LTKQ0DsPWy09JummSsH1uqfQ== - dependencies: - "@types/nlcst" "^2.0.0" - nlcst-to-string "^4.0.0" - unist-util-visit "^5.0.0" - -retext-stringify@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/retext-stringify/-/retext-stringify-4.0.0.tgz" - integrity sha512-rtfN/0o8kL1e+78+uxPTqu1Klt0yPzKuQ2BfWwwfgIUSayyzxpM1PJzkKt4V8803uB9qSy32MvI7Xep9khTpiA== - dependencies: - "@types/nlcst" "^2.0.0" - nlcst-to-string "^4.0.0" - unified "^11.0.0" - -retext@^9.0.0: - version "9.0.0" - resolved "https://registry.npmjs.org/retext/-/retext-9.0.0.tgz" - integrity sha512-sbMDcpHCNjvlheSgMfEcVrZko3cDzdbe1x/e7G66dFp0Ff7Mldvi2uv6JkJQzdRcvLYE8CA8Oe8siQx8ZOgTcA== - dependencies: - "@types/nlcst" "^2.0.0" - retext-latin "^4.0.0" - retext-stringify "^4.0.0" - unified "^11.0.0" - -reusify@^1.0.4: - version "1.1.0" - resolved "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz" - integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== - -rfdc@^1.4.1: - version "1.4.1" - resolved "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz" - integrity sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA== - -robust-predicates@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz" - integrity sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg== - -roughjs@^4.6.6: - version "4.6.6" - resolved "https://registry.npmjs.org/roughjs/-/roughjs-4.6.6.tgz" - integrity sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ== - dependencies: - hachure-fill "^0.5.2" - path-data-parser "^0.1.0" - points-on-curve "^0.2.0" - points-on-path "^0.2.1" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -rw@1: - version "1.3.3" - resolved "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz" - integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== - -"safer-buffer@>= 2.1.2 < 3.0.0": - version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -scheduler@^0.23.2: - version "0.23.2" - resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz" - integrity sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ== - dependencies: - loose-envify "^1.1.0" - -scroll-into-view-if-needed@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.1.0.tgz" - integrity sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ== - dependencies: - compute-scroll-into-view "^3.0.2" - -"search-insights@>= 1 < 3": - version "2.17.3" - resolved "https://registry.npmjs.org/search-insights/-/search-insights-2.17.3.tgz" - integrity sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ== - -section-matter@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz" - integrity sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA== - dependencies: - extend-shallow "^2.0.1" - kind-of "^6.0.0" - -semver@^6.3.0, semver@^6.3.1: - version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^7.5.3: - version "7.7.1" - resolved "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz" - integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== - -semver@^7.5.4: - version "7.7.1" - resolved "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz" - integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== - -semver@^7.6.3: - version "7.7.1" - resolved "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz" - integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== - -sharp@^0.33.4: - version "0.33.5" - resolved "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz" - integrity sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw== - dependencies: - color "^4.2.3" - detect-libc "^2.0.3" - semver "^7.6.3" - optionalDependencies: - "@img/sharp-darwin-arm64" "0.33.5" - "@img/sharp-darwin-x64" "0.33.5" - "@img/sharp-libvips-darwin-arm64" "1.0.4" - "@img/sharp-libvips-darwin-x64" "1.0.4" - "@img/sharp-libvips-linux-arm" "1.0.5" - "@img/sharp-libvips-linux-arm64" "1.0.4" - "@img/sharp-libvips-linux-s390x" "1.0.4" - "@img/sharp-libvips-linux-x64" "1.0.4" - "@img/sharp-libvips-linuxmusl-arm64" "1.0.4" - "@img/sharp-libvips-linuxmusl-x64" "1.0.4" - "@img/sharp-linux-arm" "0.33.5" - "@img/sharp-linux-arm64" "0.33.5" - "@img/sharp-linux-s390x" "0.33.5" - "@img/sharp-linux-x64" "0.33.5" - "@img/sharp-linuxmusl-arm64" "0.33.5" - "@img/sharp-linuxmusl-x64" "0.33.5" - "@img/sharp-wasm32" "0.33.5" - "@img/sharp-win32-ia32" "0.33.5" - "@img/sharp-win32-x64" "0.33.5" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -shiki@^1.0.0, shiki@^1.3.0: - version "1.29.2" - resolved "https://registry.npmjs.org/shiki/-/shiki-1.29.2.tgz" - integrity sha512-njXuliz/cP+67jU2hukkxCNuH1yUi4QfdZZY+sMr5PPrIyXSu5iTb/qYC4BiWWB0vZ+7TbdvYUCeL23zpwCfbg== - dependencies: - "@shikijs/core" "1.29.2" - "@shikijs/engine-javascript" "1.29.2" - "@shikijs/engine-oniguruma" "1.29.2" - "@shikijs/langs" "1.29.2" - "@shikijs/themes" "1.29.2" - "@shikijs/types" "1.29.2" - "@shikijs/vscode-textmate" "^10.0.1" - "@types/hast" "^3.0.4" - -signal-exit@^3.0.3: - version "3.0.7" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -signal-exit@^4.0.1, signal-exit@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz" - integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== - -simple-swizzle@^0.2.2: - version "0.2.2" - resolved "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz" - integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg== - dependencies: - is-arrayish "^0.3.1" - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -slash@^5.1.0: - version "5.1.0" - resolved "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz" - integrity sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg== - -slice-ansi@^5.0.0: - version "5.0.0" - dependencies: - ansi-styles "^6.0.0" - is-fullwidth-code-point "^4.0.0" - -slice-ansi@^7.1.0: - version "7.1.0" - dependencies: - ansi-styles "^6.2.1" - is-fullwidth-code-point "^5.0.0" - -source-map-js@^1.0.2, source-map-js@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz" - integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== - -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@^0.7.0: - version "0.7.4" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== - -space-separated-tokens@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz" - integrity sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q== - -speech-rule-engine@^4.0.6: - version "4.0.7" - resolved "https://registry.npmjs.org/speech-rule-engine/-/speech-rule-engine-4.0.7.tgz" - integrity sha512-sJrL3/wHzNwJRLBdf6CjJWIlxC04iYKkyXvYSVsWVOiC2DSkHmxsqOhEeMsBA9XK+CHuNcsdkbFDnoUfAsmp9g== - dependencies: - commander "9.2.0" - wicked-good-xpath "1.3.0" - xmldom-sre "0.1.31" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -stack-utils@^2.0.3: - version "2.0.6" - resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz" - integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== - dependencies: - escape-string-regexp "^2.0.0" - -streamsearch@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz" - integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== - -string-argv@~0.3.2: - version "0.3.2" - resolved "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz" - integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== - -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" - -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^5.0.1, string-width@^5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz" - integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== - dependencies: - eastasianwidth "^0.2.0" - emoji-regex "^9.2.2" - strip-ansi "^7.0.1" - -string-width@^7.0.0: - version "7.2.0" - dependencies: - emoji-regex "^10.3.0" - get-east-asian-width "^1.0.0" - strip-ansi "^7.1.0" - -stringify-entities@^4.0.0: - version "4.0.4" - resolved "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz" - integrity sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg== - dependencies: - character-entities-html4 "^2.0.0" - character-entities-legacy "^3.0.0" - -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^7.0.1, strip-ansi@^7.1.0: - version "7.1.0" - dependencies: - ansi-regex "^6.0.1" - -strip-bom-string@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz" - integrity sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g== - -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-final-newline@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz" - integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== - -strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -style-to-js@^1.0.0: - version "1.1.16" - resolved "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.16.tgz" - integrity sha512-/Q6ld50hKYPH3d/r6nr117TZkHR0w0kGGIVfpG9N6D8NymRPM9RqCUv4pRpJ62E5DqOYx2AFpbZMyCPnjQCnOw== - dependencies: - style-to-object "1.0.8" - -style-to-object@1.0.8: - version "1.0.8" - resolved "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.8.tgz" - integrity sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g== - dependencies: - inline-style-parser "0.2.4" - -styled-jsx@5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz" - integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw== - dependencies: - client-only "0.0.1" - -stylis@^4.3.6: - version "4.3.6" - resolved "https://registry.npmjs.org/stylis/-/stylis-4.3.6.tgz" - integrity sha512-yQ3rwFWRfwNUY7H5vpU0wfdkNSnvnJinhF9830Swlaxl03zsOjCfmX0ugac+3LtK0lYSgwL/KXc8oYL3mG4YFQ== - -sucrase@^3.35.0: - version "3.35.0" - resolved "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz" - integrity sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA== - dependencies: - "@jridgewell/gen-mapping" "^0.3.2" - commander "^4.0.0" - glob "^10.3.10" - lines-and-columns "^1.1.6" - mz "^2.7.0" - pirates "^4.0.1" - ts-interface-checker "^0.1.9" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -system-architecture@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/system-architecture/-/system-architecture-0.1.0.tgz" - integrity sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA== - -tabbable@^6.0.0: - version "6.2.0" - resolved "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz" - integrity sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew== - -tailwindcss@^3.4.7: - version "3.4.17" - resolved "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz" - integrity sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og== - dependencies: - "@alloc/quick-lru" "^5.2.0" - arg "^5.0.2" - chokidar "^3.6.0" - didyoumean "^1.2.2" - dlv "^1.1.3" - fast-glob "^3.3.2" - glob-parent "^6.0.2" - is-glob "^4.0.3" - jiti "^1.21.6" - lilconfig "^3.1.3" - micromatch "^4.0.8" - normalize-path "^3.0.0" - object-hash "^3.0.0" - picocolors "^1.1.1" - postcss "^8.4.47" - postcss-import "^15.1.0" - postcss-js "^4.0.1" - postcss-load-config "^4.0.2" - postcss-nested "^6.2.0" - postcss-selector-parser "^6.1.2" - resolve "^1.22.8" - sucrase "^3.35.0" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -thenify-all@^1.0.0: - version "1.6.0" - resolved "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz" - integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== - dependencies: - thenify ">= 3.1.0 < 4" - -"thenify@>= 3.1.0 < 4": - version "3.3.1" - resolved "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz" - integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== - dependencies: - any-promise "^1.0.0" - -tinyexec@^0.3.2: - version "0.3.2" - resolved "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz" - integrity sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA== - -title@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/title/-/title-4.0.1.tgz" - integrity sha512-xRnPkJx9nvE5MF6LkB5e8QJjE2FW8269wTu/LQdf7zZqBgPly0QJPf/CWAo7srj5so4yXfoLEdCFgurlpi47zg== - dependencies: - arg "^5.0.0" - chalk "^5.0.0" - clipboardy "^4.0.0" - -tmpl@1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz" - integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -trim-lines@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz" - integrity sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg== - -trough@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz" - integrity sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw== - -ts-dedent@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz" - integrity sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ== - -ts-interface-checker@^0.1.9: - version "0.1.13" - resolved "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz" - integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== - -tslib@^2.4.0, tslib@2: - version "2.8.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz" - integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== - -twoslash-protocol@0.2.12: - version "0.2.12" - resolved "https://registry.npmjs.org/twoslash-protocol/-/twoslash-protocol-0.2.12.tgz" - integrity sha512-5qZLXVYfZ9ABdjqbvPc4RWMr7PrpPaaDSeaYY55vl/w1j6H6kzsWK/urAEIXlzYlyrFmyz1UbwIt+AA0ck+wbg== - -twoslash@^0.2.12: - version "0.2.12" - resolved "https://registry.npmjs.org/twoslash/-/twoslash-0.2.12.tgz" - integrity sha512-tEHPASMqi7kqwfJbkk7hc/4EhlrKCSLcur+TcvYki3vhIfaRMXnXjaYFgXpoZRbT6GdprD4tGuVBEmTpUgLBsw== - dependencies: - "@typescript/vfs" "^1.6.0" - twoslash-protocol "0.2.12" - -type-detect@4.0.8: - version "4.0.8" - resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -typescript@*, typescript@^5.5.4: - version "5.8.2" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz" - integrity sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ== - -ufo@^1.5.4: - version "1.5.4" - resolved "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz" - integrity sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ== - -unified@^11.0.0, unified@^11.0.4, unified@^11.0.5: - version "11.0.5" - resolved "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz" - integrity sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA== - dependencies: - "@types/unist" "^3.0.0" - bail "^2.0.0" - devlop "^1.0.0" - extend "^3.0.0" - is-plain-obj "^4.0.0" - trough "^2.0.0" - vfile "^6.0.0" - -unist-util-find-after@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/unist-util-find-after/-/unist-util-find-after-5.0.0.tgz" - integrity sha512-amQa0Ep2m6hE2g72AugUItjbuM8X8cGQnFoHk0pGfrFeT9GZhzN5SW8nRsiGKK7Aif4CrACPENkA6P/Lw6fHGQ== - dependencies: - "@types/unist" "^3.0.0" - unist-util-is "^6.0.0" - -unist-util-is@^5.0.0: - version "5.2.1" - resolved "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz" - integrity sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw== - dependencies: - "@types/unist" "^2.0.0" - -unist-util-is@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz" - integrity sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw== - dependencies: - "@types/unist" "^3.0.0" - -unist-util-modify-children@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/unist-util-modify-children/-/unist-util-modify-children-4.0.0.tgz" - integrity sha512-+tdN5fGNddvsQdIzUF3Xx82CU9sMM+fA0dLgR9vOmT0oPT2jH+P1nd5lSqfCfXAw+93NhcXNY2qqvTUtE4cQkw== - dependencies: - "@types/unist" "^3.0.0" - array-iterate "^2.0.0" - -unist-util-position-from-estree@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/unist-util-position-from-estree/-/unist-util-position-from-estree-2.0.0.tgz" - integrity sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ== - dependencies: - "@types/unist" "^3.0.0" - -unist-util-position@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz" - integrity sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA== - dependencies: - "@types/unist" "^3.0.0" - -unist-util-remove-position@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-5.0.0.tgz" - integrity sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q== - dependencies: - "@types/unist" "^3.0.0" - unist-util-visit "^5.0.0" - -unist-util-remove@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/unist-util-remove/-/unist-util-remove-4.0.0.tgz" - integrity sha512-b4gokeGId57UVRX/eVKej5gXqGlc9+trkORhFJpu9raqZkZhU0zm8Doi05+HaiBsMEIJowL+2WtQ5ItjsngPXg== - dependencies: - "@types/unist" "^3.0.0" - unist-util-is "^6.0.0" - unist-util-visit-parents "^6.0.0" - -unist-util-stringify-position@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz" - integrity sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ== - dependencies: - "@types/unist" "^3.0.0" - -unist-util-visit-children@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/unist-util-visit-children/-/unist-util-visit-children-3.0.0.tgz" - integrity sha512-RgmdTfSBOg04sdPcpTSD1jzoNBjt9a80/ZCzp5cI9n1qPzLZWF9YdvWGN2zmTumP1HWhXKdUWexjy/Wy/lJ7tA== - dependencies: - "@types/unist" "^3.0.0" - -unist-util-visit-parents@^4.0.0: - version "4.1.1" - resolved "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-4.1.1.tgz" - integrity sha512-1xAFJXAKpnnJl8G7K5KgU7FY55y3GcLIXqkzUj5QF/QVP7biUm0K0O2oqVkYsdjzJKifYeWn9+o6piAK2hGSHw== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - -unist-util-visit-parents@^6.0.0: - version "6.0.1" - resolved "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz" - integrity sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw== - dependencies: - "@types/unist" "^3.0.0" - unist-util-is "^6.0.0" - -unist-util-visit@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-3.1.0.tgz" - integrity sha512-Szoh+R/Ll68QWAyQyZZpQzZQm2UPbxibDvaY8Xc9SUtYgPsDzx5AWSk++UUt2hJuow8mvwR+rG+LQLw+KsuAKA== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - unist-util-visit-parents "^4.0.0" - -unist-util-visit@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz" - integrity sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg== - dependencies: - "@types/unist" "^3.0.0" - unist-util-is "^6.0.0" - unist-util-visit-parents "^6.0.0" - -update-browserslist-db@^1.1.1: - version "1.1.3" - resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz" - integrity sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw== - dependencies: - escalade "^3.2.0" - picocolors "^1.1.1" - -util-deprecate@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -uuid@^11.1.0: - version "11.1.0" - resolved "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz" - integrity sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A== - -v8-to-istanbul@^9.0.1: - version "9.3.0" - resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz" - integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== - dependencies: - "@jridgewell/trace-mapping" "^0.3.12" - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^2.0.0" - -vfile-location@^5.0.0: - version "5.0.3" - resolved "https://registry.npmjs.org/vfile-location/-/vfile-location-5.0.3.tgz" - integrity sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg== - dependencies: - "@types/unist" "^3.0.0" - vfile "^6.0.0" - -vfile-message@^4.0.0: - version "4.0.2" - resolved "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz" - integrity sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw== - dependencies: - "@types/unist" "^3.0.0" - unist-util-stringify-position "^4.0.0" - -vfile@^6.0.0: - version "6.0.3" - resolved "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz" - integrity sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q== - dependencies: - "@types/unist" "^3.0.0" - vfile-message "^4.0.0" - -vscode-jsonrpc@8.2.0: - version "8.2.0" - resolved "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz" - integrity sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA== - -vscode-languageserver-protocol@3.17.5: - version "3.17.5" - resolved "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz" - integrity sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg== - dependencies: - vscode-jsonrpc "8.2.0" - vscode-languageserver-types "3.17.5" - -vscode-languageserver-textdocument@~1.0.11: - version "1.0.12" - resolved "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz" - integrity sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA== - -vscode-languageserver-types@3.17.5: - version "3.17.5" - resolved "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz" - integrity sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg== - -vscode-languageserver@~9.0.1: - version "9.0.1" - resolved "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz" - integrity sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g== - dependencies: - vscode-languageserver-protocol "3.17.5" - -vscode-uri@~3.0.8: - version "3.0.8" - resolved "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz" - integrity sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw== - -walker@^1.0.8: - version "1.0.8" - resolved "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz" - integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== - dependencies: - makeerror "1.0.12" - -web-namespaces@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz" - integrity sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ== - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wicked-good-xpath@1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/wicked-good-xpath/-/wicked-good-xpath-1.3.0.tgz" - integrity sha512-Gd9+TUn5nXdwj/hFsPVx5cuHHiF5Bwuc30jZ4+ronF1qHK5O7HD0sgmXWSEgwKquT3ClLoKPVbO6qGwVwLzvAw== - -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^8.1.0: - version "8.1.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz" - integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== - dependencies: - ansi-styles "^6.1.0" - string-width "^5.0.1" - strip-ansi "^7.0.1" - -wrap-ansi@^9.0.0: - version "9.0.0" - dependencies: - ansi-styles "^6.2.1" - string-width "^7.0.0" - strip-ansi "^7.1.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -write-file-atomic@^4.0.2: - version "4.0.2" - resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz" - integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - -ws@^8.18.0: - version "8.18.1" - resolved "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz" - integrity sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w== - -xmldom-sre@0.1.31: - version "0.1.31" - resolved "https://registry.npmjs.org/xmldom-sre/-/xmldom-sre-0.1.31.tgz" - integrity sha512-f9s+fUkX04BxQf+7mMWAp5zk61pciie+fFLC9hX9UVvCeJQfNHRHXpeo5MPcR0EUf57PYLdt+ZO4f3Ipk2oZUw== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yaml@^2.3.2, yaml@^2.3.4, yaml@~2.5.0: - version "2.5.1" - -yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^17.3.1: - version "17.7.2" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -yocto-queue@^1.1.1: - version "1.2.1" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz" - integrity sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg== - -zod-validation-error@^3.0.0: - version "3.4.0" - resolved "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-3.4.0.tgz" - integrity sha512-ZOPR9SVY6Pb2qqO5XHt+MkkTRxGXb4EVtnjc9JpXUOtUB1T9Ru7mZOT361AN3MsetVe7R0a1KZshJDZdgp9miQ== - -zod@^3.18.0, zod@^3.22.3: - version "3.24.2" - resolved "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz" - integrity sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ== - -zwitch@^2.0.0, zwitch@^2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz" - integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A== diff --git a/modelcontextprotocol/README.md b/modelcontextprotocol/README.md index 3c61e9fbc0ccc..761b9a7c9994d 100644 --- a/modelcontextprotocol/README.md +++ b/modelcontextprotocol/README.md @@ -1,9 +1,24 @@ # Pipedream MCP Server -This is a reference implementation of the Pipedream MCP server. You can run **your own MCP server** for [over 2,700 apps and APIs](https://pipedream.com/apps) and is powered by [Pipedream Connect](https://pipedream.com/docs/connect/). +> **โš ๏ธ Important Notice**: This MCP server is a **reference implementation only** and is no longer actively maintained. For production use, we recommend using Pipedream's **remote MCP server** instead. -> [Note] -> These docs discuss how you can host Pipedream's MCP server in your own app or run it locally. To use Pipedream's [remote MCP server](https://pipedream.com/docs/connect/mcp/developers) (most common), [refer to our docs](https://pipedream.com/docs/connect/mcp/developers) to get started. +## Recommended: Use Pipedream's Remote MCP Server + +For the best experience, use Pipedream's hosted MCP server which provides: + +- **2,800+ APIs and 10,000+ tools** through a single server +- **Built-in authentication**: no manual token management required +- **Multiple tool modes**: sub-agent and full configuration +- **Automatic app discovery** +- **Enterprise-grade reliability and security** + +**๐Ÿš€ Get started**: [Pipedream MCP Documentation](https://pipedream.com/docs/connect/mcp/developers) + +> **๐ŸŽฎ Try it now**: Check out our [open source chat app](https://github.com/PipedreamHQ/mcp) at [chat.pipedream.com](https://chat.pipedream.com/) + +--- + +## Self-Hosting (Reference Implementation) This reference implementation shows how you can: @@ -12,14 +27,14 @@ This reference implementation shows how you can: See the consumer-facing MCP server in action at [mcp.pipedream.com](https://mcp.pipedream.com) and check out a demo of the developer-facing product at [chat.pipedream.com](https://chat.pipedream.com). -We published this code as a reference, so you can better understand how to use Pipedream Connect for such -an application. This is a reference implementation specifically for self-hosting the server and may not be fully documented. Please reach out to us if you -have any questions. +We published this code as a reference, so you can better understand how to use Pipedream Connect for such an application. This is a reference implementation specifically for self-hosting the server and may not be fully documented. + +**For production use, we strongly recommend using our [remote MCP server](https://pipedream.com/docs/connect/mcp/developers) instead.** -## โญ Features +## โญ Reference Implementation Features -- Run **your own MCP server** for [over 2,700 apps and APIs](https://mcp.pipedream.com) -- Manage servers **for your users**, in your own app. +- Run **your own MCP server** for [over 2,800 apps and APIs](https://mcp.pipedream.com) +- Manage servers **for your users**, in your own app - Connect accounts, configure params, and make API requests, all via tools - Fully-managed OAuth and credential storage ([see security docs](https://pipedream.com/docs/privacy-and-security/#third-party-oauth-grants-api-keys-and-environment-variables)) @@ -54,7 +69,7 @@ There are two ways to use this MCP server. 1 - App specific `/{external_user_id}/{app}` -This is currently available at [mcp.pipedream.com](mcp.pipedream.com). You can use an endpoint for each app. +This is currently available at [mcp.pipedream.com](https://mcp.pipedream.com). You can use an endpoint for each app. All the tools available for that app will be available at that endpoint. 2 - Dynamic diff --git a/package.json b/package.json index 4f8f7b65569f5..f8c96c3c9ed33 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,11 @@ "platform-test": "cd platform && npm test", "types-test": "cd types && npm test", "helpers-test": "cd helpers && npm test", - "build:docs": "cd docs-v2 && pnpm install --ignore-engines && pnpm build" + "validate:packages": "node scripts/generate-package-report.js", + "validate:packages:verbose": "node scripts/generate-package-report.js --verbose", + "validate:packages:report": "node scripts/generate-package-report.js --report-only --output=package-validation-report.json", + "validate:packages:dry-run": "node scripts/generate-package-report.js --dry-run", + "validate:package": "node scripts/generate-package-report.js --package=" }, "devDependencies": { "@eslint/eslintrc": "^3.2.0", @@ -66,7 +70,7 @@ "ts-jest": "^29.1.1", "tsc-esm-fix": "^2.18.0", "tsc-watch": "^5.0.3", - "typescript": ">=4.7.4 <5.7.0", + "typescript": ">=5.5.0 <5.7.0", "typescript-eslint": "^8.15.0" }, "lint-staged": { diff --git a/packages/connect-react/CHANGELOG.md b/packages/connect-react/CHANGELOG.md index 92e548a94090b..5f8fc1f5775a5 100644 --- a/packages/connect-react/CHANGELOG.md +++ b/packages/connect-react/CHANGELOG.md @@ -2,6 +2,25 @@ # Changelog +## [1.5.0] - 2025-08-18 + +### Fixed + +- Added special handling to support `$.discord.channel[]` prop type + +### Added + +- Support for app sorting and filtering in `SelectApp` component and `useApps` hook +- Added `appsOptions` prop to `SelectApp` for controlling sort order and filtering +- Apps can now be sorted by `name`, `featured_weight`, or `name_slug` +- Support for filtering apps by whether they have actions, triggers, or components + +## [1.4.0] - 2025-08-01 + +### Added + +- Support for using custom OAuth clients + ## [1.3.3] - 2025-07-22 - Improved handling and sanitization of option objects in selection components. diff --git a/packages/connect-react/README.md b/packages/connect-react/README.md index 210abf58162e8..c53ef01c9c15c 100644 --- a/packages/connect-react/README.md +++ b/packages/connect-react/README.md @@ -153,9 +153,64 @@ type ComponentFormProps = { sdkResponse: unknown[] | unknown | undefined; /** Whether to show show errors in the form. Requires sdkErrors to be set. */ enableDebugging?: boolean; + /** OAuth app ID configuration for specific apps. + * Maps app name slugs to their corresponding OAuth app IDs. */ + oauthAppConfig?: Record; }; ``` +### OAuth App Configuration + +To connect to an OAuth app using your own OAuth client, you can specify custom OAuth app IDs for each app using the `oauthAppConfig` prop: + +```tsx +const oauthAppConfig = { + github: "oa_xxxxxxx", + google_sheets: "oa_xxxxxxx", + slack: "oa_xxxxxxx", +}; + +; +``` + +This allows you to use your own OAuth applications for specific integrations, providing better control over branding and permissions. Read how to configure OAuth clients in Pipedream here: [https://pipedream.com/docs/connect/managed-auth/oauth-clients](https://pipedream.com/docs/connect/managed-auth/oauth-clients). + +**Note**: OAuth app IDs are not sensitive, and are safe to expose in the client. + +### App Sorting and Filtering + +When using the `SelectApp` component or `useApps` hook, you can control how apps are sorted and filtered: + +```tsx + +``` + +The `useApps` hook accepts the same options: + +```tsx +const { apps, isLoading } = useApps({ + q: "slack", // Search query + sortKey: "featured_weight", + sortDirection: "desc", + hasActions: true, +}); +``` + ## Customization Style individual components using the `CustomizeProvider` and a `CustomizationConfig`. @@ -164,7 +219,7 @@ Style individual components using the `CustomizeProvider` and a `CustomizationCo @@ -427,7 +482,7 @@ customization options available. - `useFrontendClient` โ€” _allows use of provided Pipedream frontendClient_ - `useAccounts` โ€” _react-query wrapper to list Pipedream connect accounts (for app, external user, etc.)_ - `useApp` โ€” _react-query wrapper to retrieve a Pipedream app_ -- `useApps` โ€” _react-query wrapper to list Pipedream apps_ +- `useApps` โ€” _react-query wrapper to list Pipedream apps with support for sorting and filtering_ - `useComponent` โ€” _react-query wrapper to retrieve a Pipedream component (action or trigger)_ - `useComponents` โ€” _react-query wrapper to list Pipedream components (actions or triggers)_ diff --git a/packages/connect-react/examples/nextjs/.gitignore b/packages/connect-react/examples/nextjs/.gitignore deleted file mode 100644 index d32cc78b89fc9..0000000000000 --- a/packages/connect-react/examples/nextjs/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/versions - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# env files (can opt-in for committing if needed) -.env* - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts diff --git a/packages/connect-react/examples/nextjs/Makefile b/packages/connect-react/examples/nextjs/Makefile deleted file mode 100644 index 0759c5ac1e32d..0000000000000 --- a/packages/connect-react/examples/nextjs/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -dev: - cd .. && pnpm i && pnpm run build - npm i - node_modules/.bin/next dev diff --git a/packages/connect-react/examples/nextjs/README.md b/packages/connect-react/examples/nextjs/README.md deleted file mode 100644 index 0046df141aa0f..0000000000000 --- a/packages/connect-react/examples/nextjs/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Next.js @pipedream/connect-react example - -Bootstrapped from: - -``` -% npx create-next-app@latest -``` - -To run, `cp .env.example .env` and fill it out (see [root README.md](../../README.md)) then type `make`. diff --git a/packages/connect-react/examples/nextjs/next.config.ts b/packages/connect-react/examples/nextjs/next.config.ts deleted file mode 100644 index 8c9e445bf50a4..0000000000000 --- a/packages/connect-react/examples/nextjs/next.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { NextConfig } from "next"; - -const nextConfig: NextConfig = { /* config options here */ }; - -export default nextConfig; diff --git a/packages/connect-react/examples/nextjs/package-lock.json b/packages/connect-react/examples/nextjs/package-lock.json deleted file mode 100644 index 2107885541b8c..0000000000000 --- a/packages/connect-react/examples/nextjs/package-lock.json +++ /dev/null @@ -1,977 +0,0 @@ -{ - "name": "nextjs", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "nextjs", - "version": "0.1.0", - "dependencies": { - "@pipedream/connect-react": "file:../..", - "@pipedream/sdk": "^1.3.3", - "next": "15.0.3", - "react": "19.0.0-rc-66855b96-20241106", - "react-dom": "19.0.0-rc-66855b96-20241106" - }, - "devDependencies": { - "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", - "typescript": "^5" - } - }, - "../..": { - "name": "@pipedream/connect-react", - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "@pipedream/sdk": "workspace:^", - "@tanstack/react-query": "^5.59.16", - "lodash.isequal": "^4.5.0", - "react-markdown": "^9.0.1", - "react-select": "^5.8.2" - }, - "devDependencies": { - "@emotion/react": "^11.13.5", - "@types/lodash.isequal": "^4.5.8", - "@types/react": "^18.3.12", - "vite": "^5.4.11", - "vite-plugin-dts": "^4.3.0" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/@emnapi/runtime": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", - "integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@img/sharp-darwin-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", - "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.0.4" - } - }, - "node_modules/@img/sharp-darwin-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", - "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.0.4" - } - }, - "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", - "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-darwin-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", - "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-arm": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", - "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", - "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-s390x": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz", - "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==", - "cpu": [ - "s390x" - ], - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", - "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linuxmusl-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", - "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linuxmusl-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", - "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-linux-arm": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", - "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.0.5" - } - }, - "node_modules/@img/sharp-linux-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", - "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.0.4" - } - }, - "node_modules/@img/sharp-linux-s390x": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz", - "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==", - "cpu": [ - "s390x" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.0.4" - } - }, - "node_modules/@img/sharp-linux-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", - "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.0.4" - } - }, - "node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", - "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" - } - }, - "node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", - "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.0.4" - } - }, - "node_modules/@img/sharp-wasm32": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz", - "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==", - "cpu": [ - "wasm32" - ], - "optional": true, - "dependencies": { - "@emnapi/runtime": "^1.2.0" - }, - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-win32-ia32": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz", - "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-win32-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", - "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@next/env": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/env/-/env-15.0.3.tgz", - "integrity": "sha512-t9Xy32pjNOvVn2AS+Utt6VmyrshbpfUMhIjFO60gI58deSo/KgLOp31XZ4O+kY/Is8WAGYwA5gR7kOb1eORDBA==" - }, - "node_modules/@next/swc-darwin-arm64": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.0.3.tgz", - "integrity": "sha512-s3Q/NOorCsLYdCKvQlWU+a+GeAd3C8Rb3L1YnetsgwXzhc3UTWrtQpB/3eCjFOdGUj5QmXfRak12uocd1ZiiQw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-x64": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.0.3.tgz", - "integrity": "sha512-Zxl/TwyXVZPCFSf0u2BNj5sE0F2uR6iSKxWpq4Wlk/Sv9Ob6YCKByQTkV2y6BCic+fkabp9190hyrDdPA/dNrw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.0.3.tgz", - "integrity": "sha512-T5+gg2EwpsY3OoaLxUIofmMb7ohAUlcNZW0fPQ6YAutaWJaxt1Z1h+8zdl4FRIOr5ABAAhXtBcpkZNwUcKI2fw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.0.3.tgz", - "integrity": "sha512-WkAk6R60mwDjH4lG/JBpb2xHl2/0Vj0ZRu1TIzWuOYfQ9tt9NFsIinI1Epma77JVgy81F32X/AeD+B2cBu/YQA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.0.3.tgz", - "integrity": "sha512-gWL/Cta1aPVqIGgDb6nxkqy06DkwJ9gAnKORdHWX1QBbSZZB+biFYPFti8aKIQL7otCE1pjyPaXpFzGeG2OS2w==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.0.3.tgz", - "integrity": "sha512-QQEMwFd8r7C0GxQS62Zcdy6GKx999I/rTO2ubdXEe+MlZk9ZiinsrjwoiBL5/57tfyjikgh6GOU2WRQVUej3UA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.0.3.tgz", - "integrity": "sha512-9TEp47AAd/ms9fPNgtgnT7F3M1Hf7koIYYWCMQ9neOwjbVWJsHZxrFbI3iEDJ8rf1TDGpmHbKxXf2IFpAvheIQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.0.3.tgz", - "integrity": "sha512-VNAz+HN4OGgvZs6MOoVfnn41kBzT+M+tB+OK4cww6DNyWS6wKaDpaAm/qLeOUbnMh0oVx1+mg0uoYARF69dJyA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@pipedream/connect-react": { - "resolved": "../..", - "link": true - }, - "node_modules/@pipedream/sdk": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@pipedream/sdk/-/sdk-1.3.3.tgz", - "integrity": "sha512-sh0dZWdQlh7IprVs1Ka04+jMmpwTKf5SlyvaAJFmSbcvJ7So1fj/YLuU3BMXU91ehA1R6DGb66Yr+QzBsANcSA==", - "license": "SEE LICENSE IN LICENSE", - "dependencies": { - "@rails/actioncable": "^8.0.0", - "commander": "^12.1.0", - "oauth4webapi": "^3.1.4", - "ws": "^8.18.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@rails/actioncable": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@rails/actioncable/-/actioncable-8.0.0.tgz", - "integrity": "sha512-9IXyJeaBggOzlD3pF4/yWELdyUWZm/KTyKBRqxNf9laLBXPqxJt3t6fO+X4s0WajMR8cIhzkxvq1gxsXVbn3LA==" - }, - "node_modules/@swc/counter": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", - "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==" - }, - "node_modules/@swc/helpers": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.13.tgz", - "integrity": "sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@types/node": { - "version": "20.17.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.6.tgz", - "integrity": "sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==", - "dev": true, - "dependencies": { - "undici-types": "~6.19.2" - } - }, - "node_modules/@types/prop-types": { - "version": "15.7.13", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", - "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==", - "dev": true - }, - "node_modules/@types/react": { - "version": "18.3.12", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz", - "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==", - "dev": true, - "dependencies": { - "@types/prop-types": "*", - "csstype": "^3.0.2" - } - }, - "node_modules/@types/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==", - "dev": true, - "dependencies": { - "@types/react": "*" - } - }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001683", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001683.tgz", - "integrity": "sha512-iqmNnThZ0n70mNwvxpEC2nBJ037ZHZUoBI5Gorh1Mw6IlEAZujEoU1tXA628iZfzm7R9FvFzxbfdgml82a3k8Q==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/client-only": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", - "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" - }, - "node_modules/color": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", - "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", - "optional": true, - "dependencies": { - "color-convert": "^2.0.1", - "color-string": "^1.9.0" - }, - "engines": { - "node": ">=12.5.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "optional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "optional": true - }, - "node_modules/color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "optional": true, - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", - "engines": { - "node": ">=18" - } - }, - "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true - }, - "node_modules/detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "optional": true - }, - "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/next": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/next/-/next-15.0.3.tgz", - "integrity": "sha512-ontCbCRKJUIoivAdGB34yCaOcPgYXr9AAkV/IwqFfWWTXEPUgLYkSkqBhIk9KK7gGmgjc64B+RdoeIDM13Irnw==", - "dependencies": { - "@next/env": "15.0.3", - "@swc/counter": "0.1.3", - "@swc/helpers": "0.5.13", - "busboy": "1.6.0", - "caniuse-lite": "^1.0.30001579", - "postcss": "8.4.31", - "styled-jsx": "5.1.6" - }, - "bin": { - "next": "dist/bin/next" - }, - "engines": { - "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" - }, - "optionalDependencies": { - "@next/swc-darwin-arm64": "15.0.3", - "@next/swc-darwin-x64": "15.0.3", - "@next/swc-linux-arm64-gnu": "15.0.3", - "@next/swc-linux-arm64-musl": "15.0.3", - "@next/swc-linux-x64-gnu": "15.0.3", - "@next/swc-linux-x64-musl": "15.0.3", - "@next/swc-win32-arm64-msvc": "15.0.3", - "@next/swc-win32-x64-msvc": "15.0.3", - "sharp": "^0.33.5" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.1.0", - "@playwright/test": "^1.41.2", - "babel-plugin-react-compiler": "*", - "react": "^18.2.0 || 19.0.0-rc-66855b96-20241106", - "react-dom": "^18.2.0 || 19.0.0-rc-66855b96-20241106", - "sass": "^1.3.0" - }, - "peerDependenciesMeta": { - "@opentelemetry/api": { - "optional": true - }, - "@playwright/test": { - "optional": true - }, - "babel-plugin-react-compiler": { - "optional": true - }, - "sass": { - "optional": true - } - } - }, - "node_modules/oauth4webapi": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.1.4.tgz", - "integrity": "sha512-eVfN3nZNbok2s/ROifO0UAc5G8nRoLSbrcKJ09OqmucgnhXEfdIQOR4gq1eJH1rN3gV7rNw62bDEgftsgFtBEg==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/panva" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" - }, - "node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/react": { - "version": "19.0.0-rc-66855b96-20241106", - "resolved": "https://registry.npmjs.org/react/-/react-19.0.0-rc-66855b96-20241106.tgz", - "integrity": "sha512-klH7xkT71SxRCx4hb1hly5FJB21Hz0ACyxbXYAECEqssUjtJeFUAaI2U1DgJAzkGEnvEm3DkxuBchMC/9K4ipg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "19.0.0-rc-66855b96-20241106", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0-rc-66855b96-20241106.tgz", - "integrity": "sha512-D25vdaytZ1wFIRiwNU98NPQ/upS2P8Co4/oNoa02PzHbh8deWdepjm5qwZM/46OdSiGv4WSWwxP55RO9obqJEQ==", - "dependencies": { - "scheduler": "0.25.0-rc-66855b96-20241106" - }, - "peerDependencies": { - "react": "19.0.0-rc-66855b96-20241106" - } - }, - "node_modules/scheduler": { - "version": "0.25.0-rc-66855b96-20241106", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0-rc-66855b96-20241106.tgz", - "integrity": "sha512-HQXp/Mnp/MMRSXMQF7urNFla+gmtXW/Gr1KliuR0iboTit4KvZRY8KYaq5ccCTAOJiUqQh2rE2F3wgUekmgdlA==" - }, - "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "optional": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/sharp": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", - "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "color": "^4.2.3", - "detect-libc": "^2.0.3", - "semver": "^7.6.3" - }, - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-darwin-arm64": "0.33.5", - "@img/sharp-darwin-x64": "0.33.5", - "@img/sharp-libvips-darwin-arm64": "1.0.4", - "@img/sharp-libvips-darwin-x64": "1.0.4", - "@img/sharp-libvips-linux-arm": "1.0.5", - "@img/sharp-libvips-linux-arm64": "1.0.4", - "@img/sharp-libvips-linux-s390x": "1.0.4", - "@img/sharp-libvips-linux-x64": "1.0.4", - "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", - "@img/sharp-libvips-linuxmusl-x64": "1.0.4", - "@img/sharp-linux-arm": "0.33.5", - "@img/sharp-linux-arm64": "0.33.5", - "@img/sharp-linux-s390x": "0.33.5", - "@img/sharp-linux-x64": "0.33.5", - "@img/sharp-linuxmusl-arm64": "0.33.5", - "@img/sharp-linuxmusl-x64": "0.33.5", - "@img/sharp-wasm32": "0.33.5", - "@img/sharp-win32-ia32": "0.33.5", - "@img/sharp-win32-x64": "0.33.5" - } - }, - "node_modules/simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "optional": true, - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/styled-jsx": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.6.tgz", - "integrity": "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==", - "dependencies": { - "client-only": "0.0.1" - }, - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" - }, - "node_modules/typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "dev": true - }, - "node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - } - } -} diff --git a/packages/connect-react/examples/nextjs/package.json b/packages/connect-react/examples/nextjs/package.json deleted file mode 100644 index 2521af8a12d4d..0000000000000 --- a/packages/connect-react/examples/nextjs/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "nextjs", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "make dev" - }, - "dependencies": { - "@pipedream/connect-react": "file:../..", - "@pipedream/sdk": "^1.3.3", - "next": "15.0.3", - "react": "19.0.0-rc-66855b96-20241106", - "react-dom": "19.0.0-rc-66855b96-20241106" - }, - "devDependencies": { - "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", - "typescript": "^5" - } -} diff --git a/packages/connect-react/examples/nextjs/src/app/actions.ts b/packages/connect-react/examples/nextjs/src/app/actions.ts deleted file mode 100644 index 1a7d4e0fd995e..0000000000000 --- a/packages/connect-react/examples/nextjs/src/app/actions.ts +++ /dev/null @@ -1,60 +0,0 @@ -"use server"; - -import { - createBackendClient, - type ProjectEnvironment, -} from "@pipedream/sdk/server"; - -const { - NODE_ENV, - PIPEDREAM_ALLOWED_ORIGINS, - PIPEDREAM_CLIENT_ID, - PIPEDREAM_CLIENT_SECRET, - PIPEDREAM_PROJECT_ID, -} = process.env; - -if (!NODE_ENV) { - throw new Error("NODE_ENV is required"); -} - -if (!PIPEDREAM_ALLOWED_ORIGINS) { - throw new Error("PIPEDREAM_ALLOWED_ORIGINS is required"); -} - -let allowedOrigins: string[] = []; -try { - allowedOrigins = JSON.parse(PIPEDREAM_ALLOWED_ORIGINS); -} catch { - throw new Error("PIPEDREAM_ALLOWED_ORIGINS must be a valid JSON array"); -} -if (!Array.isArray(allowedOrigins)) { - throw new Error("PIPEDREAM_ALLOWED_ORIGINS must be a JSON array"); -} - -if (!PIPEDREAM_CLIENT_ID) { - throw new Error("PIPEDREAM_CLIENT_ID is required"); -} - -if (!PIPEDREAM_CLIENT_SECRET) { - throw new Error("PIPEDREAM_CLIENT_SECRET is required"); -} - -if (!PIPEDREAM_PROJECT_ID) { - throw new Error("PIPEDREAM_PROJECT_ID is required"); -} - -const client = createBackendClient({ - environment: NODE_ENV as ProjectEnvironment, - projectId: PIPEDREAM_PROJECT_ID, - credentials: { - clientId: PIPEDREAM_CLIENT_ID, - clientSecret: PIPEDREAM_CLIENT_SECRET, - }, -}); - -export async function fetchToken(opts: { externalUserId: string; }) { - return await client.createConnectToken({ - external_user_id: opts.externalUserId, - allowed_origins: allowedOrigins, - }); -} diff --git a/packages/connect-react/examples/nextjs/src/app/favicon.ico b/packages/connect-react/examples/nextjs/src/app/favicon.ico deleted file mode 100644 index 718d6fea4835e..0000000000000 Binary files a/packages/connect-react/examples/nextjs/src/app/favicon.ico and /dev/null differ diff --git a/packages/connect-react/examples/nextjs/src/app/layout.tsx b/packages/connect-react/examples/nextjs/src/app/layout.tsx deleted file mode 100644 index 1c306fdda7da6..0000000000000 --- a/packages/connect-react/examples/nextjs/src/app/layout.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import type React from "react" - -export default function RootLayout({ children }: Readonly<{ - children: React.ReactNode; -}>) { - return ( - - - {children} - - - ); -} diff --git a/packages/connect-react/examples/nextjs/src/app/page.tsx b/packages/connect-react/examples/nextjs/src/app/page.tsx deleted file mode 100644 index 2d51d322f4d9b..0000000000000 --- a/packages/connect-react/examples/nextjs/src/app/page.tsx +++ /dev/null @@ -1,66 +0,0 @@ -"use client"; - -import { useState } from "react"; -import { createFrontendClient } from "@pipedream/sdk/browser"; -import { - ComponentFormContainer, FrontendClientProvider, -} from "@pipedream/connect-react"; -import { fetchToken } from "./actions"; - -export default function Home() { - const userId = "my-authed-user-id"; - const client = createFrontendClient({ - externalUserId: userId, - tokenCallback: fetchToken, - }); - const [ - configuredProps, - setConfiguredProps, - ] = useState({ - text: "hello slack!", - }); - - const [ - dynamicPropsId, - setDynamicPropsId, - ] = useState(); - - const [ - sdkResponse, - setSdkResponse, - ] = useState(undefined); - - const handleDynamicProps = (dynamicProps: { id: string | undefined }) => { - setDynamicPropsId(dynamicProps.id) - } - - return ( - <> -
My application
- - { - try { - const response = await client.runAction({ - userId, - actionId: "slack-send-message", - configuredProps, - dynamicPropsId, - }); - setSdkResponse(response) - } catch (error) { - console.error("Action run failed:", error); - } - }} - /> - - - ); -} diff --git a/packages/connect-react/examples/nextjs/tsconfig.json b/packages/connect-react/examples/nextjs/tsconfig.json deleted file mode 100644 index c1334095f876a..0000000000000 --- a/packages/connect-react/examples/nextjs/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2017", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./src/*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] -} diff --git a/packages/connect-react/package.json b/packages/connect-react/package.json index 4ac07da3c0a25..2325c08092601 100644 --- a/packages/connect-react/package.json +++ b/packages/connect-react/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/connect-react", - "version": "1.3.3", + "version": "1.6.0", "description": "Pipedream Connect library for React", "files": [ "dist" @@ -18,6 +18,8 @@ }, "scripts": { "build": "vite build", + "lint": "eslint src", + "lint:fix": "eslint src --fix", "prepare": "pnpm run build", "watch": "NODE_ENV=development vite build --watch --mode development" }, @@ -28,7 +30,7 @@ "author": "Pipedream Engineering", "license": "MIT", "dependencies": { - "@pipedream/sdk": "workspace:^", + "@pipedream/sdk": "^1.8.0", "@tanstack/react-query": "^5.59.16", "lodash.isequal": "^4.5.0", "react-markdown": "^9.0.1", diff --git a/packages/connect-react/src/components/ComponentForm.tsx b/packages/connect-react/src/components/ComponentForm.tsx index 2ebe0b2dbaabf..36787255b77fb 100644 --- a/packages/connect-react/src/components/ComponentForm.tsx +++ b/packages/connect-react/src/components/ComponentForm.tsx @@ -1,7 +1,7 @@ import { - DynamicProps, FormContextProvider, type FormContext, } from "../hooks/form-context"; +import { DynamicProps } from "../types"; import type { ConfigurableProps, ConfiguredProps, @@ -25,14 +25,20 @@ export type ComponentFormProps onSubmit?: (ctx: FormContext) => void | Promise; // if passed, we include button onUpdateConfiguredProps?: (v: U) => void; // XXX onChange? - onUpdateDynamicProps?: (dp: DynamicProps) => void; + onUpdateDynamicProps?: (dp: DynamicProps) => void; hideOptionalProps?: boolean; - sdkResponse?: unknown | undefined; + sdkResponse?: U; enableDebugging?: boolean; + /** + * OAuth app ID configuration for specific apps. + * Maps app name slugs to their corresponding OAuth app IDs. + * Example: { 'github': 'oa_xxxxxxx', 'google_sheets': 'oa_xxxxxxx' } + */ + oauthAppConfig?: Record; } & ( - | { externalUserId: string; userId?: never } - | { userId: string; externalUserId?: never } -); + | { externalUserId: string; userId?: never } + | { userId: string; externalUserId?: never } + ); export function ComponentForm(props: ComponentFormProps) { return ( diff --git a/packages/connect-react/src/components/ComponentFormContainer.tsx b/packages/connect-react/src/components/ComponentFormContainer.tsx index d6e3dc51906c1..9fe02dfc61c81 100644 --- a/packages/connect-react/src/components/ComponentFormContainer.tsx +++ b/packages/connect-react/src/components/ComponentFormContainer.tsx @@ -9,7 +9,11 @@ import { // load a component and pass it down type ComponentFormContainerProps = Omit, "component"> & { componentKey: string; -}; +} & ( + // Either externalUserId or userId must be provided + | { externalUserId: string; userId?: never } + | { userId: string; externalUserId?: never } + ); export function ComponentFormContainer(props: ComponentFormContainerProps) { const { diff --git a/packages/connect-react/src/components/Control.tsx b/packages/connect-react/src/components/Control.tsx index ac18a8754662c..b7c2c661f612e 100644 --- a/packages/connect-react/src/components/Control.tsx +++ b/packages/connect-react/src/components/Control.tsx @@ -13,6 +13,8 @@ import { ControlObject } from "./ControlObject"; import { ControlSelect } from "./ControlSelect"; import { ControlSql } from "./ControlSql"; import { RemoteOptionsContainer } from "./RemoteOptionsContainer"; +import { sanitizeOption } from "../utils/type-guards"; +import { LabelValueOption } from "../types"; export type ControlProps = { field: FormFieldContext; @@ -32,22 +34,16 @@ export function Control const app = "app" in field.extra ? field.extra.app : undefined; - - if (prop.remoteOptions || prop.type === "$.discord.channel") { + if (prop.remoteOptions || prop.type === "$.discord.channel" || prop.type === "$.discord.channel[]") { return = idx} />; } if ("options" in prop && prop.options) { - let options = prop.options; - if (typeof options[0] !== "object") { - options = options.map((o: unknown) => ({ - label: o, - value: o, - })); - } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const options: LabelValueOption[] = prop.options.map(sanitizeOption); return null, - }} />; // TODO fix typing issue here! + }} />; } // TODO just look at registry component repo and look for what we should make sure we support diff --git a/packages/connect-react/src/components/ControlApp.tsx b/packages/connect-react/src/components/ControlApp.tsx index 0535ce881c00e..2b4a22d4d2b9a 100644 --- a/packages/connect-react/src/components/ControlApp.tsx +++ b/packages/connect-react/src/components/ControlApp.tsx @@ -9,10 +9,12 @@ import { useMemo } from "react"; import type { CSSProperties } from "react"; import type { OptionProps } from "react-select"; import type { - AppResponse, ConfigurablePropApp, + Account, + App, + ConfigurablePropApp, } from "@pipedream/sdk"; -const BaseOption = (props: OptionProps) => { +const BaseOption = (props: OptionProps) => { // const imgSrc = // props.data.img_src ?? `https://pipedream.com/s.v0/${props.data.id}/logo/48` return ( @@ -23,13 +25,21 @@ const BaseOption = (props: OptionProps) => { ); }; +type AccountPlaceholder = { + id: "_new"; + name: string; +} +type SelectValue = Account | AccountPlaceholder; + type ControlAppProps = { - app: AppResponse; + app: App; }; export function ControlApp({ app }: ControlAppProps) { const client = useFrontendClient(); - const { externalUserId } = useFormContext(); + const { + externalUserId, oauthAppConfig, + } = useFormContext(); const formFieldCtx = useFormFieldContext(); const { id, prop, value, onChange, @@ -53,7 +63,7 @@ export function ControlApp({ app }: ControlAppProps) { gridArea: "control", }; - const baseSelectProps: BaseReactSelectProps = { + const baseSelectProps: BaseReactSelectProps = { components: { Option: BaseOption, }, @@ -65,9 +75,9 @@ export function ControlApp({ app }: ControlAppProps) { }), }, }; - const selectProps = select.getProps("controlAppSelect", baseSelectProps); + const selectProps = select.getProps("controlAppSelect", baseSelectProps); - const oauthAppId = undefined; // XXX allow customizing + const oauthAppId = oauthAppConfig?.[app.name_slug]; const { isLoading: isLoadingAccounts, // TODO error @@ -75,13 +85,15 @@ export function ControlApp({ app }: ControlAppProps) { refetch: refetchAccounts, } = useAccounts( { - externalUserId, + external_user_id: externalUserId, app: app.name_slug, oauth_app_id: oauthAppId, }, { useQueryOpts: { enabled: !!app, + + // @ts-expect-error this seems to work (this overrides enabled so don't just set to true) suspense: !!app, }, }, @@ -103,17 +115,28 @@ export function ControlApp({ app }: ControlAppProps) { }); }; - const selectValue = useMemo(() => { - let ret = value; - if (ret != null) { + const newAccountPlaceholder: AccountPlaceholder = { + id: "_new", + name: `Connect new ${app.name} account...`, + }; + + const selectOptions = useMemo(() => [ + ...accounts, + newAccountPlaceholder, + ], [ + accounts, + ]); + + const selectValue = useMemo(() => { + if (value?.authProvisionId) { for (const item of accounts) { - if (ret.authProvisionId === item.id) { - ret = item; - break; + if (value.authProvisionId === item.id) { + return item; } } } - return ret; + + return newAccountPlaceholder; }, [ accounts, value, @@ -131,13 +154,7 @@ export function ControlApp({ app }: ControlAppProps) { ; + return , + ) + } + disabled={!!propsNeedConfiguring.length || submitting} + />; } diff --git a/packages/connect-react/src/components/Errors.tsx b/packages/connect-react/src/components/Errors.tsx index 0ebf460ffa3af..97661660e0ae1 100644 --- a/packages/connect-react/src/components/Errors.tsx +++ b/packages/connect-react/src/components/Errors.tsx @@ -13,7 +13,9 @@ export type ErrorsProps export function Errors(props: ErrorsProps) { const { field } = props; const { - errors = {}, prop = {}, enableDebugging, + enableDebugging, + errors = {}, + prop = {} as ConfigurableProp, } = field if (!enableDebugging) { @@ -32,6 +34,7 @@ export function Errors( type: "alert", alertType: "error", content: e, + name: prop.name, } }) diff --git a/packages/connect-react/src/components/Field.tsx b/packages/connect-react/src/components/Field.tsx index 284055797c86f..240e7404fd827 100644 --- a/packages/connect-react/src/components/Field.tsx +++ b/packages/connect-react/src/components/Field.tsx @@ -6,7 +6,7 @@ import { useCustomize } from "../hooks/customization-context"; import type { CSSProperties } from "react"; export type FieldProps = { - form: FormContext; + form: FormContext; field: FormFieldContext; }; @@ -59,7 +59,7 @@ export function Field(props: FieldProps) { // XXX use similar pattern as app below for boolean and checkboxing DOM re-ordering? return ( -
+
)}>