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
8 changes: 8 additions & 0 deletions Sources/InternxtSwiftCore/Services/HttpAPI/DriveAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
12 changes: 12 additions & 0 deletions Sources/InternxtSwiftCore/Types/DriveTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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?
}
Loading