-
Notifications
You must be signed in to change notification settings - Fork 5.5k
18770 hex #18832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
luancazarine
wants to merge
11
commits into
master
Choose a base branch
from
18770-hex
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
18770 hex #18832
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
fcf3693
Implement Hex app with comprehensive actions and constants
luancazarine c39dee9
pnpm update
luancazarine e5ea79a
Update components/hex/actions/create-data-connection/create-data-conn…
luancazarine 83b02b9
Update components/hex/actions/edit-data-connection/edit-data-connecti…
luancazarine d383ec3
Update components/hex/actions/list-projects/list-projects.mjs
luancazarine d3a2825
Update components/hex/actions/list-data-connections/list-data-connect…
luancazarine 748a1bd
Refactor edit-data-connection action and rename get-project-runs action
luancazarine 226b0f6
Merge branch 'master' into 18770-hex
luancazarine 69d03c0
Remove redundant 'params' definition in list-projects action
luancazarine 4f5abec
Merge branch 'master' into 18770-hex
luancazarine 9bfe7a7
Refactor data connection actions and error handling
luancazarine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -8,4 +8,4 @@ export default { | |
| console.log(Object.keys(this.$auth)); | ||
| }, | ||
| }, | ||
| }; | ||
| }; | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -8,4 +8,4 @@ export default { | |
| console.log(Object.keys(this.$auth)); | ||
| }, | ||
| }, | ||
| }; | ||
| }; | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -8,4 +8,4 @@ export default { | |
| console.log(Object.keys(this.$auth)); | ||
| }, | ||
| }, | ||
| }; | ||
| }; | ||
130 changes: 130 additions & 0 deletions
130
components/hex/actions/create-data-connection/create-data-connection.mjs
This file contains hidden or 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,130 @@ | ||
| import { parseObject } from "../../common/utils.mjs"; | ||
| import hex from "../../hex.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "hex-create-data-connection", | ||
| name: "Create Data Connection", | ||
| description: "Create a data connection. [See the documentation](https://learn.hex.tech/docs/api/api-reference#operation/CreateDataConnection)", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| type: "action", | ||
| props: { | ||
| hex, | ||
| sharingWorkspacePublic: { | ||
| propDefinition: [ | ||
| hex, | ||
| "sharingWorkspacePublic", | ||
| ], | ||
| }, | ||
| sharingWorkspaceGuests: { | ||
| propDefinition: [ | ||
| hex, | ||
| "sharingWorkspaceGuests", | ||
| ], | ||
| }, | ||
| sharingWorkspaceMembers: { | ||
| propDefinition: [ | ||
| hex, | ||
| "sharingWorkspaceMembers", | ||
| ], | ||
| }, | ||
| groups: { | ||
| propDefinition: [ | ||
| hex, | ||
| "groups", | ||
| ], | ||
| }, | ||
| schemaRefreshAccess: { | ||
| propDefinition: [ | ||
| hex, | ||
| "schemaRefreshAccess", | ||
| ], | ||
| }, | ||
| schemaRefreshSchedule: { | ||
| propDefinition: [ | ||
| hex, | ||
| "schemaRefreshSchedule", | ||
| ], | ||
| }, | ||
| schemaFilters: { | ||
| propDefinition: [ | ||
| hex, | ||
| "schemaFilters", | ||
| ], | ||
| }, | ||
| allowWritebackCells: { | ||
| propDefinition: [ | ||
| hex, | ||
| "allowWritebackCells", | ||
| ], | ||
| }, | ||
| includeMagic: { | ||
| propDefinition: [ | ||
| hex, | ||
| "includeMagic", | ||
| ], | ||
| }, | ||
| connectViaSsh: { | ||
| propDefinition: [ | ||
| hex, | ||
| "connectViaSsh", | ||
| ], | ||
| }, | ||
| description: { | ||
| propDefinition: [ | ||
| hex, | ||
| "description", | ||
| ], | ||
| }, | ||
| connectionDetails: { | ||
| propDefinition: [ | ||
| hex, | ||
| "connectionDetails", | ||
| ], | ||
| }, | ||
| type: { | ||
| propDefinition: [ | ||
| hex, | ||
| "type", | ||
| ], | ||
| }, | ||
| name: { | ||
| propDefinition: [ | ||
| hex, | ||
| "name", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.hex.createDataConnection({ | ||
| $, | ||
| data: { | ||
| sharing: { | ||
| workspace: { | ||
| public: this.sharingWorkspacePublic, | ||
| guests: this.sharingWorkspaceGuests, | ||
| members: this.sharingWorkspaceMembers, | ||
| }, | ||
| }, | ||
| schemaRefreshAccess: this.schemaRefreshAccess, | ||
| schemaRefreshSchedule: | ||
| this.schemaRefreshSchedule && parseObject(this.schemaRefreshSchedule), | ||
| schemaFilters: this.schemaFilters && parseObject(this.schemaFilters), | ||
| allowWritebackCells: this.allowWritebackCells, | ||
| includeMagic: this.includeMagic, | ||
| connectViaSsh: this.connectViaSsh, | ||
| description: this.description, | ||
| connectionDetails: this.connectionDetails && parseObject(this.connectionDetails), | ||
| type: this.type, | ||
| name: this.name, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully created data connection with ID: ${response.id}`); | ||
| return response; | ||
| }, | ||
| }; | ||
This file contains hidden or 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,49 @@ | ||
| import { parseObject } from "../../common/utils.mjs"; | ||
| import hex from "../../hex.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "hex-create-group", | ||
| name: "Create Group", | ||
| description: "Create a group to manage users. [See the documentation](https://learn.hex.tech/docs/api/api-reference#operation/CreateGroup)", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| type: "action", | ||
| props: { | ||
| hex, | ||
| name: { | ||
| type: "string", | ||
| label: "Name", | ||
| description: "The name of the group.", | ||
| }, | ||
| users: { | ||
| propDefinition: [ | ||
| hex, | ||
| "userId", | ||
| ], | ||
| type: "string[]", | ||
| label: "User IDs", | ||
| description: "A list of user IDs to add to the group.", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.hex.createGroup({ | ||
| $, | ||
| data: { | ||
| name: this.name, | ||
| members: { | ||
| users: this.users && parseObject(this.users)?.map((user) => ({ | ||
| id: user, | ||
| })), | ||
| }, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully created group with ID: ${response.id}`); | ||
| return response; | ||
| }, | ||
| }; |
37 changes: 37 additions & 0 deletions
37
components/hex/actions/deactivate-user/deactivate-user.mjs
This file contains hidden or 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,37 @@ | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
| import hex from "../../hex.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "hex-deactivate-user", | ||
| name: "Deactivate User", | ||
| description: "Deactivate a user. [See the documentation](https://learn.hex.tech/docs/api/api-reference#operation/DeactivateUser)", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| type: "action", | ||
| props: { | ||
| hex, | ||
| userId: { | ||
| propDefinition: [ | ||
| hex, | ||
| "userId", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| try { | ||
| const response = await this.hex.deactivateUser({ | ||
| $, | ||
| userId: this.userId, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully deactivated user with ID: ${this.userId}`); | ||
| return response; | ||
| } catch ({ response }) { | ||
| throw new ConfigurationError(response.data.reason); | ||
| } | ||
| }, | ||
| }; |
This file contains hidden or 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,32 @@ | ||
| import hex from "../../hex.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "hex-delete-group", | ||
| name: "Delete Group", | ||
| description: "Delete a group to manage users. [See the documentation](https://learn.hex.tech/docs/api/api-reference#operation/DeleteGroup)", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| type: "action", | ||
| props: { | ||
| hex, | ||
| groupId: { | ||
| propDefinition: [ | ||
| hex, | ||
| "groupId", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.hex.deleteGroup({ | ||
| $, | ||
| groupId: this.groupId, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully deleted group with ID: ${this.groupId}`); | ||
| return response; | ||
| }, | ||
luancazarine marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }; | ||
126 changes: 126 additions & 0 deletions
126
components/hex/actions/edit-data-connection/edit-data-connection.mjs
This file contains hidden or 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,126 @@ | ||
| import { parseObject } from "../../common/utils.mjs"; | ||
| import hex from "../../hex.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "hex-edit-data-connection", | ||
| name: "Edit Data Connection", | ||
| description: "Edit a specific data connection. [See the documentation](https://learn.hex.tech/docs/api/api-reference#operation/EditDataConnection)", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| type: "action", | ||
| props: { | ||
| hex, | ||
| connectionId: { | ||
| propDefinition: [ | ||
| hex, | ||
| "connectionId", | ||
| ], | ||
| }, | ||
| sharingWorkspacePublic: { | ||
| propDefinition: [ | ||
| hex, | ||
| "sharingWorkspacePublic", | ||
| ], | ||
| }, | ||
| sharingWorkspaceGuests: { | ||
| propDefinition: [ | ||
| hex, | ||
| "sharingWorkspaceGuests", | ||
| ], | ||
| }, | ||
| sharingWorkspaceMembers: { | ||
| propDefinition: [ | ||
| hex, | ||
| "sharingWorkspaceMembers", | ||
| ], | ||
| }, | ||
| schemaRefreshAccess: { | ||
| propDefinition: [ | ||
| hex, | ||
| "schemaRefreshAccess", | ||
| ], | ||
| }, | ||
| schemaRefreshSchedule: { | ||
| propDefinition: [ | ||
| hex, | ||
| "schemaRefreshSchedule", | ||
| ], | ||
| }, | ||
| schemaFilters: { | ||
| propDefinition: [ | ||
| hex, | ||
| "schemaFilters", | ||
| ], | ||
| }, | ||
| allowWritebackCells: { | ||
| propDefinition: [ | ||
| hex, | ||
| "allowWritebackCells", | ||
| ], | ||
| }, | ||
| includeMagic: { | ||
| propDefinition: [ | ||
| hex, | ||
| "includeMagic", | ||
| ], | ||
| }, | ||
| connectViaSsh: { | ||
| propDefinition: [ | ||
| hex, | ||
| "connectViaSsh", | ||
| ], | ||
| }, | ||
| description: { | ||
| propDefinition: [ | ||
| hex, | ||
| "description", | ||
| ], | ||
| }, | ||
| connectionDetails: { | ||
| propDefinition: [ | ||
| hex, | ||
| "connectionDetails", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| name: { | ||
| propDefinition: [ | ||
| hex, | ||
| "name", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.hex.updateDataConnection({ | ||
| $, | ||
| connectionId: this.connectionId, | ||
| data: { | ||
| sharing: { | ||
| workspace: { | ||
| public: this.sharingWorkspacePublic, | ||
| guests: this.sharingWorkspaceGuests, | ||
| members: this.sharingWorkspaceMembers, | ||
| }, | ||
| }, | ||
| schemaRefreshAccess: this.schemaRefreshAccess, | ||
| schemaRefreshSchedule: | ||
| this.schemaRefreshSchedule && parseObject(this.schemaRefreshSchedule), | ||
| schemaFilters: this.schemaFilters && parseObject(this.schemaFilters), | ||
| allowWritebackCells: this.allowWritebackCells, | ||
| includeMagic: this.includeMagic, | ||
| connectViaSsh: this.connectViaSsh, | ||
| description: this.description, | ||
| connectionDetails: this.connectionDetails && parseObject(this.connectionDetails), | ||
| name: this.name, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully updated data connection with ID: ${response.id}`); | ||
| return response; | ||
| }, | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.