@@ -1578,6 +1578,11 @@ public protocol CiphersClientProtocol: AnyObject, Sendable {
15781578 */
15791579 func moveToOrganization( cipher: CipherView , organizationId: OrganizationId ) throws -> CipherView
15801580
1581+ /**
1582+ * Prepare ciphers for bulk share to an organization
1583+ */
1584+ func prepareCiphersForBulkShare( ciphers: [ CipherView ] , organizationId: OrganizationId , collectionIds: [ CollectionId ] ) async throws -> [ EncryptionContext ]
1585+
15811586}
15821587open class CiphersClient : CiphersClientProtocol , @unchecked Sendable {
15831588 fileprivate let handle : UInt64
@@ -1698,6 +1703,26 @@ open func moveToOrganization(cipher: CipherView, organizationId: OrganizationId)
16981703} )
16991704}
17001705
1706+ /**
1707+ * Prepare ciphers for bulk share to an organization
1708+ */
1709+ open func prepareCiphersForBulkShare( ciphers: [ CipherView ] , organizationId: OrganizationId , collectionIds: [ CollectionId ] ) async throws -> [ EncryptionContext ] {
1710+ return
1711+ try await uniffiRustCallAsync (
1712+ rustFutureFunc: {
1713+ uniffi_bitwarden_uniffi_fn_method_ciphersclient_prepare_ciphers_for_bulk_share (
1714+ self . uniffiCloneHandle ( ) ,
1715+ FfiConverterSequenceTypeCipherView . lower ( ciphers) , FfiConverterTypeOrganizationId_lower ( organizationId) , FfiConverterSequenceTypeCollectionId . lower ( collectionIds)
1716+ )
1717+ } ,
1718+ pollFunc: ffi_bitwarden_uniffi_rust_future_poll_rust_buffer,
1719+ completeFunc: ffi_bitwarden_uniffi_rust_future_complete_rust_buffer,
1720+ freeFunc: ffi_bitwarden_uniffi_rust_future_free_rust_buffer,
1721+ liftFunc: FfiConverterSequenceTypeEncryptionContext . lift,
1722+ errorHandler: FfiConverterTypeBitwardenError_lift
1723+ )
1724+ }
1725+
17011726}
17021727
17031728
@@ -7527,6 +7552,31 @@ fileprivate struct FfiConverterSequenceTypeCipherView: FfiConverterRustBuffer {
75277552 }
75287553}
75297554
7555+ #if swift(>=5.8)
7556+ @_documentation ( visibility: private)
7557+ #endif
7558+ fileprivate struct FfiConverterSequenceTypeEncryptionContext : FfiConverterRustBuffer {
7559+ typealias SwiftType = [ EncryptionContext ]
7560+
7561+ public static func write( _ value: [ EncryptionContext ] , into buf: inout [ UInt8 ] ) {
7562+ let len = Int32 ( value. count)
7563+ writeInt ( & buf, len)
7564+ for item in value {
7565+ FfiConverterTypeEncryptionContext . write ( item, into: & buf)
7566+ }
7567+ }
7568+
7569+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> [ EncryptionContext ] {
7570+ let len : Int32 = try readInt ( & buf)
7571+ var seq = [ EncryptionContext] ( )
7572+ seq. reserveCapacity ( Int ( len) )
7573+ for _ in 0 ..< len {
7574+ seq. append ( try FfiConverterTypeEncryptionContext . read ( from: & buf) )
7575+ }
7576+ return seq
7577+ }
7578+ }
7579+
75307580#if swift(>=5.8)
75317581@_documentation ( visibility: private)
75327582#endif
@@ -7652,6 +7702,31 @@ fileprivate struct FfiConverterSequenceTypePasswordHistoryView: FfiConverterRust
76527702 }
76537703}
76547704
7705+ #if swift(>=5.8)
7706+ @_documentation ( visibility: private)
7707+ #endif
7708+ fileprivate struct FfiConverterSequenceTypeCollectionId : FfiConverterRustBuffer {
7709+ typealias SwiftType = [ CollectionId ]
7710+
7711+ public static func write( _ value: [ CollectionId ] , into buf: inout [ UInt8 ] ) {
7712+ let len = Int32 ( value. count)
7713+ writeInt ( & buf, len)
7714+ for item in value {
7715+ FfiConverterTypeCollectionId . write ( item, into: & buf)
7716+ }
7717+ }
7718+
7719+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> [ CollectionId ] {
7720+ let len : Int32 = try readInt ( & buf)
7721+ var seq = [ CollectionId] ( )
7722+ seq. reserveCapacity ( Int ( len) )
7723+ for _ in 0 ..< len {
7724+ seq. append ( try FfiConverterTypeCollectionId . read ( from: & buf) )
7725+ }
7726+ return seq
7727+ }
7728+ }
7729+
76557730#if swift(>=5.8)
76567731@_documentation ( visibility: private)
76577732#endif
@@ -7893,6 +7968,9 @@ private let initializationResult: InitializationResult = {
78937968 if ( uniffi_bitwarden_uniffi_checksum_method_ciphersclient_move_to_organization ( ) != 57722 ) {
78947969 return InitializationResult . apiChecksumMismatch
78957970 }
7971+ if ( uniffi_bitwarden_uniffi_checksum_method_ciphersclient_prepare_ciphers_for_bulk_share ( ) != 63676 ) {
7972+ return InitializationResult . apiChecksumMismatch
7973+ }
78967974 if ( uniffi_bitwarden_uniffi_checksum_method_client_auth ( ) != 4128 ) {
78977975 return InitializationResult . apiChecksumMismatch
78987976 }
@@ -8168,17 +8246,17 @@ private let initializationResult: InitializationResult = {
81688246 uniffiCallbackInitFido2CredentialStore ( )
81698247 uniffiCallbackInitFido2UserInterface ( )
81708248 uniffiCallbackInitFolderRepository ( )
8171- uniffiEnsureBitwardenCryptoInitialized ( )
8172- uniffiEnsureBitwardenEncodingInitialized ( )
8173- uniffiEnsureBitwardenStateInitialized ( )
81748249 uniffiEnsureBitwardenSendInitialized ( )
8175- uniffiEnsureBitwardenGeneratorsInitialized ( )
81768250 uniffiEnsureBitwardenCollectionsInitialized ( )
8177- uniffiEnsureBitwardenFidoInitialized ( )
8178- uniffiEnsureBitwardenVaultInitialized ( )
8179- uniffiEnsureBitwardenExportersInitialized ( )
81808251 uniffiEnsureBitwardenSshInitialized ( )
8252+ uniffiEnsureBitwardenExportersInitialized ( )
8253+ uniffiEnsureBitwardenCryptoInitialized ( )
8254+ uniffiEnsureBitwardenGeneratorsInitialized ( )
8255+ uniffiEnsureBitwardenEncodingInitialized ( )
81818256 uniffiEnsureBitwardenCoreInitialized ( )
8257+ uniffiEnsureBitwardenFidoInitialized ( )
8258+ uniffiEnsureBitwardenVaultInitialized ( )
8259+ uniffiEnsureBitwardenStateInitialized ( )
81828260 return InitializationResult . ok
81838261} ( )
81848262
0 commit comments