n8n-nodes-base 2.44.2 → 2.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/build.tsbuildinfo +1 -1
- package/dist/credentials/MicrosoftTeamsManagerOAuth2Api.credentials.d.ts +14 -0
- package/dist/credentials/MicrosoftTeamsManagerOAuth2Api.credentials.d.ts.map +1 -0
- package/dist/credentials/MicrosoftTeamsManagerOAuth2Api.credentials.js +101 -0
- package/dist/credentials/MicrosoftTeamsManagerOAuth2Api.credentials.js.map +1 -0
- package/dist/credentials/MicrosoftTeamsOAuth2Api.credentials.d.ts.map +1 -1
- package/dist/credentials/MicrosoftTeamsOAuth2Api.credentials.js +9 -6
- package/dist/credentials/MicrosoftTeamsOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/SlackApi.credentials.d.ts.map +1 -1
- package/dist/credentials/SlackApi.credentials.js +8 -1
- package/dist/credentials/SlackApi.credentials.js.map +1 -1
- package/dist/known/credentials.json +7 -0
- package/dist/methods/defined.json +25 -0
- package/dist/methods/referenced.json +25 -0
- package/dist/node-definitions/.nodes-hash +1 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/convertToFile/index.ts +3 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/convertToFile/v12.schema.js +33 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/convertToFile/v12.ts +200 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/databricks/v1/resource_genie/operation_create_message.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/databricks/v1/resource_genie/operation_create_message.ts +8 -3
- package/dist/node-definitions/nodes/n8n-nodes-base/databricks/v1/resource_genie/operation_execute_message_query.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/databricks/v1/resource_genie/operation_execute_message_query.ts +7 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/databricks/v1/resource_genie/operation_get_message.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/databricks/v1/resource_genie/operation_get_message.ts +7 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/databricks/v1/resource_genie/operation_get_query_results.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/databricks/v1/resource_genie/operation_get_query_results.ts +7 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/databricks/v1/resource_genie/operation_get_space.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/databricks/v1/resource_genie/operation_get_space.ts +7 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/databricks/v1/resource_genie/operation_start_conversation.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/databricks/v1/resource_genie/operation_start_conversation.ts +7 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/formTrigger/v26.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/formTrigger/v26.ts +7 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/gmail/v2/resource_message/operation_get.ts +72 -4
- package/dist/node-definitions/nodes/n8n-nodes-base/gmail/v2/resource_message/operation_get_all.ts +74 -6
- package/dist/node-definitions/nodes/n8n-nodes-base/gmail/v2/resource_thread/operation_get.ts +395 -20
- package/dist/node-definitions/nodes/n8n-nodes-base/gmail/v21/resource_message/operation_get.ts +72 -4
- package/dist/node-definitions/nodes/n8n-nodes-base/gmail/v21/resource_message/operation_get_all.ts +74 -6
- package/dist/node-definitions/nodes/n8n-nodes-base/gmail/v21/resource_thread/operation_get.ts +395 -20
- package/dist/node-definitions/nodes/n8n-nodes-base/gmail/v22/resource_message/operation_get.ts +72 -4
- package/dist/node-definitions/nodes/n8n-nodes-base/gmail/v22/resource_message/operation_get_all.ts +107 -6
- package/dist/node-definitions/nodes/n8n-nodes-base/gmail/v22/resource_thread/operation_get.ts +395 -19
- package/dist/node-definitions/nodes/n8n-nodes-base/gmailTrigger/v1.ts +1 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/gmailTrigger/v11.ts +1 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/gmailTrigger/v12.ts +1 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/gmailTrigger/v13.ts +1 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/gmailTrigger/v14.ts +1 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/googleAnalytics/v2/resource_report/operation_get.ts +2 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/messageAnAgent/v1.ts +23 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/messageAnAgent/v2.ts +23 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/messageAnAgent/v3.ts +23 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/messageAnAgent/v31.ts +23 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/microsoftOutlook/v2/resource_event/operation_create.ts +2 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/index.ts +3 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/index.schema.js +28 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/index.ts +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/index.schema.js +38 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/index.ts +39 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_aggregate_board_data.schema.js +27 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_aggregate_board_data.ts +117 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_archive_or_delete_board.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_archive_or_delete_board.ts +34 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_create_board.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_create_board.ts +81 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_duplicate_board.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_duplicate_board.ts +56 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_get_activity_logs.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_get_activity_logs.ts +83 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_get_board.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_get_board.ts +39 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_get_board_subscribers.schema.js +27 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_get_board_subscribers.ts +49 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_get_boards.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_get_boards.ts +70 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_search_boards_account.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_search_boards_account.ts +68 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_update_board_subscribers.schema.js +28 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_board/operation_update_board_subscribers.ts +72 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/index.schema.js +32 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/index.ts +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_add_column_label.schema.js +28 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_add_column_label.ts +72 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_create_column.schema.js +29 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_create_column.ts +271 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_create_or_get_tag.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_create_or_get_tag.ts +37 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_delete_column.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_delete_column.ts +34 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_get_columns.schema.js +23 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_get_columns.ts +29 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_update_column.schema.js +27 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_update_column.ts +60 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_update_column_label.schema.js +27 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_column/operation_update_column_label.ts +81 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_group/index.schema.js +28 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_group/index.ts +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_group/operation_archive_or_delete_group.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_group/operation_archive_or_delete_group.ts +40 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_group/operation_create_group.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_group/operation_create_group.ts +51 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_group/operation_duplicate_group.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_group/operation_duplicate_group.ts +53 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_group/operation_get_groups.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_group/operation_get_groups.ts +40 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_group/operation_update_group.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_group/operation_update_group.ts +57 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/index.schema.js +44 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/index.ts +48 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_archive_or_delete_item.schema.js +27 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_archive_or_delete_item.ts +53 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_bulk_import.schema.js +32 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_bulk_import.ts +94 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_clear_column_values.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_clear_column_values.ts +39 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_create_item.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_create_item.ts +82 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_duplicate_item.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_duplicate_item.ts +40 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_get_bulk_import_status.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_get_bulk_import_status.ts +37 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_get_column_value.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_get_column_value.ts +40 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_get_item.schema.js +27 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_get_item.ts +71 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_get_item_subscribers.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_get_item_subscribers.ts +43 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_get_items.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_get_items.ts +96 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_move_item.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_move_item.ts +91 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_search_items_account.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_search_items_account.ts +68 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_update_item.schema.js +28 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_item/operation_update_item.ts +67 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_update/index.schema.js +26 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_update/index.ts +21 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_update/operation_add_file_to_update.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_update/operation_add_file_to_update.ts +33 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_update/operation_create_update.schema.js +27 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_update/operation_create_update.ts +75 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_update/operation_get_updates.schema.js +27 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_update/operation_get_updates.ts +72 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_update/operation_search_updates_account.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mondayCom/v2/resource_update/operation_search_updates_account.ts +77 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/notion/v3/resource_database_page/operation_get.ts +162 -3
- package/dist/node-definitions/nodes/n8n-nodes-base/notion/v3/resource_database_page/operation_get_all.ts +162 -3
- package/dist/node-definitions/nodes/n8n-nodes-base/postgres/index.ts +3 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/postgres/v28.schema.js +37 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/postgres/v28.ts +199 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/scheduleTrigger/v1.schema.js +0 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/scheduleTrigger/v1.ts +0 -5
- package/dist/node-definitions/nodes/n8n-nodes-base/scheduleTrigger/v11.schema.js +0 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/scheduleTrigger/v11.ts +0 -5
- package/dist/node-definitions/nodes/n8n-nodes-base/scheduleTrigger/v12.schema.js +0 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/scheduleTrigger/v12.ts +0 -5
- package/dist/node-definitions/nodes/n8n-nodes-base/scheduleTrigger/v13.schema.js +0 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/scheduleTrigger/v13.ts +0 -5
- package/dist/node-definitions/nodes/n8n-nodes-base/scheduleTrigger/v14.schema.js +0 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/scheduleTrigger/v14.ts +0 -5
- package/dist/nodes/Databricks/Databricks.node.d.ts +4 -0
- package/dist/nodes/Databricks/Databricks.node.d.ts.map +1 -1
- package/dist/nodes/Databricks/Databricks.node.js +6 -3
- package/dist/nodes/Databricks/Databricks.node.js.map +1 -1
- package/dist/nodes/Databricks/actions/genie/createMessage.operation.d.ts.map +1 -1
- package/dist/nodes/Databricks/actions/genie/createMessage.operation.js +4 -1
- package/dist/nodes/Databricks/actions/genie/createMessage.operation.js.map +1 -1
- package/dist/nodes/Databricks/actions/genie/executeMessageQuery.operation.d.ts.map +1 -1
- package/dist/nodes/Databricks/actions/genie/executeMessageQuery.operation.js +4 -1
- package/dist/nodes/Databricks/actions/genie/executeMessageQuery.operation.js.map +1 -1
- package/dist/nodes/Databricks/actions/genie/getMessage.operation.d.ts.map +1 -1
- package/dist/nodes/Databricks/actions/genie/getMessage.operation.js +4 -1
- package/dist/nodes/Databricks/actions/genie/getMessage.operation.js.map +1 -1
- package/dist/nodes/Databricks/actions/genie/getQueryResults.operation.d.ts.map +1 -1
- package/dist/nodes/Databricks/actions/genie/getQueryResults.operation.js +4 -1
- package/dist/nodes/Databricks/actions/genie/getQueryResults.operation.js.map +1 -1
- package/dist/nodes/Databricks/actions/genie/getSpace.operation.d.ts.map +1 -1
- package/dist/nodes/Databricks/actions/genie/getSpace.operation.js +2 -1
- package/dist/nodes/Databricks/actions/genie/getSpace.operation.js.map +1 -1
- package/dist/nodes/Databricks/actions/genie/startConversation.operation.d.ts.map +1 -1
- package/dist/nodes/Databricks/actions/genie/startConversation.operation.js +8 -1
- package/dist/nodes/Databricks/actions/genie/startConversation.operation.js.map +1 -1
- package/dist/nodes/Databricks/actions/helpers.d.ts +11 -2
- package/dist/nodes/Databricks/actions/helpers.d.ts.map +1 -1
- package/dist/nodes/Databricks/actions/helpers.js +14 -0
- package/dist/nodes/Databricks/actions/helpers.js.map +1 -1
- package/dist/nodes/Databricks/actions/lakebase/Lakebase.resource.d.ts +6 -0
- package/dist/nodes/Databricks/actions/lakebase/Lakebase.resource.d.ts.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/Lakebase.resource.js +42 -0
- package/dist/nodes/Databricks/actions/lakebase/Lakebase.resource.js.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/conditions.d.ts +36 -0
- package/dist/nodes/Databricks/actions/lakebase/conditions.d.ts.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/conditions.js +86 -0
- package/dist/nodes/Databricks/actions/lakebase/conditions.js.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/deleteRows.operation.d.ts +3 -0
- package/dist/nodes/Databricks/actions/lakebase/deleteRows.operation.d.ts.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/deleteRows.operation.js +37 -0
- package/dist/nodes/Databricks/actions/lakebase/deleteRows.operation.js.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/getAll.operation.d.ts +3 -0
- package/dist/nodes/Databricks/actions/lakebase/getAll.operation.d.ts.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/getAll.operation.js +96 -0
- package/dist/nodes/Databricks/actions/lakebase/getAll.operation.js.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/helpers.d.ts +26 -3
- package/dist/nodes/Databricks/actions/lakebase/helpers.d.ts.map +1 -1
- package/dist/nodes/Databricks/actions/lakebase/helpers.js +34 -0
- package/dist/nodes/Databricks/actions/lakebase/helpers.js.map +1 -1
- package/dist/nodes/Databricks/actions/lakebase/insert.operation.d.ts +3 -0
- package/dist/nodes/Databricks/actions/lakebase/insert.operation.d.ts.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/insert.operation.js +29 -0
- package/dist/nodes/Databricks/actions/lakebase/insert.operation.js.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/mapping.d.ts +12 -0
- package/dist/nodes/Databricks/actions/lakebase/mapping.d.ts.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/mapping.js +26 -0
- package/dist/nodes/Databricks/actions/lakebase/mapping.js.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/openApiDocument.d.ts +7 -0
- package/dist/nodes/Databricks/actions/lakebase/openApiDocument.d.ts.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/openApiDocument.js +18 -0
- package/dist/nodes/Databricks/actions/lakebase/openApiDocument.js.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/schema.d.ts +20 -0
- package/dist/nodes/Databricks/actions/lakebase/schema.d.ts.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/schema.js +45 -0
- package/dist/nodes/Databricks/actions/lakebase/schema.js.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/update.operation.d.ts +3 -0
- package/dist/nodes/Databricks/actions/lakebase/update.operation.d.ts.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/update.operation.js +52 -0
- package/dist/nodes/Databricks/actions/lakebase/update.operation.js.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/upsert.operation.d.ts +3 -0
- package/dist/nodes/Databricks/actions/lakebase/upsert.operation.d.ts.map +1 -0
- package/dist/nodes/Databricks/actions/lakebase/upsert.operation.js +59 -0
- package/dist/nodes/Databricks/actions/lakebase/upsert.operation.js.map +1 -0
- package/dist/nodes/Databricks/actions/router.d.ts.map +1 -1
- package/dist/nodes/Databricks/actions/router.js +4 -0
- package/dist/nodes/Databricks/actions/router.js.map +1 -1
- package/dist/nodes/Databricks/constants.d.ts +3 -0
- package/dist/nodes/Databricks/constants.d.ts.map +1 -1
- package/dist/nodes/Databricks/constants.js +4 -1
- package/dist/nodes/Databricks/constants.js.map +1 -1
- package/dist/nodes/Databricks/methods/listSearch.d.ts.map +1 -1
- package/dist/nodes/Databricks/methods/listSearch.js +5 -26
- package/dist/nodes/Databricks/methods/listSearch.js.map +1 -1
- package/dist/nodes/Databricks/methods/loadOptions.d.ts +4 -0
- package/dist/nodes/Databricks/methods/loadOptions.d.ts.map +1 -0
- package/dist/nodes/Databricks/methods/loadOptions.js +29 -0
- package/dist/nodes/Databricks/methods/loadOptions.js.map +1 -0
- package/dist/nodes/Databricks/methods/resourceMapping.d.ts +4 -0
- package/dist/nodes/Databricks/methods/resourceMapping.d.ts.map +1 -0
- package/dist/nodes/Databricks/methods/resourceMapping.js +65 -0
- package/dist/nodes/Databricks/methods/resourceMapping.js.map +1 -0
- package/dist/nodes/Databricks/resources/genie/operations.js +3 -3
- package/dist/nodes/Databricks/resources/genie/parameters.d.ts.map +1 -1
- package/dist/nodes/Databricks/resources/genie/parameters.js +11 -3
- package/dist/nodes/Databricks/resources/genie/parameters.js.map +1 -1
- package/dist/nodes/Databricks/resources/index.d.ts +1 -0
- package/dist/nodes/Databricks/resources/index.d.ts.map +1 -1
- package/dist/nodes/Databricks/resources/index.js +1 -0
- package/dist/nodes/Databricks/resources/index.js.map +1 -1
- package/dist/nodes/Databricks/resources/lakebase/operations.d.ts +3 -0
- package/dist/nodes/Databricks/resources/lakebase/operations.d.ts.map +1 -0
- package/dist/nodes/Databricks/resources/lakebase/operations.js +52 -0
- package/dist/nodes/Databricks/resources/lakebase/operations.js.map +1 -0
- package/dist/nodes/Databricks/resources/lakebase/parameters.d.ts +1 -0
- package/dist/nodes/Databricks/resources/lakebase/parameters.d.ts.map +1 -1
- package/dist/nodes/Databricks/resources/lakebase/parameters.js +308 -17
- package/dist/nodes/Databricks/resources/lakebase/parameters.js.map +1 -1
- package/dist/nodes/Databricks/transport/index.d.ts +1 -1
- package/dist/nodes/Databricks/transport/index.d.ts.map +1 -1
- package/dist/nodes/Databricks/transport/index.js +3 -1
- package/dist/nodes/Databricks/transport/index.js.map +1 -1
- package/dist/nodes/Databricks/transport/lakebase.d.ts +8 -0
- package/dist/nodes/Databricks/transport/lakebase.d.ts.map +1 -1
- package/dist/nodes/Databricks/transport/lakebase.js +20 -2
- package/dist/nodes/Databricks/transport/lakebase.js.map +1 -1
- package/dist/nodes/Databricks/transport/lakebaseErrors.d.ts +15 -0
- package/dist/nodes/Databricks/transport/lakebaseErrors.d.ts.map +1 -0
- package/dist/nodes/Databricks/transport/lakebaseErrors.js +86 -0
- package/dist/nodes/Databricks/transport/lakebaseErrors.js.map +1 -0
- package/dist/nodes/ERPNext/ERPNext.node.d.ts.map +1 -1
- package/dist/nodes/ERPNext/ERPNext.node.js +3 -4
- package/dist/nodes/ERPNext/ERPNext.node.js.map +1 -1
- package/dist/nodes/ERPNext/GenericFunctions.js +1 -1
- package/dist/nodes/ERPNext/GenericFunctions.js.map +1 -1
- package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.d.ts.map +1 -1
- package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js +2 -2
- package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js.map +1 -1
- package/dist/nodes/EmailSend/utils.d.ts +2 -0
- package/dist/nodes/EmailSend/utils.d.ts.map +1 -1
- package/dist/nodes/EmailSend/utils.js +7 -0
- package/dist/nodes/EmailSend/utils.js.map +1 -1
- package/dist/nodes/EmailSend/v1/EmailSendV1.node.js +5 -5
- package/dist/nodes/EmailSend/v1/EmailSendV1.node.js.map +1 -1
- package/dist/nodes/EmailSend/v2/send.operation.js +5 -5
- package/dist/nodes/EmailSend/v2/send.operation.js.map +1 -1
- package/dist/nodes/EmailSend/v2/sendAndWait.operation.js +2 -2
- package/dist/nodes/EmailSend/v2/sendAndWait.operation.js.map +1 -1
- package/dist/nodes/EmailSend/v2/utils.d.ts +1 -2
- package/dist/nodes/EmailSend/v2/utils.d.ts.map +1 -1
- package/dist/nodes/ExecuteCommand/ExecuteCommand.node.d.ts.map +1 -1
- package/dist/nodes/ExecuteCommand/ExecuteCommand.node.js +8 -2
- package/dist/nodes/ExecuteCommand/ExecuteCommand.node.js.map +1 -1
- package/dist/nodes/Files/ConvertToFile/ConvertToFile.node.js +1 -1
- package/dist/nodes/Files/ConvertToFile/ConvertToFile.node.js.map +1 -1
- package/dist/nodes/Files/ConvertToFile/actions/toBinary.operation.d.ts.map +1 -1
- package/dist/nodes/Files/ConvertToFile/actions/toBinary.operation.js +1 -0
- package/dist/nodes/Files/ConvertToFile/actions/toBinary.operation.js.map +1 -1
- package/dist/nodes/Form/utils/utils.d.ts.map +1 -1
- package/dist/nodes/Form/utils/utils.js +14 -10
- package/dist/nodes/Form/utils/utils.js.map +1 -1
- package/dist/nodes/Form/v1/FormTriggerV1.node.d.ts +1 -1
- package/dist/nodes/Form/v2/FormTriggerV2.node.d.ts +6 -0
- package/dist/nodes/Form/v2/FormTriggerV2.node.d.ts.map +1 -1
- package/dist/nodes/Form/v2/FormTriggerV2.node.js +17 -0
- package/dist/nodes/Form/v2/FormTriggerV2.node.js.map +1 -1
- package/dist/nodes/Git/Git.node.d.ts.map +1 -1
- package/dist/nodes/Git/Git.node.js +4 -5
- package/dist/nodes/Git/Git.node.js.map +1 -1
- package/dist/nodes/Gitlab/GitlabTrigger.node.js +2 -2
- package/dist/nodes/Gitlab/GitlabTrigger.node.js.map +1 -1
- package/dist/nodes/Google/Calendar/GenericFunctions.d.ts +3 -0
- package/dist/nodes/Google/Calendar/GenericFunctions.d.ts.map +1 -1
- package/dist/nodes/Google/Calendar/GenericFunctions.js +12 -0
- package/dist/nodes/Google/Calendar/GenericFunctions.js.map +1 -1
- package/dist/nodes/Google/Calendar/GoogleCalendar.node.d.ts.map +1 -1
- package/dist/nodes/Google/Calendar/GoogleCalendar.node.js +4 -20
- package/dist/nodes/Google/Calendar/GoogleCalendar.node.js.map +1 -1
- package/dist/nodes/Google/Gmail/GmailTrigger.node.d.ts.map +1 -1
- package/dist/nodes/Google/Gmail/GmailTrigger.node.js +1 -1
- package/dist/nodes/Google/Gmail/GmailTrigger.node.js.map +1 -1
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/get.json +59 -143
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/get.simple-false.json +235 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/getAll.json +59 -143
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/getAll.simple-false.json +235 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/thread/get.json +122 -171
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/thread/get.simple-false.json +440 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/message/get.json +59 -155
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/message/get.simple-false.json +247 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/message/getAll.json +59 -53
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/message/getAll.simple-false.json +247 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/thread/get.json +122 -168
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/thread/get.simple-false.json +440 -0
- package/dist/nodes/Google/Gmail/utils/descriptions.d.ts +12 -0
- package/dist/nodes/Google/Gmail/utils/descriptions.d.ts.map +1 -1
- package/dist/nodes/Google/Gmail/utils/descriptions.js +13 -1
- package/dist/nodes/Google/Gmail/utils/descriptions.js.map +1 -1
- package/dist/nodes/Google/Gmail/v2/MessageDescription.d.ts.map +1 -1
- package/dist/nodes/Google/Gmail/v2/MessageDescription.js +2 -2
- package/dist/nodes/Google/Gmail/v2/MessageDescription.js.map +1 -1
- package/dist/nodes/Google/Gmail/v2/ThreadDescription.d.ts.map +1 -1
- package/dist/nodes/Google/Gmail/v2/ThreadDescription.js +1 -1
- package/dist/nodes/Google/Gmail/v2/ThreadDescription.js.map +1 -1
- package/dist/nodes/Google/Gmail/v2/utils/draft.js +1 -1
- package/dist/nodes/Google/Gmail/v2/utils/draft.js.map +1 -1
- package/dist/nodes/HomeAssistant/HomeAssistant.node.d.ts.map +1 -1
- package/dist/nodes/HomeAssistant/HomeAssistant.node.js +19 -7
- package/dist/nodes/HomeAssistant/HomeAssistant.node.js.map +1 -1
- package/dist/nodes/Kafka/Kafka.node.d.ts.map +1 -1
- package/dist/nodes/Kafka/Kafka.node.js +1 -3
- package/dist/nodes/Kafka/Kafka.node.js.map +1 -1
- package/dist/nodes/Kafka/KafkaTrigger.node.d.ts.map +1 -1
- package/dist/nodes/Kafka/KafkaTrigger.node.js +1 -3
- package/dist/nodes/Kafka/KafkaTrigger.node.js.map +1 -1
- package/dist/nodes/MessageAnAgent/__schema__/v1.0.0/output.json +67 -0
- package/dist/nodes/MessageAnAgent/__schema__/v2.0.0/output.json +67 -0
- package/dist/nodes/MessageAnAgent/__schema__/v3.1.0/output.json +67 -0
- package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.js +1 -1
- package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.js.map +1 -1
- package/dist/nodes/MondayCom/MondayCom.node.d.ts +3 -11
- package/dist/nodes/MondayCom/MondayCom.node.d.ts.map +1 -1
- package/dist/nodes/MondayCom/MondayCom.node.js +20 -701
- package/dist/nodes/MondayCom/MondayCom.node.js.map +1 -1
- package/dist/nodes/MondayCom/V1/BoardColumnDescription.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V1/BoardColumnDescription.js.map +1 -0
- package/dist/nodes/MondayCom/V1/BoardDescription.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V1/BoardDescription.js.map +1 -0
- package/dist/nodes/MondayCom/V1/BoardGroupDescription.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V1/BoardGroupDescription.js.map +1 -0
- package/dist/nodes/MondayCom/V1/BoardItemDescription.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V1/BoardItemDescription.js.map +1 -0
- package/dist/nodes/MondayCom/V1/GenericFunctions.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V1/GenericFunctions.js.map +1 -0
- package/dist/nodes/MondayCom/V1/MondayComV1.node.d.ts +14 -0
- package/dist/nodes/MondayCom/V1/MondayComV1.node.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V1/MondayComV1.node.js +707 -0
- package/dist/nodes/MondayCom/V1/MondayComV1.node.js.map +1 -0
- package/dist/nodes/MondayCom/V1/mondayCom.svg +1 -0
- package/dist/nodes/MondayCom/V2/MondayComV2.node.d.ts +41 -0
- package/dist/nodes/MondayCom/V2/MondayComV2.node.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/MondayComV2.node.js +21 -0
- package/dist/nodes/MondayCom/V2/MondayComV2.node.js.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/board/BoardDescription.d.ts +4 -0
- package/dist/nodes/MondayCom/V2/actions/board/BoardDescription.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/board/BoardDescription.js +726 -0
- package/dist/nodes/MondayCom/V2/actions/board/BoardDescription.js.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/board/board.execute.d.ts +125 -0
- package/dist/nodes/MondayCom/V2/actions/board/board.execute.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/board/board.execute.js +671 -0
- package/dist/nodes/MondayCom/V2/actions/board/board.execute.js.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/column/ColumnDescription.d.ts +4 -0
- package/dist/nodes/MondayCom/V2/actions/column/ColumnDescription.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/column/ColumnDescription.js +882 -0
- package/dist/nodes/MondayCom/V2/actions/column/ColumnDescription.js.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/column/column.execute.d.ts +53 -0
- package/dist/nodes/MondayCom/V2/actions/column/column.execute.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/column/column.execute.js +510 -0
- package/dist/nodes/MondayCom/V2/actions/column/column.execute.js.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/group/GroupDescription.d.ts +4 -0
- package/dist/nodes/MondayCom/V2/actions/group/GroupDescription.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/group/GroupDescription.js +254 -0
- package/dist/nodes/MondayCom/V2/actions/group/GroupDescription.js.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/group/group.execute.d.ts +36 -0
- package/dist/nodes/MondayCom/V2/actions/group/group.execute.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/group/group.execute.js +62 -0
- package/dist/nodes/MondayCom/V2/actions/group/group.execute.js.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/item/ItemDescription.d.ts +4 -0
- package/dist/nodes/MondayCom/V2/actions/item/ItemDescription.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/item/ItemDescription.js +1083 -0
- package/dist/nodes/MondayCom/V2/actions/item/ItemDescription.js.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/item/item.execute.d.ts +229 -0
- package/dist/nodes/MondayCom/V2/actions/item/item.execute.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/item/item.execute.js +1042 -0
- package/dist/nodes/MondayCom/V2/actions/item/item.execute.js.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/router.d.ts +3 -0
- package/dist/nodes/MondayCom/V2/actions/router.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/router.js +597 -0
- package/dist/nodes/MondayCom/V2/actions/router.js.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/update/UpdateDescription.d.ts +4 -0
- package/dist/nodes/MondayCom/V2/actions/update/UpdateDescription.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/update/UpdateDescription.js +189 -0
- package/dist/nodes/MondayCom/V2/actions/update/UpdateDescription.js.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/update/update.execute.d.ts +29 -0
- package/dist/nodes/MondayCom/V2/actions/update/update.execute.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/update/update.execute.js +100 -0
- package/dist/nodes/MondayCom/V2/actions/update/update.execute.js.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/versionDescription.d.ts +3 -0
- package/dist/nodes/MondayCom/V2/actions/versionDescription.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/actions/versionDescription.js +90 -0
- package/dist/nodes/MondayCom/V2/actions/versionDescription.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/accountSearch.d.ts +67 -0
- package/dist/nodes/MondayCom/V2/helpers/accountSearch.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/accountSearch.js +174 -0
- package/dist/nodes/MondayCom/V2/helpers/accountSearch.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/aggregate.d.ts +76 -0
- package/dist/nodes/MondayCom/V2/helpers/aggregate.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/aggregate.js +259 -0
- package/dist/nodes/MondayCom/V2/helpers/aggregate.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/boardLocator.d.ts +48 -0
- package/dist/nodes/MondayCom/V2/helpers/boardLocator.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/boardLocator.js +151 -0
- package/dist/nodes/MondayCom/V2/helpers/boardLocator.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/bulkImport.d.ts +83 -0
- package/dist/nodes/MondayCom/V2/helpers/bulkImport.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/bulkImport.js +234 -0
- package/dist/nodes/MondayCom/V2/helpers/bulkImport.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/columnDefaults.d.ts +114 -0
- package/dist/nodes/MondayCom/V2/helpers/columnDefaults.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/columnDefaults.js +394 -0
- package/dist/nodes/MondayCom/V2/helpers/columnDefaults.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/columnMapper.d.ts +42 -0
- package/dist/nodes/MondayCom/V2/helpers/columnMapper.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/columnMapper.js +249 -0
- package/dist/nodes/MondayCom/V2/helpers/columnMapper.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/columnOptions.d.ts +86 -0
- package/dist/nodes/MondayCom/V2/helpers/columnOptions.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/columnOptions.js +260 -0
- package/dist/nodes/MondayCom/V2/helpers/columnOptions.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/columnValueMappers.d.ts +35 -0
- package/dist/nodes/MondayCom/V2/helpers/columnValueMappers.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/columnValueMappers.js +232 -0
- package/dist/nodes/MondayCom/V2/helpers/columnValueMappers.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/fileTransfer.d.ts +32 -0
- package/dist/nodes/MondayCom/V2/helpers/fileTransfer.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/fileTransfer.js +70 -0
- package/dist/nodes/MondayCom/V2/helpers/fileTransfer.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/filterOptions.d.ts +37 -0
- package/dist/nodes/MondayCom/V2/helpers/filterOptions.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/filterOptions.js +132 -0
- package/dist/nodes/MondayCom/V2/helpers/filterOptions.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/groupLocator.d.ts +24 -0
- package/dist/nodes/MondayCom/V2/helpers/groupLocator.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/groupLocator.js +78 -0
- package/dist/nodes/MondayCom/V2/helpers/groupLocator.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/itemFilters.d.ts +83 -0
- package/dist/nodes/MondayCom/V2/helpers/itemFilters.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/itemFilters.js +283 -0
- package/dist/nodes/MondayCom/V2/helpers/itemFilters.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/itemLocator.d.ts +74 -0
- package/dist/nodes/MondayCom/V2/helpers/itemLocator.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/itemLocator.js +206 -0
- package/dist/nodes/MondayCom/V2/helpers/itemLocator.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/multiLevel.d.ts +90 -0
- package/dist/nodes/MondayCom/V2/helpers/multiLevel.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/multiLevel.js +149 -0
- package/dist/nodes/MondayCom/V2/helpers/multiLevel.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/pagination.d.ts +80 -0
- package/dist/nodes/MondayCom/V2/helpers/pagination.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/pagination.js +93 -0
- package/dist/nodes/MondayCom/V2/helpers/pagination.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/userLocator.d.ts +78 -0
- package/dist/nodes/MondayCom/V2/helpers/userLocator.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/userLocator.js +316 -0
- package/dist/nodes/MondayCom/V2/helpers/userLocator.js.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/workspaceLocator.d.ts +33 -0
- package/dist/nodes/MondayCom/V2/helpers/workspaceLocator.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/helpers/workspaceLocator.js +123 -0
- package/dist/nodes/MondayCom/V2/helpers/workspaceLocator.js.map +1 -0
- package/dist/nodes/MondayCom/V2/methods/index.d.ts +43 -0
- package/dist/nodes/MondayCom/V2/methods/index.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/methods/index.js +46 -0
- package/dist/nodes/MondayCom/V2/methods/index.js.map +1 -0
- package/dist/nodes/MondayCom/V2/mondayCom.dark.svg +18 -0
- package/dist/nodes/MondayCom/V2/mondayCom.svg +18 -0
- package/dist/nodes/MondayCom/V2/transport/MondayGraphQLClient.d.ts +162 -0
- package/dist/nodes/MondayCom/V2/transport/MondayGraphQLClient.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/transport/MondayGraphQLClient.js +469 -0
- package/dist/nodes/MondayCom/V2/transport/MondayGraphQLClient.js.map +1 -0
- package/dist/nodes/MondayCom/V2/transport/constants.d.ts +41 -0
- package/dist/nodes/MondayCom/V2/transport/constants.d.ts.map +1 -0
- package/dist/nodes/MondayCom/V2/transport/constants.js +53 -0
- package/dist/nodes/MondayCom/V2/transport/constants.js.map +1 -0
- package/dist/nodes/Notion/__schema__/v3.0.0/databasePage/get.json +37 -0
- package/dist/nodes/Notion/__schema__/v3.0.0/databasePage/get.simple-false.json +420 -0
- package/dist/nodes/Notion/__schema__/v3.0.0/databasePage/getAll.json +37 -0
- package/dist/nodes/Notion/__schema__/v3.0.0/databasePage/getAll.simple-false.json +420 -0
- package/dist/nodes/Notion/shared/GenericFunctions.d.ts +1 -1
- package/dist/nodes/Postgres/Postgres.node.d.ts.map +1 -1
- package/dist/nodes/Postgres/Postgres.node.js +2 -1
- package/dist/nodes/Postgres/Postgres.node.js.map +1 -1
- package/dist/nodes/Postgres/v2/actions/common.descriptions.d.ts.map +1 -1
- package/dist/nodes/Postgres/v2/actions/common.descriptions.js +13 -1
- package/dist/nodes/Postgres/v2/actions/common.descriptions.js.map +1 -1
- package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.d.ts.map +1 -1
- package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.js +19 -2
- package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.js.map +1 -1
- package/dist/nodes/Postgres/v2/actions/versionDescription.js +1 -1
- package/dist/nodes/Postgres/v2/actions/versionDescription.js.map +1 -1
- package/dist/nodes/Schedule/ScheduleTrigger.node.d.ts.map +1 -1
- package/dist/nodes/Schedule/ScheduleTrigger.node.js +0 -12
- package/dist/nodes/Schedule/ScheduleTrigger.node.js.map +1 -1
- package/dist/nodes/Splunk/v2/actions/router.d.ts.map +1 -1
- package/dist/nodes/Splunk/v2/actions/router.js +4 -1
- package/dist/nodes/Splunk/v2/actions/router.js.map +1 -1
- package/dist/types/credentials.json +3 -2
- package/dist/types/nodes.json +17 -16
- package/dist/utils/binary.d.ts +12 -1
- package/dist/utils/binary.d.ts.map +1 -1
- package/dist/utils/binary.js +61 -5
- package/dist/utils/binary.js.map +1 -1
- package/dist/utils/sendAndWait/interfaces.d.ts +1 -1
- package/dist/utils/sendAndWait/interfaces.d.ts.map +1 -1
- package/dist/utils/trusted-source.d.ts +9 -0
- package/dist/utils/trusted-source.d.ts.map +1 -0
- package/dist/utils/trusted-source.js +18 -0
- package/dist/utils/trusted-source.js.map +1 -0
- package/package.json +15 -15
- package/dist/nodes/MondayCom/BoardColumnDescription.d.ts.map +0 -1
- package/dist/nodes/MondayCom/BoardColumnDescription.js.map +0 -1
- package/dist/nodes/MondayCom/BoardDescription.d.ts.map +0 -1
- package/dist/nodes/MondayCom/BoardDescription.js.map +0 -1
- package/dist/nodes/MondayCom/BoardGroupDescription.d.ts.map +0 -1
- package/dist/nodes/MondayCom/BoardGroupDescription.js.map +0 -1
- package/dist/nodes/MondayCom/BoardItemDescription.d.ts.map +0 -1
- package/dist/nodes/MondayCom/BoardItemDescription.js.map +0 -1
- package/dist/nodes/MondayCom/GenericFunctions.d.ts.map +0 -1
- package/dist/nodes/MondayCom/GenericFunctions.js.map +0 -1
- /package/dist/nodes/MondayCom/{BoardColumnDescription.d.ts → V1/BoardColumnDescription.d.ts} +0 -0
- /package/dist/nodes/MondayCom/{BoardColumnDescription.js → V1/BoardColumnDescription.js} +0 -0
- /package/dist/nodes/MondayCom/{BoardDescription.d.ts → V1/BoardDescription.d.ts} +0 -0
- /package/dist/nodes/MondayCom/{BoardDescription.js → V1/BoardDescription.js} +0 -0
- /package/dist/nodes/MondayCom/{BoardGroupDescription.d.ts → V1/BoardGroupDescription.d.ts} +0 -0
- /package/dist/nodes/MondayCom/{BoardGroupDescription.js → V1/BoardGroupDescription.js} +0 -0
- /package/dist/nodes/MondayCom/{BoardItemDescription.d.ts → V1/BoardItemDescription.d.ts} +0 -0
- /package/dist/nodes/MondayCom/{BoardItemDescription.js → V1/BoardItemDescription.js} +0 -0
- /package/dist/nodes/MondayCom/{GenericFunctions.d.ts → V1/GenericFunctions.d.ts} +0 -0
- /package/dist/nodes/MondayCom/{GenericFunctions.js → V1/GenericFunctions.js} +0 -0
|
@@ -0,0 +1,1042 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MOVE_UNMAPPABLE_COLUMN_TYPES = exports.MAX_BULK_ARCHIVE_DELETE_ITEMS = exports.MAX_CLEAR_COLUMNS = exports.MAX_CLEAR_ITEMS = void 0;
|
|
4
|
+
exports.withArchiveOrDeleteOutcome = withArchiveOrDeleteOutcome;
|
|
5
|
+
exports.resolveArchiveOrDeleteAction = resolveArchiveOrDeleteAction;
|
|
6
|
+
exports.createItem = createItem;
|
|
7
|
+
exports.createSubitem = createSubitem;
|
|
8
|
+
exports.updateItem = updateItem;
|
|
9
|
+
exports.buildClearColumnValuesMutation = buildClearColumnValuesMutation;
|
|
10
|
+
exports.clearColumnValues = clearColumnValues;
|
|
11
|
+
exports.bulkImportItems = bulkImportItems;
|
|
12
|
+
exports.getBulkImportJobStatus = getBulkImportJobStatus;
|
|
13
|
+
exports.buildBulkArchiveOrDeleteMutation = buildBulkArchiveOrDeleteMutation;
|
|
14
|
+
exports.archiveOrDeleteManyItems = archiveOrDeleteManyItems;
|
|
15
|
+
exports.completeMoveColumnsMapping = completeMoveColumnsMapping;
|
|
16
|
+
exports.moveItem = moveItem;
|
|
17
|
+
exports.safeJsonParse = safeJsonParse;
|
|
18
|
+
exports.flattenItemColumns = flattenItemColumns;
|
|
19
|
+
exports.buildGetItemQuery = buildGetItemQuery;
|
|
20
|
+
exports.getItem = getItem;
|
|
21
|
+
exports.searchAcrossAccount = searchAcrossAccount;
|
|
22
|
+
exports.formatColumnValueOutput = formatColumnValueOutput;
|
|
23
|
+
exports.getColumnValue = getColumnValue;
|
|
24
|
+
exports.getManyItems = getManyItems;
|
|
25
|
+
const sleep_1 = require("@n8n/utils/sleep");
|
|
26
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
27
|
+
const accountSearch_1 = require("../../helpers/accountSearch");
|
|
28
|
+
const bulkImport_1 = require("../../helpers/bulkImport");
|
|
29
|
+
const columnMapper_1 = require("../../helpers/columnMapper");
|
|
30
|
+
const boardLocator_1 = require("../../helpers/boardLocator");
|
|
31
|
+
const columnValueMappers_1 = require("../../helpers/columnValueMappers");
|
|
32
|
+
const fileTransfer_1 = require("../../helpers/fileTransfer");
|
|
33
|
+
const filterOptions_1 = require("../../helpers/filterOptions");
|
|
34
|
+
const itemFilters_1 = require("../../helpers/itemFilters");
|
|
35
|
+
const multiLevel_1 = require("../../helpers/multiLevel");
|
|
36
|
+
const pagination_1 = require("../../helpers/pagination");
|
|
37
|
+
const userLocator_1 = require("../../helpers/userLocator");
|
|
38
|
+
const constants_1 = require("../../transport/constants");
|
|
39
|
+
/**
|
|
40
|
+
* Shapes the output row of an archive/delete mutation. monday echoes the
|
|
41
|
+
* entity's state from BEFORE the change (`state: "active"`,
|
|
42
|
+
* `archived: false`), so the state fields are set from the action taken —
|
|
43
|
+
* a downstream IF on them must see the new state, like Odoo V2's
|
|
44
|
+
* `{ id, deleted: true }`.
|
|
45
|
+
*/
|
|
46
|
+
function withArchiveOrDeleteOutcome(payload, action, entity) {
|
|
47
|
+
if (entity === 'group') {
|
|
48
|
+
return action === 'archive'
|
|
49
|
+
? { ...payload, archived: true, action }
|
|
50
|
+
: { ...payload, deleted: true, action };
|
|
51
|
+
}
|
|
52
|
+
return { ...payload, state: action === 'archive' ? 'archived' : 'deleted', action };
|
|
53
|
+
}
|
|
54
|
+
function resolveArchiveOrDeleteAction(itemIndex) {
|
|
55
|
+
const action = this.getNodeParameter('archiveOrDeleteAction', itemIndex, 'archive');
|
|
56
|
+
return action === 'delete' ? 'delete' : 'archive';
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Resolves the column_values object shared by Item: Create and Item: Update —
|
|
60
|
+
* either the typed column mapper (friendly per-type inputs) or a raw
|
|
61
|
+
* API-format JSON object. Returns undefined when nothing was set.
|
|
62
|
+
*/
|
|
63
|
+
async function resolveColumnValues(itemIndex, boardId) {
|
|
64
|
+
const mode = this.getNodeParameter('columnValuesMode', itemIndex);
|
|
65
|
+
if (mode === 'json') {
|
|
66
|
+
const raw = this.getNodeParameter('columnValuesJson', itemIndex, '{}');
|
|
67
|
+
if (typeof raw === 'object' && raw !== null) {
|
|
68
|
+
return raw;
|
|
69
|
+
}
|
|
70
|
+
if (typeof raw === 'string' && raw.trim() !== '' && raw.trim() !== '{}') {
|
|
71
|
+
try {
|
|
72
|
+
return JSON.parse(raw);
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Column Values (JSON) must be a valid JSON object keyed by column ID', { itemIndex });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
const mapped = (0, columnMapper_1.extractMappedValues)(this.getNodeParameter('columns', itemIndex, {}));
|
|
81
|
+
if (Object.keys(mapped).length === 0)
|
|
82
|
+
return undefined;
|
|
83
|
+
const columnTypes = await (0, columnMapper_1.fetchColumnTypes)(this, boardId, itemIndex);
|
|
84
|
+
return (0, columnValueMappers_1.buildColumnValues)(mapped, columnTypes, { timezone: this.getTimezone() });
|
|
85
|
+
}
|
|
86
|
+
/** Item: Create — create_item with column values from the shared builder. */
|
|
87
|
+
async function createItem(client, itemIndex) {
|
|
88
|
+
// Unified Create: Subitem mode routes to create_subitem.
|
|
89
|
+
const createAs = this.getNodeParameter('createAs', itemIndex, 'item');
|
|
90
|
+
if (createAs === 'subitem') {
|
|
91
|
+
return await createSubitem.call(this, client, itemIndex);
|
|
92
|
+
}
|
|
93
|
+
const boardId = this.getNodeParameter('boardId', itemIndex, undefined, {
|
|
94
|
+
extractValue: true,
|
|
95
|
+
});
|
|
96
|
+
const name = this.getNodeParameter('name', itemIndex);
|
|
97
|
+
const createOptions = this.getNodeParameter('createOptions', itemIndex, {});
|
|
98
|
+
const groupId = createOptions.groupId || '';
|
|
99
|
+
const columnValues = await resolveColumnValues.call(this, itemIndex, boardId);
|
|
100
|
+
const data = await client.execute(`mutation ($boardId: ID!, $groupId: String, $itemName: String!, $columnValues: JSON, $createLabels: Boolean) {
|
|
101
|
+
create_item(
|
|
102
|
+
board_id: $boardId,
|
|
103
|
+
group_id: $groupId,
|
|
104
|
+
item_name: $itemName,
|
|
105
|
+
column_values: $columnValues,
|
|
106
|
+
create_labels_if_missing: $createLabels
|
|
107
|
+
) {
|
|
108
|
+
id
|
|
109
|
+
name
|
|
110
|
+
url
|
|
111
|
+
state
|
|
112
|
+
board { id name }
|
|
113
|
+
group { id title }
|
|
114
|
+
column_values(${multiLevel_1.COLUMN_VALUES_CALCULATED_ARG}) { id type text value ${multiLevel_1.BATTERY_VALUE_FRAGMENT} ${multiLevel_1.LINKED_VALUE_FRAGMENTS} }
|
|
115
|
+
}
|
|
116
|
+
}`, itemIndex, {
|
|
117
|
+
boardId,
|
|
118
|
+
groupId: groupId || null,
|
|
119
|
+
itemName: name,
|
|
120
|
+
// The API's JSON scalar arrives as a string.
|
|
121
|
+
columnValues: columnValues ? JSON.stringify(columnValues) : null,
|
|
122
|
+
createLabels: createOptions.createLabelsIfMissing === true,
|
|
123
|
+
});
|
|
124
|
+
return (data.create_item ?? {});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Item: Create in Subitem mode — create_subitem under a parent item,
|
|
128
|
+
* through the same column builder as
|
|
129
|
+
* Create. Mapper values are typed against the SUBITEM board, resolved via
|
|
130
|
+
* the parent board's subtasks column — on multi-level boards that resolves
|
|
131
|
+
* to the parent board itself (one shared schema at every depth), and the
|
|
132
|
+
* parent may be a subitem (nesting up to 5 levels).
|
|
133
|
+
*/
|
|
134
|
+
async function createSubitem(client, itemIndex) {
|
|
135
|
+
const parentBoardId = this.getNodeParameter('boardId', itemIndex, undefined, {
|
|
136
|
+
extractValue: true,
|
|
137
|
+
});
|
|
138
|
+
const parentItemId = this.getNodeParameter('itemId', itemIndex, undefined, {
|
|
139
|
+
extractValue: true,
|
|
140
|
+
});
|
|
141
|
+
const name = this.getNodeParameter('name', itemIndex);
|
|
142
|
+
const createOptions = this.getNodeParameter('createOptions', itemIndex, {});
|
|
143
|
+
// Column types must come from the subitem board, not the parent's.
|
|
144
|
+
// Only needed in mapper mode; raw JSON passes through untyped.
|
|
145
|
+
const mode = this.getNodeParameter('columnValuesMode', itemIndex);
|
|
146
|
+
let valuesBoardId = parentBoardId;
|
|
147
|
+
if (mode === 'mapper') {
|
|
148
|
+
const mapped = (0, columnMapper_1.extractMappedValues)(this.getNodeParameter('columns', itemIndex, {}));
|
|
149
|
+
if (Object.keys(mapped).length > 0) {
|
|
150
|
+
const subitemBoardId = await (0, columnMapper_1.resolveSubitemBoardId)(this, parentBoardId, itemIndex);
|
|
151
|
+
if (!subitemBoardId) {
|
|
152
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'This board has no subitems board yet — create the first subitem without column values, or use Raw JSON', { itemIndex });
|
|
153
|
+
}
|
|
154
|
+
valuesBoardId = subitemBoardId;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const columnValues = await resolveColumnValues.call(this, itemIndex, valuesBoardId);
|
|
158
|
+
const data = await client.execute(`mutation ($parentItemId: ID!, $itemName: String!, $columnValues: JSON, $createLabels: Boolean) {
|
|
159
|
+
create_subitem(
|
|
160
|
+
parent_item_id: $parentItemId,
|
|
161
|
+
item_name: $itemName,
|
|
162
|
+
column_values: $columnValues,
|
|
163
|
+
create_labels_if_missing: $createLabels
|
|
164
|
+
) {
|
|
165
|
+
id
|
|
166
|
+
name
|
|
167
|
+
url
|
|
168
|
+
state
|
|
169
|
+
board { id name }
|
|
170
|
+
group { id title }
|
|
171
|
+
parent_item { id name }
|
|
172
|
+
column_values(${multiLevel_1.COLUMN_VALUES_CALCULATED_ARG}) { id type text value ${multiLevel_1.BATTERY_VALUE_FRAGMENT} ${multiLevel_1.LINKED_VALUE_FRAGMENTS} }
|
|
173
|
+
}
|
|
174
|
+
}`, itemIndex, {
|
|
175
|
+
parentItemId,
|
|
176
|
+
itemName: name,
|
|
177
|
+
columnValues: columnValues ? JSON.stringify(columnValues) : null,
|
|
178
|
+
createLabels: createOptions.createLabelsIfMissing === true,
|
|
179
|
+
});
|
|
180
|
+
return (data.create_subitem ?? {});
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Item: Update — change_multiple_column_values via the same column builder
|
|
184
|
+
* as Create; the mapper additionally exposes the name column for renames.
|
|
185
|
+
*/
|
|
186
|
+
async function updateItem(client, itemIndex) {
|
|
187
|
+
const boardId = this.getNodeParameter('boardId', itemIndex, undefined, {
|
|
188
|
+
extractValue: true,
|
|
189
|
+
});
|
|
190
|
+
const itemId = this.getNodeParameter('itemId', itemIndex, undefined, {
|
|
191
|
+
extractValue: true,
|
|
192
|
+
});
|
|
193
|
+
const createOptions = this.getNodeParameter('createOptions', itemIndex, {});
|
|
194
|
+
const columnValues = await resolveColumnValues.call(this, itemIndex, boardId);
|
|
195
|
+
if (!columnValues || Object.keys(columnValues).length === 0) {
|
|
196
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Set at least one column value to update', {
|
|
197
|
+
itemIndex,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
const data = await client.execute(`mutation ($boardId: ID!, $itemId: ID!, $columnValues: JSON!, $createLabels: Boolean) {
|
|
201
|
+
change_multiple_column_values(
|
|
202
|
+
board_id: $boardId,
|
|
203
|
+
item_id: $itemId,
|
|
204
|
+
column_values: $columnValues,
|
|
205
|
+
create_labels_if_missing: $createLabels
|
|
206
|
+
) {
|
|
207
|
+
id
|
|
208
|
+
name
|
|
209
|
+
url
|
|
210
|
+
state
|
|
211
|
+
board { id name }
|
|
212
|
+
group { id title }
|
|
213
|
+
column_values(${multiLevel_1.COLUMN_VALUES_CALCULATED_ARG}) { id type text value ${multiLevel_1.BATTERY_VALUE_FRAGMENT} ${multiLevel_1.LINKED_VALUE_FRAGMENTS} }
|
|
214
|
+
}
|
|
215
|
+
}`, itemIndex, {
|
|
216
|
+
boardId,
|
|
217
|
+
itemId,
|
|
218
|
+
columnValues: JSON.stringify(columnValues),
|
|
219
|
+
createLabels: createOptions.createLabelsIfMissing === true,
|
|
220
|
+
});
|
|
221
|
+
return (data.change_multiple_column_values ?? {});
|
|
222
|
+
}
|
|
223
|
+
/** Product cap for Item: Clear Column Values — items and columns per execution. */
|
|
224
|
+
exports.MAX_CLEAR_ITEMS = 10;
|
|
225
|
+
exports.MAX_CLEAR_COLUMNS = 10;
|
|
226
|
+
/**
|
|
227
|
+
* Builds the single aliased request that clears the given columns on every
|
|
228
|
+
* item: one change_multiple_column_values per item, all in one mutation.
|
|
229
|
+
* Setting a column to null resets it to its empty/default value (verified
|
|
230
|
+
* live for text, numbers, date, link, status, checkbox and file columns).
|
|
231
|
+
* Exported for unit tests.
|
|
232
|
+
*/
|
|
233
|
+
function buildClearColumnValuesMutation(itemIds, columnIds) {
|
|
234
|
+
const columnValues = JSON.stringify(Object.fromEntries(columnIds.map((columnId) => [columnId, null])));
|
|
235
|
+
const variables = { boardId: undefined, columnValues };
|
|
236
|
+
const varDefs = ['$boardId: ID!', '$columnValues: JSON!'];
|
|
237
|
+
const aliases = [];
|
|
238
|
+
itemIds.forEach((itemId, index) => {
|
|
239
|
+
varDefs.push(`$item${index}: ID!`);
|
|
240
|
+
variables[`item${index}`] = itemId;
|
|
241
|
+
aliases.push(`item${index}: change_multiple_column_values(board_id: $boardId, item_id: $item${index}, column_values: $columnValues) { id name }`);
|
|
242
|
+
});
|
|
243
|
+
return {
|
|
244
|
+
query: `mutation (${varDefs.join(', ')}) {\n\t${aliases.join('\n\t')}\n}`,
|
|
245
|
+
variables,
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Item: Clear Column Values — resets up to 10 columns on up to 10 items back
|
|
250
|
+
* to their empty/default values in ONE aliased API request. Not atomic: if a
|
|
251
|
+
* later item in the batch fails, earlier aliases may already have executed.
|
|
252
|
+
*/
|
|
253
|
+
async function clearColumnValues(client, itemIndex) {
|
|
254
|
+
const boardId = this.getNodeParameter('boardId', itemIndex, undefined, {
|
|
255
|
+
extractValue: true,
|
|
256
|
+
});
|
|
257
|
+
const itemIds = (0, filterOptions_1.normalizeIdList)(this.getNodeParameter('clearItemIds', itemIndex));
|
|
258
|
+
const columnIds = (0, filterOptions_1.normalizeIdList)(this.getNodeParameter('clearColumnIds', itemIndex));
|
|
259
|
+
if (itemIds.length === 0) {
|
|
260
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Provide at least one item ID to clear', {
|
|
261
|
+
itemIndex,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
if (itemIds.length > exports.MAX_CLEAR_ITEMS) {
|
|
265
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Too many items: ${itemIds.length} provided, but Clear Column Values handles at most ${exports.MAX_CLEAR_ITEMS} per execution. Split the list across multiple runs.`, { itemIndex });
|
|
266
|
+
}
|
|
267
|
+
if (columnIds.length === 0) {
|
|
268
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Select at least one column to clear', {
|
|
269
|
+
itemIndex,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
if (columnIds.length > exports.MAX_CLEAR_COLUMNS) {
|
|
273
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Too many columns: ${columnIds.length} selected, but Clear Column Values handles at most ${exports.MAX_CLEAR_COLUMNS} per execution`, { itemIndex });
|
|
274
|
+
}
|
|
275
|
+
const { query, variables } = buildClearColumnValuesMutation(itemIds, columnIds);
|
|
276
|
+
variables.boardId = boardId;
|
|
277
|
+
const { data, errors } = await client.executeBulk(query, itemIndex, variables);
|
|
278
|
+
const failures = [];
|
|
279
|
+
const rows = itemIds.map((itemId, index) => {
|
|
280
|
+
const payload = data[`item${index}`];
|
|
281
|
+
if (payload) {
|
|
282
|
+
return {
|
|
283
|
+
itemId: payload.id ?? itemId,
|
|
284
|
+
name: payload.name ?? null,
|
|
285
|
+
success: true,
|
|
286
|
+
clearedColumnIds: columnIds,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
const failure = errors.find((error) => error.path?.[0] === `item${index}`);
|
|
290
|
+
const message = failure?.message ?? 'Unknown error';
|
|
291
|
+
failures.push({ itemId, message });
|
|
292
|
+
return {
|
|
293
|
+
itemId,
|
|
294
|
+
success: false,
|
|
295
|
+
error: message,
|
|
296
|
+
errorCode: failure?.extensions?.code ?? failure?.error_code ?? null,
|
|
297
|
+
};
|
|
298
|
+
});
|
|
299
|
+
if (failures.length > 0 && !this.continueOnFail()) {
|
|
300
|
+
const detail = failures.map((failure) => `${failure.itemId} (${failure.message})`).join(', ');
|
|
301
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `${failures.length} of ${itemIds.length} items failed to clear: ${detail}. The other items in the batch were still cleared.`, { itemIndex });
|
|
302
|
+
}
|
|
303
|
+
return rows;
|
|
304
|
+
}
|
|
305
|
+
/** Selection set for fetch_job_status — shared by the wait loop and the status op. */
|
|
306
|
+
const ITEMS_JOB_STATUS_QUERY = `query ($jobId: ID!) {
|
|
307
|
+
fetch_job_status(job_id: $jobId) {
|
|
308
|
+
... on ItemsJobStatus {
|
|
309
|
+
status
|
|
310
|
+
counts { submitted invalid skipped created updated failed }
|
|
311
|
+
progress_percentage
|
|
312
|
+
failure_reason
|
|
313
|
+
failure_message
|
|
314
|
+
fully_imported
|
|
315
|
+
report_created
|
|
316
|
+
report_url
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}`;
|
|
320
|
+
/** One fetch_job_status poll. */
|
|
321
|
+
async function fetchBulkImportJobStatus(client, itemIndex, jobId) {
|
|
322
|
+
const data = await client.execute(ITEMS_JOB_STATUS_QUERY, itemIndex, { jobId });
|
|
323
|
+
return (data.fetch_job_status ?? {});
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Downloads and parses monday's per-row import report. The report URL is a
|
|
327
|
+
* pre-signed S3 GET that expires after 10 minutes — always fetched
|
|
328
|
+
* immediately, never emitted downstream. Rows in mapped mode pair back to
|
|
329
|
+
* the input item they came from (serialNo is the 1-based data-row number).
|
|
330
|
+
*/
|
|
331
|
+
async function fetchBulkImportReportRows(jobId, reportUrl, pairToInputRows, fallbackItemIndex, inputItemCount) {
|
|
332
|
+
(0, fileTransfer_1.assertPresignedStorageUrl)(this.getNode(), reportUrl, 'report', fallbackItemIndex);
|
|
333
|
+
const reportText = (await this.helpers.httpRequest({
|
|
334
|
+
url: reportUrl,
|
|
335
|
+
...fileTransfer_1.PRESIGNED_URL_REQUEST_OPTIONS,
|
|
336
|
+
}));
|
|
337
|
+
return (0, bulkImport_1.parseReportRows)(String(reportText)).map((row) => {
|
|
338
|
+
const serialNo = typeof row.serialNo === 'number' ? row.serialNo : undefined;
|
|
339
|
+
const pairedIndex = pairToInputRows && serialNo !== undefined && serialNo >= 1 && serialNo <= inputItemCount
|
|
340
|
+
? serialNo - 1
|
|
341
|
+
: fallbackItemIndex;
|
|
342
|
+
return {
|
|
343
|
+
json: { jobId, ...row },
|
|
344
|
+
pairedItem: { item: pairedIndex },
|
|
345
|
+
};
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Item: Bulk Import — one asynchronous CSV import job per execution:
|
|
350
|
+
* start ingest_items/backfill_items, PUT the CSV to the pre-signed URL
|
|
351
|
+
* (valid 10 minutes, so the upload happens immediately), then optionally
|
|
352
|
+
* poll fetch_job_status every 10s until a terminal state.
|
|
353
|
+
*/
|
|
354
|
+
async function bulkImportItems(client, inputItemCount) {
|
|
355
|
+
const boardId = this.getNodeParameter('boardId', 0, undefined, {
|
|
356
|
+
extractValue: true,
|
|
357
|
+
});
|
|
358
|
+
const groupIdParam = this.getNodeParameter('bulkImportGroupId', 0, '');
|
|
359
|
+
const importType = this.getNodeParameter('bulkImportType', 0);
|
|
360
|
+
const source = this.getNodeParameter('bulkImportSource', 0);
|
|
361
|
+
const wait = this.getNodeParameter('bulkImportWait', 0);
|
|
362
|
+
const options = this.getNodeParameter('bulkImportOptions', 0, {});
|
|
363
|
+
const isBackfill = importType === 'backfill';
|
|
364
|
+
const rowCap = isBackfill ? bulkImport_1.MAX_BACKFILL_ROWS : bulkImport_1.MAX_INGEST_ROWS;
|
|
365
|
+
// Assemble the CSV before starting the job — the upload URL only lives
|
|
366
|
+
// 10 minutes, so everything slow happens first. A file source is
|
|
367
|
+
// streamed from binary storage rather than buffered.
|
|
368
|
+
let csvBody;
|
|
369
|
+
let csvLength;
|
|
370
|
+
let mappedMode = false;
|
|
371
|
+
if (source === 'file') {
|
|
372
|
+
const binaryPropertyName = this.getNodeParameter('bulkImportBinaryPropertyName', 0);
|
|
373
|
+
const upload = await (0, fileTransfer_1.resolveBinaryUpload)(this, 0, binaryPropertyName);
|
|
374
|
+
csvBody = upload.body;
|
|
375
|
+
csvLength = upload.contentLength;
|
|
376
|
+
}
|
|
377
|
+
else {
|
|
378
|
+
mappedMode = true;
|
|
379
|
+
if (inputItemCount > rowCap) {
|
|
380
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Too many rows: ${inputItemCount} input items, but ${isBackfill ? 'backfill' : 'ingest'} accepts at most ${rowCap} rows per job. Split the input into smaller batches.`, { itemIndex: 0 });
|
|
381
|
+
}
|
|
382
|
+
const mappedRows = [];
|
|
383
|
+
for (let i = 0; i < inputItemCount; i++) {
|
|
384
|
+
mappedRows.push((0, columnMapper_1.extractMappedValues)(this.getNodeParameter('bulkImportColumns', i, {})));
|
|
385
|
+
}
|
|
386
|
+
const columns = await (0, columnMapper_1.fetchColumns)(this, boardId, 0);
|
|
387
|
+
const columnTypes = Object.fromEntries(columns.map((column) => [column.id, column.type]));
|
|
388
|
+
try {
|
|
389
|
+
const built = (0, bulkImport_1.buildBulkImportCsv)(mappedRows, columnTypes, columns.map((column) => column.id));
|
|
390
|
+
csvBody = Buffer.from(built.csv, 'utf-8');
|
|
391
|
+
csvLength = csvBody.length;
|
|
392
|
+
}
|
|
393
|
+
catch (error) {
|
|
394
|
+
if (error instanceof bulkImport_1.BulkImportInputError) {
|
|
395
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error.message, { itemIndex: 0 });
|
|
396
|
+
}
|
|
397
|
+
// Anything else came from the GraphQL client — already a mapped NodeApiError.
|
|
398
|
+
throw error;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
// group_id is required by the API; empty picker = the board's top group.
|
|
402
|
+
let groupId = groupIdParam;
|
|
403
|
+
if (!groupId) {
|
|
404
|
+
const groupIds = await (0, multiLevel_1.fetchBoardGroupIds)(client, 0, boardId);
|
|
405
|
+
if (groupIds.length === 0) {
|
|
406
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Board ${boardId} has no groups`, {
|
|
407
|
+
itemIndex: 0,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
groupId = groupIds[0];
|
|
411
|
+
}
|
|
412
|
+
// on_match only exists on ingest_items (backfill always creates).
|
|
413
|
+
const onMatchBehaviour = isBackfill
|
|
414
|
+
? 'none'
|
|
415
|
+
: this.getNodeParameter('bulkImportOnMatch', 0, 'none');
|
|
416
|
+
let onMatch = null;
|
|
417
|
+
if (onMatchBehaviour !== 'none') {
|
|
418
|
+
const matchColumnId = this.getNodeParameter('bulkImportMatchColumnId', 0);
|
|
419
|
+
onMatch = { behaviour: onMatchBehaviour, match_column_id: matchColumnId };
|
|
420
|
+
}
|
|
421
|
+
const startMutation = isBackfill
|
|
422
|
+
? `mutation ($boardId: ID!, $groupId: ID!) {
|
|
423
|
+
backfill_items(board_id: $boardId, group_id: $groupId) { job_id upload_url }
|
|
424
|
+
}`
|
|
425
|
+
: `mutation ($boardId: ID!, $groupId: ID!, $onMatch: OnMatchInput) {
|
|
426
|
+
ingest_items(board_id: $boardId, group_id: $groupId, on_match: $onMatch) { job_id upload_url }
|
|
427
|
+
}`;
|
|
428
|
+
const startVariables = { boardId, groupId };
|
|
429
|
+
if (!isBackfill)
|
|
430
|
+
startVariables.onMatch = onMatch;
|
|
431
|
+
const startData = await client.execute(startMutation, 0, startVariables);
|
|
432
|
+
const jobInit = (startData[isBackfill ? 'backfill_items' : 'ingest_items'] ?? {});
|
|
433
|
+
if (!jobInit.job_id || !jobInit.upload_url) {
|
|
434
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'monday.com did not return a job ID and upload URL for the import job', { itemIndex: 0 });
|
|
435
|
+
}
|
|
436
|
+
const jobId = jobInit.job_id;
|
|
437
|
+
(0, fileTransfer_1.assertPresignedStorageUrl)(this.getNode(), jobInit.upload_url, 'upload', 0);
|
|
438
|
+
// Pre-signed S3 PUT: no auth header, and no extra headers beyond the
|
|
439
|
+
// standard ones — an unsigned x-amz-checksum-crc32 header makes S3
|
|
440
|
+
// reject the upload (403). Content-Length is required for a stream body.
|
|
441
|
+
await this.helpers.httpRequest({
|
|
442
|
+
method: 'PUT',
|
|
443
|
+
url: jobInit.upload_url,
|
|
444
|
+
body: csvBody,
|
|
445
|
+
headers: { 'Content-Type': 'text/csv', 'Content-Length': String(csvLength) },
|
|
446
|
+
...fileTransfer_1.PRESIGNED_URL_REQUEST_OPTIONS,
|
|
447
|
+
});
|
|
448
|
+
if (!wait) {
|
|
449
|
+
return [
|
|
450
|
+
{
|
|
451
|
+
json: { jobId, status: 'UPLOAD_PENDING', boardId, groupId, importType },
|
|
452
|
+
pairedItem: { item: 0 },
|
|
453
|
+
},
|
|
454
|
+
];
|
|
455
|
+
}
|
|
456
|
+
const maxWaitTimeMs = (options.maxWaitTime ?? 1800) * 1000;
|
|
457
|
+
const startedAt = Date.now();
|
|
458
|
+
let status = await fetchBulkImportJobStatus(client, 0, jobId);
|
|
459
|
+
while (!bulkImport_1.BULK_IMPORT_TERMINAL_STATES.has(status.status ?? '')) {
|
|
460
|
+
if (Date.now() - startedAt >= maxWaitTimeMs) {
|
|
461
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Import job ${jobId} did not finish within ${maxWaitTimeMs / 1000}s (last status: ${status.status ?? 'unknown'}). The job keeps running on monday's side — check it with the Get Bulk Import Status operation.`, { itemIndex: 0 });
|
|
462
|
+
}
|
|
463
|
+
await (0, sleep_1.sleep)(bulkImport_1.BULK_IMPORT_POLL_INTERVAL_MS);
|
|
464
|
+
status = await fetchBulkImportJobStatus(client, 0, jobId);
|
|
465
|
+
}
|
|
466
|
+
if (status.status === 'FAILED' || status.status === 'REJECTED') {
|
|
467
|
+
const reason = [status.failure_reason, status.failure_message].filter(Boolean).join(' — ');
|
|
468
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Import job ${jobId} ${status.status === 'REJECTED' ? 'was rejected' : 'failed'}${reason ? `: ${reason}` : ''}`, { itemIndex: 0 });
|
|
469
|
+
}
|
|
470
|
+
const results = [
|
|
471
|
+
{ json: (0, bulkImport_1.summarizeJobStatus)(jobId, status), pairedItem: { item: 0 } },
|
|
472
|
+
];
|
|
473
|
+
if (options.includeRowResults === true && status.report_created && status.report_url) {
|
|
474
|
+
results.push(...(await fetchBulkImportReportRows.call(this, jobId, status.report_url, mappedMode, 0, inputItemCount)));
|
|
475
|
+
}
|
|
476
|
+
return results;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Item: Get Bulk Import Status — one fetch_job_status poll for a job ID
|
|
480
|
+
* from a previous Bulk Import run (the no-wait path).
|
|
481
|
+
*/
|
|
482
|
+
async function getBulkImportJobStatus(client, itemIndex) {
|
|
483
|
+
const jobId = this.getNodeParameter('bulkImportJobId', itemIndex).trim();
|
|
484
|
+
if (!jobId) {
|
|
485
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Job ID is required', { itemIndex });
|
|
486
|
+
}
|
|
487
|
+
const options = this.getNodeParameter('bulkImportStatusOptions', itemIndex, {});
|
|
488
|
+
const status = await fetchBulkImportJobStatus(client, itemIndex, jobId);
|
|
489
|
+
if (status.status === undefined) {
|
|
490
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `No import job found for job ID ${jobId}`, {
|
|
491
|
+
itemIndex,
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
const results = [
|
|
495
|
+
{ json: (0, bulkImport_1.summarizeJobStatus)(jobId, status), pairedItem: { item: itemIndex } },
|
|
496
|
+
];
|
|
497
|
+
if (options.includeRowResults === true && status.report_created && status.report_url) {
|
|
498
|
+
results.push(...(await fetchBulkImportReportRows.call(this, jobId, status.report_url, false, itemIndex, 0)));
|
|
499
|
+
}
|
|
500
|
+
return results;
|
|
501
|
+
}
|
|
502
|
+
/** Product cap for bulk Item: Archive or Delete — item IDs per execution. */
|
|
503
|
+
exports.MAX_BULK_ARCHIVE_DELETE_ITEMS = 50;
|
|
504
|
+
/**
|
|
505
|
+
* Builds the single aliased request that archives or deletes every item in
|
|
506
|
+
* the list: one archive_item/delete_item per ID, all in one mutation. The
|
|
507
|
+
* batch is NOT atomic — a failing alias returns null (with a per-alias error
|
|
508
|
+
* carrying its path) while the other aliases still execute (verified live).
|
|
509
|
+
* Exported for unit tests.
|
|
510
|
+
*/
|
|
511
|
+
function buildBulkArchiveOrDeleteMutation(action, itemIds) {
|
|
512
|
+
const mutationField = action === 'archive' ? 'archive_item' : 'delete_item';
|
|
513
|
+
const variables = {};
|
|
514
|
+
const varDefs = [];
|
|
515
|
+
const aliases = [];
|
|
516
|
+
itemIds.forEach((itemId, index) => {
|
|
517
|
+
varDefs.push(`$item${index}: ID!`);
|
|
518
|
+
variables[`item${index}`] = itemId;
|
|
519
|
+
aliases.push(`item${index}: ${mutationField}(item_id: $item${index}) { id name state }`);
|
|
520
|
+
});
|
|
521
|
+
return {
|
|
522
|
+
query: `mutation (${varDefs.join(', ')}) {\n\t${aliases.join('\n\t')}\n}`,
|
|
523
|
+
variables,
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Item: Archive or Delete in Multiple Items mode — up to 50 item IDs in ONE
|
|
528
|
+
* aliased API request. Per-ID failures are mapped back to their item via the
|
|
529
|
+
* error path; with continueOnFail they become error rows, otherwise the run
|
|
530
|
+
* fails with a summary that names the failed IDs (the rest were still
|
|
531
|
+
* processed — the batch is not atomic).
|
|
532
|
+
*/
|
|
533
|
+
async function archiveOrDeleteManyItems(client, itemIndex, action) {
|
|
534
|
+
const itemIds = [...new Set((0, filterOptions_1.normalizeIdList)(this.getNodeParameter('bulkItemIds', itemIndex)))];
|
|
535
|
+
if (itemIds.length === 0) {
|
|
536
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Provide at least one item ID to ${action}`, {
|
|
537
|
+
itemIndex,
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
if (itemIds.length > exports.MAX_BULK_ARCHIVE_DELETE_ITEMS) {
|
|
541
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Too many items: ${itemIds.length} provided, but Archive or Delete handles at most ${exports.MAX_BULK_ARCHIVE_DELETE_ITEMS} unique item IDs per execution. Split the list across multiple runs.`, { itemIndex });
|
|
542
|
+
}
|
|
543
|
+
const { query, variables } = buildBulkArchiveOrDeleteMutation(action, itemIds);
|
|
544
|
+
const { data, errors } = await client.executeBulk(query, itemIndex, variables);
|
|
545
|
+
const failures = [];
|
|
546
|
+
const rows = itemIds.map((itemId, index) => {
|
|
547
|
+
const payload = data[`item${index}`];
|
|
548
|
+
if (payload) {
|
|
549
|
+
return withArchiveOrDeleteOutcome(payload, action, 'item');
|
|
550
|
+
}
|
|
551
|
+
const failure = errors.find((error) => error.path?.[0] === `item${index}`);
|
|
552
|
+
const message = failure?.message ?? 'Unknown error';
|
|
553
|
+
failures.push({ itemId, message });
|
|
554
|
+
return {
|
|
555
|
+
itemId,
|
|
556
|
+
action,
|
|
557
|
+
error: message,
|
|
558
|
+
errorCode: failure?.extensions?.code ?? failure?.error_code ?? null,
|
|
559
|
+
};
|
|
560
|
+
});
|
|
561
|
+
if (failures.length > 0 && !this.continueOnFail()) {
|
|
562
|
+
const detail = failures.map((failure) => `${failure.itemId} (${failure.message})`).join(', ');
|
|
563
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `${failures.length} of ${itemIds.length} items failed to ${action}: ${detail}. The other items in the batch were still processed.`, { itemIndex });
|
|
564
|
+
}
|
|
565
|
+
return rows;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Column types move_item_to_board's columns_mapping cannot include — the
|
|
569
|
+
* API rejects the whole mapping with an opaque "Columns mapping is not in
|
|
570
|
+
* the expected format" error (name and subtasks verified live 2026-07-19;
|
|
571
|
+
* formula per the API docs). These columns are handled by the move itself.
|
|
572
|
+
*/
|
|
573
|
+
exports.MOVE_UNMAPPABLE_COLUMN_TYPES = new Set(['formula', 'name', 'subtasks']);
|
|
574
|
+
/**
|
|
575
|
+
* Builds the complete columns_mapping that move_item_to_board requires. The
|
|
576
|
+
* API rejects partial mappings outright, so the configured pairs are
|
|
577
|
+
* validated against both boards' columns and every remaining mappable
|
|
578
|
+
* source column is filled in with target: null — which is what monday's own
|
|
579
|
+
* move dialog submits for unmapped columns (their values are dropped).
|
|
580
|
+
* Exported for unit tests.
|
|
581
|
+
*/
|
|
582
|
+
function completeMoveColumnsMapping(picked, sourceColumns, targetColumns) {
|
|
583
|
+
const sourceById = new Map(sourceColumns.map((column) => [column.id, column]));
|
|
584
|
+
const targetIds = new Set(targetColumns.map((column) => column.id));
|
|
585
|
+
const mapping = [];
|
|
586
|
+
const mappedSourceIds = new Set();
|
|
587
|
+
for (const pair of picked) {
|
|
588
|
+
const sourceColumn = sourceById.get(pair.source);
|
|
589
|
+
if (!sourceColumn) {
|
|
590
|
+
throw new n8n_workflow_1.UserError(`Column "${pair.source}" does not exist on the item's board`);
|
|
591
|
+
}
|
|
592
|
+
if (exports.MOVE_UNMAPPABLE_COLUMN_TYPES.has(sourceColumn.type)) {
|
|
593
|
+
throw new n8n_workflow_1.UserError(`The "${pair.source}" column (type ${sourceColumn.type}) cannot be mapped — the move handles it automatically`);
|
|
594
|
+
}
|
|
595
|
+
if (mappedSourceIds.has(pair.source)) {
|
|
596
|
+
throw new n8n_workflow_1.UserError(`Column "${pair.source}" is mapped more than once`);
|
|
597
|
+
}
|
|
598
|
+
const target = pair.target ?? null;
|
|
599
|
+
if (target !== null && target !== '' && !targetIds.has(target)) {
|
|
600
|
+
throw new n8n_workflow_1.UserError(`Column "${target}" does not exist on the target board`);
|
|
601
|
+
}
|
|
602
|
+
mappedSourceIds.add(pair.source);
|
|
603
|
+
mapping.push({ source: pair.source, target: target === '' ? null : target });
|
|
604
|
+
}
|
|
605
|
+
for (const column of sourceColumns) {
|
|
606
|
+
if (!mappedSourceIds.has(column.id) && !exports.MOVE_UNMAPPABLE_COLUMN_TYPES.has(column.type)) {
|
|
607
|
+
mapping.push({ source: column.id, target: null });
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
return mapping;
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* Item: Move — move_item_to_group within the board, or move_item_to_board
|
|
614
|
+
* with an optional columns_mapping for cross-board moves. The mapping comes
|
|
615
|
+
* from the guided mapper rows when any are configured, otherwise from the
|
|
616
|
+
* raw-JSON escape hatch in Options; either way it is completed to the
|
|
617
|
+
* full-board mapping the API demands. Exported for unit tests.
|
|
618
|
+
*/
|
|
619
|
+
async function moveItem(client, itemIndex) {
|
|
620
|
+
const itemId = this.getNodeParameter('itemId', itemIndex, undefined, {
|
|
621
|
+
extractValue: true,
|
|
622
|
+
});
|
|
623
|
+
const destination = this.getNodeParameter('moveDestination', itemIndex);
|
|
624
|
+
if (destination === 'group') {
|
|
625
|
+
const targetGroupId = this.getNodeParameter('targetGroupId', itemIndex);
|
|
626
|
+
const data = await client.execute(`mutation ($itemId: ID!, $groupId: String!) {
|
|
627
|
+
move_item_to_group(item_id: $itemId, group_id: $groupId) {
|
|
628
|
+
id
|
|
629
|
+
name
|
|
630
|
+
url
|
|
631
|
+
board { id name }
|
|
632
|
+
group { id title }
|
|
633
|
+
}
|
|
634
|
+
}`, itemIndex, { itemId, groupId: targetGroupId });
|
|
635
|
+
return (data.move_item_to_group ?? {});
|
|
636
|
+
}
|
|
637
|
+
const targetBoardId = this.getNodeParameter('targetBoardId', itemIndex, undefined, {
|
|
638
|
+
extractValue: true,
|
|
639
|
+
});
|
|
640
|
+
const targetGroupId = this.getNodeParameter('targetBoardGroupId', itemIndex);
|
|
641
|
+
const moveOptions = this.getNodeParameter('moveOptions', itemIndex, {});
|
|
642
|
+
const mappingUi = this.getNodeParameter('columnsMappingUi', itemIndex, {});
|
|
643
|
+
let pickedMapping;
|
|
644
|
+
const uiRows = mappingUi.mappings ?? [];
|
|
645
|
+
if (uiRows.length > 0) {
|
|
646
|
+
pickedMapping = uiRows.map((row, rowIndex) => {
|
|
647
|
+
const source = typeof row.source === 'string' ? row.source.trim() : '';
|
|
648
|
+
const target = typeof row.target === 'string' ? row.target.trim() : '';
|
|
649
|
+
if (!source || !target) {
|
|
650
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Columns Mapping row ${rowIndex + 1} needs both a source and a target column`, { itemIndex });
|
|
651
|
+
}
|
|
652
|
+
return { source, target };
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
else {
|
|
656
|
+
const rawMapping = moveOptions.columnsMapping;
|
|
657
|
+
if (rawMapping !== undefined && rawMapping !== null && rawMapping !== '') {
|
|
658
|
+
const parsed = typeof rawMapping === 'string' ? safeJsonParse(rawMapping) : rawMapping;
|
|
659
|
+
if (!Array.isArray(parsed)) {
|
|
660
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Columns Mapping must be a JSON array of {"source", "target"} pairs', { itemIndex });
|
|
661
|
+
}
|
|
662
|
+
if (parsed.length > 0) {
|
|
663
|
+
pickedMapping = parsed;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
// The API rejects partial mappings ("Columns mapping is not in the
|
|
668
|
+
// expected format"), so complete the configured pairs against both
|
|
669
|
+
// boards' real columns before sending.
|
|
670
|
+
let columnsMapping;
|
|
671
|
+
if (pickedMapping) {
|
|
672
|
+
const sourceBoardId = this.getNodeParameter('boardId', itemIndex, undefined, {
|
|
673
|
+
extractValue: true,
|
|
674
|
+
});
|
|
675
|
+
const boardData = await client.execute('query ($ids: [ID!]) { boards(ids: $ids) { id columns { id type } } }', itemIndex, { ids: [sourceBoardId, targetBoardId] });
|
|
676
|
+
const boards = (boardData.boards ?? []);
|
|
677
|
+
const sourceColumns = boards.find((board) => board.id === String(sourceBoardId))?.columns ?? [];
|
|
678
|
+
const targetColumns = boards.find((board) => board.id === String(targetBoardId))?.columns ?? [];
|
|
679
|
+
try {
|
|
680
|
+
columnsMapping = completeMoveColumnsMapping(pickedMapping, sourceColumns, targetColumns);
|
|
681
|
+
}
|
|
682
|
+
catch (error) {
|
|
683
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error.message, { itemIndex });
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
const data = await client.execute(`mutation ($boardId: ID!, $groupId: ID!, $itemId: ID!, $columnsMapping: [ColumnMappingInput!]) {
|
|
687
|
+
move_item_to_board(
|
|
688
|
+
board_id: $boardId,
|
|
689
|
+
group_id: $groupId,
|
|
690
|
+
item_id: $itemId,
|
|
691
|
+
columns_mapping: $columnsMapping
|
|
692
|
+
) {
|
|
693
|
+
id
|
|
694
|
+
name
|
|
695
|
+
url
|
|
696
|
+
board { id name }
|
|
697
|
+
group { id title }
|
|
698
|
+
}
|
|
699
|
+
}`, itemIndex, {
|
|
700
|
+
boardId: targetBoardId,
|
|
701
|
+
groupId: targetGroupId,
|
|
702
|
+
itemId,
|
|
703
|
+
columnsMapping: columnsMapping ?? null,
|
|
704
|
+
});
|
|
705
|
+
return (data.move_item_to_board ?? {});
|
|
706
|
+
}
|
|
707
|
+
function safeJsonParse(text) {
|
|
708
|
+
try {
|
|
709
|
+
return JSON.parse(text);
|
|
710
|
+
}
|
|
711
|
+
catch {
|
|
712
|
+
return undefined;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Flattens column values into { [column title]: text }. Status rollups
|
|
717
|
+
* (BatteryValue, multi-level boards) have no text — their label counts are
|
|
718
|
+
* rendered as "Done: 2, Stuck: 1" via the column's status labels.
|
|
719
|
+
* Linked-item columns (dependency / board_relation / mirror) also have no
|
|
720
|
+
* text — they fall back to display_value, the comma-separated linked item
|
|
721
|
+
* names ("" = no links, flattened to null). Exported for unit tests.
|
|
722
|
+
*/
|
|
723
|
+
function flattenItemColumns(columnValues) {
|
|
724
|
+
const columns = {};
|
|
725
|
+
for (const columnValue of columnValues) {
|
|
726
|
+
const title = columnValue.column?.title ?? columnValue.id;
|
|
727
|
+
if (columnValue.battery_value) {
|
|
728
|
+
columns[title] = (0, multiLevel_1.formatBatteryText)(columnValue.battery_value, columnValue.column?.settings_str);
|
|
729
|
+
continue;
|
|
730
|
+
}
|
|
731
|
+
columns[title] = columnValue.text ?? (columnValue.display_value || null);
|
|
732
|
+
}
|
|
733
|
+
return columns;
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* Builds the Item: Get query. Column values are scoped to the Select
|
|
737
|
+
* Columns option when set (empty = all columns — the ids argument is only
|
|
738
|
+
* sent when columns were picked, which cuts complexity cost and payload on
|
|
739
|
+
* big boards). Include All Item Info adds the metadata fields the base
|
|
740
|
+
* selection deliberately excludes. Exported for unit tests.
|
|
741
|
+
*/
|
|
742
|
+
function buildGetItemQuery(itemId, options) {
|
|
743
|
+
const columnIds = (0, filterOptions_1.normalizeIdList)(options.columnIds);
|
|
744
|
+
const scoped = columnIds.length > 0;
|
|
745
|
+
const extraFields = [
|
|
746
|
+
options.includeAllItemInfo === true
|
|
747
|
+
? 'creator { id name email } email relative_link subscribers { id name }'
|
|
748
|
+
: '',
|
|
749
|
+
options.includeSubitems === true
|
|
750
|
+
? 'subitems { id name state url parent_item { id name } }'
|
|
751
|
+
: '',
|
|
752
|
+
options.includeUpdates === true ? 'updates { id body created_at creator { id name } }' : '',
|
|
753
|
+
].join('\n');
|
|
754
|
+
const columnArgs = scoped
|
|
755
|
+
? `ids: $columnIds, ${multiLevel_1.COLUMN_VALUES_CALCULATED_ARG}`
|
|
756
|
+
: multiLevel_1.COLUMN_VALUES_CALCULATED_ARG;
|
|
757
|
+
return {
|
|
758
|
+
query: `query ($ids: [ID!]${scoped ? ', $columnIds: [String!]' : ''}) {
|
|
759
|
+
items(ids: $ids) {
|
|
760
|
+
id
|
|
761
|
+
name
|
|
762
|
+
state
|
|
763
|
+
url
|
|
764
|
+
created_at
|
|
765
|
+
updated_at
|
|
766
|
+
board { id name }
|
|
767
|
+
group { id title }
|
|
768
|
+
parent_item { id name }
|
|
769
|
+
column_values(${columnArgs}) {
|
|
770
|
+
id type text value column { title settings_str }
|
|
771
|
+
${multiLevel_1.BATTERY_VALUE_FRAGMENT}
|
|
772
|
+
${multiLevel_1.LINKED_VALUE_FRAGMENTS}
|
|
773
|
+
}
|
|
774
|
+
${extraFields}
|
|
775
|
+
}
|
|
776
|
+
}`,
|
|
777
|
+
variables: scoped ? { ids: [itemId], columnIds } : { ids: [itemId] },
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Item: Get — items(ids:) with optional subitems/updates/full metadata, and
|
|
782
|
+
* a Simplify Column Values Response mode that flattens column values into
|
|
783
|
+
* { [column title]: text }. Works at any depth of a multi-level board
|
|
784
|
+
* (subitems are items on the same board); rollup column values are included
|
|
785
|
+
* via the CALCULATED capability.
|
|
786
|
+
*/
|
|
787
|
+
async function getItem(client, itemIndex) {
|
|
788
|
+
const itemId = this.getNodeParameter('itemId', itemIndex, undefined, {
|
|
789
|
+
extractValue: true,
|
|
790
|
+
});
|
|
791
|
+
const simplify = this.getNodeParameter('simplify', itemIndex, true);
|
|
792
|
+
const options = this.getNodeParameter('getItemOptions', itemIndex, {});
|
|
793
|
+
const { query, variables } = buildGetItemQuery(itemId, options);
|
|
794
|
+
const data = await client.execute(query, itemIndex, variables);
|
|
795
|
+
const item = (data.items ?? [])[0];
|
|
796
|
+
if (!item) {
|
|
797
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Item ${itemId} not found`, { itemIndex });
|
|
798
|
+
}
|
|
799
|
+
if (!simplify)
|
|
800
|
+
return item;
|
|
801
|
+
const columns = flattenItemColumns((item.column_values ?? []));
|
|
802
|
+
const rest = { ...item };
|
|
803
|
+
delete rest.column_values;
|
|
804
|
+
return { ...rest, columns };
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* Search: one request against the entity's field on the cross-entity
|
|
808
|
+
* `search` root query. Which entity type is searched follows from the
|
|
809
|
+
* operation (SEARCH_OPERATION_ENTITY). Scale-safe by design: server-side
|
|
810
|
+
* relevance search, hard-capped at 20 results, no pagination (see
|
|
811
|
+
* accountSearch.ts for the verified API contract).
|
|
812
|
+
*/
|
|
813
|
+
async function searchAcrossAccount(client, itemIndex, operation) {
|
|
814
|
+
const entity = accountSearch_1.SEARCH_OPERATION_ENTITY[operation];
|
|
815
|
+
const searchText = this.getNodeParameter('searchQuery', itemIndex).trim();
|
|
816
|
+
const includeLiveData = this.getNodeParameter('includeLiveData', itemIndex, false) === true;
|
|
817
|
+
const options = this.getNodeParameter('searchOptions', itemIndex, {});
|
|
818
|
+
if (!searchText) {
|
|
819
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Query is required', {
|
|
820
|
+
itemIndex,
|
|
821
|
+
description: 'Provide the text to search for.',
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
const filters = {
|
|
825
|
+
boardIds: (0, filterOptions_1.normalizeIdList)(options.boardIds),
|
|
826
|
+
workspaceIds: (0, filterOptions_1.normalizeIdList)(options.workspaceIds),
|
|
827
|
+
creatorIds: (0, userLocator_1.extractUserRowIds)(options.creatorIds),
|
|
828
|
+
createdAfter: (0, filterOptions_1.toIso8601)(options.createdAfter),
|
|
829
|
+
createdBefore: (0, filterOptions_1.toIso8601)(options.createdBefore),
|
|
830
|
+
updatedAfter: (0, filterOptions_1.toIso8601)(options.updatedAfter),
|
|
831
|
+
updatedBefore: (0, filterOptions_1.toIso8601)(options.updatedBefore),
|
|
832
|
+
};
|
|
833
|
+
const plan = (0, accountSearch_1.buildAccountSearchPlan)(searchText, [entity], includeLiveData, options.searchLimit ?? 10, options.strategy, filters);
|
|
834
|
+
const data = await client.execute(plan.query, itemIndex, plan.variables);
|
|
835
|
+
return (0, accountSearch_1.flattenSearchResults)(data.search, [entity], includeLiveData);
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* Shapes the Get Column Value output: parsed text plus the raw API value.
|
|
839
|
+
* `value` arrives as a JSON-encoded string — decode it so workflows can
|
|
840
|
+
* address fields directly (e.g. {{$json.value.index}}); `valueRaw` keeps
|
|
841
|
+
* the original string for round-tripping into raw-JSON updates. Status
|
|
842
|
+
* rollups (BatteryValue, multi-level boards) have no text/value — they get
|
|
843
|
+
* label-count text plus batteryValue/isLeaf fields instead. Linked-item
|
|
844
|
+
* columns (dependency / board_relation / mirror) also have no text/value —
|
|
845
|
+
* text falls back to display_value (the linked items' names), and the raw
|
|
846
|
+
* link data lands in displayValue/linkedItemIds/linkedItems (+
|
|
847
|
+
* dependencyLinks for dependency columns).
|
|
848
|
+
*/
|
|
849
|
+
function formatColumnValueOutput(item, columnValue, columnId) {
|
|
850
|
+
let value = null;
|
|
851
|
+
if (columnValue?.value != null) {
|
|
852
|
+
value = safeJsonParse(columnValue.value);
|
|
853
|
+
if (value === undefined)
|
|
854
|
+
value = columnValue.value;
|
|
855
|
+
}
|
|
856
|
+
const output = {
|
|
857
|
+
itemId: item.id ?? null,
|
|
858
|
+
itemName: item.name ?? null,
|
|
859
|
+
columnId,
|
|
860
|
+
columnTitle: columnValue?.column?.title ?? null,
|
|
861
|
+
columnType: columnValue?.type ?? null,
|
|
862
|
+
text: columnValue?.text ?? null,
|
|
863
|
+
value: value,
|
|
864
|
+
valueRaw: columnValue?.value ?? null,
|
|
865
|
+
};
|
|
866
|
+
if (columnValue?.battery_value) {
|
|
867
|
+
output.text = (0, multiLevel_1.formatBatteryText)(columnValue.battery_value, columnValue.column?.settings_str);
|
|
868
|
+
output.batteryValue = columnValue.battery_value;
|
|
869
|
+
// is_leaf: false = calculated from children; true = static leaf value.
|
|
870
|
+
output.isLeaf = columnValue.is_leaf ?? null;
|
|
871
|
+
}
|
|
872
|
+
if (columnValue?.display_value !== undefined) {
|
|
873
|
+
output.text = columnValue.text ?? (columnValue.display_value || null);
|
|
874
|
+
output.displayValue = columnValue.display_value ?? '';
|
|
875
|
+
if (columnValue.linked_item_ids) {
|
|
876
|
+
output.linkedItemIds = columnValue.linked_item_ids;
|
|
877
|
+
}
|
|
878
|
+
if (columnValue.linked_items) {
|
|
879
|
+
output.linkedItems = columnValue.linked_items;
|
|
880
|
+
}
|
|
881
|
+
if (columnValue.dependency_links) {
|
|
882
|
+
output.dependencyLinks = columnValue.dependency_links;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
return output;
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Item: Get Column Value — items(ids:) { column_values(ids:) }, one column.
|
|
889
|
+
* A column with no value set still yields a record (text/value null), so
|
|
890
|
+
* downstream nodes can branch on emptiness without erroring.
|
|
891
|
+
*/
|
|
892
|
+
async function getColumnValue(client, itemIndex) {
|
|
893
|
+
const itemId = this.getNodeParameter('itemId', itemIndex, undefined, {
|
|
894
|
+
extractValue: true,
|
|
895
|
+
});
|
|
896
|
+
const columnId = this.getNodeParameter('columnId', itemIndex);
|
|
897
|
+
const data = await client.execute(`query ($ids: [ID!], $columnIds: [String!]) {
|
|
898
|
+
items(ids: $ids) {
|
|
899
|
+
id
|
|
900
|
+
name
|
|
901
|
+
column_values(ids: $columnIds, ${multiLevel_1.COLUMN_VALUES_CALCULATED_ARG}) {
|
|
902
|
+
id type text value column { title settings_str }
|
|
903
|
+
${multiLevel_1.BATTERY_VALUE_FRAGMENT}
|
|
904
|
+
${multiLevel_1.LINKED_VALUE_DETAIL_FRAGMENTS}
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}`, itemIndex, { ids: [itemId], columnIds: [columnId] });
|
|
908
|
+
const item = (data.items ?? [])[0];
|
|
909
|
+
if (!item) {
|
|
910
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Item ${itemId} not found`, { itemIndex });
|
|
911
|
+
}
|
|
912
|
+
const columnValue = (item.column_values ?? []).find((row) => row.id === columnId);
|
|
913
|
+
if (!columnValue) {
|
|
914
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Column ${columnId} not found on the item's board`, { itemIndex });
|
|
915
|
+
}
|
|
916
|
+
return formatColumnValueOutput(item, columnValue, columnId);
|
|
917
|
+
}
|
|
918
|
+
/**
|
|
919
|
+
* Item: Get Many — cursor pagination via items_page / next_items_page.
|
|
920
|
+
* Group and column-value filtering plus sorting all go through query_params,
|
|
921
|
+
* which keeps a single cursor across the whole query. Emits one item per
|
|
922
|
+
* record, plus an optional trailing { nextCursor } item for resuming.
|
|
923
|
+
*
|
|
924
|
+
* Include Subitems (multi-level boards) adds hierarchy_scope_config:
|
|
925
|
+
* "allItems" — subject to two verified API bugs handled here: order_by is
|
|
926
|
+
* silently ignored under that scope (blocked with an error), and an
|
|
927
|
+
* unfiltered all-items query returns an empty page (worked around with a
|
|
928
|
+
* tautological all-groups rule).
|
|
929
|
+
*/
|
|
930
|
+
async function getManyItems(client, itemIndex) {
|
|
931
|
+
const boardId = this.getNodeParameter('boardId', itemIndex, undefined, {
|
|
932
|
+
extractValue: true,
|
|
933
|
+
});
|
|
934
|
+
const options = this.getNodeParameter('options', itemIndex, {});
|
|
935
|
+
// No "Return All" — a bounded limit only, under Options with a default
|
|
936
|
+
// (node-wide convention). The helper still walks the cursor internally
|
|
937
|
+
// (100/request) until the limit is reached.
|
|
938
|
+
const limit = options.limit ?? constants_1.DEFAULT_LIMIT;
|
|
939
|
+
const groupIds = (0, filterOptions_1.normalizeIdList)(options.groupIds);
|
|
940
|
+
const columnIds = (0, filterOptions_1.normalizeIdList)(options.columnIds);
|
|
941
|
+
const startingCursor = (options.startingCursor ?? '');
|
|
942
|
+
const includeCursor = options.includeCursor === true;
|
|
943
|
+
const includeSubitems = options.includeSubitems === true;
|
|
944
|
+
if (includeSubitems && options.sortBy && !startingCursor) {
|
|
945
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Sort By Column cannot be combined with Include Subitems — the API silently ignores sorting when subitems are included. Remove one of the two options.', { itemIndex });
|
|
946
|
+
}
|
|
947
|
+
const filterRows = this.getNodeParameter('itemFilters', itemIndex, {}).rules ??
|
|
948
|
+
[];
|
|
949
|
+
const rules = [];
|
|
950
|
+
if (groupIds.length > 0) {
|
|
951
|
+
rules.push({ column_id: 'group', compare_value: groupIds, operator: 'any_of' });
|
|
952
|
+
}
|
|
953
|
+
if (filterRows.length > 0) {
|
|
954
|
+
// Column settings are needed to resolve status/dropdown label text
|
|
955
|
+
// into the label indexes the API filters by.
|
|
956
|
+
const columns = await (0, columnMapper_1.fetchColumns)(this, boardId, itemIndex);
|
|
957
|
+
// Rollup status columns (BatteryValue) return silently wrong filter
|
|
958
|
+
// results — the picker hides them, this guards expression-set IDs.
|
|
959
|
+
const rollupStatusColumns = (0, itemFilters_1.findRollupStatusRuleColumns)(filterRows, columns);
|
|
960
|
+
if (rollupStatusColumns.length > 0) {
|
|
961
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Cannot filter on ${rollupStatusColumns.join(', ')}: status columns that roll up child values (multi-level boards) return unreliable filter results in the monday API. Filter on a different column, or filter the output in n8n instead.`, { itemIndex });
|
|
962
|
+
}
|
|
963
|
+
// Stale dropdown selections (n8n keeps the operator when the column
|
|
964
|
+
// changes) and expression-mode column IDs can pair a column with an
|
|
965
|
+
// operator its type rejects — fail with the supported list up front.
|
|
966
|
+
const unsupportedOperatorRules = (0, itemFilters_1.findUnsupportedOperatorRules)(filterRows, columns);
|
|
967
|
+
if (unsupportedOperatorRules.length > 0) {
|
|
968
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), (0, itemFilters_1.formatUnsupportedOperatorMessage)(unsupportedOperatorRules), { itemIndex });
|
|
969
|
+
}
|
|
970
|
+
rules.push(...(0, itemFilters_1.buildFilterRules)(filterRows, columns));
|
|
971
|
+
}
|
|
972
|
+
if (includeSubitems && rules.length === 0 && !startingCursor) {
|
|
973
|
+
// Verified API bug: the all-items scope returns an empty page when no
|
|
974
|
+
// rules are set at all. A rule matching every group is a no-op filter.
|
|
975
|
+
rules.push((0, multiLevel_1.buildAllGroupsRule)(await (0, multiLevel_1.fetchBoardGroupIds)(client, itemIndex, boardId)));
|
|
976
|
+
}
|
|
977
|
+
const orderBy = options.sortBy
|
|
978
|
+
? [{ column_id: options.sortBy, direction: options.sortDirection ?? 'asc' }]
|
|
979
|
+
: undefined;
|
|
980
|
+
let queryParams = null;
|
|
981
|
+
if (rules.length > 0 || orderBy) {
|
|
982
|
+
queryParams = {};
|
|
983
|
+
if (rules.length > 0) {
|
|
984
|
+
queryParams.rules = rules;
|
|
985
|
+
queryParams.operator = options.filtersMatch ?? 'and';
|
|
986
|
+
}
|
|
987
|
+
if (orderBy) {
|
|
988
|
+
queryParams.order_by = orderBy;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
// Column IDs come from the picker or an expression; serialize them as a
|
|
992
|
+
// JSON string array, which is valid GraphQL list syntax for [String!].
|
|
993
|
+
// Empty selection = all columns. The item name is a top-level field, so
|
|
994
|
+
// it is always present regardless of this selection. CALCULATED is
|
|
995
|
+
// always requested — without it, rollup columns (multi-level boards)
|
|
996
|
+
// are silently missing from column_values.
|
|
997
|
+
const columnArgs = columnIds.length > 0
|
|
998
|
+
? `(ids: ${JSON.stringify(columnIds)}, ${multiLevel_1.COLUMN_VALUES_CALCULATED_ARG})`
|
|
999
|
+
: `(${multiLevel_1.COLUMN_VALUES_CALCULATED_ARG})`;
|
|
1000
|
+
const itemFields = `
|
|
1001
|
+
id
|
|
1002
|
+
name
|
|
1003
|
+
state
|
|
1004
|
+
url
|
|
1005
|
+
created_at
|
|
1006
|
+
updated_at
|
|
1007
|
+
group { id title }
|
|
1008
|
+
${includeSubitems ? 'parent_item { id name }' : ''}
|
|
1009
|
+
column_values${columnArgs} { id type text value ${multiLevel_1.BATTERY_VALUE_FRAGMENT} ${multiLevel_1.LINKED_VALUE_FRAGMENTS} }
|
|
1010
|
+
`;
|
|
1011
|
+
// The hierarchy scope only exists on the first query; follow-up
|
|
1012
|
+
// next_items_page calls inherit it through the cursor.
|
|
1013
|
+
const scopeArg = includeSubitems ? ', hierarchy_scope_config: "allItems"' : '';
|
|
1014
|
+
const { rows, nextCursor } = await (0, pagination_1.fetchAllByCursor)({
|
|
1015
|
+
client,
|
|
1016
|
+
itemIndex,
|
|
1017
|
+
firstQuery: `query ($boardId: [ID!], $limit: Int!, $queryParams: ItemsQuery) {
|
|
1018
|
+
boards(ids: $boardId) {
|
|
1019
|
+
items_page(limit: $limit, query_params: $queryParams${scopeArg}) {
|
|
1020
|
+
cursor
|
|
1021
|
+
items { ${itemFields} }
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}`,
|
|
1025
|
+
firstVariables: {
|
|
1026
|
+
boardId: [boardId],
|
|
1027
|
+
queryParams,
|
|
1028
|
+
},
|
|
1029
|
+
extractFirstPage: (data) => {
|
|
1030
|
+
const board = data.boards?.[0];
|
|
1031
|
+
if (!board)
|
|
1032
|
+
throw (0, boardLocator_1.boardNotFoundError)(this.getNode(), boardId, itemIndex);
|
|
1033
|
+
const page = board.items_page;
|
|
1034
|
+
return page ? { cursor: page.cursor, items: page.items } : undefined;
|
|
1035
|
+
},
|
|
1036
|
+
itemFields,
|
|
1037
|
+
limit,
|
|
1038
|
+
startCursor: startingCursor || undefined,
|
|
1039
|
+
});
|
|
1040
|
+
return includeCursor ? [...rows, { nextCursor }] : rows;
|
|
1041
|
+
}
|
|
1042
|
+
//# sourceMappingURL=item.execute.js.map
|