-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a90ef8
commit 21c8c44
Showing
7 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
92 changes: 92 additions & 0 deletions
92
packages/backend/src/apps/miro/actions/create-board/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import defineAction from '../../../../helpers/define-action'; | ||
|
||
export default defineAction({ | ||
name: 'Create board', | ||
key: 'createBoard', | ||
description: 'Creates a new board.', | ||
arguments: [ | ||
{ | ||
label: 'Name', | ||
key: 'name', | ||
type: 'string' as const, | ||
required: true, | ||
description: 'Title for the board.', | ||
variables: true, | ||
}, | ||
{ | ||
label: 'Description', | ||
key: 'description', | ||
type: 'string' as const, | ||
required: false, | ||
description: 'Description of the board.', | ||
variables: true, | ||
}, | ||
{ | ||
label: 'Team Access', | ||
key: 'teamAccess', | ||
type: 'dropdown' as const, | ||
required: false, | ||
description: '', | ||
variables: true, | ||
options: [ | ||
{ | ||
label: 'Private - nobody in the team can find and access the board', | ||
value: 'private', | ||
}, | ||
{ | ||
label: 'View - any team member can find and view the board', | ||
value: 'view', | ||
}, | ||
{ | ||
label: 'Comment - any team member can find and comment the board', | ||
value: 'comment', | ||
}, | ||
{ | ||
label: 'Edit - any team member can find and edit the board', | ||
value: 'edit', | ||
}, | ||
], | ||
}, | ||
{ | ||
label: 'Access Via Link', | ||
key: 'accessViaLink', | ||
type: 'dropdown' as const, | ||
required: false, | ||
description: '', | ||
variables: true, | ||
options: [ | ||
{ | ||
label: 'Private - only you have access to the board', | ||
value: 'private', | ||
}, | ||
{ | ||
label: 'View - can view, no sign-in required', | ||
value: 'view', | ||
}, | ||
{ | ||
label: 'Comment - can comment, no sign-in required', | ||
value: 'comment', | ||
}, | ||
], | ||
}, | ||
], | ||
|
||
async run($) { | ||
const body = { | ||
name: $.step.parameters.name, | ||
description: $.step.parameters.description, | ||
policy: { | ||
sharingPolicy: { | ||
access: $.step.parameters.accessViaLink, | ||
teamAccess: $.step.parameters.teamAccess, | ||
}, | ||
}, | ||
}; | ||
|
||
const { data } = await $.http.post('/v2/boards', body); | ||
|
||
$.setActionItem({ | ||
raw: data, | ||
}); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import createBoard from './create-board'; | ||
|
||
export default [createBoard]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
favicon: /favicons/miro.svg | ||
items: | ||
- name: Create board | ||
desc: Creates a new board. | ||
--- | ||
|
||
<script setup> | ||
import CustomListing from '../../components/CustomListing.vue' | ||
</script> | ||
|
||
<CustomListing /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Miro | ||
|
||
:::info | ||
This page explains the steps you need to follow to set up the Miro | ||
connection in Automatisch. If any of the steps are outdated, please let us know! | ||
::: | ||
|
||
1. Go to [link](https://miro.com/signup/) to create a user account in Miro. | ||
2. After signin in, go to [link](https://miro.com/app/dashboard/?createDevTeam=1) to create a developer team. | ||
3. In the **Create new team** modal, select the checkbox and then click **Create team** button. | ||
4. After that, click **Create new app** in Your app section. | ||
5. Fill the field of **App Name**. | ||
6. Select the **Expire user authorization token** checkbox and click the **Create app**. | ||
7. Copy **OAuth Redirect URL** from Automatisch to the **Redirect URI for OAuth2.0** field. | ||
8. Give permissions for **boards**, **identity**, and **team** scopes in Permissions field. | ||
9. Copy the **Client ID** value to the `Client ID` field on Automatisch. | ||
10. Copy the **Client secret** value to the `Client Secret` field on Automatisch. | ||
11. Click **Submit** button on Automatisch. | ||
12. Congrats! Start using your new Miro connection within the flows. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.