diff --git a/.codegen.json b/.codegen.json index 4976322d..0d4363db 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "74a3b04", "specHash": "fc01415", "version": "0.3.0" } +{ "engineHash": "62a25a4", "specHash": "e95d6fa", "version": "0.3.0" } diff --git a/Sources/Schemas/SignRequestCreateSigner/SignRequestCreateSigner.swift b/Sources/Schemas/SignRequestCreateSigner/SignRequestCreateSigner.swift index 37c1c35c..6f688d1f 100644 --- a/Sources/Schemas/SignRequestCreateSigner/SignRequestCreateSigner.swift +++ b/Sources/Schemas/SignRequestCreateSigner/SignRequestCreateSigner.swift @@ -53,14 +53,16 @@ public class SignRequestCreateSigner: Codable { /// declined redirect URL settings for a specific signer. public let declinedRedirectUrl: String? - /// If set to true, signer will need to login to a Box account + /// If set to true, the signer will need to log in to a Box account /// before signing the request. If the signer does not have - /// an existing account, they will have an option to create - /// a free Box account. + /// an existing account, they will have the option to create + /// a free Box account. Cannot be selected in combination with + /// `verification_phone_number`. public let loginRequired: Bool? - /// If set, this phone number is be used to verify the signer - /// via two factor authentication before they are able to sign the document. + /// If set, this phone number will be used to verify the signer + /// via two-factor authentication before they are able to sign the document. + /// Cannot be selected in combination with `login_required`. public let verificationPhoneNumber: String? /// If set, the signer is required to enter the password before they are able @@ -103,12 +105,14 @@ public class SignRequestCreateSigner: Codable { /// to after declining to sign a document. /// Defining this URL overrides default or global /// declined redirect URL settings for a specific signer. - /// - loginRequired: If set to true, signer will need to login to a Box account + /// - loginRequired: If set to true, the signer will need to log in to a Box account /// before signing the request. If the signer does not have - /// an existing account, they will have an option to create - /// a free Box account. - /// - verificationPhoneNumber: If set, this phone number is be used to verify the signer - /// via two factor authentication before they are able to sign the document. + /// an existing account, they will have the option to create + /// a free Box account. Cannot be selected in combination with + /// `verification_phone_number`. + /// - verificationPhoneNumber: If set, this phone number will be used to verify the signer + /// via two-factor authentication before they are able to sign the document. + /// Cannot be selected in combination with `login_required`. /// - password: If set, the signer is required to enter the password before they are able /// to sign a document. This field is write only. /// - signerGroupId: If set, signers who have the same value will be assigned to the same input and to the same signer group. diff --git a/Sources/Schemas/SignRequestSigner/SignRequestSigner.swift b/Sources/Schemas/SignRequestSigner/SignRequestSigner.swift index 39349b35..570eb0c9 100644 --- a/Sources/Schemas/SignRequestSigner/SignRequestSigner.swift +++ b/Sources/Schemas/SignRequestSigner/SignRequestSigner.swift @@ -54,12 +54,14 @@ public class SignRequestSigner: SignRequestCreateSigner { /// to after declining to sign a document. /// Defining this URL overrides default or global /// declined redirect URL settings for a specific signer. - /// - loginRequired: If set to true, signer will need to login to a Box account + /// - loginRequired: If set to true, the signer will need to log in to a Box account /// before signing the request. If the signer does not have - /// an existing account, they will have an option to create - /// a free Box account. - /// - verificationPhoneNumber: If set, this phone number is be used to verify the signer - /// via two factor authentication before they are able to sign the document. + /// an existing account, they will have the option to create + /// a free Box account. Cannot be selected in combination with + /// `verification_phone_number`. + /// - verificationPhoneNumber: If set, this phone number will be used to verify the signer + /// via two-factor authentication before they are able to sign the document. + /// Cannot be selected in combination with `login_required`. /// - password: If set, the signer is required to enter the password before they are able /// to sign a document. This field is write only. /// - signerGroupId: If set, signers who have the same value will be assigned to the same input and to the same signer group. diff --git a/Tests/CollaborationAllowlistEntries/CollaborationAllowlistEntriesManagerTests.swift b/Tests/CollaborationAllowlistEntries/CollaborationAllowlistEntriesManagerTests.swift index 991f87e8..cd60836a 100644 --- a/Tests/CollaborationAllowlistEntries/CollaborationAllowlistEntriesManagerTests.swift +++ b/Tests/CollaborationAllowlistEntries/CollaborationAllowlistEntriesManagerTests.swift @@ -12,7 +12,7 @@ class CollaborationAllowlistEntriesManagerTests: XCTestCase { public func testCollaborationAllowlistEntries() async throws { let allowlist: CollaborationAllowlistEntries = try await client.collaborationAllowlistEntries.getCollaborationWhitelistEntries() XCTAssertTrue(allowlist.entries!.count >= 0) - let domain: String = "example.com" + let domain: String = "\(Utils.getUUID())\("example.com")" let newEntry: CollaborationAllowlistEntry = try await client.collaborationAllowlistEntries.createCollaborationWhitelistEntry(requestBody: CreateCollaborationWhitelistEntryRequestBody(domain: domain, direction: CreateCollaborationWhitelistEntryRequestBodyDirectionField.inbound)) XCTAssertTrue(Utils.Strings.toString(value: newEntry.type) == "collaboration_whitelist_entry") XCTAssertTrue(Utils.Strings.toString(value: newEntry.direction) == "inbound") diff --git a/Tests/FileMetadata/FileMetadataManagerTests.swift b/Tests/FileMetadata/FileMetadataManagerTests.swift index 0f920b38..432bfe30 100644 --- a/Tests/FileMetadata/FileMetadataManagerTests.swift +++ b/Tests/FileMetadata/FileMetadataManagerTests.swift @@ -18,11 +18,11 @@ class FileMetadataManagerTests: XCTestCase { XCTAssertTrue(Utils.Strings.toString(value: createdMetadata.scope) == "global") XCTAssertTrue(createdMetadata.version == 0) let receivedMetadata: MetadataFull = try await client.fileMetadata.getFileMetadataById(fileId: file.id, scope: GetFileMetadataByIdScope.global, templateKey: "properties") - XCTAssertTrue(receivedMetadata.extraData!["abc"] == "xyz") + XCTAssertTrue(Utils.Strings.toString(value: receivedMetadata.extraData!["abc"]) == "xyz") let newValue: String = "bar" try await client.fileMetadata.updateFileMetadataById(fileId: file.id, scope: UpdateFileMetadataByIdScope.global, templateKey: "properties", requestBody: [UpdateFileMetadataByIdRequestBody(op: UpdateFileMetadataByIdRequestBodyOpField.replace, path: "/abc", value: newValue)]) let receivedUpdatedMetadata: MetadataFull = try await client.fileMetadata.getFileMetadataById(fileId: file.id, scope: GetFileMetadataByIdScope.global, templateKey: "properties") - XCTAssertTrue(receivedUpdatedMetadata.extraData!["abc"] == newValue) + XCTAssertTrue(Utils.Strings.toString(value: receivedUpdatedMetadata.extraData!["abc"]) == newValue) try await client.fileMetadata.deleteFileMetadataById(fileId: file.id, scope: DeleteFileMetadataByIdScope.global, templateKey: "properties") await XCTAssertThrowsErrorAsync(try await client.fileMetadata.getFileMetadataById(fileId: file.id, scope: GetFileMetadataByIdScope.global, templateKey: "properties")) try await client.files.deleteFileById(fileId: file.id) diff --git a/Tests/FolderMetadata/FolderMetadataManagerTests.swift b/Tests/FolderMetadata/FolderMetadataManagerTests.swift index 38c9cd5e..e98b5811 100644 --- a/Tests/FolderMetadata/FolderMetadataManagerTests.swift +++ b/Tests/FolderMetadata/FolderMetadataManagerTests.swift @@ -18,11 +18,11 @@ class FolderMetadataManagerTests: XCTestCase { XCTAssertTrue(Utils.Strings.toString(value: createdMetadata.scope) == "global") XCTAssertTrue(createdMetadata.version == 0) let receivedMetadata: MetadataFull = try await client.folderMetadata.getFolderMetadataById(folderId: folder.id, scope: GetFolderMetadataByIdScope.global, templateKey: "properties") - XCTAssertTrue(receivedMetadata.extraData!["abc"] == "xyz") + XCTAssertTrue(Utils.Strings.toString(value: receivedMetadata.extraData!["abc"]) == "xyz") let newValue: String = "bar" try await client.folderMetadata.updateFolderMetadataById(folderId: folder.id, scope: UpdateFolderMetadataByIdScope.global, templateKey: "properties", requestBody: [UpdateFolderMetadataByIdRequestBody(op: UpdateFolderMetadataByIdRequestBodyOpField.replace, path: "/abc", value: newValue)]) let receivedUpdatedMetadata: MetadataFull = try await client.folderMetadata.getFolderMetadataById(folderId: folder.id, scope: GetFolderMetadataByIdScope.global, templateKey: "properties") - XCTAssertTrue(receivedUpdatedMetadata.extraData!["abc"] == newValue) + XCTAssertTrue(Utils.Strings.toString(value: receivedUpdatedMetadata.extraData!["abc"]) == newValue) try await client.folderMetadata.deleteFolderMetadataById(folderId: folder.id, scope: DeleteFolderMetadataByIdScope.global, templateKey: "properties") await XCTAssertThrowsErrorAsync(try await client.folderMetadata.getFolderMetadataById(folderId: folder.id, scope: GetFolderMetadataByIdScope.global, templateKey: "properties")) try await client.folders.deleteFolderById(folderId: folder.id) diff --git a/Tests/MetadataCascadePolicies/MetadataCascadePoliciesManagerTests.swift b/Tests/MetadataCascadePolicies/MetadataCascadePoliciesManagerTests.swift index 78d2fc96..079255df 100644 --- a/Tests/MetadataCascadePolicies/MetadataCascadePoliciesManagerTests.swift +++ b/Tests/MetadataCascadePolicies/MetadataCascadePoliciesManagerTests.swift @@ -28,8 +28,7 @@ class MetadataCascadePoliciesManagerTests: XCTestCase { let policies: MetadataCascadePolicies = try await client.metadataCascadePolicies.getMetadataCascadePolicies(queryParams: GetMetadataCascadePoliciesQueryParams(folderId: folder.id)) XCTAssertTrue(policies.entries!.count == 1) await XCTAssertThrowsErrorAsync(try await client.metadataCascadePolicies.applyMetadataCascadePolicy(metadataCascadePolicyId: cascadePolicyId, requestBody: ApplyMetadataCascadePolicyRequestBody(conflictResolution: ApplyMetadataCascadePolicyRequestBodyConflictResolutionField.overwrite))) - let data: [String: String] = ["testName": "xyz"] - try await client.folderMetadata.createFolderMetadataById(folderId: folder.id, scope: CreateFolderMetadataByIdScope.enterprise, templateKey: templateKey, requestBody: data) + try await client.folderMetadata.createFolderMetadataById(folderId: folder.id, scope: CreateFolderMetadataByIdScope.enterprise, templateKey: templateKey, requestBody: ["testName": "xyz"]) try await client.metadataCascadePolicies.applyMetadataCascadePolicy(metadataCascadePolicyId: cascadePolicyId, requestBody: ApplyMetadataCascadePolicyRequestBody(conflictResolution: ApplyMetadataCascadePolicyRequestBodyConflictResolutionField.overwrite)) try await client.metadataCascadePolicies.deleteMetadataCascadePolicyById(metadataCascadePolicyId: cascadePolicyId) await XCTAssertThrowsErrorAsync(try await client.metadataCascadePolicies.getMetadataCascadePolicyById(metadataCascadePolicyId: cascadePolicyId))