From cf502e2fb117f01c85902d5e8c3d97fff4bbefec Mon Sep 17 00:00:00 2001 From: Andrii Bodnar Date: Mon, 9 Oct 2023 16:14:37 +0300 Subject: [PATCH] code fixes after zapier-platform-core upgrade --- _shared.js | 2 +- actions/download_file.js | 1 - actions/translate_mt.js | 1 - actions/upload_file.js | 1 - actions/upload_screenshot.js | 1 - fields/list_files_dropdown.js | 1 - fields/list_labels_dropdown.js | 1 - fields/list_languages_dropdown.js | 1 - fields/list_mts_dropdown.js | 1 - fields/list_project_directories_dropdown.js | 1 - fields/list_project_members_dropdown.js | 1 - fields/list_project_workflow_steps_dropdown.js | 1 - fields/list_projects_dropdown.js | 1 - fields/list_vendors_dropdown.js | 1 - fields/list_workflows.js | 1 - resources/directory.js | 2 -- searches/find_file.js | 1 - searches/find_language.js | 1 - triggers/comment_created.js | 1 - triggers/comment_deleted.js | 1 - triggers/comment_restored.js | 1 - triggers/comment_updated.js | 1 - triggers/file_added.js | 1 - triggers/file_approved.js | 1 - triggers/file_deleted.js | 1 - triggers/file_reverted.js | 1 - triggers/file_translated.js | 1 - triggers/file_updated.js | 1 - triggers/project_approved.js | 1 - triggers/project_translated.js | 1 - 30 files changed, 1 insertion(+), 31 deletions(-) diff --git a/_shared.js b/_shared.js index fe9fb4c..0db69f7 100644 --- a/_shared.js +++ b/_shared.js @@ -186,7 +186,7 @@ const getCrowdinConnection = async (z, bundle) => { // Test connection. Get one language to verify we're good to go. try { - (await languagesApi.listSupportedLanguages(1)).data + (await languagesApi.listSupportedLanguages({limit: 1})).data } catch (e) { //TODO: well, we should better test what went wrong, but most common problem would be expired token throw new z.errors.RefreshAuthError(); diff --git a/actions/download_file.js b/actions/download_file.js index 10adf32..2dfc001 100644 --- a/actions/download_file.js +++ b/actions/download_file.js @@ -28,7 +28,6 @@ const uploadFile = { noun: "Download Translated File", display: { hidden: false, - important: true, description: "Downloads the translated file.", label: "Download Translated File" }, diff --git a/actions/translate_mt.js b/actions/translate_mt.js index 3d04bbb..3376a80 100644 --- a/actions/translate_mt.js +++ b/actions/translate_mt.js @@ -28,7 +28,6 @@ module.exports = { noun: "Translation", display: { hidden: false, - important: false, description: "Auto detect source language and translate with selected MT engine.", label: "Translate via Machine Translation" }, diff --git a/actions/upload_file.js b/actions/upload_file.js index 7128a6d..65f2d07 100644 --- a/actions/upload_file.js +++ b/actions/upload_file.js @@ -51,7 +51,6 @@ const uploadFile = { noun: "File", display: { hidden: false, - important: false, description: "Uploads a file into Crowdin project.", label: "Create or Update a File" }, diff --git a/actions/upload_screenshot.js b/actions/upload_screenshot.js index a3f0613..3a8fe50 100644 --- a/actions/upload_screenshot.js +++ b/actions/upload_screenshot.js @@ -45,7 +45,6 @@ const uploadFile = { noun: "Upload Screenshot", display: { hidden: false, - important: false, description: "Adds a screenshot to Crowdin project and tags it automatically (optional).", label: "Upload Screenshot" }, diff --git a/fields/list_files_dropdown.js b/fields/list_files_dropdown.js index 0b4c222..b8cad1d 100644 --- a/fields/list_files_dropdown.js +++ b/fields/list_files_dropdown.js @@ -14,6 +14,5 @@ module.exports = { label: 'List Files', description: 'Returns a list of project files.', hidden: true, - important: false, } } \ No newline at end of file diff --git a/fields/list_labels_dropdown.js b/fields/list_labels_dropdown.js index 6867775..8e9aaa3 100644 --- a/fields/list_labels_dropdown.js +++ b/fields/list_labels_dropdown.js @@ -14,6 +14,5 @@ module.exports = { label: 'List Labels', description: 'Returns a list of project labels.', hidden: true, - important: false, } } \ No newline at end of file diff --git a/fields/list_languages_dropdown.js b/fields/list_languages_dropdown.js index 931ee9f..85c7d50 100644 --- a/fields/list_languages_dropdown.js +++ b/fields/list_languages_dropdown.js @@ -13,6 +13,5 @@ module.exports = { label: 'List Languages', description: 'Returns a list of Crowdin languages.', hidden: true, - important: false, } } \ No newline at end of file diff --git a/fields/list_mts_dropdown.js b/fields/list_mts_dropdown.js index 4276479..ef639ed 100644 --- a/fields/list_mts_dropdown.js +++ b/fields/list_mts_dropdown.js @@ -14,6 +14,5 @@ module.exports = { label: 'List Machine Translation Engines', description: 'Returns a list of machine translation engines.', hidden: true, - important: false, } } \ No newline at end of file diff --git a/fields/list_project_directories_dropdown.js b/fields/list_project_directories_dropdown.js index 0e480bd..ae6ab68 100644 --- a/fields/list_project_directories_dropdown.js +++ b/fields/list_project_directories_dropdown.js @@ -16,6 +16,5 @@ module.exports = { label: 'List Directories', description: 'Returns a list of project directories.', hidden: true, - important: false, } } \ No newline at end of file diff --git a/fields/list_project_members_dropdown.js b/fields/list_project_members_dropdown.js index b9672fa..437632a 100644 --- a/fields/list_project_members_dropdown.js +++ b/fields/list_project_members_dropdown.js @@ -14,6 +14,5 @@ module.exports = { label: 'List Project Members', description: 'Returns a list of project members.', hidden: true, - important: false, } } \ No newline at end of file diff --git a/fields/list_project_workflow_steps_dropdown.js b/fields/list_project_workflow_steps_dropdown.js index de24b69..b414f29 100644 --- a/fields/list_project_workflow_steps_dropdown.js +++ b/fields/list_project_workflow_steps_dropdown.js @@ -19,6 +19,5 @@ module.exports = { label: 'List Project Workflow Steps', description: 'Returns a list of project workflow steps.', hidden: true, - important: false, } } \ No newline at end of file diff --git a/fields/list_projects_dropdown.js b/fields/list_projects_dropdown.js index 4238149..280fde9 100644 --- a/fields/list_projects_dropdown.js +++ b/fields/list_projects_dropdown.js @@ -16,6 +16,5 @@ module.exports = { label: 'List Projects', description: 'Returns a list of user projects.', hidden: true, - important: false, } } \ No newline at end of file diff --git a/fields/list_vendors_dropdown.js b/fields/list_vendors_dropdown.js index b422488..f41abb4 100644 --- a/fields/list_vendors_dropdown.js +++ b/fields/list_vendors_dropdown.js @@ -19,6 +19,5 @@ module.exports = { label: 'List Vendors', description: 'Returns a list of organization vendors.', hidden: true, - important: false, } } \ No newline at end of file diff --git a/fields/list_workflows.js b/fields/list_workflows.js index 0700e7b..73f7e49 100644 --- a/fields/list_workflows.js +++ b/fields/list_workflows.js @@ -19,6 +19,5 @@ module.exports = { label: 'List Workflows', description: 'Returns a list of user workflows.', hidden: true, - important: false, } } \ No newline at end of file diff --git a/resources/directory.js b/resources/directory.js index aff342a..d973085 100644 --- a/resources/directory.js +++ b/resources/directory.js @@ -45,7 +45,6 @@ module.exports = { display: { label: 'New Directory', description: 'Triggers when new directory is created.', - important: false }, operation: { perform: performList, @@ -61,7 +60,6 @@ module.exports = { display: { label: 'Find Directory', description: 'Finds a directory.', - important: true }, operation: { inputFields: [projectInputField, diff --git a/searches/find_file.js b/searches/find_file.js index add6299..0a80512 100644 --- a/searches/find_file.js +++ b/searches/find_file.js @@ -44,6 +44,5 @@ module.exports = { label: 'Find File', description: 'Finds file by id or name.', hidden: false, - important: false, }, }; diff --git a/searches/find_language.js b/searches/find_language.js index af66d58..12c6055 100644 --- a/searches/find_language.js +++ b/searches/find_language.js @@ -67,6 +67,5 @@ module.exports = { label: 'Find Language', description: 'Finds language by Crowdin code, locale or name.', hidden: false, - important: false, }, }; diff --git a/triggers/comment_created.js b/triggers/comment_created.js index e409e04..c69b021 100644 --- a/triggers/comment_created.js +++ b/triggers/comment_created.js @@ -107,6 +107,5 @@ module.exports = { label: 'Comment/Issue Added', description: 'Triggers when a user creates a comment or an issue.', hidden: false, - important: false, } } \ No newline at end of file diff --git a/triggers/comment_deleted.js b/triggers/comment_deleted.js index 042caf5..094974b 100644 --- a/triggers/comment_deleted.js +++ b/triggers/comment_deleted.js @@ -107,6 +107,5 @@ module.exports = { label: 'Comment/Issue Deleted', description: 'Triggers when a user deletes a comment or an issue.', hidden: false, - important: false, } } \ No newline at end of file diff --git a/triggers/comment_restored.js b/triggers/comment_restored.js index f0f1d3a..c3026de 100644 --- a/triggers/comment_restored.js +++ b/triggers/comment_restored.js @@ -107,6 +107,5 @@ module.exports = { label: 'Comment/Issue Restored', description: 'Triggers when a user restores a deleted comment or an issue.', hidden: false, - important: false, } } \ No newline at end of file diff --git a/triggers/comment_updated.js b/triggers/comment_updated.js index 48a4d5f..9c5a05b 100644 --- a/triggers/comment_updated.js +++ b/triggers/comment_updated.js @@ -107,6 +107,5 @@ module.exports = { label: 'Comment/Issue Updated', description: 'Triggers when a user updates a comment or an issue.', hidden: false, - important: false, } } \ No newline at end of file diff --git a/triggers/file_added.js b/triggers/file_added.js index bea09fc..166b31c 100644 --- a/triggers/file_added.js +++ b/triggers/file_added.js @@ -31,6 +31,5 @@ module.exports = { label: 'File Added', description: 'Triggers when a new file has been added to the project.', hidden: false, - important: false, } } \ No newline at end of file diff --git a/triggers/file_approved.js b/triggers/file_approved.js index b685e77..da2933f 100644 --- a/triggers/file_approved.js +++ b/triggers/file_approved.js @@ -24,6 +24,5 @@ module.exports = { label: 'File Approved', description: 'Triggers when a file is fully translated and approved.', hidden: false, - important: true, } } \ No newline at end of file diff --git a/triggers/file_deleted.js b/triggers/file_deleted.js index c555cb9..565e4de 100644 --- a/triggers/file_deleted.js +++ b/triggers/file_deleted.js @@ -31,6 +31,5 @@ module.exports = { label: 'File Deleted', description: 'Triggers when a file has been deleted from the project.', hidden: false, - important: false, } } \ No newline at end of file diff --git a/triggers/file_reverted.js b/triggers/file_reverted.js index 55fe2d1..ca14456 100644 --- a/triggers/file_reverted.js +++ b/triggers/file_reverted.js @@ -31,6 +31,5 @@ module.exports = { label: 'File Reverted', description: 'Triggers when a file update has been reverted.', hidden: false, - important: false, } } \ No newline at end of file diff --git a/triggers/file_translated.js b/triggers/file_translated.js index b54c8d8..9c4ab60 100644 --- a/triggers/file_translated.js +++ b/triggers/file_translated.js @@ -24,6 +24,5 @@ module.exports = { label: 'File Translated', description: 'Triggers when a file is fully translated.', hidden: false, - important: true, } } \ No newline at end of file diff --git a/triggers/file_updated.js b/triggers/file_updated.js index 0819aef..8bf3c83 100644 --- a/triggers/file_updated.js +++ b/triggers/file_updated.js @@ -31,6 +31,5 @@ module.exports = { label: 'File Updated', description: 'Triggers when a file has been updated.', hidden: false, - important: false, } } \ No newline at end of file diff --git a/triggers/project_approved.js b/triggers/project_approved.js index 8465996..5c54797 100644 --- a/triggers/project_approved.js +++ b/triggers/project_approved.js @@ -22,6 +22,5 @@ module.exports = { label: 'Project Language Approved', description: 'Triggers when one of a project languages is fully translated and approved.', hidden: false, - important: false, } }; diff --git a/triggers/project_translated.js b/triggers/project_translated.js index 9c78c42..d1c3225 100644 --- a/triggers/project_translated.js +++ b/triggers/project_translated.js @@ -22,6 +22,5 @@ module.exports = { label: 'Project Language Translated', description: 'Triggers when one of a project languages is fully translated.', hidden: false, - important: true, } };