From 46cfefc905c33d3474c56425ce63d95dd5d199f7 Mon Sep 17 00:00:00 2001 From: patricioxavier8 <116120453+patricioxavier8@users.noreply.github.com> Date: Tue, 12 May 2026 09:24:01 -0500 Subject: [PATCH] feat: add getFileLimits endpoint to manage file size limits in the app --- .../Services/HttpAPI/DriveAPI.swift | 8 ++++++++ Sources/InternxtSwiftCore/Types/DriveTypes.swift | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/Sources/InternxtSwiftCore/Services/HttpAPI/DriveAPI.swift b/Sources/InternxtSwiftCore/Services/HttpAPI/DriveAPI.swift index fa89aec..c9c5108 100644 --- a/Sources/InternxtSwiftCore/Services/HttpAPI/DriveAPI.swift +++ b/Sources/InternxtSwiftCore/Services/HttpAPI/DriveAPI.swift @@ -616,4 +616,12 @@ public struct DriveAPI { ) return try await apiClient.fetch(type: ShareDomainsResponse.self, endpoint, debugResponse: debug) } + + public func getFileLimits(debug: Bool = false) async throws -> FileLimitsResponse { + let endpoint = Endpoint( + path: "\(self.baseUrl)/files/limits", + method: .GET + ) + return try await apiClient.fetch(type: FileLimitsResponse.self, endpoint, debugResponse: debug) + } } diff --git a/Sources/InternxtSwiftCore/Types/DriveTypes.swift b/Sources/InternxtSwiftCore/Types/DriveTypes.swift index 67158f3..43a0026 100644 --- a/Sources/InternxtSwiftCore/Types/DriveTypes.swift +++ b/Sources/InternxtSwiftCore/Types/DriveTypes.swift @@ -841,3 +841,15 @@ public struct CreateSharingResponse: Decodable { public struct ShareDomainsResponse: Decodable { public let list: [String] } + +public struct FileLimitsResponse: Codable { + public let versioning: Versioning? + public let maxUploadFileSize: Int? +} + +public struct Versioning: Codable { + public let enabled: Bool? + public let maxFileSize: Int? + public let retentionDays: Int? + public let maxVersions: Int? +}