Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

### [Unreleased]
* Added support for `include_hidden_folders` query parameter in folders list endpoint for Microsoft accounts to control whether hidden folders are included in the response

### 6.5.0 / 2025-06-13
* Replaced `rest-client` dependency with `httparty` for improved maintainability and security
- `rest-client` is no longer actively maintained and has known security vulnerabilities
Expand Down
1 change: 1 addition & 0 deletions lib/nylas/resources/folders.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Folders < Resource
#
# @param identifier [String] Grant ID or email account to query.
# @param query_params [Hash, nil] Query params to pass to the request.
# - include_hidden_folders [Boolean] (Microsoft only) When true, includes hidden folders.
# @return [Array(Array(Hash), String, String)] The list of folders, API Request ID, and next cursor.
def list(identifier:, query_params: nil)
get_list(
Expand Down
13 changes: 13 additions & 0 deletions spec/nylas/resources/folders_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@

expect(folders_response).to eq(list_response)
end

it "calls the get method with the correct query parameters including include_hidden_folders" do
identifier = "abc-123-grant-id"
query_params = { include_hidden_folders: true }
path = "#{api_uri}/v3/grants/#{identifier}/folders"
allow(folders).to receive(:get_list)
.with(path: path, query_params: query_params)
.and_return(list_response)

folders_response = folders.list(identifier: identifier, query_params: query_params)

expect(folders_response).to eq(list_response)
end
end

describe "#find" do
Expand Down
Loading