OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Adds Root folder query capabilites
Marcello Rochac3aa33dff1d9
diff --git a/modules/storages/app/common/storages/adapters/providers/one_drive/queries/files_query.rb b/modules/storages/app/common/storages/adapters/providers/one_drive/queries/files_query.rbindex 2489c7095bf..05d9371f238 100644--- a/modules/storages/app/common/storages/adapters/providers/one_drive/queries/files_query.rb+++ b/modules/storages/app/common/storages/adapters/providers/one_drive/queries/files_query.rb@@ -77,11 +77,11 @@ module Storagesenddef storage_files(json_files)- files = json_files.map { |json| @transformer.transform(json).value_or(nil) }+ files = json_files.filter_map { |json| @transformer.transform(json).value_or(nil) }parent_reference = json_files.first[:parentReference]Results::StorageFileCollection- .build(files: files.compact, parent: parent(parent_reference), ancestors: forge_ancestors(parent_reference))+ .build(files: files, parent: parent(parent_reference), ancestors: forge_ancestors(parent_reference))enddef empty_response(http, folder)diff --git a/modules/storages/app/common/storages/adapters/providers/share_point/base.rb b/modules/storages/app/common/storages/adapters/providers/share_point/base.rbindex 2ba1141f186..e21e9b4fb34 100644--- a/modules/storages/app/common/storages/adapters/providers/share_point/base.rb+++ b/modules/storages/app/common/storages/adapters/providers/share_point/base.rb@@ -53,6 +53,14 @@ module Storagesprivate+ def site_name+ host_uri.path&.split("/")&.last+ end++ def host_uri+ URI(@storage.host)+ end+def drive_and_location(location)drive_id, item_id = location.to_s.split(SharePointStorage::IDENTIFIER_SEPARATOR){ drive_id:, location: Peripherals::ParentFolder.new(item_id || "/") }diff --git a/modules/storages/app/common/storages/adapters/providers/share_point/queries/files_query.rb b/modules/storages/app/common/storages/adapters/providers/share_point/queries/files_query.rbindex ad43fa5f670..8e9aa1fe1e4 100644--- a/modules/storages/app/common/storages/adapters/providers/share_point/queries/files_query.rb+++ b/modules/storages/app/common/storages/adapters/providers/share_point/queries/files_query.rb@@ -34,28 +34,20 @@ module Storagesmodule SharePointmodule Queriesclass FilesQuery < Base- def call(auth_strategy:, **)+ def call(auth_strategy:, input_data:)Authentication[auth_strategy].call(storage: @storage) do |http|- Internal::ListsQuery.call(storage: @storage, http:).bind { build_collection(it) }+ files_request(input_data.folder, http)endendprivate- def build_collection(files)- Results::StorageFileCollection.build(- files:,- parent: root(Digest::SHA256.hexdigest("i_am_site_root")),- ancestors: []- )- end-- def root(id)- Results::StorageFile.new(- name: URI(@storage.host).path&.split("/")&.last,- location: "/", id:,- permissions: %i[readable writeable]- )+ def files_request(folder, http)+ if folder.root?+ Internal::ListsQuery.call(storage: @storage, http:)+ else+ Internal::ChildrenQuery.call(storage: @storage, http:, **drive_and_location(folder))+ endendendenddiff --git a/modules/storages/app/common/storages/adapters/providers/share_point/queries/internal/children_query.rb b/modules/storages/app/common/storages/adapters/providers/share_point/queries/internal/children_query.rbnew file mode 100644index 00000000000..18a1d0a166f--- /dev/null+++ b/modules/storages/app/common/storages/adapters/providers/share_point/queries/internal/children_query.rb@@ -0,0 +1,105 @@+# frozen_string_literal: true++#-- copyright+#++++module Storages+ module Adapters+ module Providers+ module SharePoint+ module Queries+ module Internal+ class ChildrenQuery < Base+ FIELDS = "?$select=id,name,size,webUrl,lastModifiedBy,createdBy,fileSystemInfo,file,folder,parentReference"++ def self.call(storage:, http:, drive_id:, location:)+ new(storage).call(drive_id:, http:, location:)+ end++ def initialize(storage)+ super+ @transformer = StorageFileTransformer.new(site_name)+ end++ def call(http:, drive_id:, location:)+ handle_response(http.get(request_uri(drive_id, location) + FIELDS)).bind { parse_response(it) }+ end++ private++ def request_uri(drive_id, location)+ if location.root?+ UrlBuilder.url(base_uri, "/v1.0/drives/#{drive_id}/root/children")+ else+ UrlBuilder.url(base_uri, "/v1.0/drives/#{drive_id}/items/#{location.path}/children")+ end+ end++ def handle_response(response)+ error = Results::Error.new(source: self.class, payload: response)++ case response+ in { status: 200..299 }+ Success(response.json(symbolize_keys: true)[:value])+ in { status: 400 }+ Failure(error.with(code: :request_error))+ in { status: 404 }+ Failure(error.with(code: :not_found))+ in { status: 403 }+ Failure(error.with(code: :forbidden))+ in { status: 401 }+ Failure(error.with(code: :unauthorized))+ else+ Failure(error.with(code: :error))+ end+ end++ def parse_response(json)+ files = json.filter_map { @transformer.transform(it).value_or(nil) }+ entry = json.first++ Results::StorageFileCollection.build(+ files:,+ parent: @transformer.parent_transform(entry),+ ancestors: forge_ancestors(entry[:parentReference], entry[:webUrl])+ )+ end++ def forge_ancestors(parent_reference, web_url)+ # 1. This is a query on a drive, so we will always have the site root.+ # 2. Then this can be a drive root or a folder query+ # a. Drive Root we need to add it to the ancestors.+ drive_name = CGI.unescape(web_url.gsub(/.*#{site_name}\//, "").split("/").first)+ list = parent_reference[:path].gsub(/.*root:/, "").split("/")[0..-2] # Last item is the parent++ list.each_with_object([site_root]) do |component, ancestors|+ if component.blank?+ ancestors.unshift drive_root(parent_reference[:driveId], drive_name)+ end+ end+ end++ def drive_root(drive_id, name)+ Results::StorageFile.new(+ name:,+ location: UrlBuilder.path("/#{name}"),+ id: "#{drive_id}||",+ permissions: %i[readable writeable]+ )+ end++ def site_root+ Results::StorageFile.new(+ name: site_name,+ location: "/",+ id: Digest::SHA256.hexdigest("i_am_root"),+ permissions: %i[readable writeable]+ )+ end+ end+ end+ end+ end+ end+ end+enddiff --git a/modules/storages/app/common/storages/adapters/providers/share_point/queries/internal/lists_query.rb b/modules/storages/app/common/storages/adapters/providers/share_point/queries/internal/lists_query.rbindex 80445020f7f..315b0ec81a1 100644--- a/modules/storages/app/common/storages/adapters/providers/share_point/queries/internal/lists_query.rb+++ b/modules/storages/app/common/storages/adapters/providers/share_point/queries/internal/lists_query.rb@@ -42,13 +42,13 @@ module Storagesenddef call(http)- handle_response(http.get(request_uri + FIELDS)).fmap { parse_response(it) }+ handle_response(http.get(request_uri + FIELDS)).bind { parse_response(it) }endprivatedef handle_response(response)- error = Results::Error.new(source: self, payload: response)+ error = Results::Error.new(source: self.class, payload: response)case responsein { status: 200..299 }@@ -67,21 +67,42 @@ module Storagesenddef parse_response(json)- json[:value].filter_map do |entry|+ files = json[:value].filter_map do |entry|+ next unless entry.key?(:drive)+Results::StorageFile.build(name: entry[:name],- id: entry.dig(:drive, :id),+ id: "#{entry.dig(:drive, :id)}#{SharePointStorage::IDENTIFIER_SEPARATOR}",mime_type: "application/x-op-drive",- location: "/drives/#{entry.dig(:drive, :id)}",+ location: UrlBuilder.path("/", entry[:name]),permissions: %i[readable writeable]).value_or { nil }end++ build_collection(files)enddef request_uristorage_host = URI(@storage.host)URI.join(base_uri.origin, "/v1.0/sites/#{storage_host.host}:#{storage_host.path}:/lists").to_send++ def build_collection(files)+ Results::StorageFileCollection.build(+ files:,+ parent: root(Digest::SHA256.hexdigest("i_am_site_root")),+ ancestors: []+ )+ end++ def root(id)+ Results::StorageFile.new(+ id:,+ name: URI(@storage.host).path&.split("/")&.last,+ location: "/",+ permissions: %i[readable writeable]+ )+ endendendenddiff --git a/modules/storages/app/common/storages/adapters/providers/share_point/storage_file_transformer.rb b/modules/storages/app/common/storages/adapters/providers/share_point/storage_file_transformer.rbnew file mode 100644index 00000000000..4a011466215--- /dev/null+++ b/modules/storages/app/common/storages/adapters/providers/share_point/storage_file_transformer.rb@@ -0,0 +1,71 @@+# frozen_string_literal: true++#-- copyright+#++++module Storages+ module Adapters+ module Providers+ module SharePoint+ class StorageFileTransformer+ attr_reader :site_name++ def initialize(site_name)+ @site_name = site_name+ end++ def transform(json)+ Results::StorageFile.build(+ id: compose_id(json),+ name: json[:name],+ size: json[:size],+ mime_type: mime_type(json),+ location: extract_location(json),+ created_at: Time.zone.parse(json.dig(:fileSystemInfo, :createdDateTime)),+ last_modified_at: Time.zone.parse(json.dig(:fileSystemInfo, :lastModifiedDateTime)),+ created_by_name: json.dig(:createdBy, :user, :displayName),+ last_modified_by_name: json.dig(:lastModifiedBy, :user, :displayName),+ permissions: %i[readable writeable]+ )+ end++ def parent_transform(json)+ Results::StorageFile.new(+ name: json.dig(:parentReference, :name),+ id: compose_parent_id(json[:parentReference]),+ location: extract_parent_location(json),+ permissions: %i[readable writeable]+ )+ end++ private++ def mime_type(entry)+ return "application/x-op-directory" if entry.key? :folder++ entry.dig(:file, :mimeType)+ end++ def extract_location(json)+ json[:webUrl].gsub(/.*#{site_name}/, "")+ end++ def extract_parent_location(json)+ rindex = UrlBuilder.path(json[:name]).length * -1+ extract_location(json)[0...rindex]+ end++ def compose_id(json)+ "#{json.dig(:parentReference, :driveId)}#{SharePointStorage::IDENTIFIER_SEPARATOR}#{json[:id]}"+ end++ def compose_parent_id(parent)+ item_id = parent[:path].ends_with?("root:") ? nil : parent[:id]++ "#{parent[:driveId]}#{SharePointStorage::IDENTIFIER_SEPARATOR}#{item_id}"+ end+ end+ end+ end+ end+enddiff --git a/modules/storages/spec/common/storages/adapters/providers/share_point/queries/files_query_spec.rb b/modules/storages/spec/common/storages/adapters/providers/share_point/queries/files_query_spec.rbindex 21245de9bc5..26a8533f322 100644--- a/modules/storages/spec/common/storages/adapters/providers/share_point/queries/files_query_spec.rb+++ b/modules/storages/spec/common/storages/adapters/providers/share_point/queries/files_query_spec.rb@@ -38,72 +38,73 @@ module Storagesmodule QueriesRSpec.describe FilesQuery, :webmock dolet(:user) { create(:admin) }- let(:storage) { create(:share_point_storage, oauth_client_token_user: user) }+ let(:storage) { create(:share_point_dev_storage, oauth_client_token_user: user) }let(:auth_strategy) { Registry["share_point.authentication.userless"].call(false) }let(:input_data) { Input::Files.build(folder:).value! }it_behaves_like "adapter files_query: basic query setup"- context "when parent folder is root, return a list of drives", vcr: "share_point/files_query_root" do+ # rubocop:disable Layout/LineLength+ context "when parent folder is root", vcr: "share_point/files_query_root" dolet(:folder) { "/" }let(:files_result) doResults::StorageFileCollection.new(files: [Results::StorageFile.new(- id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8Qconfm2i6SKEoCmuGYqQK",+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8Qconfm2i6SKEoCmuGYqQK||",name: "OpenProject",mime_type: "application/x-op-drive",- location: "/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8Qconfm2i6SKEoCmuGYqQK",+ location: "/OpenProject",permissions: %i[readable writeable]),Results::StorageFile.new(- id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY87vnZ6fgfvQanZHX-XCAyw",+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY87vnZ6fgfvQanZHX-XCAyw||",name: "Shared Documents",mime_type: "application/x-op-drive",- location: "/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY87vnZ6fgfvQanZHX-XCAyw",+ location: "/Shared%20Documents",permissions: %i[readable writeable]),Results::StorageFile.new(- id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8Pmdpc8mQ1QJkyIbbWQJol",+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8Pmdpc8mQ1QJkyIbbWQJol||",name: "Selected Permissions",mime_type: "application/x-op-drive",- location: "/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8Pmdpc8mQ1QJkyIbbWQJol",+ location: "/Selected%20Permissions",permissions: %i[readable writeable]),Results::StorageFile.new(- id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY_YoKf1JPvYSJeFRsyx4zF_",+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY_YoKf1JPvYSJeFRsyx4zF_||",name: "Chris document library",mime_type: "application/x-op-drive",- location: "/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY_YoKf1JPvYSJeFRsyx4zF_",+ location: "/Chris%20document%20library",permissions: %i[readable writeable]),Results::StorageFile.new(- id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8CfNaHr_0ERYs5kgmEWFrX",+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8CfNaHr_0ERYs5kgmEWFrX||",name: "Marcello AMPF",mime_type: "application/x-op-drive",- location: "/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8CfNaHr_0ERYs5kgmEWFrX",+ location: "/Marcello%20AMPF",permissions: %i[readable writeable]),Results::StorageFile.new(- id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8opHtYeMANTahXlS54FgHn",+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8opHtYeMANTahXlS54FgHn||",name: "Dominic",mime_type: "application/x-op-drive",- location: "/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8opHtYeMANTahXlS54FgHn",+ location: "/Dominic",permissions: %i[readable writeable]),Results::StorageFile.new(- id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY93AQ5rgPKoR7tMwpspgj95",+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY93AQ5rgPKoR7tMwpspgj95||",name: "Markus",mime_type: "application/x-op-drive",- location: "/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY93AQ5rgPKoR7tMwpspgj95",+ location: "/Markus",permissions: %i[readable writeable]),Results::StorageFile.new(- id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW",+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW||",name: "Marcello VCR",mime_type: "application/x-op-drive",- location: "/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW",+ location: "/Marcello%20VCR",permissions: %i[readable writeable])],@@ -117,6 +118,128 @@ module Storagesit_behaves_like "adapter files_query: successful files response"end++ context "when requesting a drive", vcr: "share_point/files_query_drive" do+ let(:folder) { "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW||" }+ let(:files_result) do+ Results::StorageFileCollection.new(+ files: [+ Results::StorageFile.new(+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW||01ANJ53W5P3SUY3ZCDTRA3KLXRGA5A2M3S",+ name: "data",+ size: 760,+ mime_type: "application/x-op-directory",+ created_at: Time.zone.parse("2025-04-07 12:02:26Z"),+ last_modified_at: Time.zone.parse("2025-04-07 12:02:26Z"),+ created_by_name: "Eric Schubert",+ last_modified_by_name: "Eric Schubert",+ location: "/Marcello%20VCR/data",+ permissions: %i[readable writeable]+ ),+ Results::StorageFile.new(+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW||01ANJ53W2MWJ6SKEZPHFGIAAB325KYYMPE",+ name: "empty",+ size: 0,+ mime_type: "application/x-op-directory",+ created_at: Time.zone.parse("2025-07-28 08:46:36Z"),+ last_modified_at: Time.zone.parse("2025-07-28 08:46:36Z"),+ created_by_name: "Eric Schubert",+ last_modified_by_name: "Eric Schubert",+ location: "/Marcello%20VCR/empty",+ permissions: %i[readable writeable]+ ),+ Results::StorageFile.new(+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW||01ANJ53WZVLAWJSVFKOFF3HLYZPMPUK6HI",+ name: "simply_oidc.jpg",+ size: 56483,+ mime_type: "image/jpeg",+ created_at: Time.zone.parse("2025-04-07 12:02:42Z"),+ last_modified_at: Time.zone.parse("2025-04-07 12:02:42Z"),+ created_by_name: "Eric Schubert",+ last_modified_by_name: "Eric Schubert",+ location: "/Marcello%20VCR/simply_oidc.jpg",+ permissions: %i[readable writeable]+ )+ ],+ parent: Results::StorageFile.new(+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW||",+ name: "Marcello VCR",+ location: "/Marcello%20VCR",+ permissions: %i[readable writeable]+ ),+ ancestors: [+ Results::StorageFile.new(+ id: "a1d45ff742d2175c095f0a7173f93fc3fc23664a953ceae6778fe15398818c2d",+ name: "OPTest",+ location: "/",+ permissions: %i[readable writeable]+ )+ ]+ )+ end++ it_behaves_like "adapter files_query: successful files response"+ end++ context "when requesting an folder", vcr: "share_point/files_query_folder" do+ let(:folder) do+ "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW||01ANJ53W5P3SUY3ZCDTRA3KLXRGA5A2M3S"+ end++ let(:files_result) do+ Results::StorageFileCollection.new(+ files: [+ Results::StorageFile.new(+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW||01ANJ53W26P5RNXU7V2JBKCVQQAGGTO46A",+ name: "edge one_drive_health_report_2025-07-22T16_03_25Z.txt",+ size: 760,+ mime_type: "text/plain",+ location: "/Marcello%20VCR/data/edge%20one_drive_health_report_2025-07-22T16_03_25Z.txt",+ created_at: Time.zone.parse("2025-07-28 08:45:30.000000000 UTC +00:00"),+ last_modified_at: Time.zone.parse("2025-07-28 08:45:30.000000000 UTC +00:00"),+ created_by_name: "Eric Schubert",+ last_modified_by_name: "Eric Schubert",+ permissions: %i[readable writeable]+ )+ ],+ parent: Results::StorageFile.new(+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW||01ANJ53W5P3SUY3ZCDTRA3KLXRGA5A2M3S",+ name: "data",+ location: "/Marcello%20VCR/data",+ permissions: %i[readable writeable]+ ),+ ancestors: [+ Results::StorageFile.new(+ id: "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW||",+ name: "Marcello VCR",+ location: "/Marcello%20VCR",+ permissions: %i[readable writeable]+ ),+ Results::StorageFile.new(+ id: "a1d45ff742d2175c095f0a7173f93fc3fc23664a953ceae6778fe15398818c2d",+ name: "OPTest",+ location: "/",+ permissions: %i[readable writeable]+ )+ ]+ )+ end++ it_behaves_like "adapter files_query: successful files response"+ end++ context "when requesting an unknown file", vcr: "share_point/files_query_file_not_found" do+ let(:folder) { "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW||POTATO" }++ it_behaves_like "adapter files_query: not found", Internal::ChildrenQuery+ end++ context "when requestion an unknown drive", vcr: "share_point/files_query_drive_not_found" do+ let(:folder) { "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvPoTaTO" }++ it_behaves_like "adapter files_query: not found", Internal::ChildrenQuery+ end+ # rubocop:enable Layout/LineLengthendendenddiff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_drive.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_drive.ymlnew file mode 100644index 00000000000..512bd219535--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_drive.yml@@ -0,0 +1,119 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/e36f1dbc-fdae-427e-b61b-0d96ddfb81a4/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=404e0567-19a1-4a64-b2d1-d3b0c99f2ed9&client_secret=QRB8Q%7Ei.1rID_.MC9FTfRGq-FTE5SgWYsoeLacWf+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - e5593e6d-10b8-42ee-8f15-ad820ac10500+ X-Ms-Ests-Server:+ - 2.1.21415.7 - FRC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-OAM6X5AYz9ocAqYPChlwQw'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=ArsDHMmFgLZOhbsMGLIx3LVZ-dCOAQAAAMkwGeAOAAAA; expires=Wed, 27-Aug-2025+ 08:50:18 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Mon, 28 Jul 2025 08:50:17 GMT+ Content-Length:+ - '1927'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Mon, 28 Jul 2025 08:50:18 GMT+- request:+ method: get+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/root/children?$select=id,name,size,webUrl,lastModifiedBy,createdBy,fileSystemInfo,file,folder,parentReference+ body:+ encoding: US-ASCII+ string: ''+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false;+ charset=utf-8+ Content-Encoding:+ - gzip+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 60b70375-811f-401d-b92d-f9e890b2b95a+ Client-Request-Id:+ - 60b70375-811f-401d-b92d-f9e890b2b95a+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"FR3PEPF00000167"}}'+ Splogid:+ - 6926b6a1-e079-0000-7566-ad884651cd18+ Date:+ - Mon, 28 Jul 2025 08:50:18 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#Collection(driveItem)","value":[{"@odata.etag":"\"{8DA9DCAF-43E4-419C-B52E-F1303A0D3372},1\"","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"id":"01ANJ53W5P3SUY3ZCDTRA3KLXRGA5A2M3S","lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"name":"data","parentReference":{"driveType":"documentLibrary","driveId":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello+ VCR","path":"/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/data","fileSystemInfo":{"createdDateTime":"2025-04-07T12:02:26Z","lastModifiedDateTime":"2025-04-07T12:02:26Z"},"folder":{"childCount":1},"size":760},{"@odata.etag":"\"{257DB24C-2F13-4C39-8000-3BD7558C31E4},1\"","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"id":"01ANJ53W2MWJ6SKEZPHFGIAAB325KYYMPE","lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"name":"empty","parentReference":{"driveType":"documentLibrary","driveId":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello+ VCR","path":"/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/empty","fileSystemInfo":{"createdDateTime":"2025-07-28T08:46:36Z","lastModifiedDateTime":"2025-07-28T08:46:36Z"},"folder":{"childCount":0},"size":0},{"@odata.etag":"\"{992C5835-AA54-4B71-B3AF-197B1F4578E8},2\"","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"id":"01ANJ53WZVLAWJSVFKOFF3HLYZPMPUK6HI","lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"name":"simply_oidc.jpg","parentReference":{"driveType":"documentLibrary","driveId":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello+ VCR","path":"/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/simply_oidc.jpg","file":{"hashes":{"quickXorHash":"qzqT/ZJgJnvhu77aF+2RcdH62Sc="},"mimeType":"image/jpeg"},"fileSystemInfo":{"createdDateTime":"2025-04-07T12:02:42Z","lastModifiedDateTime":"2025-04-07T12:02:42Z"},"size":56483}]}'+ recorded_at: Mon, 28 Jul 2025 08:50:18 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_drive_not_found.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_drive_not_found.ymlnew file mode 100644index 00000000000..852c2a71b7f--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_drive_not_found.yml@@ -0,0 +1,111 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/e36f1dbc-fdae-427e-b61b-0d96ddfb81a4/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=404e0567-19a1-4a64-b2d1-d3b0c99f2ed9&client_secret=QRB8Q%7Ei.1rID_.MC9FTfRGq-FTE5SgWYsoeLacWf+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - ff7ffdad-33a4-4cd2-8757-b3b10f337d00+ X-Ms-Ests-Server:+ - 2.1.21415.7 - FRC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-VdWfibjRfWm-a8iXEyCQBw'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AmU5JebootlLq_w0JEw_Kv1Z-dCOAQAAAJlvGeAOAAAA; expires=Wed, 27-Aug-2025+ 13:18:18 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Mon, 28 Jul 2025 13:18:18 GMT+ Content-Length:+ - '1927'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Mon, 28 Jul 2025 13:18:18 GMT+- request:+ method: get+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvPoTaTO/root/children?$select=id,name,size,webUrl,lastModifiedBy,createdBy,fileSystemInfo,file,folder,parentReference+ body:+ encoding: US-ASCII+ string: ''+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 404+ message: Not Found+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json; charset=utf-8+ Content-Encoding:+ - gzip+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 04a7154e-197c-4ffc-b9ea-cfdc125ce2a4+ Client-Request-Id:+ - 04a7154e-197c-4ffc-b9ea-cfdc125ce2a4+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"008","RoleInstance":"FR3PEPF00000DD3"}}'+ Splogid:+ - bf35b6a1-603c-0000-7566-a3bc946874bc+ Date:+ - Mon, 28 Jul 2025 13:18:18 GMT+ body:+ encoding: UTF-8+ string: '{"error":{"code":"itemNotFound","message":"Item not found"}}'+ recorded_at: Mon, 28 Jul 2025 13:18:18 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_file_not_found.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_file_not_found.ymlnew file mode 100644index 00000000000..ad2b6dc0bca--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_file_not_found.yml@@ -0,0 +1,111 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/e36f1dbc-fdae-427e-b61b-0d96ddfb81a4/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=404e0567-19a1-4a64-b2d1-d3b0c99f2ed9&client_secret=QRB8Q%7Ei.1rID_.MC9FTfRGq-FTE5SgWYsoeLacWf+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - b2ce4ada-b8ef-46c7-8cf4-c9b83db6a500+ X-Ms-Ests-Server:+ - 2.1.21415.7 - FRC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-GFNiZX_zRLvj3WVU7ogLeQ'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AkeDXHb9l0ZCgY-m-IGrBzhZ-dCOAQAAAG5tGeAOAAAA; expires=Wed, 27-Aug-2025+ 13:09:03 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Mon, 28 Jul 2025 13:09:02 GMT+ Content-Length:+ - '1932'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Mon, 28 Jul 2025 13:09:03 GMT+- request:+ method: get+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/items/POTATO/children?$select=id,name,size,webUrl,lastModifiedBy,createdBy,fileSystemInfo,file,folder,parentReference+ body:+ encoding: US-ASCII+ string: ''+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 404+ message: Not Found+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json; charset=utf-8+ Content-Encoding:+ - gzip+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 8470c2a4-e9b1-480a-84c2-8abf72f91adf+ Client-Request-Id:+ - 8470c2a4-e9b1-480a-84c2-8abf72f91adf+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"008","RoleInstance":"FR3PEPF00000DD5"}}'+ Splogid:+ - 3735b6a1-60b6-0000-7566-a31011c0b744+ Date:+ - Mon, 28 Jul 2025 13:09:03 GMT+ body:+ encoding: UTF-8+ string: '{"error":{"code":"itemNotFound","message":"Item not found"}}'+ recorded_at: Mon, 28 Jul 2025 13:09:03 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_folder.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_folder.ymlnew file mode 100644index 00000000000..921e59c1dc7--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_folder.yml@@ -0,0 +1,112 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/e36f1dbc-fdae-427e-b61b-0d96ddfb81a4/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=404e0567-19a1-4a64-b2d1-d3b0c99f2ed9&client_secret=QRB8Q%7Ei.1rID_.MC9FTfRGq-FTE5SgWYsoeLacWf+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - 6f542d99-7f2f-4466-952f-c400dbe06600+ X-Ms-Ests-Server:+ - 2.1.21415.7 - WEULR1 ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-bFUy_yd93jzFa_VHsmlc9Q'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AkC9kJWBJE5Li_QcJSA9Au1Z-dCOAQAAAM4xGeAOAAAA; expires=Wed, 27-Aug-2025+ 08:54:39 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Mon, 28 Jul 2025 08:54:38 GMT+ Content-Length:+ - '1937'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Mon, 28 Jul 2025 08:54:39 GMT+- request:+ method: get+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/items/01ANJ53W5P3SUY3ZCDTRA3KLXRGA5A2M3S/children?$select=id,name,size,webUrl,lastModifiedBy,createdBy,fileSystemInfo,file,folder,parentReference+ body:+ encoding: US-ASCII+ string: ''+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false;+ charset=utf-8+ Content-Encoding:+ - gzip+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 8a564d27-6add-4786-a344-17d748e93119+ Client-Request-Id:+ - 8a564d27-6add-4786-a344-17d748e93119+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"FR3PEPF00000350"}}'+ Splogid:+ - a926b6a1-801c-0000-7566-a04034d05092+ Date:+ - Mon, 28 Jul 2025 08:54:39 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#Collection(driveItem)","value":[{"@odata.etag":"\"{DB627F5E-F5D3-42D2-A156-10018D3773C0},1\"","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"id":"01ANJ53W26P5RNXU7V2JBKCVQQAGGTO46A","lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"name":"edge one_drive_health_report_2025-07-22T16_03_25Z.txt","parentReference":{"driveType":"documentLibrary","driveId":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW","id":"01ANJ53W5P3SUY3ZCDTRA3KLXRGA5A2M3S","name":"data","path":"/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/root:/data","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/data/edge%20one_drive_health_report_2025-07-22T16_03_25Z.txt","file":{"hashes":{"quickXorHash":"dUZdSj55kRInUxY0kvoKq2xFSLk="},"mimeType":"text/plain"},"fileSystemInfo":{"createdDateTime":"2025-07-28T08:45:30Z","lastModifiedDateTime":"2025-07-28T08:45:30Z"},"size":760}]}'+ recorded_at: Mon, 28 Jul 2025 08:54:39 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_root.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_root.ymlindex fc70a731f63..df80aa6b83d 100644--- a/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_root.yml+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/files_query_root.yml@@ -37,13 +37,13 @@ http_interactions:P3p:- CP="DSP CUR OTPi IND OTRi ONL FIN"X-Ms-Request-Id:- - 2151528f-3b78-4c06-af47-5418b6440400+ - 94211292-5035-40b4-b9d5-2d3ec48a7e00X-Ms-Ests-Server:- - 2.1.21415.7 - SEC ProdSlices+ - 2.1.21415.7 - FRC ProdSlicesX-Ms-Srs:- 1.PContent-Security-Policy-Report-Only:- - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-LLJhckFDSgu1DYtB3fvK-g'+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-aKvJ90PEOpqPhZmq6TTwDg''unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.nethttps://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.comhttps://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net@@ -52,18 +52,18 @@ http_interactions:X-Xss-Protection:- '0'Set-Cookie:- - fpc=AkhqyVRZf9VOqEbrBAV5PXFZ-dCOAQAAAGYiFOAOAAAA; expires=Sat, 23-Aug-2025- 12:47:35 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ - fpc=AnUMhhQ9eI9EqAraBLDAbNRZ-dCOAQAAAMowGeAOAAAA; expires=Wed, 27-Aug-2025+ 08:50:19 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;secure; samesite=none; httponlyDate:- - Thu, 24 Jul 2025 12:47:35 GMT+ - Mon, 28 Jul 2025 08:50:19 GMTContent-Length:- '1925'body:encoding: UTF-8string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'- recorded_at: Thu, 24 Jul 2025 12:47:35 GMT+ recorded_at: Mon, 28 Jul 2025 08:50:19 GMT- request:method: geturi: https://graph.microsoft.com/v1.0/sites/ymt6d.sharepoint.com:/sites/OPTest:/lists?$expand=drive&$select=id,name,drive@@ -95,53 +95,53 @@ http_interactions:Strict-Transport-Security:- max-age=31536000Request-Id:- - 516e4e68-f5a2-4665-8f98-0171e66f50ce+ - d94669a4-95fb-4044-83e9-bb9677994772Client-Request-Id:- - 516e4e68-f5a2-4665-8f98-0171e66f50ce+ - d94669a4-95fb-4044-83e9-bb9677994772X-Ms-Ags-Diagnostic:- - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"006","RoleInstance":"FR1PEPF00001FC9"}}'+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"FR3PEPF00000DC1"}}'Splogid:- - 66eab4a1-e040-0000-7380-7fa7ad0849a5+ - 6926b6a1-b0ac-0000-7534-cd98012d4302Odata-Version:- '4.0'Date:- - Thu, 24 Jul 2025 12:47:35 GMT+ - Mon, 28 Jul 2025 08:50:19 GMTbody:encoding: UTF-8string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)(id,name,drive,drive())","value":[{"@odata.etag":"\"df897210-689b-48ba-a128-0a6b8662a40a,26\"","id":"df897210-689b-48ba-a128-0a6b8662a40a","name":"OpenProject","[email protected]":"https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)(''df897210-689b-48ba-a128-0a6b8662a40a'')/drive/$entity","drive":{"createdDateTime":"2024-02-02T13:53:33Z","description":"Enabledfor automatic management","id":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8Qconfm2i6SKEoCmuGYqQK","lastModifiedDateTime":"2025-06-18T11:42:21Z","name":"OpenProject","webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/OpenProject","driveType":"documentLibrary","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"EricSchubert"}},"lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"EricSchubert"}},"owner":{"group":{"email":"[email protected]","id":"5dfb4269-d3e3-4c70-83f5-c4937ff6dcdb","displayName":"OP- Test Owners"}},"quota":{"deleted":47480,"remaining":27487787051559,"state":"normal","total":27487790694400,"used":3595361}}},{"@odata.etag":"\"7a76be3b-077e-41ef-a9d9-1d7f97080cb0,21\"","id":"7a76be3b-077e-41ef-a9d9-1d7f97080cb0","name":"Shared+ Test Owners"}},"quota":{"deleted":0,"remaining":27487787097631,"state":"normal","total":27487790694400,"used":3596769}}},{"@odata.etag":"\"7a76be3b-077e-41ef-a9d9-1d7f97080cb0,21\"","id":"7a76be3b-077e-41ef-a9d9-1d7f97080cb0","name":"SharedDocuments","[email protected]":"https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)(''7a76be3b-077e-41ef-a9d9-1d7f97080cb0'')/drive/$entity","drive":{"createdDateTime":"2023-12-10T00:27:16Z","description":"","id":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY87vnZ6fgfvQanZHX-XCAyw","lastModifiedDateTime":"2024-08-09T11:53:52Z","name":"Documents","webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Shared%20Documents","driveType":"documentLibrary","createdBy":{"user":{"displayName":"SystemAccount"}},"lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"EricSchubert"}},"owner":{"group":{"email":"[email protected]","id":"5dfb4269-d3e3-4c70-83f5-c4937ff6dcdb","displayName":"OP- Test Owners"}},"quota":{"deleted":47480,"remaining":27487787051559,"state":"normal","total":27487790694400,"used":3595361}}},{"@odata.etag":"\"5cda990f-64f2-4035-9932-21b6d6409a25,4\"","id":"5cda990f-64f2-4035-9932-21b6d6409a25","name":"Selected+ Test Owners"}},"quota":{"deleted":0,"remaining":27487787097631,"state":"normal","total":27487790694400,"used":3596769}}},{"@odata.etag":"\"5cda990f-64f2-4035-9932-21b6d6409a25,4\"","id":"5cda990f-64f2-4035-9932-21b6d6409a25","name":"SelectedPermissions","[email protected]":"https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)(''5cda990f-64f2-4035-9932-21b6d6409a25'')/drive/$entity","drive":{"createdDateTime":"2024-08-12T13:14:43Z","description":"","id":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8Pmdpc8mQ1QJkyIbbWQJol","lastModifiedDateTime":"2024-08-12T16:45:41Z","name":"SelectedPermissions","webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Selected%20Permissions","driveType":"documentLibrary","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"EricSchubert"}},"lastModifiedBy":{"user":{"email":"[email protected]","id":"ddbce65c-65fd-42a9-be30-253e244c3f36","displayName":"OPOwner"}},"owner":{"group":{"email":"[email protected]","id":"5dfb4269-d3e3-4c70-83f5-c4937ff6dcdb","displayName":"OP- Test Owners"}},"quota":{"deleted":47480,"remaining":27487787051559,"state":"normal","total":27487790694400,"used":3595361}}},{"@odata.etag":"\"f5a7a0d8-fb24-48d8-9785-46ccb1e3317f,22\"","id":"f5a7a0d8-fb24-48d8-9785-46ccb1e3317f","name":"Chris+ Test Owners"}},"quota":{"deleted":0,"remaining":27487787097631,"state":"normal","total":27487790694400,"used":3596769}}},{"@odata.etag":"\"f5a7a0d8-fb24-48d8-9785-46ccb1e3317f,22\"","id":"f5a7a0d8-fb24-48d8-9785-46ccb1e3317f","name":"Chrisdocument library","[email protected]":"https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)(''f5a7a0d8-fb24-48d8-9785-46ccb1e3317f'')/drive/$entity","drive":{"createdDateTime":"2024-02-13T15:38:57Z","description":"Fortesting","id":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY_YoKf1JPvYSJeFRsyx4zF_","lastModifiedDateTime":"2024-05-21T12:58:12Z","name":"Chrisdocument library","webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Chris%20document%20library","driveType":"documentLibrary","createdBy":{"user":{"email":"[email protected]","id":"5bbaa900-f913-41c9-9593-c3d03a14684b","displayName":"ChristopheBliard"}},"owner":{"group":{"email":"[email protected]","id":"5dfb4269-d3e3-4c70-83f5-c4937ff6dcdb","displayName":"OP- Test Owners"}},"quota":{"deleted":47480,"remaining":27487787051559,"state":"normal","total":27487790694400,"used":3595361}}},{"@odata.etag":"\"87d67c02-fdaf-4504-8b39-920984585ad7,4\"","id":"87d67c02-fdaf-4504-8b39-920984585ad7","name":"Marcello+ Test Owners"}},"quota":{"deleted":0,"remaining":27487787097631,"state":"normal","total":27487790694400,"used":3596769}}},{"@odata.etag":"\"87d67c02-fdaf-4504-8b39-920984585ad7,4\"","id":"87d67c02-fdaf-4504-8b39-920984585ad7","name":"MarcelloAMPF","[email protected]":"https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)(''87d67c02-fdaf-4504-8b39-920984585ad7'')/drive/$entity","drive":{"createdDateTime":"2025-04-07T12:03:17Z","description":"","id":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8CfNaHr_0ERYs5kgmEWFrX","lastModifiedDateTime":"2025-04-09T16:01:59Z","name":"Marcello(AMPF)","webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20AMPF","driveType":"documentLibrary","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"EricSchubert"}},"lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"EricSchubert"}},"owner":{"group":{"email":"[email protected]","id":"5dfb4269-d3e3-4c70-83f5-c4937ff6dcdb","displayName":"OP- Test Owners"}},"quota":{"deleted":47480,"remaining":27487787051559,"state":"normal","total":27487790694400,"used":3595361}}},{"@odata.etag":"\"587ba428-c078-4d0d-a857-952e781601e7,6\"","id":"587ba428-c078-4d0d-a857-952e781601e7","name":"Dominic","[email protected]":"https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)(''587ba428-c078-4d0d-a857-952e781601e7'')/drive/$entity","drive":{"createdDateTime":"2024-07-05T09:54:25Z","description":"","id":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8opHtYeMANTahXlS54FgHn","lastModifiedDateTime":"2024-07-19T07:48:01Z","name":"Dominic","webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Dominic","driveType":"documentLibrary","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Test Owners"}},"quota":{"deleted":0,"remaining":27487787097631,"state":"normal","total":27487790694400,"used":3596769}}},{"@odata.etag":"\"587ba428-c078-4d0d-a857-952e781601e7,6\"","id":"587ba428-c078-4d0d-a857-952e781601e7","name":"Dominic","[email protected]":"https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)(''587ba428-c078-4d0d-a857-952e781601e7'')/drive/$entity","drive":{"createdDateTime":"2024-07-05T09:54:25Z","description":"","id":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8opHtYeMANTahXlS54FgHn","lastModifiedDateTime":"2024-07-19T07:48:01Z","name":"Dominic","webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Dominic","driveType":"documentLibrary","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"EricSchubert"}},"owner":{"group":{"email":"[email protected]","id":"5dfb4269-d3e3-4c70-83f5-c4937ff6dcdb","displayName":"OP- Test Owners"}},"quota":{"deleted":47480,"remaining":27487787051559,"state":"normal","total":27487790694400,"used":3595361}}},{"@odata.etag":"\"6b0e0177-f280-47a8-bb4c-c29b29823f79,25\"","id":"6b0e0177-f280-47a8-bb4c-c29b29823f79","name":"Markus","[email protected]":"https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)(''6b0e0177-f280-47a8-bb4c-c29b29823f79'')/drive/$entity","drive":{"createdDateTime":"2024-05-13T14:53:56Z","description":"","id":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY93AQ5rgPKoR7tMwpspgj95","lastModifiedDateTime":"2025-05-19T13:28:22Z","name":"Markus","webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Markus","driveType":"documentLibrary","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Test Owners"}},"quota":{"deleted":0,"remaining":27487787097631,"state":"normal","total":27487790694400,"used":3596769}}},{"@odata.etag":"\"6b0e0177-f280-47a8-bb4c-c29b29823f79,25\"","id":"6b0e0177-f280-47a8-bb4c-c29b29823f79","name":"Markus","[email protected]":"https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)(''6b0e0177-f280-47a8-bb4c-c29b29823f79'')/drive/$entity","drive":{"createdDateTime":"2024-05-13T14:53:56Z","description":"","id":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY93AQ5rgPKoR7tMwpspgj95","lastModifiedDateTime":"2025-05-19T13:28:22Z","name":"Markus","webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Markus","driveType":"documentLibrary","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"EricSchubert"}},"lastModifiedBy":{"user":{"email":"[email protected]","id":"ddbce65c-65fd-42a9-be30-253e244c3f36","displayName":"OPOwner"}},"owner":{"group":{"email":"[email protected]","id":"5dfb4269-d3e3-4c70-83f5-c4937ff6dcdb","displayName":"OP- Test Owners"}},"quota":{"deleted":47480,"remaining":27487787051559,"state":"normal","total":27487790694400,"used":3595361}}},{"@odata.etag":"\"5ea9a363-3a24-4fab-b9ae-cef9a25a3156,20\"","id":"5ea9a363-3a24-4fab-b9ae-cef9a25a3156","name":"Marcello- VCR","[email protected]":"https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)(''5ea9a363-3a24-4fab-b9ae-cef9a25a3156'')/drive/$entity","drive":{"createdDateTime":"2025-04-07T12:02:17Z","description":"","id":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW","lastModifiedDateTime":"2025-07-22T17:22:13Z","name":"Marcello+ Test Owners"}},"quota":{"deleted":0,"remaining":27487787097631,"state":"normal","total":27487790694400,"used":3596769}}},{"@odata.etag":"\"5ea9a363-3a24-4fab-b9ae-cef9a25a3156,20\"","id":"5ea9a363-3a24-4fab-b9ae-cef9a25a3156","name":"Marcello+ VCR","[email protected]":"https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)(''5ea9a363-3a24-4fab-b9ae-cef9a25a3156'')/drive/$entity","drive":{"createdDateTime":"2025-04-07T12:02:17Z","description":"","id":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW","lastModifiedDateTime":"2025-07-28T08:46:36Z","name":"Marcello(VCR)","webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR","driveType":"documentLibrary","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"EricSchubert"}},"lastModifiedBy":{"user":{"email":"[email protected]","id":"a9023fd0-c421-4695-b83c-bb3ba67708d6","displayName":"OPMember"}},"owner":{"group":{"email":"[email protected]","id":"5dfb4269-d3e3-4c70-83f5-c4937ff6dcdb","displayName":"OP- Test Owners"}},"quota":{"deleted":47480,"remaining":27487787051559,"state":"normal","total":27487790694400,"used":3595361}}},{"@odata.etag":"\"da53472d-ec9c-4fb1-b021-d89d3748c8a1,0\"","id":"da53472d-ec9c-4fb1-b021-d89d3748c8a1","name":"wte"},{"@odata.etag":"\"834449c8-dc24-44e0-a59a-e94f9128801c,8\"","id":"834449c8-dc24-44e0-a59a-e94f9128801c","name":"Access+ Test Owners"}},"quota":{"deleted":0,"remaining":27487787097631,"state":"normal","total":27487790694400,"used":3596769}}},{"@odata.etag":"\"da53472d-ec9c-4fb1-b021-d89d3748c8a1,0\"","id":"da53472d-ec9c-4fb1-b021-d89d3748c8a1","name":"wte"},{"@odata.etag":"\"834449c8-dc24-44e0-a59a-e94f9128801c,8\"","id":"834449c8-dc24-44e0-a59a-e94f9128801c","name":"AccessRequests"}]}'- recorded_at: Thu, 24 Jul 2025 12:47:35 GMT+ recorded_at: Mon, 28 Jul 2025 08:50:19 GMTrecorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/shared_examples_for_storage_providers/files_query_examples.rb b/modules/storages/spec/support/shared_examples_for_storage_providers/files_query_examples.rbindex 784d328db4b..b5f34077b22 100644--- a/modules/storages/spec/support/shared_examples_for_storage_providers/files_query_examples.rb+++ b/modules/storages/spec/support/shared_examples_for_storage_providers/files_query_examples.rb@@ -44,7 +44,7 @@ RSpec.shared_examples_for "adapter files_query: basic query setup" doendRSpec.shared_examples_for "adapter files_query: successful files response" do- it "returns a file info object" do+ it "returns a storage file collection object" doresult = described_class.call(storage:, auth_strategy:, input_data:)expect(result).to be_success@@ -55,7 +55,7 @@ RSpec.shared_examples_for "adapter files_query: successful files response" doendend-RSpec.shared_examples_for "adapter files_query: not found" do+RSpec.shared_examples_for "adapter files_query: not found" do |error_source = described_class|it "returns a failure" doresult = described_class.call(storage:, auth_strategy:, input_data:)@@ -63,11 +63,11 @@ RSpec.shared_examples_for "adapter files_query: not found" doerror = result.failureexpect(error.code).to eq(:not_found)- expect(error.source).to eq(described_class)+ expect(error.source).to eq(error_source)endend-RSpec.shared_examples_for "adapter files_query: error" do+RSpec.shared_examples_for "adapter files_query: error" do |error_source = described_class|it "returns a failure" doresult = described_class.call(storage:, auth_strategy:, input_data:)@@ -75,6 +75,6 @@ RSpec.shared_examples_for "adapter files_query: error" doerror = result.failureexpect(error.code).to eq(:error)- expect(error.source).to eq(described_class)+ expect(error.source).to eq(error_source)endend