diff --git a/.codegen.json b/.codegen.json index bff09216..691d6eda 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "20cb559", "specHash": "2da99e0", "version": "0.6.1" } +{ "engineHash": "20cb559", "specHash": "a54170e", "version": "0.6.1" } diff --git a/Sources/Managers/Files/UpdateFileByIdRequestBody.swift b/Sources/Managers/Files/UpdateFileByIdRequestBody.swift index 08127977..e6dd47fc 100644 --- a/Sources/Managers/Files/UpdateFileByIdRequestBody.swift +++ b/Sources/Managers/Files/UpdateFileByIdRequestBody.swift @@ -24,6 +24,9 @@ public class UpdateFileByIdRequestBody: Codable, RawJSONReadable { /// An optional different name for the file. This can be used to /// rename the file. + /// + /// File names must be unique within their parent folder. The name check is case-insensitive, so a file + /// named `New File` cannot be created in a parent folder that already contains a folder named `new file`. public let name: String? /// The description for a file. This can be seen in the right-hand sidebar panel @@ -78,6 +81,9 @@ public class UpdateFileByIdRequestBody: Codable, RawJSONReadable { /// - Parameters: /// - name: An optional different name for the file. This can be used to /// rename the file. + /// + /// File names must be unique within their parent folder. The name check is case-insensitive, so a file + /// named `New File` cannot be created in a parent folder that already contains a folder named `new file`. /// - description: The description for a file. This can be seen in the right-hand sidebar panel /// when viewing a file in the Box web app. Additionally, this index is used in /// the search index of the file, allowing users to find the file by the content diff --git a/Sources/Managers/Folders/CreateFolderRequestBody.swift b/Sources/Managers/Folders/CreateFolderRequestBody.swift index 43e637ca..fdb90a86 100644 --- a/Sources/Managers/Folders/CreateFolderRequestBody.swift +++ b/Sources/Managers/Folders/CreateFolderRequestBody.swift @@ -19,13 +19,14 @@ public class CreateFolderRequestBody: Codable, RawJSONReadable { /// The name for the new folder. /// - /// There are some restrictions to the file name. Names containing + /// The following restrictions to folder names apply: names containing /// non-printable ASCII characters, forward and backward slashes - /// (`/`, `\`), as well as names with trailing spaces are - /// prohibited. + /// (`/`, `\`), names with trailing spaces, and names `.` and `..` are + /// not allowed. /// - /// Additionally, the names `.` and `..` are - /// not allowed either. + /// Folder names must be unique within their parent folder. The name check is case-insensitive, + /// so a folder named `New Folder` cannot be created in a parent folder that already contains + /// a folder named `new folder`. public let name: String /// The parent folder to create the new folder within. @@ -43,13 +44,14 @@ public class CreateFolderRequestBody: Codable, RawJSONReadable { /// - Parameters: /// - name: The name for the new folder. /// - /// There are some restrictions to the file name. Names containing + /// The following restrictions to folder names apply: names containing /// non-printable ASCII characters, forward and backward slashes - /// (`/`, `\`), as well as names with trailing spaces are - /// prohibited. + /// (`/`, `\`), names with trailing spaces, and names `.` and `..` are + /// not allowed. /// - /// Additionally, the names `.` and `..` are - /// not allowed either. + /// Folder names must be unique within their parent folder. The name check is case-insensitive, + /// so a folder named `New Folder` cannot be created in a parent folder that already contains + /// a folder named `new folder`. /// - parent: The parent folder to create the new folder within. /// - folderUploadEmail: /// - syncState: Specifies whether a folder should be synced to a diff --git a/Sources/Managers/Folders/UpdateFolderByIdRequestBody.swift b/Sources/Managers/Folders/UpdateFolderByIdRequestBody.swift index a0ba4de2..72a9cf5d 100644 --- a/Sources/Managers/Folders/UpdateFolderByIdRequestBody.swift +++ b/Sources/Managers/Folders/UpdateFolderByIdRequestBody.swift @@ -25,6 +25,15 @@ public class UpdateFolderByIdRequestBody: Codable, RawJSONReadable { /// The optional new name for this folder. + /// + /// The following restrictions to folder names apply: names containing + /// non-printable ASCII characters, forward and backward slashes + /// (`/`, `\`), names with trailing spaces, and names `.` and `..` are + /// not allowed. + /// + /// Folder names must be unique within their parent folder. The name check is case-insensitive, + /// so a folder named `New Folder` cannot be created in a parent folder that already contains + /// a folder named `new folder`. public let name: String? /// The optional description of this folder @@ -89,6 +98,15 @@ public class UpdateFolderByIdRequestBody: Codable, RawJSONReadable { /// /// - Parameters: /// - name: The optional new name for this folder. + /// + /// The following restrictions to folder names apply: names containing + /// non-printable ASCII characters, forward and backward slashes + /// (`/`, `\`), names with trailing spaces, and names `.` and `..` are + /// not allowed. + /// + /// Folder names must be unique within their parent folder. The name check is case-insensitive, + /// so a folder named `New Folder` cannot be created in a parent folder that already contains + /// a folder named `new folder`. /// - description: The optional description of this folder /// - syncState: Specifies whether a folder should be synced to a /// user's device or not. This is used by Box Sync diff --git a/Sources/Managers/Uploads/UploadFileRequestBodyAttributesField.swift b/Sources/Managers/Uploads/UploadFileRequestBodyAttributesField.swift index f52754a7..05d58034 100644 --- a/Sources/Managers/Uploads/UploadFileRequestBodyAttributesField.swift +++ b/Sources/Managers/Uploads/UploadFileRequestBodyAttributesField.swift @@ -17,7 +17,10 @@ public class UploadFileRequestBodyAttributesField: Codable, RawJSONReadable { } - /// The name of the file + /// The name of the file. + /// + /// File names must be unique within their parent folder. The name check is case-insensitive, so a file + /// named `New File` cannot be created in a parent folder that already contains a folder named `new file`. public let name: String /// The parent folder to upload the file to @@ -36,7 +39,10 @@ public class UploadFileRequestBodyAttributesField: Codable, RawJSONReadable { /// Initializer for a UploadFileRequestBodyAttributesField. /// /// - Parameters: - /// - name: The name of the file + /// - name: The name of the file. + /// + /// File names must be unique within their parent folder. The name check is case-insensitive, so a file + /// named `New File` cannot be created in a parent folder that already contains a folder named `new file`. /// - parent: The parent folder to upload the file to /// - contentCreatedAt: Defines the time the file was originally created at. /// diff --git a/Sources/Managers/Uploads/UploadWithPreflightCheckRequestBodyAttributesField.swift b/Sources/Managers/Uploads/UploadWithPreflightCheckRequestBodyAttributesField.swift index 517496df..58965e86 100644 --- a/Sources/Managers/Uploads/UploadWithPreflightCheckRequestBodyAttributesField.swift +++ b/Sources/Managers/Uploads/UploadWithPreflightCheckRequestBodyAttributesField.swift @@ -18,7 +18,10 @@ public class UploadWithPreflightCheckRequestBodyAttributesField: Codable, RawJSO } - /// The name of the file + /// The name of the file. + /// + /// File names must be unique within their parent folder. The name check is case-insensitive, so a file + /// named `New File` cannot be created in a parent folder that already contains a folder named `new file`. public let name: String /// The parent folder to upload the file to @@ -40,7 +43,10 @@ public class UploadWithPreflightCheckRequestBodyAttributesField: Codable, RawJSO /// Initializer for a UploadWithPreflightCheckRequestBodyAttributesField. /// /// - Parameters: - /// - name: The name of the file + /// - name: The name of the file. + /// + /// File names must be unique within their parent folder. The name check is case-insensitive, so a file + /// named `New File` cannot be created in a parent folder that already contains a folder named `new file`. /// - parent: The parent folder to upload the file to /// - size: The size of the file in bytes /// - contentCreatedAt: Defines the time the file was originally created at.