diff --git a/.github/workflows/docs-pr-app.yml b/.github/workflows/docs-pr-app.yml new file mode 100644 index 0000000000..69ef9a9306 --- /dev/null +++ b/.github/workflows/docs-pr-app.yml @@ -0,0 +1,222 @@ +name: Render PR deploy +on: + pull_request_target: + types: [labeled, unlabeled, closed] +env: + PR_NUMBER: ${{ github.event.number }} + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + +permissions: + pull-requests: write + issues: write + +jobs: + create-review-docs-app: + if: ${{ github.event.action == 'labeled' && github.event.label.name == 'create-review-docs-app' }} + runs-on: ubuntu-latest + + steps: + - name: Create deployment + id: create-deployment + run: | + export RESPONSE=$(curl --request POST \ + --url https://api.render.com/v1/services \ + --header 'accept: application/json' \ + --header 'content-type: application/json' \ + --header 'Authorization: Bearer ${{ secrets.RENDER_API_KEY }}' \ + --data ' + { + "type": "static_site", + "autoDeploy": "yes", + "branch": "${{ env.BRANCH_NAME }}", + "name": "ToolJet PR #${{ env.PR_NUMBER }}", + "ownerId": "tea-caeo4bj19n072h3dddc0", + "repo": "${{ github.event.pull_request.head.repo.git_url }}", + "rootDir": "docs", + "envVars": [ + { + "key": "NODE_ENV", + "value": "production" + }, + { + "key": "NODE_VERSION", + "value": "16.18.1" + }, + { + "key": "NPM_VERSION", + "value": "8.19.2" + }, + { + "key": "GA_MID", + "value": "dummy" + } + ], + "serviceDetails": { + "pullRequestPreviewsEnabled": "no", + "buildCommand": "npm i && npm run build", + "publishPath": "build/", + "url": "https://tooljet-pr-${{ env.PR_NUMBER }}.onrender.com" + } + }') + + echo "response: $RESPONSE" + export SERVICE_ID=$(echo $RESPONSE | jq -r '.service.id') + echo "SERVICE_ID=$SERVICE_ID" >> $GITHUB_ENV + + - name: Comment deployment URL + uses: actions/github-script@v5 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Deployment: https://tooljet-pr-${{ env.PR_NUMBER }}.onrender.com \n Dashboard: https://dashboard.render.com/static/${{ env.SERVICE_ID }}' + }) + + - uses: actions/github-script@v6 + with: + script: | + try { + await github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: 'create-review-docs-app' + }) + } catch (e) { + console.log(e) + } + + await github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['active-review-docs-app'] + }) + + destroy-review-docs-app: + if: ${{ (github.event.action == 'labeled' && github.event.label.name == 'destroy-review-docs-app') || github.event.action == 'closed' }} + runs-on: ubuntu-latest + + steps: + - name: Delete service + run: | + export SERVICE_ID=$(curl --request GET \ + --url 'https://api.render.com/v1/services?name=ToolJet%20PR%20%23${{ env.PR_NUMBER }}&limit=1' \ + --header 'accept: application/json' \ + --header 'authorization: Bearer ${{ secrets.RENDER_API_KEY }}' | \ + jq -r '.[0].service.id') + + curl --request DELETE \ + --url https://api.render.com/v1/services/$SERVICE_ID \ + --header 'accept: application/json' \ + --header 'authorization: Bearer ${{ secrets.RENDER_API_KEY }}' + + - uses: actions/github-script@v6 + with: + script: | + try { + await github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: 'destroy-review-docs-app' + }) + } catch (e) { + console.log(e) + } + + try { + await github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: 'suspend-review-docs-app' + }) + } catch (e) { + console.log(e) + } + + try { + await github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: 'active-review-docs-app' + }) + } catch (e) { + console.log(e) + } + + suspend-review-docs-app: + if: ${{ github.event.action == 'labeled' && github.event.label.name == 'suspend-review-docs-app' }} + runs-on: ubuntu-latest + + steps: + - name: Suspend service + run: | + export SERVICE_ID=$(curl --request GET \ + --url 'https://api.render.com/v1/services?name=ToolJet%20PR%20%23${{ env.PR_NUMBER }}&limit=1' \ + --header 'accept: application/json' \ + --header 'authorization: Bearer ${{ secrets.RENDER_API_KEY }}' | \ + jq -r '.[0].service.id') + + curl --request POST \ + --url https://api.render.com/v1/services/$SERVICE_ID/suspend \ + --header 'accept: application/json' \ + --header 'authorization: Bearer ${{ secrets.RENDER_API_KEY }}' + + - uses: actions/github-script@v6 + with: + script: | + try { + await github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: 'active-review-docs-app' + }) + } catch (e) { + console.log(e) + } + + resume-review-docs-app: + if: ${{ github.event.action == 'unlabeled' && github.event.label.name == 'suspend-review-docs-app' }} + runs-on: ubuntu-latest + + steps: + - name: Resume service + run: | + export SERVICE_ID=$(curl --request GET \ + --url 'https://api.render.com/v1/services?name=ToolJet%20PR%20%23${{ env.PR_NUMBER }}&limit=1' \ + --header 'accept: application/json' \ + --header 'authorization: Bearer ${{ secrets.RENDER_API_KEY }}' | \ + jq -r '.[0].service.id') + + curl --request POST \ + --url https://api.render.com/v1/services/$SERVICE_ID/resume \ + --header 'accept: application/json' \ + --header 'authorization: Bearer ${{ secrets.RENDER_API_KEY }}' + + - uses: actions/github-script@v6 + with: + script: | + await github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['active-review-docs-app'] + }) + + try { + await github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: 'suspend-review-docs-app' + }) + } catch (e) { + console.log(e) + } diff --git a/.github/workflows/stale-docs-pr-render-deploys.yml b/.github/workflows/stale-docs-pr-render-deploys.yml new file mode 100644 index 0000000000..a8cb4f2a7b --- /dev/null +++ b/.github/workflows/stale-docs-pr-render-deploys.yml @@ -0,0 +1,45 @@ +name: Label for stale Docs PR render deploys +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * *" + +permissions: + issues: write + +jobs: + label-stale-deploys: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: akshaysasidrn/stale-label-fetch@v1.1 + id: stale-label + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + stale-label: "active-review-docs-app" + stale-time: "86400" + type: "pull_request" + - name: Get stale numbers + run: echo "Matched PR numbers - ${{ steps.stale-label.outputs.stale-numbers }}" + - name: Add suspend label + uses: actions/github-script@v6 + env: + STALE_NUMBERS: ${{ steps.stale-label.outputs.stale-numbers }} + with: + github-token: ${{ secrets.TJ_BOT_PAT }} + script: | + if (!process.env.STALE_NUMBERS) return + + const prNumbers = process.env.STALE_NUMBERS.split(",") + + console.log(`Adding suspend labels for: ${prNumbers}`) + + for (const prNumber of prNumbers) { + github.rest.issues.addLabels({ + issue_number: prNumber, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['suspend-review-docs-app'] + }) + } diff --git a/.version b/.version index 83ecbf1d7a..db65e2167e 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.20.2 +2.21.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 786388589d..d5e9f4f00f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,10 +17,9 @@ We use GitHub to host code, to track issues and feature requests, as well as acc ## First-time contributors We've tagged some issues to make it easy to get started :smile: -[Good first issues](https://github.com/ToolJet/ToolJet/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) -Looking for ReactJS issues? Check out our [Frontend issues](https://github.com/ToolJet/ToolJet/issues?q=is%3Aissue+is%3Aopen+label%3Afrontend) +[Good first issues](https://github.com/ToolJet/ToolJet/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) -Add a comment on the issue and wait for the issue to be assigned before you start working on it. This helps to avoid multiple people working on similar issues. +If you're interested in working on an issue, make sure it has either a `good-first-issue` or `up-for-grabs` label added. Add a comment on the issue and wait for the issue to be assigned before you start working on it. This helps to avoid multiple people working on similar issues. ## We Use [GitHub Flow](https://docs.github.com/en/get-started/quickstart/github-flow), So All Code Changes Happen Through Pull Requests Pull requests are the best way to propose changes to the codebase (we use [Git-Flow](https://nvie.com/posts/a-successful-git-branching-model/)). We actively welcome your pull requests: diff --git a/cypress-tests/cypress/commands/commands.js b/cypress-tests/cypress/commands/commands.js index 53ca1b7375..016af0bf06 100644 --- a/cypress-tests/cypress/commands/commands.js +++ b/cypress-tests/cypress/commands/commands.js @@ -56,6 +56,8 @@ Cypress.Commands.add("createApp", (appName) => { cy.get("body").then(($title) => { cy.get(getAppButtonSelector($title)).click(); + cy.clearAndType('[data-cy="app-name-input"]', appName); + cy.get('[data-cy="+ Create app"]').click(); }); cy.waitForAppLoad(); cy.skipEditorPopover(); diff --git a/cypress-tests/cypress/constants/texts/dashboard.js b/cypress-tests/cypress/constants/texts/dashboard.js index 47131ff553..3e8f1ab913 100644 --- a/cypress-tests/cypress/constants/texts/dashboard.js +++ b/cypress-tests/cypress/constants/texts/dashboard.js @@ -37,7 +37,7 @@ export const dashboardText = { }, seeAllAppsTemplateButton: "See all templates", addToFolderTitle: "Add to folder", - appClonedToast: "App cloned successfully.", + appClonedToast: "App cloned successfully!", darkModeText: "Dark Mode", lightModeText: "Light Mode", dashboardAppsHeaderLabel: " All apps", diff --git a/cypress-tests/cypress/e2e/editor/app-version/version.cy.js b/cypress-tests/cypress/e2e/editor/app-version/version.cy.js index a890da5760..b3ade9630e 100644 --- a/cypress-tests/cypress/e2e/editor/app-version/version.cy.js +++ b/cypress-tests/cypress/e2e/editor/app-version/version.cy.js @@ -42,9 +42,8 @@ describe("App Version Functionality", () => { }); it("Verify the elements of the version module", () => { - cy.createApp(); + cy.createApp(data.appName); cy.get(appVersionSelectors.appVersionLabel).should("be.visible"); - cy.renameApp(data.appName); cy.get(commonSelectors.appNameInput).verifyVisibleElement( "have.value", data.appName diff --git a/cypress-tests/cypress/e2e/workspace/dashboard.cy.js b/cypress-tests/cypress/e2e/workspace/dashboard.cy.js index 3a9274b1a7..e7d5c84ffb 100644 --- a/cypress-tests/cypress/e2e/workspace/dashboard.cy.js +++ b/cypress-tests/cypress/e2e/workspace/dashboard.cy.js @@ -168,12 +168,10 @@ describe("dashboard", () => { it("Should verify app card elements and app card operations", () => { cy.apiLogin(); - cy.apiCreateApp(); + cy.apiCreateApp(data.appName); cy.openApp(); - cy.renameApp(data.appName); cy.dragAndDropWidget("Table", 250, 250); - cy.get(commonSelectors.editorPageLogo).click(); cy.wait(500); @@ -192,7 +190,6 @@ describe("dashboard", () => { expect($el.contents().last().text().trim()).to.eq("The Developer"); }); }); - cy.reloadAppForTheElement(data.appName); viewAppCardOptions(data.appName); cy.get( @@ -213,7 +210,6 @@ describe("dashboard", () => { modifyAndVerifyAppCardIcon(data.appName); createFolder(data.folderName); - cy.reloadAppForTheElement(data.appName); viewAppCardOptions(data.appName); cy.get( @@ -246,7 +242,7 @@ describe("dashboard", () => { cy.get(commonSelectors.appCard(data.appName)) .contains(data.appName) .should("be.visible"); - cy.reloadAppForTheElement(data.appName); + viewAppCardOptions(data.appName); cy.get(commonSelectors.appCardOptions(commonText.removeFromFolderOption)) @@ -256,7 +252,6 @@ describe("dashboard", () => { cancelModal(commonText.cancelButton); - cy.reloadAppForTheElement(data.appName); viewAppCardOptions(data.appName); cy.get( commonSelectors.appCardOptions(commonText.removeFromFolderOption) @@ -276,17 +271,13 @@ describe("dashboard", () => { deleteFolder(data.folderName); cy.get(commonSelectors.allApplicationsLink).click(); - cy.reloadAppForTheElement(data.appName); viewAppCardOptions(data.appName); cy.get(commonSelectors.appCardOptions(commonText.cloneAppOption)).click(); - cy.verifyToastMessage( - commonSelectors.toastMessage, - dashboardText.appClonedToast - ); - // cy.waitForAppLoad(); - cy.wait(2000); - cy.clearAndType(commonSelectors.appNameInput, data.cloneAppName); + cy.get('[data-cy="Clone app"]').click(); + cy.get('.go3958317564').should('be.visible').and('have.text', dashboardText.appClonedToast) + cy.wait(3000); + cy.renameApp(data.cloneAppName); cy.dragAndDropWidget("button", 25, 25); cy.get(commonSelectors.editorPageLogo).click(); cy.wait("@appLibrary"); @@ -341,12 +332,11 @@ describe("dashboard", () => { it("Should verify the app CRUD operation", () => { data.appName = `${fake.companyName}-App`; cy.appUILogin(); - cy.createApp(); - cy.renameApp(data.appName); + cy.createApp(data.appName); cy.dragAndDropWidget("Button", 450, 450); cy.get(commonSelectors.editorPageLogo).click(); - cy.reloadAppForTheElement(data.appName); + cy.get(commonSelectors.appCard(data.appName)).should( "contain.text", data.appName @@ -368,8 +358,7 @@ describe("dashboard", () => { it("Should verify the folder CRUD operation", () => { data.appName = `${fake.companyName}-App`; cy.appUILogin(); - cy.createApp(); - cy.renameApp(data.appName); + cy.createApp(data.appName); cy.dragAndDropWidget("Button", 100, 100); cy.get(commonSelectors.editorPageLogo).click(); @@ -431,7 +420,7 @@ describe("dashboard", () => { .should("be.visible") .and("have.text", "Edit folder"); - cy.get(commonSelectors.folderNameInput).should("be.visible") + cy.get(commonSelectors.folderNameInput).should("be.visible"); // verifyModal( // commonText.updateFolderTitle, diff --git a/cypress-tests/cypress/e2e/workspace/shareApp.cy.js b/cypress-tests/cypress/e2e/workspace/shareApp.cy.js index ff6c9452ed..b9391d303d 100644 --- a/cypress-tests/cypress/e2e/workspace/shareApp.cy.js +++ b/cypress-tests/cypress/e2e/workspace/shareApp.cy.js @@ -13,119 +13,121 @@ describe("App share functionality", () => { data.email = fake.email.toLowerCase(); const slug = data.appName.toLowerCase().replace(/\s+/g, "-"); const firstUserEmail = data.email + const envVar = Cypress.env("environment"); beforeEach(() => { cy.appUILogin(); }); - it("Verify private and public app share funtionality", () => { - cy.apiLogin(); - cy.apiCreateApp(); - cy.openApp(); - cy.renameApp(data.appName); - cy.dragAndDropWidget("Table", 250, 250); + if (envVar === "Community") { + it("Verify private and public app share funtionality", () => { + cy.apiLogin(); + cy.apiCreateApp(data.appName); + cy.openApp(); + cy.dragAndDropWidget("Table", 250, 250); - cy.get(commonWidgetSelector.shareAppButton).click(); + cy.get(commonWidgetSelector.shareAppButton).click(); - for (const elements in commonWidgetSelector.shareModalElements) { - cy.get( - commonWidgetSelector.shareModalElements[elements] - ).verifyVisibleElement( + for (const elements in commonWidgetSelector.shareModalElements) { + cy.get( + commonWidgetSelector.shareModalElements[elements] + ).verifyVisibleElement( + "have.text", + commonText.shareModalElements[elements] + ); + } + + cy.get(commonWidgetSelector.makePublicAppToggle).should("be.visible"); + cy.get(commonWidgetSelector.appLink).should("be.visible"); + cy.get(commonWidgetSelector.appNameSlugInput).should("be.visible"); + // cy.get(commonWidgetSelector.iframeLink).should("be.visible"); + cy.get(commonWidgetSelector.modalCloseButton).should("be.visible"); + + cy.clearAndType(commonWidgetSelector.appNameSlugInput, `${slug}`); + cy.get(commonWidgetSelector.modalCloseButton).click(); + cy.forceClickOnCanvas() + cy.dragAndDropWidget("Button", 50, 50); + cy.get(commonSelectors.editorPageLogo).click(); + + logout(); + cy.visit(`/applications/${slug}`); + + cy.get(commonSelectors.loginButton).should("be.visible"); + + cy.clearAndType(commonSelectors.workEmailInputField, "dev@tooljet.io"); + cy.clearAndType(commonSelectors.passwordInputField, "password"); + cy.get(commonSelectors.loginButton).click(); + + cy.wait(500); + cy.get('[data-cy="draggable-widget-table1"]').should("be.visible"); + cy.get(commonSelectors.viewerPageLogo).click(); + + navigateToAppEditor(data.appName); + cy.get(commonWidgetSelector.shareAppButton).click(); + cy.get(commonWidgetSelector.makePublicAppToggle).check(); + cy.get(commonWidgetSelector.modalCloseButton).click(); + cy.get(commonSelectors.editorPageLogo).click(); + + logout(); + cy.visit(`/applications/${slug}`); + cy.wait(500); + cy.get('[data-cy="draggable-widget-table1"]').should("be.visible"); + }); + + it("Verify app private and public app visibility for the same workspace user", () => { + addNewUserMW(data.firstName, data.email); + + logout(); + cy.visit(`/applications/${slug}`); + cy.get('[data-cy="draggable-widget-table1"]').should("be.visible"); + + cy.appUILogin(); + navigateToAppEditor(data.appName); + cy.skipEditorPopover() + cy.get(commonWidgetSelector.shareAppButton).click(); + cy.get(commonWidgetSelector.makePublicAppToggle).uncheck(); + cy.get(commonWidgetSelector.modalCloseButton).click(); + cy.get(commonSelectors.editorPageLogo).click(); + + logout(); + cy.visit(`/applications/${slug}`); + + cy.login(data.email, "password"); + cy.get(commonSelectors.allApplicationLink).verifyVisibleElement( "have.text", - commonText.shareModalElements[elements] + commonText.allApplicationLink ); - } + }); - cy.get(commonWidgetSelector.makePublicAppToggle).should("be.visible"); - cy.get(commonWidgetSelector.appLink).should("be.visible"); - cy.get(commonWidgetSelector.appNameSlugInput).should("be.visible"); - // cy.get(commonWidgetSelector.iframeLink).should("be.visible"); - cy.get(commonWidgetSelector.modalCloseButton).should("be.visible"); + it("Verify app private and public app visibility for the same instance user", () => { + data.firstName = fake.firstName; + data.email = fake.email.toLowerCase(); - cy.clearAndType(commonWidgetSelector.appNameSlugInput, `${slug}`); - cy.get(commonWidgetSelector.modalCloseButton).click(); - cy.forceClickOnCanvas() - cy.dragAndDropWidget("Button", 50, 50); - cy.get(commonSelectors.editorPageLogo).click(); + logout(); + userSignUp(data.firstName, data.email, "Test"); + cy.visit(`/applications/${slug}`); + cy.wait(1000); - logout(); - cy.visit(`/applications/${slug}`); + cy.clearAndType(commonSelectors.workEmailInputField, data.email); + cy.clearAndType(commonSelectors.passwordInputField, "password"); + cy.get(commonSelectors.signInButton).click(); + cy.wait(1000); - cy.get(commonSelectors.loginButton).should("be.visible"); + cy.visit("/"); + cy.wait(2000); + logout(); + cy.appUILogin(); - cy.clearAndType(commonSelectors.workEmailInputField, "dev@tooljet.io"); - cy.clearAndType(commonSelectors.passwordInputField, "password"); - cy.get(commonSelectors.loginButton).click(); + navigateToAppEditor(data.appName); + cy.skipEditorPopover(); + cy.get(commonWidgetSelector.shareAppButton).click(); + cy.get(commonWidgetSelector.makePublicAppToggle).check(); + cy.get(commonWidgetSelector.modalCloseButton).click(); + cy.get(commonSelectors.editorPageLogo).click(); - cy.wait(500); - cy.get('[data-cy="draggable-widget-table1"]').should("be.visible"); - cy.get(commonSelectors.viewerPageLogo).click(); - - navigateToAppEditor(data.appName); - cy.get(commonWidgetSelector.shareAppButton).click(); - cy.get(commonWidgetSelector.makePublicAppToggle).check(); - cy.get(commonWidgetSelector.modalCloseButton).click(); - cy.get(commonSelectors.editorPageLogo).click(); - - logout(); - cy.visit(`/applications/${slug}`); - cy.wait(500); - cy.get('[data-cy="draggable-widget-table1"]').should("be.visible"); - }); - - it("Verify app private and public app visibility for the same workspace user", () => { - addNewUserMW(data.firstName, data.email); - - logout(); - cy.visit(`/applications/${slug}`); - cy.get('[data-cy="draggable-widget-table1"]').should("be.visible"); - - cy.appUILogin(); - navigateToAppEditor(data.appName); - cy.skipEditorPopover() - cy.get(commonWidgetSelector.shareAppButton).click(); - cy.get(commonWidgetSelector.makePublicAppToggle).uncheck(); - cy.get(commonWidgetSelector.modalCloseButton).click(); - cy.get(commonSelectors.editorPageLogo).click(); - - logout(); - cy.visit(`/applications/${slug}`); - - cy.login(data.email, "password"); - cy.get(commonSelectors.allApplicationLink).verifyVisibleElement( - "have.text", - commonText.allApplicationLink - ); - }); - - it("Verify app private and public app visibility for the same instance user", () => { - data.firstName = fake.firstName; - data.email = fake.email.toLowerCase(); - - logout(); - userSignUp(data.firstName, data.email, "Test"); - cy.visit(`/applications/${slug}`); - cy.wait(1000); - - cy.clearAndType(commonSelectors.workEmailInputField, data.email); - cy.clearAndType(commonSelectors.passwordInputField, "password"); - cy.get(commonSelectors.signInButton).click(); - cy.wait(1000); - - cy.visit("/"); - cy.wait(2000); - logout(); - cy.appUILogin(); - - navigateToAppEditor(data.appName); - cy.skipEditorPopover(); - cy.get(commonWidgetSelector.shareAppButton).click(); - cy.get(commonWidgetSelector.makePublicAppToggle).check(); - cy.get(commonWidgetSelector.modalCloseButton).click(); - cy.get(commonSelectors.editorPageLogo).click(); - - logout(); - cy.visit(`/applications/${slug}`); - cy.get('[data-cy="draggable-widget-table1"]').should("be.visible"); - cy.get(commonSelectors.viewerPageLogo).click(); - }); + logout(); + cy.visit(`/applications/${slug}`); + cy.get('[data-cy="draggable-widget-table1"]').should("be.visible"); + cy.get(commonSelectors.viewerPageLogo).click(); + }); + } }); \ No newline at end of file diff --git a/cypress-tests/cypress/e2e/workspace/userPermissions.cy.js b/cypress-tests/cypress/e2e/workspace/userPermissions.cy.js index b6ebcf5416..6911368965 100644 --- a/cypress-tests/cypress/e2e/workspace/userPermissions.cy.js +++ b/cypress-tests/cypress/e2e/workspace/userPermissions.cy.js @@ -23,11 +23,9 @@ describe("User permissions", () => { permissions.reset(); cy.get(commonSelectors.homePageLogo).click(); cy.wait("@homePage"); - cy.createApp(); - cy.renameApp(data.appName); + cy.createApp(data.appName); cy.dragAndDropWidget("Table", 250, 250); cy.get(commonSelectors.editorPageLogo).click(); - cy.reloadAppForTheElement(data.appName); permissions.addNewUserMW(data.firstName, data.email); common.logout(); }); @@ -41,11 +39,7 @@ describe("User permissions", () => { cy.login(data.email, usersText.password); cy.get("body").then(($title) => { if ($title.text().includes(dashboardText.emptyPageDescription)) { - cy.get(commonSelectors.dashboardAppCreateButton).click(); - cy.verifyToastMessage( - commonSelectors.toastMessage, - usersText.createAppPermissionToast - ); + cy.get(commonSelectors.dashboardAppCreateButton).should('be.disabled'); } else { cy.contains(dashboardText.createAppButton).should("not.exist"); } @@ -120,7 +114,21 @@ describe("User permissions", () => { }); it("Should verify the Create and Delete app permission", () => { + data.appName = `${fake.companyName}-App`; + cy.createApp(data.appName); + cy.get(commonSelectors.editorPageLogo).click(); + cy.wait(1000); common.navigateToManageGroups(); + cy.get(groupsSelector.appSearchBox).click(); + cy.get(groupsSelector.searchBoxOptions).contains(data.appName).click(); + cy.get(groupsSelector.selectAddButton).click(); + cy.get("table").contains("td", data.appName); + cy.contains("td", data.appName) + .parent() + .within(() => { + cy.get("td input").first().should("be.checked"); + }); + cy.wait(500) cy.get(groupsSelector.permissionsLink).click(); cy.get(groupsSelector.appsCreateCheck).check(); cy.get(groupsSelector.permissionsLink).click(); @@ -141,11 +149,10 @@ describe("User permissions", () => { common.viewAppCardOptions(data.appName); cy.contains("Delete app").should("not.exist"); - cy.createApp(); - cy.renameApp(data.email); + cy.createApp(data.email); + cy.dragAndDropWidget("Table", 50, 50); cy.get(commonSelectors.editorPageLogo).click(); - cy.reloadAppForTheElement(data.email); common.viewAppCardOptions(data.email); cy.contains("Delete app").should("exist"); cy.get(commonSelectors.appCardOptions(commonText.deleteAppOption)).click(); diff --git a/cypress-tests/cypress/e2e/workspace/workspaceConstants.cy.js b/cypress-tests/cypress/e2e/workspace/workspaceConstants.cy.js index e5c4f3b26b..0d8258136b 100644 --- a/cypress-tests/cypress/e2e/workspace/workspaceConstants.cy.js +++ b/cypress-tests/cypress/e2e/workspace/workspaceConstants.cy.js @@ -279,8 +279,7 @@ describe("Workspace constants", () => { cy.get(commonSelectors.homePageLogo).click(); cy.wait("@homePage"); - cy.createApp(); - cy.renameApp(data.appName); + cy.createApp(data.appName); selectQueryFromLandingPage("runjs", "JavaScript"); addInputOnQueryField("runjs", `return constants.${data.constantsName}`); diff --git a/docs/docs/data-sources/appwrite.md b/docs/docs/data-sources/appwrite.md index dc11572625..c987afdd6b 100644 --- a/docs/docs/data-sources/appwrite.md +++ b/docs/docs/data-sources/appwrite.md @@ -1,11 +1,11 @@ --- id: appwrite -title: Appwrite Database +title: Appwrite --- -# Appwrite Database +# Appwrite -Now build applications on top of your Appwrite database. +ToolJet can connect to appwrite database to read/write data. ## Connection @@ -20,7 +20,7 @@ You'll find the Secret key and other credentials on your Appwrite's project sett You should also set the scope for access to a particular resource. Learn more about the **API keys and scopes** [here](https://appwrite.io/docs/keys). ::: -To connect Appwrite datasource to your ToolJet application, go to the data source manager on the left-sidebar and click on the `+` button. Select Appwrite from the list of available datasources, provide the credentials and click **Save**. It is recommended to check the connection by clicking on 'Test connection' button to verify if the service account can access Appwrite from the ToolJet server. +To establish a connection with the Appwrite data source, you can either click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
-Click on the **run** button to run the query. NOTE: Query should be saved before running.
:::tip
Query results can be transformed using transformations. Read our transformations documentation to see how: [link](/docs/tutorial/transformations)
@@ -157,4 +154,4 @@ NOTE: visit -https://github.com/googleapis/nodejs-bigquery/blob/main/samples/cre
:::
### Delete Table
-- To delete a table.
\ No newline at end of file
+- To delete a table.
diff --git a/docs/docs/data-sources/cosmosdb.md b/docs/docs/data-sources/cosmosdb.md
index a924932750..9ffe9b3e6d 100644
--- a/docs/docs/data-sources/cosmosdb.md
+++ b/docs/docs/data-sources/cosmosdb.md
@@ -2,14 +2,14 @@
id: cosmosdb
title: CosmosDB
---
+
# Cosmosdb
-ToolJet can connect to CosmosDB databases to read and write data.
-
+ToolJet can connect to CosmosDB databases to read and write data.
## Connection
-To add a new **[Azure Cosmos DB](https://docs.microsoft.com/en-us/javascript/api/overview/azure/cosmos-readme?view=azure-node-latest#key-concepts)**, click on the `+` button on data sources panel at the left-bottom corner of the app editor. Select CosmosDB from the modal that pops up.
+To establish a connection with the CosmosDB data source, you can either click on the `+Add new data source` button located on the query panel or navigate to the **[Data Sources](/docs/data-sources/overview)** page through the ToolJet dashboard.
ToolJet requires the following to connect to your Cosmos DB.
@@ -28,8 +28,7 @@ You can find the endpoint and key in the **[Azure Portal](https://portal.azure.c
+## Supported Queries:
-
-## Supported queries:
-
-- [Listing records](#listing-records)
-- [Retrieving a record](#retrieving-a-record)
-- [Creating a record](#creating-a-record)
-- [Updating a record](#updating-a-record)
-- [Deleting a record](#deleting-a-record)
+- [Listing Records](#listing-records)
+- [Retrieving a Record](#retrieving-a-record)
+- [Creating a Record](#creating-a-record)
+- [Updating a Record](#updating-a-record)
+- [Deleting a Record](#deleting-a-record)
- [Find](#find)
-- [Retrieving a view](#retrieving-a-view)
+- [Retrieving a View](#retrieving-a-view)
:::info
NOTE: Record ID is same as document ID("_id") .
:::
-### Listing records
+### Listing Records
This query lists all the records in a database.
-#### Optional parameters:
+#### Optional Parameters:
- **Include docs**
- **Descending order**
@@ -83,9 +80,9 @@ Example response from CouchDb:
}
```
-### Retrieving a record
+### Retrieving a Record
-#### Required parameters:
+#### Required Parameters:
- **Record ID**
@@ -108,7 +105,7 @@ Example response from CouchDb:
The returned JSON is the JSON of the document, including the document ID and revision number:
-### Creating a record
+### Creating a Record
@@ -122,10 +119,6 @@ The returned JSON is the JSON of the document, including the document ID and rev
Click on the `run` button to run the query.
-:::info
-NOTE: Query must be saved before running.
-:::
-
Example response from CouchDb:
```json
@@ -137,12 +130,12 @@ Example response from CouchDb:
```
-### Updating a record
+### Updating a Record
You can get the revision id value, by sending a GET request to get the document details.
You get the document as JSON in the response. For each update to the document, the revision field "_rev" gets changed.
-#### Required parameters:
+#### Required Rarameters:
- **Revision ID**
- **Record ID**
@@ -150,7 +143,7 @@ You get the document as JSON in the response. For each update to the document, t
-#### Example body:
+#### Example Body:
```json
[{"name":"tooljet"}]
@@ -172,9 +165,9 @@ Example response from CouchDb:
}
```
-### Deleting a record
+### Deleting a Record
-#### Required parameters:
+#### Required Parameters:
- **Revision ID**
- **Record ID**
@@ -200,7 +193,7 @@ Example response from CouchDb:
Find documents using a declarative JSON querying syntax.
-#### Required parameters:
+#### Required Parameters:
- **Selector**
:::info
@@ -212,7 +205,7 @@ selector syntax: https://pouchdb.com/guides/mango-queries.html
-#### Example body:
+#### Example Body:
```json
{
@@ -239,11 +232,11 @@ Example response from CouchDb:
-### Retrieving a view
+### Retrieving a View
Views are the primary tool used for querying and reporting on CouchDB documents.
-#### Required parameters:
+#### Required Parameters:
- **View url**
Reference for view :https://docs.couchdb.org/en/3.2.0/ddocs/views/intro.html#what-is-a-view
@@ -252,7 +245,7 @@ Reference for view :https://docs.couchdb.org/en/3.2.0/ddocs/views/intro.html#wha
-#### Optional parameters:
+#### Optional Parameters:
- **Start key**
- **End key**
diff --git a/docs/docs/data-sources/dynamodb.md b/docs/docs/data-sources/dynamodb.md
index abaacaa48c..127a917898 100644
--- a/docs/docs/data-sources/dynamodb.md
+++ b/docs/docs/data-sources/dynamodb.md
@@ -8,7 +8,7 @@ DynamoDB is a managed non-relational database service provided by Amazon. ToolJe
## Connection
-To establish a connection with the DynamoDB global datasource, you can either click on the `+Add new global datasource` button located on the query panel or navigate to the **[Global Datasources](/docs/data-sources/overview)** page through the ToolJet dashboard.
+To establish a connection with the DynamoDB data source, you can either click on the `+Add new data source` button located on the query panel or navigate to the **[Data sources](/docs/data-sources/overview)** page through the ToolJet dashboard.
diff --git a/docs/docs/data-sources/firestore.md b/docs/docs/data-sources/firestore.md
index c0375c29c6..4b86322ea5 100644
--- a/docs/docs/data-sources/firestore.md
+++ b/docs/docs/data-sources/firestore.md
@@ -4,12 +4,14 @@ title: Cloud Firestore
---
# Cloud Firestore
+ToolJet can connect to Cloud Firestore databases to read and write data.
## Connection
-ToolJet connects to your Cloud Firestore using JSON key of your GCP service account.
-To generate a new key, check out [Firestore's official documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#iam-service-account-keys-create-console).
+ToolJet connects to your Cloud Firestore using JSON key of your GCP service account. Get your service account key as JSON from GCP console. For generating a new key, check out [Firestore's official documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#iam-service-account-keys-create-console).
-Once the key is downloaded, click on `+` button of data sources panel at the left-bottom corner of the app editor. Select Firestore from the modal that pops up. Paste the key in the field for GCP key. Click on **Test connection** button to verify if the service account can access Firestore from ToolJet server. Click on **Save** button to save the datasource.
+Once you have the key, open it in a text editor and copy the contents. Paste the contents in the **Private key** field of the Firestore data source modal.
+
+Click on **Test connection** button to verify if the key is valid. Click on **Save** button to save the data source.
@@ -160,4 +162,4 @@ The Firestore query result is in the form of object so we’ll need to transform
```js
return data = Array(data)
-```
\ No newline at end of file
+```
diff --git a/docs/docs/data-sources/gcs.md b/docs/docs/data-sources/gcs.md
index 6483a43408..03cad29535 100644
--- a/docs/docs/data-sources/gcs.md
+++ b/docs/docs/data-sources/gcs.md
@@ -9,19 +9,18 @@ ToolJet can connect to GCS buckets and perform various operation on them.
## Supported operations
--**Read file**
--**Upload file**
--**List buckets**
--**List files in a bucket**
--**Signed url for download**
--**Signed url for upload**
+- **Read file**
+- **Upload file**
+- **List buckets**
+- **List files in a bucket**
+- **Signed url for download**
+- **Signed url for upload**
## Connection
-To add a new GCS source, click on the **Add or edit datasource** icon on the left sidebar of the app editor and click on `Add datasource` button. Select GCS from the modal that pops up.
+To establish a connection with the Google Cloud Storage data source, you can either click on the `+Add new data source` button located on the query panel or navigate to the **[Data Sources](/docs/data-sources/overview)** page through the ToolJet dashboard.
-ToolJet requires the **json private key** of a service account to be able to connect to GCS.
-You can follow the [google documentation](https://cloud.google.com/docs/authentication/getting-started) to get started.
+To connect to GCS, you need to provide the JSON Private Key of a service account that has access to the bucket. You can follow the [google documentation](https://cloud.google.com/docs/authentication/getting-started) to get started.
diff --git a/docs/docs/data-sources/mailgun.md b/docs/docs/data-sources/mailgun.md
index 6b4c71ca78..09907b82d1 100644
--- a/docs/docs/data-sources/mailgun.md
+++ b/docs/docs/data-sources/mailgun.md
@@ -15,7 +15,7 @@ The Mailgun API Datasource supports for interaction with the mail endpoint of th
## Connection
-To add a new Mailgun API datasource, click the **Datasource manager** icon on the left-sidebar of the app builder and click on the `Add datasource` button, then select Mailgun API from the modal that pops up.
+To establish a connection with the MailGun data source, click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
Enter your **Mailgun API key** in the "API key" field.
@@ -58,7 +58,3 @@ For example: `admin@tooljet.io`
**Send multiple individual emails to multiple recipients** - set Multiple recipients field to `{{true}}` and the `Send mail to` field will be split into multiple emails and send to each recipient.
:::
-
-:::note
-NOTE: Query should be saved before running.
-:::
diff --git a/docs/docs/data-sources/minio.md b/docs/docs/data-sources/minio.md
index 3f19ffc32d..0ac53fd17d 100644
--- a/docs/docs/data-sources/minio.md
+++ b/docs/docs/data-sources/minio.md
@@ -20,7 +20,7 @@ ToolJet can connect to minio and perform various operation on them.
## Connection
-To add a new minio source, click on the **Add or edit datasource** icon on the left sidebar of the app editor and click on `Add datasource` button. Select Minio from the modal that pops up.
+To establish a connection with the Minio data source, click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
ToolJet requires the following to connect to your DynamoDB:
@@ -44,7 +44,7 @@ Click on `+` button of the **query manager** at the bottom panel of the editor a
Click on the **run** button to run the query.
-**NOTE**: Query should be saved before running.
+
:::tip
Query results can be transformed using transformations. Read our transformations documentation to see how: [link](/docs/tutorial/transformations)
diff --git a/docs/docs/data-sources/mongodb.md b/docs/docs/data-sources/mongodb.md
index 0ae21b519a..8a4dea7b16 100644
--- a/docs/docs/data-sources/mongodb.md
+++ b/docs/docs/data-sources/mongodb.md
@@ -11,7 +11,7 @@ ToolJet can connect to MongoDB to read and write data.
Please make sure the host/ip of the database is accessible from your VPC if you have self-hosted ToolJet. If you are using ToolJet cloud, please whitelist our IP.
-To add a new MongoDB, click on the `+` button on data sources panel at the left-bottom corner of the app editor. Select MongoDB from the modal that pops up.
+To establish a connection with the MongoDB data source, click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
ToolJet requires the following to connect to your MongoDB.
@@ -32,15 +32,14 @@ Click on `+` button of the query manager at the bottom panel of the editor and s
-
-
-Click on the 'run' button to run the query. NOTE: Query should be saved before running.
+Click on the 'run' button to run the query.
:::tip
Query results can be transformed using transformations. Read our transformations documentation to see how: [link](/docs/tutorial/transformations)
:::
### Supported operations
+
- [List Collections](#list-collections)
- [Find One](#find-one)
- [Find Many](#find-many)
@@ -59,51 +58,89 @@ Query results can be transformed using transformations. Read our transformations
- [Delete One](#delete-one)
- [Delete Many](#delete-many)
- [Bulk Operations](#bulk-operations)
+
#### List Collections
+
Returns list of collections
+
#### Fine One
+
Return a document which satisfy the given filter and options. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/findOne)
+
#### Fine Many
+
Return list of documents which satisfy the given filter and options. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/find/)
+
#### Total Count
+
Returns an estimation of the number of documents in the collection based on collection metadata. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#estimateddocumentcount)
+
#### Count
+
Returns the number of documents based on the filter. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#countdocuments)
+
#### Distinct
+
Retrieve a list of distinct values for a field based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/distinct/)
+
#### Insert One
+
Insert a document. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/insertOne/)
+
#### Insert Many
+
Insert list of documents. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/insertMany/)
+
#### Update One
+
Update a document based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/updateOne/)
+
#### Update Many
+
Update many documents based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/updateMany/)
+
#### Replace One
+
Replace a document based on filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/replaceOne/)
+
#### Find One and Update
+
If your application requires the document after updating, use this instead of `Update One`. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#findoneandupdate)
+
#### Find One and Replace
+
If your application requires the document after updating, use this instead of `Replace One`. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#findoneandreplace)
+
#### Find One and Delete
+
If your application requires the document after deleting, use this instead of `Delete One`. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#findoneanddelete)
+
#### Aggregate
+
Aggregation operations are expressions you can use to produce reduced and summarized results. [Reference](https://docs.mongodb.com/drivers/node/v4.0/fundamentals/aggregation/)
+
#### Delete One
+
Delete a record based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/deleteOne/)
+
#### Delete Many
+
Delete many records based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/deleteMany/)
+
#### Bulk Operations
+
Perform bulk operations. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/bulkWrite/)
### Dynamic Quries
+
```javascript
{ amount: { $lt: '{{ components.textinput1.value }}' }}
-// Dates
+// Dates
// supported: Extended JSON syntax
{ createdAt: { $date: '{{ new Date('01/10/2020') }}'} }
// not supported: MongoDB classic syntax
{ createdAt: new Date('01/10/2020') }
```
+
Reference on [mongodb extended JSON](https://docs.mongodb.com/manual/reference/mongodb-extended-json/) supported data types
diff --git a/docs/docs/data-sources/mssql.md b/docs/docs/data-sources/mssql.md
index a8aa169ce5..0f9fa32b2f 100644
--- a/docs/docs/data-sources/mssql.md
+++ b/docs/docs/data-sources/mssql.md
@@ -12,7 +12,7 @@ ToolJet can connect to MS SQL Server & Azure SQL databases to read and write dat
Please make sure the host/ip of the database is accessible from your VPC if you have self-hosted ToolJet. If you are using ToolJet cloud, please whitelist our IP.
-To add new MS SQL Server / Azure SQL database, click on the '+' button on data sources panel at the left-bottom corner of the app editor. Select `SQL Server` from the modal that pops up.
+To establish a connection with the MS SQL Server data source, click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
ToolJet requires the following to connect to your PostgreSQL database.
@@ -32,7 +32,7 @@ Click on 'Test connection' button to verify if the credentials are correct and t
## Querying SQL Server / Azure SQL databases
Click on '+' button of the query manager at the bottom panel of the editor and select the database added in the previous step as the data source.
-Click on the 'run' button to run the query. NOTE: Query should be saved before running.
+Click on the 'run' button to run the query.
diff --git a/docs/docs/data-sources/mysql.md b/docs/docs/data-sources/mysql.md
index 63af848971..c349d83171 100644
--- a/docs/docs/data-sources/mysql.md
+++ b/docs/docs/data-sources/mysql.md
@@ -7,11 +7,11 @@ ToolJet can connect to MySQL databases to read and write data.
## Connection
-To establish a connection with the MySQL datasource, you can either click on the `+Add New` button located on the query panel or navigate to the **[Global Datasources](/docs/data-sources/overview)** page through the ToolJet dashboard.
+To establish a connection with the MySQL data source, you can either click on the `+Add New` button located on the query panel or navigate to the **[Data Sources](/docs/data-sources/overview)** page through the ToolJet dashboard.
+
-
:::tip
Before querying Notion, you must share the database with your integration. Click the share button in your database view, find your integration name select it.
-
-
:::
### Database
On database resource you can perform the following operations:
+
- **[Retrieve a database](#1-retrieve-a-database)**
- **[Query a database](#2-query-a-database)**
- **[Create a database](#3-create-a-database)**
- **[Update a database](#4-update-a-database)**
-
-
#### 1. Retrieve a database
This operations retrieves a Database object using the ID specified.
@@ -57,13 +57,12 @@ This operations retrieves a Database object using the ID specified.
- **Database ID**: You'll find the Database ID in the url. Suppose this is the example url: `https://www.notion.so/workspace/XXX?v=YYY&p=ZZZ` then `XXX` is the database ID, `YYY` is the view ID and `ZZZ` is the page ID.
-
-
#### 2. Query a database
This operation gets a list of **Pages** contained in the database, filtered and ordered according to the filter conditions and sort criteria provided in the query.
+
##### Required parameters:
- **Database ID** : You'll find the Database ID in the url. Suppose this is the example url: `https://www.notion.so/workspace/XXX?v=YYY&p=ZZZ` then `XXX` is the database ID, `YYY` is the view ID and `ZZZ` is the page ID.
@@ -98,6 +97,7 @@ This operation creates a database as a subpage in the specified parent page, wit
This operation updates an existing database as specified by the parameters.
##### Required parameters:
+
- **Database ID**
##### Optional parameters:
@@ -112,24 +112,29 @@ This operation updates an existing database as specified by the parameters.
### Page
On page resource you can perform the following operations:
+
- **[Retrieve a page](#1-retrieve-a-page)**
- **[Create a page](#2-create-a-page)**
- **[Update a page](#3-update-a-page)**
- **[Retrieve a page property](#4-retrieve-a-page-property-item)**
- **[Archive a page](#5-archive-delete-a-page)**
-
-
#### 1. Retrieve a page
+
This operation retrieves a **Page** object using the ID specified.
+
##### Required parameters:
+
- **Page ID**
#### 2. Create a page
+
This operation creates a new page in the specified database or as a child of an existing page. If the parent is a database, the property values of the new page in the properties parameter must conform to the parent database's property schema. If the parent is a page, the only valid property is title.
+
##### Parameters:
+
- **Page ID**
- **Properties** : Property values of this page
- **Icon type** : Currently notion api accepts two icon options, emoji, external URL
@@ -138,8 +143,11 @@ This operation creates a new page in the specified database or as a child of an
- **Cover value** : Value of selected cover type
#### 3. Update a page
+
This operation updates page property values for the specified page. Properties that are not set via the properties parameter will remain unchanged.
+
##### Parameters:
+
- **Page ID**
- **Parent type**: A database parent or page parent
- **Properties** : Property values of this page
@@ -150,77 +158,94 @@ This operation updates page property values for the specified page. Properties t
- **Cover value** : Value of selected cover type
#### 4. Retrieve a page property item
+
This operation retrieves a property_item object for a given page ID and property ID. Depending on the property type, the object returned will either be a value or a paginated list of property item values. See Property item objects for specifics.
+
##### Parameters:
+
- **Page ID**
- **Property ID**
- **Limit**
- **Start cursor**
#### 5. Archive (delete) a page
+
##### Required parameters:
+
- **Page ID**
- **Archive**: Dropdown for archive and un archive the page
### Blocks
+
The following operations can be performed on the block resource:
+
- **[Retrieve a block](#1-retrieve-a-block)**
- **[Append block children](#2-append-new-block-children)**
- **[Retrieve block children](#3-retrieve-block-children)**
- **[Update a block](#4-update-a-block)**
- **[Delete a block](#5-delete-a-block)**
-
-
:::info
To get the id for blocks, simply click on the menu icon for the block and click "Copy link". Afterwards, paste the link in the browser and it should look like this: `https://www.notion.so/Creating-Page-Sample-ee18b8779ae54f358b09221d6665ee15#7fcb3940a1264aadb2ad4ee9ffe11b0e` the string after **#** is the block id i.e. `7fcb3940a1264aadb2ad4ee9ffe11b0e`.
:::
#### 1. Retrieve a block
+
This operation retrieves a **Block** object using the ID specified.
##### Required parameters:
+
- **Block ID**
#### 2. Append new block children
+
This operation creates and appends new children blocks to the parent block_id specified.
##### Required parameters:
+
- **Block ID**
- **Children**: Array of block objects
#### 3. Retrieve block children
+
This operation retrieves a paginated array of child block objects contained in the block using the ID specified.
##### Required parameters:
+
- **Block ID**
- **Limit**
- **Start cursor**
#### 4. Update a block
+
This operation updates the content for the specified block_id based on the block type.
##### Required parameters:
+
- **Block ID**
- **Properties**: The block object type value with the properties to be updated
- **Archive**
#### 5. Delete a block
+
##### Required parameters:
+
- **Block ID**
### User
+
The following operations can be performed on the user notion resource:
#### 1. Retrieve a user from current workspace
-This operation retrieves a User using the ID specified.
+This operation retrieves a User using the ID specified.
##### Required parameters:
+
- **User ID**
#### 2. Retrieve list of users of a workspace
@@ -228,6 +253,7 @@ This operation retrieves a User using the ID specified.
This operation returns a paginated list of Users for the workspace.
##### Required parameters:
+
- **Limit**
- **Start cursor**
diff --git a/docs/docs/data-sources/s3.md b/docs/docs/data-sources/s3.md
index db8f35c780..60488139a9 100644
--- a/docs/docs/data-sources/s3.md
+++ b/docs/docs/data-sources/s3.md
@@ -9,7 +9,7 @@ ToolJet can connect to Amazon S3 buckets and perform various operation on them.
## Connection
-To add a new S3 source, go to the **Datasources manager** on the left sidebar of the app editor and click on `Add datasource` button. Select **AWS S3** from the modal that pops up.
+To add a new S3 source, go to the **Data sources manager** on the left sidebar of the app editor and click on `Add data source` button. Select **AWS S3** from the modal that pops up.
ToolJet supports connecting to AWS S3 using **IAM credentials**, **AWS Instance Profile** or **AWS ARN Role**.
@@ -155,5 +155,5 @@ The presigned URLs are useful if you want your user/customer to be able to uploa
:::info
-We built an app to view and upload files to AWS S3 buckets. Check out the complete tutorial **[here](https://blog.tooljet.com/building-an-app-to-view-and-upload-files-in-aws-s3-bucket/)**.
+We built an app to view and upload files to AWS S3 buckets. Check out the complete tutorial **[here](https://blog.tooljet.com/build-an-aws-s3-broswer-with-tooljet/)**.
:::
diff --git a/docs/docs/widgets/html.md b/docs/docs/widgets/html.md
index 41908bef43..cc1e06c574 100644
--- a/docs/docs/widgets/html.md
+++ b/docs/docs/widgets/html.md
@@ -1,9 +1,9 @@
---
id: html
-title: HTML
+title: HTML Viewer
---
-# HTML
+# HTML Viewer
HTML widget can be used to create your own HTML-CSS layout.
diff --git a/docs/docs/widgets/rich-text-editor.md b/docs/docs/widgets/rich-text-editor.md
index 7c5ba592d7..9d99fb99e3 100644
--- a/docs/docs/widgets/rich-text-editor.md
+++ b/docs/docs/widgets/rich-text-editor.md
@@ -1,8 +1,8 @@
---
id: rich-text-editor
-title: Rich Text Editor
+title: Text Editor
---
-# Rich Text Editor
+# Text Editor
Rich Text Editor can be used to enter and edit the text in HTML format.
It should be preferred for blog posts, forum posts or notes sections. The text is to be used as the label for the radio button.
diff --git a/docs/versioned_docs/version-2.18.0/data-sources/appwrite.md b/docs/versioned_docs/version-2.18.0/data-sources/appwrite.md
index dc11572625..a0562cc980 100644
--- a/docs/versioned_docs/version-2.18.0/data-sources/appwrite.md
+++ b/docs/versioned_docs/version-2.18.0/data-sources/appwrite.md
@@ -1,11 +1,11 @@
---
id: appwrite
-title: Appwrite Database
+title: Appwrite
---
-# Appwrite Database
+# Appwrite
-Now build applications on top of your Appwrite database.
+ToolJet can connect to appwrite database to read/write data.
## Connection
@@ -20,7 +20,7 @@ You'll find the Secret key and other credentials on your Appwrite's project sett
You should also set the scope for access to a particular resource. Learn more about the **API keys and scopes** [here](https://appwrite.io/docs/keys).
:::
-To connect Appwrite datasource to your ToolJet application, go to the data source manager on the left-sidebar and click on the `+` button. Select Appwrite from the list of available datasources, provide the credentials and click **Save**. It is recommended to check the connection by clicking on 'Test connection' button to verify if the service account can access Appwrite from the ToolJet server.
+To establish a connection with the Appwrite data source, you can either click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
-Click on the **run** button to run the query. NOTE: Query should be saved before running.
:::tip
Query results can be transformed using transformations. Read our transformations documentation to see how: [link](/docs/tutorial/transformations)
@@ -157,4 +154,4 @@ NOTE: visit -https://github.com/googleapis/nodejs-bigquery/blob/main/samples/cre
:::
### Delete Table
-- To delete a table.
\ No newline at end of file
+- To delete a table.
diff --git a/docs/versioned_docs/version-2.18.0/data-sources/cosmosdb.md b/docs/versioned_docs/version-2.18.0/data-sources/cosmosdb.md
index a924932750..4b6d4f412f 100644
--- a/docs/versioned_docs/version-2.18.0/data-sources/cosmosdb.md
+++ b/docs/versioned_docs/version-2.18.0/data-sources/cosmosdb.md
@@ -2,14 +2,14 @@
id: cosmosdb
title: CosmosDB
---
+
# Cosmosdb
-ToolJet can connect to CosmosDB databases to read and write data.
-
+ToolJet can connect to CosmosDB databases to read and write data.
## Connection
-To add a new **[Azure Cosmos DB](https://docs.microsoft.com/en-us/javascript/api/overview/azure/cosmos-readme?view=azure-node-latest#key-concepts)**, click on the `+` button on data sources panel at the left-bottom corner of the app editor. Select CosmosDB from the modal that pops up.
+To establish a connection with the CosmosDB data source, you can either click on the `+Add new data source` button located on the query panel or navigate to the **[Data Sources](/docs/data-sources/overview)** page through the ToolJet dashboard.
ToolJet requires the following to connect to your Cosmos DB.
@@ -28,8 +28,7 @@ You can find the endpoint and key in the **[Azure Portal](https://portal.azure.c
+## Supported Queries:
-
-## Supported queries:
-
-- [Listing records](#listing-records)
-- [Retrieving a record](#retrieving-a-record)
-- [Creating a record](#creating-a-record)
-- [Updating a record](#updating-a-record)
-- [Deleting a record](#deleting-a-record)
+- [Listing Records](#listing-records)
+- [Retrieving a Record](#retrieving-a-record)
+- [Creating a Record](#creating-a-record)
+- [Updating a Record](#updating-a-record)
+- [Deleting a Record](#deleting-a-record)
- [Find](#find)
-- [Retrieving a view](#retrieving-a-view)
+- [Retrieving a View](#retrieving-a-view)
:::info
NOTE: Record ID is same as document ID("_id") .
:::
-### Listing records
+### Listing Records
This query lists all the records in a database.
-#### Optional parameters:
+#### Optional Parameters:
- **Include docs**
- **Descending order**
@@ -83,9 +80,9 @@ Example response from CouchDb:
}
```
-### Retrieving a record
+### Retrieving a Record
-#### Required parameters:
+#### Required Parameters:
- **Record ID**
@@ -108,7 +105,7 @@ Example response from CouchDb:
The returned JSON is the JSON of the document, including the document ID and revision number:
-### Creating a record
+### Creating a Record
@@ -122,10 +119,6 @@ The returned JSON is the JSON of the document, including the document ID and rev
Click on the `run` button to run the query.
-:::info
-NOTE: Query must be saved before running.
-:::
-
Example response from CouchDb:
```json
@@ -137,12 +130,12 @@ Example response from CouchDb:
```
-### Updating a record
+### Updating a Record
You can get the revision id value, by sending a GET request to get the document details.
You get the document as JSON in the response. For each update to the document, the revision field "_rev" gets changed.
-#### Required parameters:
+#### Required Parameters:
- **Revision ID**
- **Record ID**
@@ -150,7 +143,7 @@ You get the document as JSON in the response. For each update to the document, t
-#### Example body:
+#### Example Body:
```json
[{"name":"tooljet"}]
@@ -172,9 +165,9 @@ Example response from CouchDb:
}
```
-### Deleting a record
+### Deleting a Record
-#### Required parameters:
+#### Required Parameters:
- **Revision ID**
- **Record ID**
@@ -200,7 +193,7 @@ Example response from CouchDb:
Find documents using a declarative JSON querying syntax.
-#### Required parameters:
+#### Required Parameters:
- **Selector**
:::info
@@ -212,7 +205,7 @@ selector syntax: https://pouchdb.com/guides/mango-queries.html
-#### Example body:
+#### Example Body:
```json
{
@@ -239,11 +232,11 @@ Example response from CouchDb:
-### Retrieving a view
+### Retrieving a View
Views are the primary tool used for querying and reporting on CouchDB documents.
-#### Required parameters:
+#### Required Parameters:
- **View url**
Reference for view :https://docs.couchdb.org/en/3.2.0/ddocs/views/intro.html#what-is-a-view
@@ -252,7 +245,7 @@ Reference for view :https://docs.couchdb.org/en/3.2.0/ddocs/views/intro.html#wha
-#### Optional parameters:
+#### Optional Parameters:
- **Start key**
- **End key**
diff --git a/docs/versioned_docs/version-2.18.0/data-sources/dynamodb.md b/docs/versioned_docs/version-2.18.0/data-sources/dynamodb.md
index abaacaa48c..127a917898 100644
--- a/docs/versioned_docs/version-2.18.0/data-sources/dynamodb.md
+++ b/docs/versioned_docs/version-2.18.0/data-sources/dynamodb.md
@@ -8,7 +8,7 @@ DynamoDB is a managed non-relational database service provided by Amazon. ToolJe
## Connection
-To establish a connection with the DynamoDB global datasource, you can either click on the `+Add new global datasource` button located on the query panel or navigate to the **[Global Datasources](/docs/data-sources/overview)** page through the ToolJet dashboard.
+To establish a connection with the DynamoDB data source, you can either click on the `+Add new data source` button located on the query panel or navigate to the **[Data sources](/docs/data-sources/overview)** page through the ToolJet dashboard.
diff --git a/docs/versioned_docs/version-2.18.0/data-sources/firestore.md b/docs/versioned_docs/version-2.18.0/data-sources/firestore.md
index c0375c29c6..a498d8a75e 100644
--- a/docs/versioned_docs/version-2.18.0/data-sources/firestore.md
+++ b/docs/versioned_docs/version-2.18.0/data-sources/firestore.md
@@ -4,13 +4,14 @@ title: Cloud Firestore
---
# Cloud Firestore
+ToolJet can connect to Cloud Firestore databases to read and write data.
## Connection
-ToolJet connects to your Cloud Firestore using JSON key of your GCP service account.
-To generate a new key, check out [Firestore's official documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#iam-service-account-keys-create-console).
+ToolJet connects to your Cloud Firestore using JSON key of your GCP service account. Get your service account key as JSON from GCP console. For generating a new key, check out [Firestore's official documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#iam-service-account-keys-create-console).
-Once the key is downloaded, click on `+` button of data sources panel at the left-bottom corner of the app editor. Select Firestore from the modal that pops up. Paste the key in the field for GCP key. Click on **Test connection** button to verify if the service account can access Firestore from ToolJet server. Click on **Save** button to save the datasource.
+Once you have the key, open it in a text editor and copy the contents. Paste the contents in the **Private key** field of the Firestore data source modal.
+Click on **Test connection** button to verify if the key is valid. Click on **Save** button to save the data source.
@@ -160,4 +161,4 @@ The Firestore query result is in the form of object so we’ll need to transform
```js
return data = Array(data)
-```
\ No newline at end of file
+```
diff --git a/docs/versioned_docs/version-2.18.0/data-sources/gcs.md b/docs/versioned_docs/version-2.18.0/data-sources/gcs.md
index 6483a43408..03cad29535 100644
--- a/docs/versioned_docs/version-2.18.0/data-sources/gcs.md
+++ b/docs/versioned_docs/version-2.18.0/data-sources/gcs.md
@@ -9,19 +9,18 @@ ToolJet can connect to GCS buckets and perform various operation on them.
## Supported operations
--**Read file**
--**Upload file**
--**List buckets**
--**List files in a bucket**
--**Signed url for download**
--**Signed url for upload**
+- **Read file**
+- **Upload file**
+- **List buckets**
+- **List files in a bucket**
+- **Signed url for download**
+- **Signed url for upload**
## Connection
-To add a new GCS source, click on the **Add or edit datasource** icon on the left sidebar of the app editor and click on `Add datasource` button. Select GCS from the modal that pops up.
+To establish a connection with the Google Cloud Storage data source, you can either click on the `+Add new data source` button located on the query panel or navigate to the **[Data Sources](/docs/data-sources/overview)** page through the ToolJet dashboard.
-ToolJet requires the **json private key** of a service account to be able to connect to GCS.
-You can follow the [google documentation](https://cloud.google.com/docs/authentication/getting-started) to get started.
+To connect to GCS, you need to provide the JSON Private Key of a service account that has access to the bucket. You can follow the [google documentation](https://cloud.google.com/docs/authentication/getting-started) to get started.
diff --git a/docs/versioned_docs/version-2.18.0/data-sources/mailgun.md b/docs/versioned_docs/version-2.18.0/data-sources/mailgun.md
index 6b4c71ca78..09907b82d1 100644
--- a/docs/versioned_docs/version-2.18.0/data-sources/mailgun.md
+++ b/docs/versioned_docs/version-2.18.0/data-sources/mailgun.md
@@ -15,7 +15,7 @@ The Mailgun API Datasource supports for interaction with the mail endpoint of th
## Connection
-To add a new Mailgun API datasource, click the **Datasource manager** icon on the left-sidebar of the app builder and click on the `Add datasource` button, then select Mailgun API from the modal that pops up.
+To establish a connection with the MailGun data source, click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
Enter your **Mailgun API key** in the "API key" field.
@@ -58,7 +58,3 @@ For example: `admin@tooljet.io`
**Send multiple individual emails to multiple recipients** - set Multiple recipients field to `{{true}}` and the `Send mail to` field will be split into multiple emails and send to each recipient.
:::
-
-:::note
-NOTE: Query should be saved before running.
-:::
diff --git a/docs/versioned_docs/version-2.18.0/data-sources/minio.md b/docs/versioned_docs/version-2.18.0/data-sources/minio.md
index 3f19ffc32d..0ac53fd17d 100644
--- a/docs/versioned_docs/version-2.18.0/data-sources/minio.md
+++ b/docs/versioned_docs/version-2.18.0/data-sources/minio.md
@@ -20,7 +20,7 @@ ToolJet can connect to minio and perform various operation on them.
## Connection
-To add a new minio source, click on the **Add or edit datasource** icon on the left sidebar of the app editor and click on `Add datasource` button. Select Minio from the modal that pops up.
+To establish a connection with the Minio data source, click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
ToolJet requires the following to connect to your DynamoDB:
@@ -44,7 +44,7 @@ Click on `+` button of the **query manager** at the bottom panel of the editor a
Click on the **run** button to run the query.
-**NOTE**: Query should be saved before running.
+
:::tip
Query results can be transformed using transformations. Read our transformations documentation to see how: [link](/docs/tutorial/transformations)
diff --git a/docs/versioned_docs/version-2.18.0/data-sources/mongodb.md b/docs/versioned_docs/version-2.18.0/data-sources/mongodb.md
index 0ae21b519a..8a4dea7b16 100644
--- a/docs/versioned_docs/version-2.18.0/data-sources/mongodb.md
+++ b/docs/versioned_docs/version-2.18.0/data-sources/mongodb.md
@@ -11,7 +11,7 @@ ToolJet can connect to MongoDB to read and write data.
Please make sure the host/ip of the database is accessible from your VPC if you have self-hosted ToolJet. If you are using ToolJet cloud, please whitelist our IP.
-To add a new MongoDB, click on the `+` button on data sources panel at the left-bottom corner of the app editor. Select MongoDB from the modal that pops up.
+To establish a connection with the MongoDB data source, click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
ToolJet requires the following to connect to your MongoDB.
@@ -32,15 +32,14 @@ Click on `+` button of the query manager at the bottom panel of the editor and s
-
-
-Click on the 'run' button to run the query. NOTE: Query should be saved before running.
+Click on the 'run' button to run the query.
:::tip
Query results can be transformed using transformations. Read our transformations documentation to see how: [link](/docs/tutorial/transformations)
:::
### Supported operations
+
- [List Collections](#list-collections)
- [Find One](#find-one)
- [Find Many](#find-many)
@@ -59,51 +58,89 @@ Query results can be transformed using transformations. Read our transformations
- [Delete One](#delete-one)
- [Delete Many](#delete-many)
- [Bulk Operations](#bulk-operations)
+
#### List Collections
+
Returns list of collections
+
#### Fine One
+
Return a document which satisfy the given filter and options. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/findOne)
+
#### Fine Many
+
Return list of documents which satisfy the given filter and options. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/find/)
+
#### Total Count
+
Returns an estimation of the number of documents in the collection based on collection metadata. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#estimateddocumentcount)
+
#### Count
+
Returns the number of documents based on the filter. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#countdocuments)
+
#### Distinct
+
Retrieve a list of distinct values for a field based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/distinct/)
+
#### Insert One
+
Insert a document. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/insertOne/)
+
#### Insert Many
+
Insert list of documents. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/insertMany/)
+
#### Update One
+
Update a document based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/updateOne/)
+
#### Update Many
+
Update many documents based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/updateMany/)
+
#### Replace One
+
Replace a document based on filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/replaceOne/)
+
#### Find One and Update
+
If your application requires the document after updating, use this instead of `Update One`. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#findoneandupdate)
+
#### Find One and Replace
+
If your application requires the document after updating, use this instead of `Replace One`. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#findoneandreplace)
+
#### Find One and Delete
+
If your application requires the document after deleting, use this instead of `Delete One`. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#findoneanddelete)
+
#### Aggregate
+
Aggregation operations are expressions you can use to produce reduced and summarized results. [Reference](https://docs.mongodb.com/drivers/node/v4.0/fundamentals/aggregation/)
+
#### Delete One
+
Delete a record based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/deleteOne/)
+
#### Delete Many
+
Delete many records based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/deleteMany/)
+
#### Bulk Operations
+
Perform bulk operations. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/bulkWrite/)
### Dynamic Quries
+
```javascript
{ amount: { $lt: '{{ components.textinput1.value }}' }}
-// Dates
+// Dates
// supported: Extended JSON syntax
{ createdAt: { $date: '{{ new Date('01/10/2020') }}'} }
// not supported: MongoDB classic syntax
{ createdAt: new Date('01/10/2020') }
```
+
Reference on [mongodb extended JSON](https://docs.mongodb.com/manual/reference/mongodb-extended-json/) supported data types
diff --git a/docs/versioned_docs/version-2.18.0/data-sources/mssql.md b/docs/versioned_docs/version-2.18.0/data-sources/mssql.md
index a8aa169ce5..0f9fa32b2f 100644
--- a/docs/versioned_docs/version-2.18.0/data-sources/mssql.md
+++ b/docs/versioned_docs/version-2.18.0/data-sources/mssql.md
@@ -12,7 +12,7 @@ ToolJet can connect to MS SQL Server & Azure SQL databases to read and write dat
Please make sure the host/ip of the database is accessible from your VPC if you have self-hosted ToolJet. If you are using ToolJet cloud, please whitelist our IP.
-To add new MS SQL Server / Azure SQL database, click on the '+' button on data sources panel at the left-bottom corner of the app editor. Select `SQL Server` from the modal that pops up.
+To establish a connection with the MS SQL Server data source, click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
ToolJet requires the following to connect to your PostgreSQL database.
@@ -32,7 +32,7 @@ Click on 'Test connection' button to verify if the credentials are correct and t
## Querying SQL Server / Azure SQL databases
Click on '+' button of the query manager at the bottom panel of the editor and select the database added in the previous step as the data source.
-Click on the 'run' button to run the query. NOTE: Query should be saved before running.
+Click on the 'run' button to run the query.
diff --git a/docs/versioned_docs/version-2.18.0/data-sources/mysql.md b/docs/versioned_docs/version-2.18.0/data-sources/mysql.md
index 63af848971..c349d83171 100644
--- a/docs/versioned_docs/version-2.18.0/data-sources/mysql.md
+++ b/docs/versioned_docs/version-2.18.0/data-sources/mysql.md
@@ -7,11 +7,11 @@ ToolJet can connect to MySQL databases to read and write data.
## Connection
-To establish a connection with the MySQL datasource, you can either click on the `+Add New` button located on the query panel or navigate to the **[Global Datasources](/docs/data-sources/overview)** page through the ToolJet dashboard.
+To establish a connection with the MySQL data source, you can either click on the `+Add New` button located on the query panel or navigate to the **[Data Sources](/docs/data-sources/overview)** page through the ToolJet dashboard.
+
-
:::tip
Before querying Notion, you must share the database with your integration. Click the share button in your database view, find your integration name select it.
-
-
:::
### Database
On database resource you can perform the following operations:
+
- **[Retrieve a database](#1-retrieve-a-database)**
- **[Query a database](#2-query-a-database)**
- **[Create a database](#3-create-a-database)**
- **[Update a database](#4-update-a-database)**
-
-
#### 1. Retrieve a database
This operations retrieves a Database object using the ID specified.
@@ -57,13 +57,12 @@ This operations retrieves a Database object using the ID specified.
- **Database ID**: You'll find the Database ID in the url. Suppose this is the example url: `https://www.notion.so/workspace/XXX?v=YYY&p=ZZZ` then `XXX` is the database ID, `YYY` is the view ID and `ZZZ` is the page ID.
-
-
#### 2. Query a database
This operation gets a list of **Pages** contained in the database, filtered and ordered according to the filter conditions and sort criteria provided in the query.
+
##### Required parameters:
- **Database ID** : You'll find the Database ID in the url. Suppose this is the example url: `https://www.notion.so/workspace/XXX?v=YYY&p=ZZZ` then `XXX` is the database ID, `YYY` is the view ID and `ZZZ` is the page ID.
@@ -98,6 +97,7 @@ This operation creates a database as a subpage in the specified parent page, wit
This operation updates an existing database as specified by the parameters.
##### Required parameters:
+
- **Database ID**
##### Optional parameters:
@@ -112,24 +112,29 @@ This operation updates an existing database as specified by the parameters.
### Page
On page resource you can perform the following operations:
+
- **[Retrieve a page](#1-retrieve-a-page)**
- **[Create a page](#2-create-a-page)**
- **[Update a page](#3-update-a-page)**
- **[Retrieve a page property](#4-retrieve-a-page-property-item)**
- **[Archive a page](#5-archive-delete-a-page)**
-
-
#### 1. Retrieve a page
+
This operation retrieves a **Page** object using the ID specified.
+
##### Required parameters:
+
- **Page ID**
#### 2. Create a page
+
This operation creates a new page in the specified database or as a child of an existing page. If the parent is a database, the property values of the new page in the properties parameter must conform to the parent database's property schema. If the parent is a page, the only valid property is title.
+
##### Parameters:
+
- **Page ID**
- **Properties** : Property values of this page
- **Icon type** : Currently notion api accepts two icon options, emoji, external URL
@@ -138,8 +143,11 @@ This operation creates a new page in the specified database or as a child of an
- **Cover value** : Value of selected cover type
#### 3. Update a page
+
This operation updates page property values for the specified page. Properties that are not set via the properties parameter will remain unchanged.
+
##### Parameters:
+
- **Page ID**
- **Parent type**: A database parent or page parent
- **Properties** : Property values of this page
@@ -150,77 +158,94 @@ This operation updates page property values for the specified page. Properties t
- **Cover value** : Value of selected cover type
#### 4. Retrieve a page property item
+
This operation retrieves a property_item object for a given page ID and property ID. Depending on the property type, the object returned will either be a value or a paginated list of property item values. See Property item objects for specifics.
+
##### Parameters:
+
- **Page ID**
- **Property ID**
- **Limit**
- **Start cursor**
#### 5. Archive (delete) a page
+
##### Required parameters:
+
- **Page ID**
- **Archive**: Dropdown for archive and un archive the page
### Blocks
+
The following operations can be performed on the block resource:
+
- **[Retrieve a block](#1-retrieve-a-block)**
- **[Append block children](#2-append-new-block-children)**
- **[Retrieve block children](#3-retrieve-block-children)**
- **[Update a block](#4-update-a-block)**
- **[Delete a block](#5-delete-a-block)**
-
-
:::info
To get the id for blocks, simply click on the menu icon for the block and click "Copy link". Afterwards, paste the link in the browser and it should look like this: `https://www.notion.so/Creating-Page-Sample-ee18b8779ae54f358b09221d6665ee15#7fcb3940a1264aadb2ad4ee9ffe11b0e` the string after **#** is the block id i.e. `7fcb3940a1264aadb2ad4ee9ffe11b0e`.
:::
#### 1. Retrieve a block
+
This operation retrieves a **Block** object using the ID specified.
##### Required parameters:
+
- **Block ID**
#### 2. Append new block children
+
This operation creates and appends new children blocks to the parent block_id specified.
##### Required parameters:
+
- **Block ID**
- **Children**: Array of block objects
#### 3. Retrieve block children
+
This operation retrieves a paginated array of child block objects contained in the block using the ID specified.
##### Required parameters:
+
- **Block ID**
- **Limit**
- **Start cursor**
#### 4. Update a block
+
This operation updates the content for the specified block_id based on the block type.
##### Required parameters:
+
- **Block ID**
- **Properties**: The block object type value with the properties to be updated
- **Archive**
#### 5. Delete a block
+
##### Required parameters:
+
- **Block ID**
### User
+
The following operations can be performed on the user notion resource:
#### 1. Retrieve a user from current workspace
-This operation retrieves a User using the ID specified.
+This operation retrieves a User using the ID specified.
##### Required parameters:
+
- **User ID**
#### 2. Retrieve list of users of a workspace
@@ -228,6 +253,7 @@ This operation retrieves a User using the ID specified.
This operation returns a paginated list of Users for the workspace.
##### Required parameters:
+
- **Limit**
- **Start cursor**
diff --git a/docs/versioned_docs/version-2.18.0/data-sources/s3.md b/docs/versioned_docs/version-2.18.0/data-sources/s3.md
index db8f35c780..60488139a9 100644
--- a/docs/versioned_docs/version-2.18.0/data-sources/s3.md
+++ b/docs/versioned_docs/version-2.18.0/data-sources/s3.md
@@ -9,7 +9,7 @@ ToolJet can connect to Amazon S3 buckets and perform various operation on them.
## Connection
-To add a new S3 source, go to the **Datasources manager** on the left sidebar of the app editor and click on `Add datasource` button. Select **AWS S3** from the modal that pops up.
+To add a new S3 source, go to the **Data sources manager** on the left sidebar of the app editor and click on `Add data source` button. Select **AWS S3** from the modal that pops up.
ToolJet supports connecting to AWS S3 using **IAM credentials**, **AWS Instance Profile** or **AWS ARN Role**.
@@ -155,5 +155,5 @@ The presigned URLs are useful if you want your user/customer to be able to uploa
:::info
-We built an app to view and upload files to AWS S3 buckets. Check out the complete tutorial **[here](https://blog.tooljet.com/building-an-app-to-view-and-upload-files-in-aws-s3-bucket/)**.
+We built an app to view and upload files to AWS S3 buckets. Check out the complete tutorial **[here](https://blog.tooljet.com/build-an-aws-s3-broswer-with-tooljet/)**.
:::
diff --git a/docs/versioned_docs/version-2.18.0/widgets/html.md b/docs/versioned_docs/version-2.18.0/widgets/html.md
index 41908bef43..cc1e06c574 100644
--- a/docs/versioned_docs/version-2.18.0/widgets/html.md
+++ b/docs/versioned_docs/version-2.18.0/widgets/html.md
@@ -1,9 +1,9 @@
---
id: html
-title: HTML
+title: HTML Viewer
---
-# HTML
+# HTML Viewer
HTML widget can be used to create your own HTML-CSS layout.
diff --git a/docs/versioned_docs/version-2.18.0/widgets/rich-text-editor.md b/docs/versioned_docs/version-2.18.0/widgets/rich-text-editor.md
index 7c5ba592d7..9d99fb99e3 100644
--- a/docs/versioned_docs/version-2.18.0/widgets/rich-text-editor.md
+++ b/docs/versioned_docs/version-2.18.0/widgets/rich-text-editor.md
@@ -1,8 +1,8 @@
---
id: rich-text-editor
-title: Rich Text Editor
+title: Text Editor
---
-# Rich Text Editor
+# Text Editor
Rich Text Editor can be used to enter and edit the text in HTML format.
It should be preferred for blog posts, forum posts or notes sections. The text is to be used as the label for the radio button.
diff --git a/docs/versioned_docs/version-2.19.0/data-sources/appwrite.md b/docs/versioned_docs/version-2.19.0/data-sources/appwrite.md
index dc11572625..c987afdd6b 100644
--- a/docs/versioned_docs/version-2.19.0/data-sources/appwrite.md
+++ b/docs/versioned_docs/version-2.19.0/data-sources/appwrite.md
@@ -1,11 +1,11 @@
---
id: appwrite
-title: Appwrite Database
+title: Appwrite
---
-# Appwrite Database
+# Appwrite
-Now build applications on top of your Appwrite database.
+ToolJet can connect to appwrite database to read/write data.
## Connection
@@ -20,7 +20,7 @@ You'll find the Secret key and other credentials on your Appwrite's project sett
You should also set the scope for access to a particular resource. Learn more about the **API keys and scopes** [here](https://appwrite.io/docs/keys).
:::
-To connect Appwrite datasource to your ToolJet application, go to the data source manager on the left-sidebar and click on the `+` button. Select Appwrite from the list of available datasources, provide the credentials and click **Save**. It is recommended to check the connection by clicking on 'Test connection' button to verify if the service account can access Appwrite from the ToolJet server.
+To establish a connection with the Appwrite data source, you can either click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
-Click on the **run** button to run the query. NOTE: Query should be saved before running.
:::tip
Query results can be transformed using transformations. Read our transformations documentation to see how: [link](/docs/tutorial/transformations)
@@ -157,4 +154,4 @@ NOTE: visit -https://github.com/googleapis/nodejs-bigquery/blob/main/samples/cre
:::
### Delete Table
-- To delete a table.
\ No newline at end of file
+- To delete a table.
diff --git a/docs/versioned_docs/version-2.19.0/data-sources/cosmosdb.md b/docs/versioned_docs/version-2.19.0/data-sources/cosmosdb.md
index a924932750..9ffe9b3e6d 100644
--- a/docs/versioned_docs/version-2.19.0/data-sources/cosmosdb.md
+++ b/docs/versioned_docs/version-2.19.0/data-sources/cosmosdb.md
@@ -2,14 +2,14 @@
id: cosmosdb
title: CosmosDB
---
+
# Cosmosdb
-ToolJet can connect to CosmosDB databases to read and write data.
-
+ToolJet can connect to CosmosDB databases to read and write data.
## Connection
-To add a new **[Azure Cosmos DB](https://docs.microsoft.com/en-us/javascript/api/overview/azure/cosmos-readme?view=azure-node-latest#key-concepts)**, click on the `+` button on data sources panel at the left-bottom corner of the app editor. Select CosmosDB from the modal that pops up.
+To establish a connection with the CosmosDB data source, you can either click on the `+Add new data source` button located on the query panel or navigate to the **[Data Sources](/docs/data-sources/overview)** page through the ToolJet dashboard.
ToolJet requires the following to connect to your Cosmos DB.
@@ -28,8 +28,7 @@ You can find the endpoint and key in the **[Azure Portal](https://portal.azure.c
@@ -122,10 +122,6 @@ The returned JSON is the JSON of the document, including the document ID and rev
Click on the `run` button to run the query.
-:::info
-NOTE: Query must be saved before running.
-:::
-
Example response from CouchDb:
```json
@@ -137,12 +133,12 @@ Example response from CouchDb:
```
-### Updating a record
+### Updating a Record
You can get the revision id value, by sending a GET request to get the document details.
You get the document as JSON in the response. For each update to the document, the revision field "_rev" gets changed.
-#### Required parameters:
+#### Required Parameters:
- **Revision ID**
- **Record ID**
@@ -150,7 +146,7 @@ You get the document as JSON in the response. For each update to the document, t
-#### Example body:
+#### Example Body:
```json
[{"name":"tooljet"}]
@@ -172,9 +168,9 @@ Example response from CouchDb:
}
```
-### Deleting a record
+### Deleting a Record
-#### Required parameters:
+#### Required Parameters:
- **Revision ID**
- **Record ID**
@@ -200,7 +196,7 @@ Example response from CouchDb:
Find documents using a declarative JSON querying syntax.
-#### Required parameters:
+#### Required Parameters:
- **Selector**
:::info
@@ -212,7 +208,7 @@ selector syntax: https://pouchdb.com/guides/mango-queries.html
-#### Example body:
+#### Example Body:
```json
{
@@ -239,11 +235,11 @@ Example response from CouchDb:
-### Retrieving a view
+### Retrieving a View
Views are the primary tool used for querying and reporting on CouchDB documents.
-#### Required parameters:
+#### Required Parameters:
- **View url**
Reference for view :https://docs.couchdb.org/en/3.2.0/ddocs/views/intro.html#what-is-a-view
@@ -252,7 +248,7 @@ Reference for view :https://docs.couchdb.org/en/3.2.0/ddocs/views/intro.html#wha
-#### Optional parameters:
+#### Optional Parameters:
- **Start key**
- **End key**
diff --git a/docs/versioned_docs/version-2.19.0/data-sources/dynamodb.md b/docs/versioned_docs/version-2.19.0/data-sources/dynamodb.md
index abaacaa48c..127a917898 100644
--- a/docs/versioned_docs/version-2.19.0/data-sources/dynamodb.md
+++ b/docs/versioned_docs/version-2.19.0/data-sources/dynamodb.md
@@ -8,7 +8,7 @@ DynamoDB is a managed non-relational database service provided by Amazon. ToolJe
## Connection
-To establish a connection with the DynamoDB global datasource, you can either click on the `+Add new global datasource` button located on the query panel or navigate to the **[Global Datasources](/docs/data-sources/overview)** page through the ToolJet dashboard.
+To establish a connection with the DynamoDB data source, you can either click on the `+Add new data source` button located on the query panel or navigate to the **[Data sources](/docs/data-sources/overview)** page through the ToolJet dashboard.
diff --git a/docs/versioned_docs/version-2.19.0/data-sources/firestore.md b/docs/versioned_docs/version-2.19.0/data-sources/firestore.md
index c0375c29c6..4b86322ea5 100644
--- a/docs/versioned_docs/version-2.19.0/data-sources/firestore.md
+++ b/docs/versioned_docs/version-2.19.0/data-sources/firestore.md
@@ -4,12 +4,14 @@ title: Cloud Firestore
---
# Cloud Firestore
+ToolJet can connect to Cloud Firestore databases to read and write data.
## Connection
-ToolJet connects to your Cloud Firestore using JSON key of your GCP service account.
-To generate a new key, check out [Firestore's official documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#iam-service-account-keys-create-console).
+ToolJet connects to your Cloud Firestore using JSON key of your GCP service account. Get your service account key as JSON from GCP console. For generating a new key, check out [Firestore's official documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#iam-service-account-keys-create-console).
-Once the key is downloaded, click on `+` button of data sources panel at the left-bottom corner of the app editor. Select Firestore from the modal that pops up. Paste the key in the field for GCP key. Click on **Test connection** button to verify if the service account can access Firestore from ToolJet server. Click on **Save** button to save the datasource.
+Once you have the key, open it in a text editor and copy the contents. Paste the contents in the **Private key** field of the Firestore data source modal.
+
+Click on **Test connection** button to verify if the key is valid. Click on **Save** button to save the data source.
@@ -160,4 +162,4 @@ The Firestore query result is in the form of object so we’ll need to transform
```js
return data = Array(data)
-```
\ No newline at end of file
+```
diff --git a/docs/versioned_docs/version-2.19.0/data-sources/gcs.md b/docs/versioned_docs/version-2.19.0/data-sources/gcs.md
index 6483a43408..03cad29535 100644
--- a/docs/versioned_docs/version-2.19.0/data-sources/gcs.md
+++ b/docs/versioned_docs/version-2.19.0/data-sources/gcs.md
@@ -9,19 +9,18 @@ ToolJet can connect to GCS buckets and perform various operation on them.
## Supported operations
--**Read file**
--**Upload file**
--**List buckets**
--**List files in a bucket**
--**Signed url for download**
--**Signed url for upload**
+- **Read file**
+- **Upload file**
+- **List buckets**
+- **List files in a bucket**
+- **Signed url for download**
+- **Signed url for upload**
## Connection
-To add a new GCS source, click on the **Add or edit datasource** icon on the left sidebar of the app editor and click on `Add datasource` button. Select GCS from the modal that pops up.
+To establish a connection with the Google Cloud Storage data source, you can either click on the `+Add new data source` button located on the query panel or navigate to the **[Data Sources](/docs/data-sources/overview)** page through the ToolJet dashboard.
-ToolJet requires the **json private key** of a service account to be able to connect to GCS.
-You can follow the [google documentation](https://cloud.google.com/docs/authentication/getting-started) to get started.
+To connect to GCS, you need to provide the JSON Private Key of a service account that has access to the bucket. You can follow the [google documentation](https://cloud.google.com/docs/authentication/getting-started) to get started.
diff --git a/docs/versioned_docs/version-2.19.0/data-sources/mailgun.md b/docs/versioned_docs/version-2.19.0/data-sources/mailgun.md
index 6b4c71ca78..09907b82d1 100644
--- a/docs/versioned_docs/version-2.19.0/data-sources/mailgun.md
+++ b/docs/versioned_docs/version-2.19.0/data-sources/mailgun.md
@@ -15,7 +15,7 @@ The Mailgun API Datasource supports for interaction with the mail endpoint of th
## Connection
-To add a new Mailgun API datasource, click the **Datasource manager** icon on the left-sidebar of the app builder and click on the `Add datasource` button, then select Mailgun API from the modal that pops up.
+To establish a connection with the MailGun data source, click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
Enter your **Mailgun API key** in the "API key" field.
@@ -58,7 +58,3 @@ For example: `admin@tooljet.io`
**Send multiple individual emails to multiple recipients** - set Multiple recipients field to `{{true}}` and the `Send mail to` field will be split into multiple emails and send to each recipient.
:::
-
-:::note
-NOTE: Query should be saved before running.
-:::
diff --git a/docs/versioned_docs/version-2.19.0/data-sources/minio.md b/docs/versioned_docs/version-2.19.0/data-sources/minio.md
index 3f19ffc32d..0ac53fd17d 100644
--- a/docs/versioned_docs/version-2.19.0/data-sources/minio.md
+++ b/docs/versioned_docs/version-2.19.0/data-sources/minio.md
@@ -20,7 +20,7 @@ ToolJet can connect to minio and perform various operation on them.
## Connection
-To add a new minio source, click on the **Add or edit datasource** icon on the left sidebar of the app editor and click on `Add datasource` button. Select Minio from the modal that pops up.
+To establish a connection with the Minio data source, click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
ToolJet requires the following to connect to your DynamoDB:
@@ -44,7 +44,7 @@ Click on `+` button of the **query manager** at the bottom panel of the editor a
Click on the **run** button to run the query.
-**NOTE**: Query should be saved before running.
+
:::tip
Query results can be transformed using transformations. Read our transformations documentation to see how: [link](/docs/tutorial/transformations)
diff --git a/docs/versioned_docs/version-2.19.0/data-sources/mongodb.md b/docs/versioned_docs/version-2.19.0/data-sources/mongodb.md
index 0ae21b519a..8a4dea7b16 100644
--- a/docs/versioned_docs/version-2.19.0/data-sources/mongodb.md
+++ b/docs/versioned_docs/version-2.19.0/data-sources/mongodb.md
@@ -11,7 +11,7 @@ ToolJet can connect to MongoDB to read and write data.
Please make sure the host/ip of the database is accessible from your VPC if you have self-hosted ToolJet. If you are using ToolJet cloud, please whitelist our IP.
-To add a new MongoDB, click on the `+` button on data sources panel at the left-bottom corner of the app editor. Select MongoDB from the modal that pops up.
+To establish a connection with the MongoDB data source, click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
ToolJet requires the following to connect to your MongoDB.
@@ -32,15 +32,14 @@ Click on `+` button of the query manager at the bottom panel of the editor and s
-
-
-Click on the 'run' button to run the query. NOTE: Query should be saved before running.
+Click on the 'run' button to run the query.
:::tip
Query results can be transformed using transformations. Read our transformations documentation to see how: [link](/docs/tutorial/transformations)
:::
### Supported operations
+
- [List Collections](#list-collections)
- [Find One](#find-one)
- [Find Many](#find-many)
@@ -59,51 +58,89 @@ Query results can be transformed using transformations. Read our transformations
- [Delete One](#delete-one)
- [Delete Many](#delete-many)
- [Bulk Operations](#bulk-operations)
+
#### List Collections
+
Returns list of collections
+
#### Fine One
+
Return a document which satisfy the given filter and options. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/findOne)
+
#### Fine Many
+
Return list of documents which satisfy the given filter and options. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/find/)
+
#### Total Count
+
Returns an estimation of the number of documents in the collection based on collection metadata. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#estimateddocumentcount)
+
#### Count
+
Returns the number of documents based on the filter. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#countdocuments)
+
#### Distinct
+
Retrieve a list of distinct values for a field based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/distinct/)
+
#### Insert One
+
Insert a document. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/insertOne/)
+
#### Insert Many
+
Insert list of documents. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/insertMany/)
+
#### Update One
+
Update a document based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/updateOne/)
+
#### Update Many
+
Update many documents based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/updateMany/)
+
#### Replace One
+
Replace a document based on filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/replaceOne/)
+
#### Find One and Update
+
If your application requires the document after updating, use this instead of `Update One`. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#findoneandupdate)
+
#### Find One and Replace
+
If your application requires the document after updating, use this instead of `Replace One`. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#findoneandreplace)
+
#### Find One and Delete
+
If your application requires the document after deleting, use this instead of `Delete One`. [Reference](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#findoneanddelete)
+
#### Aggregate
+
Aggregation operations are expressions you can use to produce reduced and summarized results. [Reference](https://docs.mongodb.com/drivers/node/v4.0/fundamentals/aggregation/)
+
#### Delete One
+
Delete a record based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/deleteOne/)
+
#### Delete Many
+
Delete many records based on the filter. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/deleteMany/)
+
#### Bulk Operations
+
Perform bulk operations. [Reference](https://docs.mongodb.com/drivers/node/v4.0/usage-examples/bulkWrite/)
### Dynamic Quries
+
```javascript
{ amount: { $lt: '{{ components.textinput1.value }}' }}
-// Dates
+// Dates
// supported: Extended JSON syntax
{ createdAt: { $date: '{{ new Date('01/10/2020') }}'} }
// not supported: MongoDB classic syntax
{ createdAt: new Date('01/10/2020') }
```
+
Reference on [mongodb extended JSON](https://docs.mongodb.com/manual/reference/mongodb-extended-json/) supported data types
diff --git a/docs/versioned_docs/version-2.19.0/data-sources/mssql.md b/docs/versioned_docs/version-2.19.0/data-sources/mssql.md
index a8aa169ce5..0f9fa32b2f 100644
--- a/docs/versioned_docs/version-2.19.0/data-sources/mssql.md
+++ b/docs/versioned_docs/version-2.19.0/data-sources/mssql.md
@@ -12,7 +12,7 @@ ToolJet can connect to MS SQL Server & Azure SQL databases to read and write dat
Please make sure the host/ip of the database is accessible from your VPC if you have self-hosted ToolJet. If you are using ToolJet cloud, please whitelist our IP.
-To add new MS SQL Server / Azure SQL database, click on the '+' button on data sources panel at the left-bottom corner of the app editor. Select `SQL Server` from the modal that pops up.
+To establish a connection with the MS SQL Server data source, click on the `+Add new data source` button located on the query panel or navigate to the [Data Sources](https://docs.tooljet.com/docs/data-sources/overview) page from the ToolJet dashboard.
ToolJet requires the following to connect to your PostgreSQL database.
@@ -32,7 +32,7 @@ Click on 'Test connection' button to verify if the credentials are correct and t
## Querying SQL Server / Azure SQL databases
Click on '+' button of the query manager at the bottom panel of the editor and select the database added in the previous step as the data source.
-Click on the 'run' button to run the query. NOTE: Query should be saved before running.
+Click on the 'run' button to run the query.
diff --git a/docs/versioned_docs/version-2.19.0/data-sources/mysql.md b/docs/versioned_docs/version-2.19.0/data-sources/mysql.md
index 63af848971..c349d83171 100644
--- a/docs/versioned_docs/version-2.19.0/data-sources/mysql.md
+++ b/docs/versioned_docs/version-2.19.0/data-sources/mysql.md
@@ -7,11 +7,11 @@ ToolJet can connect to MySQL databases to read and write data.
## Connection
-To establish a connection with the MySQL datasource, you can either click on the `+Add New` button located on the query panel or navigate to the **[Global Datasources](/docs/data-sources/overview)** page through the ToolJet dashboard.
+To establish a connection with the MySQL data source, you can either click on the `+Add New` button located on the query panel or navigate to the **[Data Sources](/docs/data-sources/overview)** page through the ToolJet dashboard.
+
-
:::tip
Before querying Notion, you must share the database with your integration. Click the share button in your database view, find your integration name select it.
-
-
:::
### Database
On database resource you can perform the following operations:
+
- **[Retrieve a database](#1-retrieve-a-database)**
- **[Query a database](#2-query-a-database)**
- **[Create a database](#3-create-a-database)**
- **[Update a database](#4-update-a-database)**
-
-
#### 1. Retrieve a database
This operations retrieves a Database object using the ID specified.
@@ -57,13 +57,12 @@ This operations retrieves a Database object using the ID specified.
- **Database ID**: You'll find the Database ID in the url. Suppose this is the example url: `https://www.notion.so/workspace/XXX?v=YYY&p=ZZZ` then `XXX` is the database ID, `YYY` is the view ID and `ZZZ` is the page ID.
-
-
#### 2. Query a database
This operation gets a list of **Pages** contained in the database, filtered and ordered according to the filter conditions and sort criteria provided in the query.
+
##### Required parameters:
- **Database ID** : You'll find the Database ID in the url. Suppose this is the example url: `https://www.notion.so/workspace/XXX?v=YYY&p=ZZZ` then `XXX` is the database ID, `YYY` is the view ID and `ZZZ` is the page ID.
@@ -98,6 +97,7 @@ This operation creates a database as a subpage in the specified parent page, wit
This operation updates an existing database as specified by the parameters.
##### Required parameters:
+
- **Database ID**
##### Optional parameters:
@@ -112,24 +112,29 @@ This operation updates an existing database as specified by the parameters.
### Page
On page resource you can perform the following operations:
+
- **[Retrieve a page](#1-retrieve-a-page)**
- **[Create a page](#2-create-a-page)**
- **[Update a page](#3-update-a-page)**
- **[Retrieve a page property](#4-retrieve-a-page-property-item)**
- **[Archive a page](#5-archive-delete-a-page)**
-
-
#### 1. Retrieve a page
+
This operation retrieves a **Page** object using the ID specified.
+
##### Required parameters:
+
- **Page ID**
#### 2. Create a page
+
This operation creates a new page in the specified database or as a child of an existing page. If the parent is a database, the property values of the new page in the properties parameter must conform to the parent database's property schema. If the parent is a page, the only valid property is title.
+
##### Parameters:
+
- **Page ID**
- **Properties** : Property values of this page
- **Icon type** : Currently notion api accepts two icon options, emoji, external URL
@@ -138,8 +143,11 @@ This operation creates a new page in the specified database or as a child of an
- **Cover value** : Value of selected cover type
#### 3. Update a page
+
This operation updates page property values for the specified page. Properties that are not set via the properties parameter will remain unchanged.
+
##### Parameters:
+
- **Page ID**
- **Parent type**: A database parent or page parent
- **Properties** : Property values of this page
@@ -150,77 +158,94 @@ This operation updates page property values for the specified page. Properties t
- **Cover value** : Value of selected cover type
#### 4. Retrieve a page property item
+
This operation retrieves a property_item object for a given page ID and property ID. Depending on the property type, the object returned will either be a value or a paginated list of property item values. See Property item objects for specifics.
+
##### Parameters:
+
- **Page ID**
- **Property ID**
- **Limit**
- **Start cursor**
#### 5. Archive (delete) a page
+
##### Required parameters:
+
- **Page ID**
- **Archive**: Dropdown for archive and un archive the page
### Blocks
+
The following operations can be performed on the block resource:
+
- **[Retrieve a block](#1-retrieve-a-block)**
- **[Append block children](#2-append-new-block-children)**
- **[Retrieve block children](#3-retrieve-block-children)**
- **[Update a block](#4-update-a-block)**
- **[Delete a block](#5-delete-a-block)**
-
-
:::info
To get the id for blocks, simply click on the menu icon for the block and click "Copy link". Afterwards, paste the link in the browser and it should look like this: `https://www.notion.so/Creating-Page-Sample-ee18b8779ae54f358b09221d6665ee15#7fcb3940a1264aadb2ad4ee9ffe11b0e` the string after **#** is the block id i.e. `7fcb3940a1264aadb2ad4ee9ffe11b0e`.
:::
#### 1. Retrieve a block
+
This operation retrieves a **Block** object using the ID specified.
##### Required parameters:
+
- **Block ID**
#### 2. Append new block children
+
This operation creates and appends new children blocks to the parent block_id specified.
##### Required parameters:
+
- **Block ID**
- **Children**: Array of block objects
#### 3. Retrieve block children
+
This operation retrieves a paginated array of child block objects contained in the block using the ID specified.
##### Required parameters:
+
- **Block ID**
- **Limit**
- **Start cursor**
#### 4. Update a block
+
This operation updates the content for the specified block_id based on the block type.
##### Required parameters:
+
- **Block ID**
- **Properties**: The block object type value with the properties to be updated
- **Archive**
#### 5. Delete a block
+
##### Required parameters:
+
- **Block ID**
### User
+
The following operations can be performed on the user notion resource:
#### 1. Retrieve a user from current workspace
-This operation retrieves a User using the ID specified.
+This operation retrieves a User using the ID specified.
##### Required parameters:
+
- **User ID**
#### 2. Retrieve list of users of a workspace
@@ -228,6 +253,7 @@ This operation retrieves a User using the ID specified.
This operation returns a paginated list of Users for the workspace.
##### Required parameters:
+
- **Limit**
- **Start cursor**
diff --git a/docs/versioned_docs/version-2.19.0/data-sources/s3.md b/docs/versioned_docs/version-2.19.0/data-sources/s3.md
index ba1a029fb2..016630a1dd 100644
--- a/docs/versioned_docs/version-2.19.0/data-sources/s3.md
+++ b/docs/versioned_docs/version-2.19.0/data-sources/s3.md
@@ -9,7 +9,7 @@ ToolJet can connect to Amazon S3 buckets and perform various operation on them.
## Connection
-To add a new S3 source, go to the **Datasources manager** on the left sidebar of the app editor and click on `Add datasource` button. Select **AWS S3** from the modal that pops up.
+To add a new S3 source, go to the **Data sources manager** on the left sidebar of the app editor and click on `Add data source` button. Select **AWS S3** from the modal that pops up.
ToolJet requires the following to connect to your AWS S3:
@@ -133,5 +133,5 @@ The presigned URLs are useful if you want your user/customer to be able to uploa
:::info
-We built an app to view and upload files to AWS S3 buckets. Check out the complete tutorial **[here](https://blog.tooljet.com/building-an-app-to-view-and-upload-files-in-aws-s3-bucket/)**.
+We built an app to view and upload files to AWS S3 buckets. Check out the complete tutorial **[here](https://blog.tooljet.com/build-an-aws-s3-broswer-with-tooljet/)**.
:::
diff --git a/docs/versioned_docs/version-2.19.0/widgets/html.md b/docs/versioned_docs/version-2.19.0/widgets/html.md
index 41908bef43..cc1e06c574 100644
--- a/docs/versioned_docs/version-2.19.0/widgets/html.md
+++ b/docs/versioned_docs/version-2.19.0/widgets/html.md
@@ -1,9 +1,9 @@
---
id: html
-title: HTML
+title: HTML Viewer
---
-# HTML
+# HTML Viewer
HTML widget can be used to create your own HTML-CSS layout.
diff --git a/docs/versioned_docs/version-2.19.0/widgets/rich-text-editor.md b/docs/versioned_docs/version-2.19.0/widgets/rich-text-editor.md
index 7c5ba592d7..9d99fb99e3 100644
--- a/docs/versioned_docs/version-2.19.0/widgets/rich-text-editor.md
+++ b/docs/versioned_docs/version-2.19.0/widgets/rich-text-editor.md
@@ -1,8 +1,8 @@
---
id: rich-text-editor
-title: Rich Text Editor
+title: Text Editor
---
-# Rich Text Editor
+# Text Editor
Rich Text Editor can be used to enter and edit the text in HTML format.
It should be preferred for blog posts, forum posts or notes sections. The text is to be used as the label for the radio button.
diff --git a/frontend/.version b/frontend/.version
index 83ecbf1d7a..db65e2167e 100644
--- a/frontend/.version
+++ b/frontend/.version
@@ -1 +1 @@
-2.20.2
+2.21.0
diff --git a/frontend/assets/translations/en.json b/frontend/assets/translations/en.json
index 5feaac4eb5..ff40b511e6 100644
--- a/frontend/assets/translations/en.json
+++ b/frontend/assets/translations/en.json
@@ -737,19 +737,19 @@
},
"TextInput": {
"displayName": "Text Input",
- "description": "Text field for forms"
+ "description": "User text input field"
},
"NumberInput": {
"displayName": "Number Input",
- "description": "Number field for forms"
+ "description": "Numeric input field"
},
"PasswordInput": {
"displayName": "Password Input",
- "description": "Password input field for forms"
+ "description": "Secure text input"
},
"Datepicker": {
"displayName": "Date Picker",
- "description": "Select a date and time"
+ "description": "Choose date and time"
},
"Checkbox": {
"displayName": "Checkbox",
@@ -769,19 +769,19 @@
},
"DateRangePicker": {
"displayName": "Range Picker",
- "description": "Select a date range"
+ "description": "Choose date ranges"
},
"Text": {
"displayName": "Text",
- "description": "Display markdown or HTML"
+ "description": "Display text or HTML"
},
"Image": {
"displayName": "Image",
- "description": "Display an Image"
+ "description": "Show image files"
},
"Container": {
"displayName": "Container",
- "description": "Wrapper for multiple components"
+ "description": "Group components"
},
"Dropdown": {
"displayName": "Dropdown",
@@ -833,35 +833,35 @@
},
"Timer": {
"displayName": "Timer",
- "description": "timer"
+ "description": "Countdown or stopwatch"
},
"Listview": {
"displayName": "List View",
- "description": "Wrapper for multiple components"
+ "description": "List multiple items"
},
"Tags": {
"displayName": "Tags",
- "description": "Content can be shown as tags"
+ "description": "Display tag labels"
},
"Pagination": {
"displayName": "Pagination",
- "description": "Pagination "
+ "description": "Navigate pages"
},
"CircularProgressbar": {
"displayName": "Circular Progressbar",
- "description": "Show the progress using circular progressbar"
+ "description": "Show circular progress"
},
"Spinner": {
"displayName": "Spinner",
- "description": "Spinner can be used to display loading status"
+ "description": "Indicate loading state"
},
"Statistics": {
"displayName": "Statistics",
- "description": "Statistics can be used to display different statistical information"
+ "description": "Show key metrics"
},
"RangeSlider": {
"displayName": "Range Slider",
- "description": "Can be used to show slider with a range"
+ "description": "Adjust value range"
},
"Timeline": {
"displayName": "Timeline",
@@ -881,19 +881,19 @@
},
"CustomComponent": {
"displayName": "Custom Component",
- "description": "Add your custom react component"
+ "description": "Create React components"
},
"ButtonGroup": {
"displayName": "Button Group",
- "description": "ButtonGroup"
+ "description": "Group of buttons"
},
"PDF": {
"displayName": "PDF",
- "description": "Embed PDF file"
+ "description": "Embed PDF documents"
},
"Steps": {
"displayName": "Steps",
- "description": "Steps"
+ "description": "Step-by-step navigation aid"
},
"KanbanBoard": {
"displayName": "Kanban Board",
@@ -948,4 +948,4 @@
"tip": "Back to Home"
}
}
-}
\ No newline at end of file
+}
diff --git a/frontend/src/Editor/Header/EditAppName.jsx b/frontend/src/Editor/Header/EditAppName.jsx
index 35400201e9..8ac727e5be 100644
--- a/frontend/src/Editor/Header/EditAppName.jsx
+++ b/frontend/src/Editor/Header/EditAppName.jsx
@@ -1,57 +1,136 @@
-import React from 'react';
+import React, { useRef, useEffect, useState } from 'react';
import { ToolTip } from '@/_components';
import { appService } from '@/_services';
-import { handleHttpErrorMessages, validateName } from '../../_helpers/utils';
+import { handleHttpErrorMessages, validateAppName, validateName } from '@/_helpers/utils';
+import InfoOrErrorBox from './InfoOrErrorBox';
+import { toast } from 'react-hot-toast';
function EditAppName({ appId, appName = '', onNameChanged }) {
const darkMode = localStorage.getItem('darkMode') === 'true';
- const [name, setName] = React.useState(appName);
+ const [name, setName] = useState(appName);
+ const [isValid, setIsValid] = useState(true);
+ const [isEditing, setIsEditing] = useState(false);
+ const [isError, setIsError] = useState(false);
+ const [errorMessage, setErrorMessage] = useState('');
+ const [warningText, setWarningText] = useState('');
- React.useEffect(() => {
+ const inputRef = useRef(null);
+
+ useEffect(() => {
setName(appName);
}, [appName]);
- const saveAppName = async (name) => {
- const newName = name.trim();
- if (!validateName(name, 'App name').status) {
- return;
- }
- if (newName === appName) {
- //will set back name without starting and ending spaces
- setName(newName);
- return;
- }
- await appService
- .saveApp(appId, { name: newName })
- .then(() => {
- onNameChanged(newName);
- })
- .catch((error) => {
- handleHttpErrorMessages(error, 'app');
- });
+ const clearError = () => {
+ setIsError(false);
+ setErrorMessage('');
};
+ const setError = (message) => {
+ setIsError(true);
+ setErrorMessage(message);
+ };
+
+ const saveAppName = async (newName) => {
+ const trimmedName = newName.trim();
+ if (validateName(trimmedName, 'App name', true)?.errorMsg) {
+ setName(appName);
+ clearError();
+ setIsEditing(false);
+ return;
+ }
+
+ if (trimmedName === appName) {
+ setIsValid(true);
+ setIsEditing(false);
+ setName(appName);
+ return;
+ }
+
+ try {
+ await appService.saveApp(appId, { name: trimmedName });
+ onNameChanged(trimmedName);
+ setIsValid(true);
+ setIsEditing(false);
+ toast.success('App name successfully updated!');
+ } catch (error) {
+ if (error.statusCode === 409) {
+ setError('App name already exists');
+ } else {
+ clearError();
+ setName(appName);
+ setIsEditing(false);
+ handleHttpErrorMessages(error, 'app');
+ }
+ }
+ };
+
+ const handleBlur = () => {
+ saveAppName(name);
+ };
+
+ const handleFocus = () => {
+ setIsValid(true);
+ setIsEditing(true);
+ };
+
+ const handleInput = (e) => {
+ const newValue = e.target.value;
+ setName(newValue);
+ if (newValue.length >= 50) {
+ setWarningText('Maximum length has been reached');
+ } else {
+ setWarningText('');
+ clearError();
+ }
+ };
+
+ const borderColor = isError
+ ? 'var(--light-tomato-10, #DB4324)' // Apply error border color
+ : darkMode
+ ? 'var(--dark-border-color, #2D3748)' // Change this to the appropriate dark border color
+ : 'var(--light-border-color, #FFF0EE)';
+
return (
-