@bitwarden/cli
Version:
A secure and free password manager for all of your devices.
860 lines (847 loc) • 3.8 MB
JavaScript
#!/usr/bin/env node
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 431
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $1F: () => (/* binding */ __wbg_instanceof_IdbRequest_6a0e24572d4f1d46),
/* harmony export */ $85: () => (/* binding */ __wbg_resolve_ae8d83246e5bcc12),
/* harmony export */ $Uo: () => (/* binding */ __wbindgen_cast_000000000000000a),
/* harmony export */ $bb: () => (/* binding */ LogLevel),
/* harmony export */ $g3: () => (/* binding */ __wbg_set_headers_3c8fecc693b75327),
/* harmony export */ $iT: () => (/* binding */ __wbg_append_608dfb635ee8998f),
/* harmony export */ $jp: () => (/* binding */ __wbg_slice_f3fd3c2bec9310f6),
/* harmony export */ AEJ: () => (/* binding */ __wbg_addEventListener_3d8de3b0a3355b64),
/* harmony export */ ANT: () => (/* binding */ __wbg_mark_310e9a031ccc84ff),
/* harmony export */ A_M: () => (/* binding */ __wbg_close_cbf870bdad0aad99),
/* harmony export */ B8s: () => (/* binding */ __wbg___wbindgen_jsval_eq_ee31bfad3e536463),
/* harmony export */ BHc: () => (/* binding */ __wbg_append_bbf73d7e78ce268c),
/* harmony export */ BJo: () => (/* binding */ __wbg_get_bb37eac6ac539a58),
/* harmony export */ BQ0: () => (/* binding */ __wbg_respond_e286ee502e7cf7e4),
/* harmony export */ BZb: () => (/* binding */ __wbindgen_object_clone_ref),
/* harmony export */ Bk1: () => (/* binding */ __wbg_get_6056efe32134faed),
/* harmony export */ CPq: () => (/* binding */ __wbg_get_user_key_9f4a2b9c32c4bbc0),
/* harmony export */ CYs: () => (/* binding */ __wbg_get_client_name_9cd0c5575296f1b2),
/* harmony export */ CnV: () => (/* binding */ __wbg_new_0_1dcafdf5e786e876),
/* harmony export */ Crs: () => (/* binding */ __wbg_set_account_cryptographic_state_a074784ff2f86543),
/* harmony export */ D4x: () => (/* binding */ __wbg_debug_271c16e6de0bc226),
/* harmony export */ D6r: () => (/* binding */ __wbg___wbindgen_string_get_395e606bd0ee4427),
/* harmony export */ D70: () => (/* binding */ __wbg_list_fd6a77862b6d1141),
/* harmony export */ DL0: () => (/* binding */ __wbg_error_a6fa202b58aa1cd3),
/* harmony export */ DMn: () => (/* binding */ __wbg_error_1eece6b0039034ce),
/* harmony export */ DOu: () => (/* binding */ __wbg_static_accessor_GLOBAL_8adb955bd33fac2f),
/* harmony export */ Dbn: () => (/* binding */ __wbg_value_21fc78aab0322612),
/* harmony export */ Don: () => (/* binding */ __wbg_send_dff48d066ea20b55),
/* harmony export */ DxH: () => (/* binding */ __wbg_iterator_d8f549ec8fb061b1),
/* harmony export */ E5T: () => (/* binding */ __wbg_put_f1673d719f93ce22),
/* harmony export */ E9s: () => (/* binding */ __wbg_measure_54743279e77e77bb),
/* harmony export */ EuX: () => (/* binding */ __wbg_list_eb1d5eaa0c24017f),
/* harmony export */ FLi: () => (/* binding */ __wbg_clear_v2_upgrade_token_c6d1a4582707adc3),
/* harmony export */ FjX: () => (/* binding */ __wbg_stringify_5ae93966a84901ac),
/* harmony export */ G0e: () => (/* binding */ __wbindgen_cast_0000000000000008),
/* harmony export */ G0m: () => (/* binding */ __wbg_removeAll_4fb530a881aad2c3),
/* harmony export */ GE9: () => (/* binding */ __wbg_text_372f5b91442c50f9),
/* harmony export */ Geh: () => (/* binding */ init_sdk),
/* harmony export */ Gg9: () => (/* binding */ __wbg_String_8564e559799eccda),
/* harmony export */ Gjz: () => (/* binding */ __wbg_new_with_u8_array_sequence_and_options_de38f663e19ad899),
/* harmony export */ H4J: () => (/* binding */ __wbg_close_690d36108c557337),
/* harmony export */ HQp: () => (/* binding */ __wbg_call_e133b57c9155d22c),
/* harmony export */ HcU: () => (/* binding */ __wbg_now_16f0c993d5dd6c27),
/* harmony export */ HoS: () => (/* binding */ __wbg_queueMicrotask_0c399741342fb10f),
/* harmony export */ HvI: () => (/* binding */ __wbg_ipcclientsubscription_new),
/* harmony export */ HyI: () => (/* binding */ __wbg_user_key_state_e261cc6e2cd57001),
/* harmony export */ IAB: () => (/* binding */ __wbg_get_with_ref_key_6412cf3094599694),
/* harmony export */ IEs: () => (/* binding */ PureCrypto),
/* harmony export */ IF6: () => (/* binding */ __wbg_new_with_str_and_init_b4b54d1a819bc724),
/* harmony export */ IRJ: () => (/* binding */ __wbg_getTime_1dad7b5386ddd2d9),
/* harmony export */ IZ7: () => (/* binding */ __wbg_entries_e8a20ff8c9757101),
/* harmony export */ I_x: () => (/* binding */ __wbg_removeBulk_1a95fc3490ec5ba4),
/* harmony export */ Ib0: () => (/* binding */ __wbg_error_74898554122344a8),
/* harmony export */ Ir8: () => (/* binding */ __wbg_removeAll_1686f6a9ad798af1),
/* harmony export */ ItZ: () => (/* binding */ __wbg_removeAll_2012be847884afdd),
/* harmony export */ JTH: () => (/* binding */ __wbg_read_7f593a961a7f80ed),
/* harmony export */ JdB: () => (/* binding */ __wbg_url_7fefc1820fba4e0c),
/* harmony export */ Jrc: () => (/* binding */ __wbg_get_encrypted_pin_05411136d124139d),
/* harmony export */ K60: () => (/* binding */ __wbg_enqueue_ec3552838b4b7fbf),
/* harmony export */ KXD: () => (/* binding */ __wbg_close_737b4b1fbc658540),
/* harmony export */ KiH: () => (/* binding */ __wbg_get_unchecked_329cfe50afab7352),
/* harmony export */ Kqd: () => (/* binding */ __wbg_get_326e41e095fb2575),
/* harmony export */ Kyl: () => (/* binding */ __wbg__wbg_cb_unref_6b5b6b8576d35cb1),
/* harmony export */ L2x: () => (/* binding */ __wbg_setTimeout_56bcdccbad22fd44),
/* harmony export */ L9h: () => (/* binding */ __wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913),
/* harmony export */ LRR: () => (/* binding */ __wbg_getReader_9facd4f899beac89),
/* harmony export */ LTX: () => (/* binding */ __wbg_get_done_d0ab690f8df5501f),
/* harmony export */ LlB: () => (/* binding */ __wbg_isArray_33b91feb269ff46e),
/* harmony export */ M2g: () => (/* binding */ __wbg_list_users_ffbaeb1cdfb59680),
/* harmony export */ M8x: () => (/* binding */ __wbg_view_f68a712e7315f8b2),
/* harmony export */ MB3: () => (/* binding */ __wbg_new_49d5571bd3f0c4d4),
/* harmony export */ MB6: () => (/* binding */ __wbg_append_83e47d4b428d97aa),
/* harmony export */ Mc5: () => (/* binding */ __wbg_target_7bc90f314634b37b),
/* harmony export */ N$n: () => (/* binding */ __wbg_get_masterpassword_unlock_data_06171cf90ccde503),
/* harmony export */ N2F: () => (/* binding */ __wbg_get_896f4aaf48f955c9),
/* harmony export */ N93: () => (/* binding */ __wbg_append_48b3d4fc4c97ab8d),
/* harmony export */ NAj: () => (/* binding */ __wbg_get_3ef1eba1850ade27),
/* harmony export */ NCs: () => (/* binding */ __wbindgen_cast_0000000000000007),
/* harmony export */ NRA: () => (/* binding */ __wbindgen_cast_0000000000000001),
/* harmony export */ NTA: () => (/* binding */ SendType),
/* harmony export */ NTR: () => (/* binding */ __wbg_setBulk_3f0db63f92ba5b45),
/* harmony export */ NX2: () => (/* binding */ __wbg_getAll_690f659b57ae2d51),
/* harmony export */ Ney: () => (/* binding */ __wbg_new_with_length_3259a525196bd8cc),
/* harmony export */ Nm_: () => (/* binding */ __wbg_mark_742962d66a858cc5),
/* harmony export */ Nz0: () => (/* binding */ __wbg_queueMicrotask_a082d78ce798393e),
/* harmony export */ O0d: () => (/* binding */ __wbg_unlock_user_bbb3a44f2a0e9bae),
/* harmony export */ OCE: () => (/* binding */ __wbg_remove_643f114c5e71f740),
/* harmony export */ OOP: () => (/* binding */ __wbg_set_name_55070a3388f8b72f),
/* harmony export */ OnO: () => (/* binding */ __wbg_byteOffset_b26b63681c83856c),
/* harmony export */ P1S: () => (/* binding */ __wbg_send_f7a2e2504c7d3168),
/* harmony export */ P6: () => (/* binding */ __wbg_removeBulk_c05f49e04eda8512),
/* harmony export */ PBZ: () => (/* binding */ __wbg_set_v2_upgrade_token_409bc758f69738af),
/* harmony export */ PC6: () => (/* binding */ __wbg_debug_4b9b1a2d5972be57),
/* harmony export */ PUO: () => (/* binding */ FieldType),
/* harmony export */ PUW: () => (/* binding */ __wbindgen_cast_0000000000000005),
/* harmony export */ Pcj: () => (/* binding */ __wbg_set_cache_ec7e430c6056ebda),
/* harmony export */ Q8K: () => (/* binding */ __wbg_get_v2_upgrade_token_01248971e9bc249a),
/* harmony export */ QB4: () => (/* binding */ __wbg_local_user_data_key_state_82edfb5bdcf9e8f8),
/* harmony export */ R6N: () => (/* binding */ __wbg_setBulk_191ebc76b4fa8380),
/* harmony export */ RKI: () => (/* binding */ __wbg_isSafeInteger_ecd6a7f9c3e053cd),
/* harmony export */ RRY: () => (/* binding */ CryptoClient),
/* harmony export */ RVL: () => (/* binding */ __wbg_body_ac1dad652946e6da),
/* harmony export */ Rr9: () => (/* binding */ __wbg_instanceof_Map_f194b366846aca0c),
/* harmony export */ Rzd: () => (/* binding */ __wbg_name_7a3bbd030d0afa16),
/* harmony export */ S9q: () => (/* binding */ __wbg_get_biometrics_status_7440f7f0874c6044),
/* harmony export */ SQ0: () => (/* binding */ __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6),
/* harmony export */ SWp: () => (/* binding */ __wbg_new_ab79df5bd7c26067),
/* harmony export */ SbO: () => (/* binding */ __wbg_releaseLock_ef7766a5da654ff8),
/* harmony export */ St$: () => (/* binding */ __wbg_incomingmessage_new),
/* harmony export */ TGt: () => (/* binding */ __wbg_clear_encrypted_pin_71bf85f1d7414e45),
/* harmony export */ TfU: () => (/* binding */ __wbg_getRandomValues_a697888e9ba1eee3),
/* harmony export */ Tu9: () => (/* binding */ __wbg_getRandomValues_76dfc69825c9c552),
/* harmony export */ U53: () => (/* binding */ __wbg_Error_83742b46f01ce22d),
/* harmony export */ UEv: () => (/* binding */ __wbg___wbindgen_is_string_7ef6b97b02428fae),
/* harmony export */ ULw: () => (/* binding */ __wbg_set_type_33e79f1b45a78c37),
/* harmony export */ UNz: () => (/* binding */ __wbg_get_417b576752f76b04),
/* harmony export */ UOi: () => (/* binding */ __wbg_set_ephemeral_pin_envelope_042d02d71b441b25),
/* harmony export */ U_B: () => (/* binding */ __wbindgen_cast_0000000000000002),
/* harmony export */ UeG: () => (/* binding */ __wbindgen_cast_0000000000000006),
/* harmony export */ Ugb: () => (/* binding */ __wbindgen_cast_000000000000000b),
/* harmony export */ UmX: () => (/* binding */ __wbg_removeBulk_9af084eb07ec6e39),
/* harmony export */ VFZ: () => (/* binding */ __wbg_byteLength_607b856aa6c5a508),
/* harmony export */ VG1: () => (/* binding */ __wbg_new_c518c60af666645b),
/* harmony export */ VTo: () => (/* binding */ __wbg_buffer_60b8043cd926067d),
/* harmony export */ VWO: () => (/* binding */ __wbg___wbindgen_is_bigint_e2141d4f045b7eda),
/* harmony export */ Vav: () => (/* binding */ __wbg_removeBulk_05f57efdc87bce7c),
/* harmony export */ Vki: () => (/* binding */ __wbg_abort_6479c2d794ebf2ee),
/* harmony export */ Vqp: () => (/* binding */ __wbg_set_onsuccess_fca94ded107b64af),
/* harmony export */ Vup: () => (/* binding */ __wbg_clear_user_key_271853b8a695d882),
/* harmony export */ Weo: () => (/* binding */ __wbg_get_c9bda7efc6284f90),
/* harmony export */ Wh6: () => (/* binding */ __wbg_warn_809cad1bfc2b3a42),
/* harmony export */ Ww_: () => (/* binding */ __wbindgen_cast_0000000000000004),
/* harmony export */ X4S: () => (/* binding */ __wbg_set_11f0bb7f109c877d),
/* harmony export */ XVj: () => (/* binding */ __wbg_removeAll_aa8f78dbb85a8bb0),
/* harmony export */ X_E: () => (/* binding */ __wbg___wbindgen_boolean_get_c0f3f60bac5a78d1),
/* harmony export */ XpY: () => (/* binding */ __wbindgen_cast_0000000000000010),
/* harmony export */ YDY: () => (/* binding */ __wbg_list_915cd50f6d74c7a8),
/* harmony export */ YIv: () => (/* binding */ __wbg___wbindgen_throw_6ddd609b62940d55),
/* harmony export */ YRU: () => (/* binding */ __wbg_setBulk_5b4a4ca2482f3916),
/* harmony export */ YRg: () => (/* binding */ __wbg_setTimeout_3a808dd861dd3c12),
/* harmony export */ Yjw: () => (/* binding */ __wbg_new_98e187f8aa8916fe),
/* harmony export */ Ykw: () => (/* binding */ __wbg_set_mode_5a87f2c809cf37c2),
/* harmony export */ YrG: () => (/* binding */ __wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b),
/* harmony export */ ZIt: () => (/* binding */ __wbg_get_persistent_pin_envelope_8db7ede9792f9a10),
/* harmony export */ ZaO: () => (/* binding */ __wbg_removeAll_8bd9c7bc9cb767e4),
/* harmony export */ ZvE: () => (/* binding */ __wbg_list_bddd5955ef9970cc),
/* harmony export */ ZxQ: () => (/* binding */ OrganizationUserStatusType),
/* harmony export */ _9k: () => (/* binding */ __wbg_save_60aa257e5f92e97d),
/* harmony export */ _G4: () => (/* binding */ __wbg_get_f6174f7c2596deec),
/* harmony export */ _P4: () => (/* binding */ __wbg_info_7d4e223bb1a7e671),
/* harmony export */ _Rr: () => (/* binding */ __wbg___wbindgen_is_object_781bc9f159099513),
/* harmony export */ _WK: () => (/* binding */ __wbg_Number_a5a435bd7bbec835),
/* harmony export */ _di: () => (/* binding */ __wbg_list_7ad8912c66d7ab35),
/* harmony export */ _ov: () => (/* binding */ __wbg_suppress_vault_timeout_27b3df935087e2a7),
/* harmony export */ _xL: () => (/* binding */ __wbg___wbindgen_debug_string_5398f5bb970e0daa),
/* harmony export */ aIg: () => (/* binding */ __wbg_get_user_key_08f334b2f58bb3e6),
/* harmony export */ aLo: () => (/* binding */ __wbg_call_2d781c1f4d5c0ef8),
/* harmony export */ aPr: () => (/* binding */ __wbg_remove_a86a9bfb00df4a36),
/* harmony export */ aWS: () => (/* binding */ __wbg_get_vault_url_24ef944d1c433b8b),
/* harmony export */ acE: () => (/* binding */ __wbg_measure_cd1f7667d5f5517d),
/* harmony export */ ajr: () => (/* binding */ __wbg_get_1fee6ed9135a7205),
/* harmony export */ aq5: () => (/* binding */ __wbg_catch_d7ed0375ab6532a5),
/* harmony export */ b$l: () => (/* binding */ __wbindgen_cast_0000000000000003),
/* harmony export */ b3E: () => (/* binding */ __wbg_set_signal_0cebecb698f25d21),
/* harmony export */ b90: () => (/* binding */ __wbg_stack_3b0d974bbf31e44f),
/* harmony export */ bCU: () => (/* binding */ __wbg_cancel_79b3bea07a1028e7),
/* harmony export */ bRe: () => (/* binding */ __wbg_new_d15cb560a6a0e5f0),
/* harmony export */ bSo: () => (/* binding */ __wbg_subarray_a068d24e39478a8a),
/* harmony export */ bWd: () => (/* binding */ __wbindgen_cast_0000000000000009),
/* harmony export */ bYK: () => (/* binding */ __wbindgen_cast_000000000000000e),
/* harmony export */ b_Y: () => (/* binding */ __wbg_clear_ephemeral_pin_envelope_cb708c379bdf22e7),
/* harmony export */ bcp: () => (/* binding */ __wbg_fetch_074561c3e313c86f),
/* harmony export */ bhM: () => (/* binding */ __wbg_unlock_biometrics_ef9846ac18e3eae8),
/* harmony export */ bkt: () => (/* binding */ __wbindgen_object_drop_ref),
/* harmony export */ bnN: () => (/* binding */ import_ssh_key),
/* harmony export */ c4$: () => (/* binding */ __wbindgen_cast_0000000000000011),
/* harmony export */ cH4: () => (/* binding */ __wbg_error_8d9a8e04cd1d3588),
/* harmony export */ cKH: () => (/* binding */ __wbg_set_7eaa4f96924fd6b3),
/* harmony export */ cM: () => (/* binding */ __wbg_new_with_byte_offset_and_length_b2ec5bf7b2f35743),
/* harmony export */ cPU: () => (/* binding */ PasswordManagerClient),
/* harmony export */ ccF: () => (/* binding */ __wbg_lock_user_b204349d2e0e9452),
/* harmony export */ cmn: () => (/* binding */ __wbg_set_282384002438957f),
/* harmony export */ cnm: () => (/* binding */ __wbindgen_cast_0000000000000013),
/* harmony export */ dNJ: () => (/* binding */ __wbg_transaction_3223f7c8d0f40129),
/* harmony export */ dPP: () => (/* binding */ __wbg_set_onerror_8a268cb237177bba),
/* harmony export */ d_3: () => (/* binding */ __wbg_instanceof_DomException_2bdcf7791a2d7d09),
/* harmony export */ eZq: () => (/* binding */ isImportError),
/* harmony export */ eu7: () => (/* binding */ __wbg___wbindgen_is_function_3c846841762788c1),
/* harmony export */ fJd: () => (/* binding */ __wbg_setBulk_d9de78a2bae2aa04),
/* harmony export */ fbw: () => (/* binding */ __wbg_set_encrypted_pin_34ada8a1153de63c),
/* harmony export */ fjU: () => (/* binding */ __wbg_get_account_cryptographic_state_0c9b64fd91a07b73),
/* harmony export */ fmd: () => (/* binding */ __wbg_set_d15d8e99bf97a21a),
/* harmony export */ gCH: () => (/* binding */ CipherType),
/* harmony export */ giu: () => (/* binding */ __wbindgen_cast_000000000000000f),
/* harmony export */ gkX: () => (/* binding */ isCryptoError),
/* harmony export */ h46: () => (/* binding */ __wbg_set_variant_ff54f670c6ba7b2e),
/* harmony export */ hQb: () => (/* binding */ __wbg_set_8b50ee72dd493ef3),
/* harmony export */ hTz: () => (/* binding */ AuthType),
/* harmony export */ hVt: () => (/* binding */ __wbg_set_credentials_ed63183445882c65),
/* harmony export */ hjS: () => (/* binding */ __wbg_new_a70fbab9066b301f),
/* harmony export */ hlF: () => (/* binding */ __wbg_remove_bb31f168e8b64ede),
/* harmony export */ hxw: () => (/* binding */ __wbg_performance_3fcf6e32a7e1ed0a),
/* harmony export */ i2O: () => (/* binding */ __wbg_removeAll_e7f3811c379762d2),
/* harmony export */ iAY: () => (/* binding */ __wbindgen_cast_000000000000000d),
/* harmony export */ iEd: () => (/* binding */ __wbg_static_accessor_WINDOW_bb9f1ba69d61b386),
/* harmony export */ imW: () => (/* binding */ __wbg_set_5024d4c6948dcf1b),
/* harmony export */ inD: () => (/* binding */ __wbg_get_value_548ae6adf5a174e4),
/* harmony export */ irN: () => (/* binding */ __wbg_preventDefault_25a229bfe5c510f8),
/* harmony export */ ivJ: () => (/* binding */ __wbg_clear_masterpassword_unlock_data_0b51c4c2827a6cf9),
/* harmony export */ iz_: () => (/* binding */ __wbg_byobRequest_6342e5f2b232c0f9),
/* harmony export */ j$C: () => (/* binding */ __wbg_set_e7530cea7f84d0ae),
/* harmony export */ j2W: () => (/* binding */ __wbg_set_8c0b3ffcf05d61c2),
/* harmony export */ jGn: () => (/* binding */ __wbindgen_cast_0000000000000012),
/* harmony export */ jTc: () => (/* binding */ __wbg_remove_778eecbc399ff1ac),
/* harmony export */ jXz: () => (/* binding */ __wbg_getFullYear_f6d84c054eee1543),
/* harmony export */ jY2: () => (/* binding */ __wbg_get_a8ee5c45dabc1b3b),
/* harmony export */ jZD: () => (/* binding */ __wbg_remove_82fb1ad9be90170e),
/* harmony export */ joy: () => (/* binding */ __wbg_status_318629ab93a22955),
/* harmony export */ kMP: () => (/* binding */ __wbg___wbindgen_is_null_0b605fc6b167c56f),
/* harmony export */ kQt: () => (/* binding */ __wbg_set_masterpassword_unlock_data_1c95fb9bc42b96cc),
/* harmony export */ kSo: () => (/* binding */ __wbg_then_098abe61755d12f6),
/* harmony export */ kau: () => (/* binding */ __wbg_set_persistent_pin_envelope_d39b5c1abd31bab7),
/* harmony export */ ko8: () => (/* binding */ __wbg_length_b3416cf66a5452c8),
/* harmony export */ ksV: () => (/* binding */ __wbg_removeBulk_8a32aab1dcd1fe1d),
/* harmony export */ kyq: () => (/* binding */ __wbg_removeBulk_3f390516e7a5b491),
/* harmony export */ lI6: () => (/* binding */ __wbg_folder_e52fae00c228e8e1),
/* harmony export */ lIU: () => (/* binding */ __wbg_set_wasm),
/* harmony export */ lUx: () => (/* binding */ __wbg_has_926ef2ff40b308cf),
/* harmony export */ lcU: () => (/* binding */ __wbg_push_e87b0e732085a946),
/* harmony export */ lsE: () => (/* binding */ __wbg_set_bf7251625df30a02),
/* harmony export */ lw3: () => (/* binding */ __wbg_organization_shared_key_2dd56ddf0c639663),
/* harmony export */ lw9: () => (/* binding */ __wbg_abort_5ef96933660780b7),
/* harmony export */ mEN: () => (/* binding */ __wbg_list_bb57346f8defa64b),
/* harmony export */ mEQ: () => (/* binding */ __wbg_list_b0754e660bb9f2e2),
/* harmony export */ mXs: () => (/* binding */ __wbg_new_227d7c05414eb861),
/* harmony export */ mbo: () => (/* binding */ SdkRandomNumberClient),
/* harmony export */ mp6: () => (/* binding */ __wbg_setBulk_492dda5a1365ca59),
/* harmony export */ mrC: () => (/* binding */ __wbg_set_user_key_8abdbcc46cc6ad78),
/* harmony export */ muV: () => (/* binding */ __wbg_new_from_slice_22da9388ac046e50),
/* harmony export */ my: () => (/* binding */ __wbg_signal_166e1da31adcac18),
/* harmony export */ nR2: () => (/* binding */ __wbg_arrayBuffer_eb8e9ca620af2a19),
/* harmony export */ nRH: () => (/* binding */ __wbg_new_with_length_825018a1616e9e55),
/* harmony export */ nZ: () => (/* binding */ __wbg_result_c5baa2d3d690a01a),
/* harmony export */ nq3: () => (/* binding */ __wbg_static_accessor_SELF_f207c857566db248),
/* harmony export */ nsp: () => (/* binding */ __wbg_clearTimeout_333bba87532ab9d3),
/* harmony export */ o1H: () => (/* binding */ __wbg_new_0837727332ac86ba),
/* harmony export */ oZC: () => (/* binding */ __wbg_fetch_5550a88cf343aaa9),
/* harmony export */ ol7: () => (/* binding */ __wbg_prototypesetcall_d62e5099504357e6),
/* harmony export */ pPt: () => (/* binding */ __wbg___wbindgen_bigint_get_as_i64_447a76b5c6ef7bda),
/* harmony export */ pQh: () => (/* binding */ __wbg_set_6be42768c690e380),
/* harmony export */ pUe: () => (/* binding */ __wbg_get_6ac8c8119f577720),
/* harmony export */ p_4: () => (/* binding */ __wbg_get_access_token_ec29582c5e35466b),
/* harmony export */ pc: () => (/* binding */ __wbindgen_cast_000000000000000c),
/* harmony export */ phP: () => (/* binding */ __wbg_get_744e34962ff53303),
/* harmony export */ pkv: () => (/* binding */ __wbg_info_0194681687b5ab04),
/* harmony export */ pql: () => (/* binding */ __wbg_new_5cfc6a14488ab25a),
/* harmony export */ pwX: () => (/* binding */ __wbg_set_03ea3eaef7be47df),
/* harmony export */ qKX: () => (/* binding */ __wbg_setBulk_0359d9909531431b),
/* harmony export */ r3k: () => (/* binding */ __wbg_instanceof_Uint8Array_740438561a5b956d),
/* harmony export */ r8w: () => (/* binding */ __wbg_clear_persistent_pin_envelope_9af9ce9923a7b3e6),
/* harmony export */ rIV: () => (/* binding */ __wbg_setBulk_11b7a5a34b462c37),
/* harmony export */ rRx: () => (/* binding */ __wbg_remove_b217f79898b1301d),
/* harmony export */ rU4: () => (/* binding */ __wbg_headers_eb2234545f9ff993),
/* harmony export */ s7n: () => (/* binding */ __wbg_remove_f2bdd169bc80c7ce),
/* harmony export */ sCD: () => (/* binding */ __wbg_set_943eb330278c4ce4),
/* harmony export */ sIo: () => (/* binding */ __wbg_length_ea16607d7b61445b),
/* harmony export */ sjv: () => (/* binding */ __wbg_now_e7c6795a7f81e10f),
/* harmony export */ szO: () => (/* binding */ __wbg_new_5f486cdf45a04d78),
/* harmony export */ tCB: () => (/* binding */ __wbg_delete_40db93c05c546fb9),
/* harmony export */ tPr: () => (/* binding */ __wbg_static_accessor_performance_7f6ecf1ec56b9bbe),
/* harmony export */ tb_: () => (/* binding */ __wbg_then_9e335f6dd892bc11),
/* harmony export */ teL: () => (/* binding */ __wbg_now_c6d7a7d35f74f6f1),
/* harmony export */ tff: () => (/* binding */ __wbg_collectionviewnodeitem_new),
/* harmony export */ tmP: () => (/* binding */ __wbg___wbindgen_is_undefined_52709e72fb9f179c),
/* harmony export */ ttN: () => (/* binding */ PolicyType),
/* harmony export */ tyK: () => (/* binding */ __wbg_get_ephemeral_pin_envelope_f4be0da59411d0fa),
/* harmony export */ uE4: () => (/* binding */ __wbg_get_d040b5ceb31c8360),
/* harmony export */ uND: () => (/* binding */ __wbg_set_body_a3d856b097dfda04),
/* harmony export */ uO9: () => (/* binding */ __wbg___wbindgen_in_41dbb8413020e076),
/* harmony export */ uny: () => (/* binding */ __wbg_signal_1d082171358a3104),
/* harmony export */ uyV: () => (/* binding */ __wbg_entries_5b8fe91cea59610e),
/* harmony export */ v$b: () => (/* binding */ __wbg_next_e01a967809d1aa68),
/* harmony export */ vEg: () => (/* binding */ __wbg_remove_257e3436b7948e5c),
/* harmony export */ vdI: () => (/* binding */ __wbg_instanceof_Response_9b4d9fd451e051b1),
/* harmony export */ vo_: () => (/* binding */ __wbg_acquireCookies_885af914fa9a89b1),
/* harmony export */ vs4: () => (/* binding */ __wbg_create_e9e35ffcb49d7084),
/* harmony export */ w43: () => (/* binding */ __wbg_abort_60dcb252ae0031fc),
/* harmony export */ w8s: () => (/* binding */ __wbg_ephemeral_pin_envelope_state_33cc648e3ba85111),
/* harmony export */ wM_: () => (/* binding */ __wbg_save_6386e4c2a792df62),
/* harmony export */ wPe: () => (/* binding */ __wbg_cipher_d701ffa203591c5e),
/* harmony export */ xGw: () => (/* binding */ __wbg_next_11b99ee6237339e3),
/* harmony export */ xi8: () => (/* binding */ __wbg_removeBulk_db1f3cab403ac801),
/* harmony export */ xiA: () => (/* binding */ __wbg_clearTimeout_3629d6209dfcc46e),
/* harmony export */ xuz: () => (/* binding */ __wbg___wbindgen_number_get_34bb9d9dcfa21373),
/* harmony export */ y2Z: () => (/* binding */ __wbg_done_08ce71ee07e3bd17),
/* harmony export */ y5K: () => (/* binding */ __wbg_set_method_8c015e8bcafd7be1),
/* harmony export */ y6D: () => (/* binding */ __wbg_authenticate_biometrics_351ee7a7bb4da23d),
/* harmony export */ y7F: () => (/* binding */ __wbg_clear_1885f7bf35006b0c),
/* harmony export */ yLd: () => (/* binding */ __wbg_objectStore_f314ab152a5c7bd0),
/* harmony export */ yj_: () => (/* binding */ __wbg_new_typed_aaaeaf29cf802876),
/* harmony export */ yjh: () => (/* binding */ __wbg_warn_69424c2d92a2fa73),
/* harmony export */ zEg: () => (/* binding */ __wbg_clear_account_cryptographic_state_d24691e2f188bcc5),
/* harmony export */ zd6: () => (/* binding */ __wbg_removeAll_f2f831313b8fb367),
/* harmony export */ zeM: () => (/* binding */ __wbg_performance_757310249566272b),
/* harmony export */ zgG: () => (/* binding */ __wbg_parse_e9eddd2a82c706eb)
/* harmony export */ });
/* unused harmony exports AttachmentAdminClient, AttachmentsClient, AuthClient, BiometricsStatus, CardLinkedIdType, CipherAdminClient, CipherRepromptType, CipherRiskClient, CiphersClient, CollectionType, CollectionViewNodeItem, CollectionViewTree, CollectionsClient, CommercialPasswordManagerClient, CommercialVaultClient, CryptoCipherSuiteClient, ExporterClient, FileUploadType, FlagsClient, FlightRecorderClient, FoldersClient, GeneratorClient, IdentityLinkedIdType, ImporterClient, IncomingMessage, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, InviteLinkClient, IpcClient, IpcClientSubscription, IpcCommunicationBackend, LoginClient, LoginLinkedIdType, MemberDecryptionType, OrganizationUserType, OutgoingMessage, PinSettingsClient, PlatformClient, PolicyClient, ProductTierType, ProviderType, RegistrationClient, RsaError, SecureNoteType, SendAccessClient, SendClient, ServerCommunicationConfigClient, SharedUnlockFollower, SharedUnlockLeader, StateBridgeClient, StateClient, TotpClient, UriMatchType, UserCryptoManagementClient, VaultClient, generate_ssh_key, ipcRegisterBiometricsHandlers, ipcRegisterDiscoverHandler, ipcRequestAuthenticateBiometrics, ipcRequestDiscover, ipcRequestGetBiometricsStatus, ipcRequestUnlockBiometrics, isAccessSendError, isAccountCryptographyInitializationError, isAcquireCookieError, isAlreadyRunningError, isBulkUpdateCollectionsCipherError, isCallError, isChannelError, isCipherAdminGetAttachmentDownloadUrlError, isCipherCreateAttachmentError, isCipherDeleteAttachmentError, isCipherError, isCipherGetAttachmentDownloadUrlError, isCipherRenewFileUploadUrlError, isCipherRiskError, isCipherUpgradeAttachmentError, isCollectionDecryptError, isCreateCipherAdminError, isCreateCipherError, isCreateFileSendError, isCreateFolderError, isCreateSendError, isCryptoClientError, isDatabaseError, isDecryptError, isDecryptFileError, isDeleteAttachmentAdminError, isDeleteCipherAdminError, isDeleteCipherError, isDeleteSendError, isDeriveKeyConnectorError, isDeserializeError, isEditCipherAdminError, isEditCipherError, isEditFolderError, isEditSendError, isEncryptError, isEncryptFileError, isEncryptionSettingsError, isEnrollAdminPasswordResetError, isExportError, isFollowerStartError, isGenBytesError, isGenRangeError, isGetAssignedOrgCiphersAdminError, isGetCipherError, isGetFileDownloadDataError, isGetFolderError, isGetOrganizationCiphersAdminError, isGetSendError, isKeyGenerationError, isKeyPairRegenerationError, isLeaderStartError, isMakeKeysError, isMasterPasswordError, isMigrateToKeyConnectorError, isMoveCipherError, isOrganizationInviteCryptoBundleError, isPasswordError, isPasswordLoginError, isPasswordPreloginError, isPasswordRulesError, isPinSettingsError, isReceiveError, isRegistrationError, isRemoveSendPasswordError, isRenewFileUploadUrlError, isRequestError, isRestoreCipherAdminError, isRestoreCipherError, isRotateCryptographyStateError, isRotateUserKeysError, isServerCommunicationConfigRepositoryError, isSshKeyExportError, isSshKeyImportError, isStateRegistryError, isStatefulCryptoError, isSubscribeError, isSyncError, isTestError, isTotpError, isTypedReceiveError, isUploadSendFileError, isUsernameError */
/**
* Wrapper for attachment admin operations. Uses the admin server API endpoints and does
* not modify local state.
*/
class AttachmentAdminClient {
static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(AttachmentAdminClient.prototype);
obj.__wbg_ptr = ptr;
AttachmentAdminClientFinalization.register(obj, obj.__wbg_ptr, obj);
return obj;
}
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
AttachmentAdminClientFinalization.unregister(this);
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_attachmentadminclient_free(ptr, 0);
}
/**
* Deletes an attachment from a cipher using the admin endpoint.
* Affects server data only, does not modify local state.
* @param {CipherId} cipher_id
* @param {string} attachment_id
* @returns {Promise<Cipher>}
*/
delete_attachment(cipher_id, attachment_id) {
const ptr0 = passStringToWasm0(attachment_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.attachmentadminclient_delete_attachment(this.__wbg_ptr, addHeapObject(cipher_id), ptr0, len0);
return takeObject(ret);
}
/**
* Fetches the download URL for an attachment from the admin API. The admin client has
* no local repository to fall back to on 404, so a server-side 404 is surfaced as
* [`CipherAdminGetAttachmentDownloadUrlError::NotFound`] for the caller to handle.
* @param {CipherId} cipher_id
* @param {string} attachment_id
* @returns {Promise<string>}
*/
get_attachment_download_url(cipher_id, attachment_id) {
const ptr0 = passStringToWasm0(attachment_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.attachmentadminclient_get_attachment_download_url(this.__wbg_ptr, addHeapObject(cipher_id), ptr0, len0);
return takeObject(ret);
}
}
if (Symbol.dispose) AttachmentAdminClient.prototype[Symbol.dispose] = AttachmentAdminClient.prototype.free;
/**
* Wrapper for attachment-specific cipher operations.
*/
class AttachmentsClient {
static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(AttachmentsClient.prototype);
obj.__wbg_ptr = ptr;
AttachmentsClientFinalization.register(obj, obj.__wbg_ptr, obj);
return obj;
}
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
AttachmentsClientFinalization.unregister(this);
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_attachmentsclient_free(ptr, 0);
}
/**
* Returns a new client for performing attachment admin operations.
* Uses the admin server API endpoints and does not modify local state.
* @returns {AttachmentAdminClient}
*/
admin() {
const ret = wasm.attachmentsclient_admin(this.__wbg_ptr);
return AttachmentAdminClient.__wrap(ret);
}
/**
* Creates a new attachment slot on the server and updates local repository
* state with the merged cipher returned by the server.
*
* The caller must upload the encrypted bytes to [`CreatedAttachment::upload_url`]
* using the transport in [`CreatedAttachment::file_upload_type`].
*
* If a later step fails after slot creation, the SDK best-effort deletes the
* orphaned slot and returns the original error.
* @param {CipherId} cipher_id
* @param {CreateAttachmentRequest} request
* @returns {Promise<CreatedAttachment>}
*/
create_attachment(cipher_id, request) {
const ret = wasm.attachmentsclient_create_attachment(this.__wbg_ptr, addHeapObject(cipher_id), addHeapObject(request));
return takeObject(ret);
}
/**
* @param {Cipher} cipher
* @param {AttachmentView} attachment
* @param {Uint8Array} encrypted_buffer
* @returns {Uint8Array}
*/
decrypt_buffer(cipher, attachment, encrypted_buffer) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(encrypted_buffer, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.attachmentsclient_decrypt_buffer(retptr, this.__wbg_ptr, addHeapObject(cipher), addHeapObject(attachment), ptr0, len0);
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
if (r3) {
throw takeObject(r2);
}
var v2 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_free(r0, r1 * 1, 1);
return v2;
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* Deletes an attachment from a cipher, and updates the local repository with the new
* cipher data returned from the API.
* @param {CipherId} cipher_id
* @param {string} attachment_id
* @returns {Promise<Cipher>}
*/
delete_attachment(cipher_id, attachment_id) {
const ptr0 = passStringToWasm0(attachment_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.attachmentsclient_delete_attachment(this.__wbg_ptr, addHeapObject(cipher_id), ptr0, len0);
return takeObject(ret);
}
/**
* Returns the attachment download URL.
*
* With `emergency_access_id`, uses the emergency-access endpoint and never falls back.
* Otherwise uses the cipher endpoint and falls back to the local repository on 404.
* @param {CipherId} cipher_id
* @param {string} attachment_id
* @param {string | null} [emergency_access_id]
* @returns {Promise<string>}
*/
get_attachment_download_url(cipher_id, attachment_id, emergency_access_id) {
const ptr0 = passStringToWasm0(attachment_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
var ptr1 = isLikeNone(emergency_access_id) ? 0 : passStringToWasm0(emergency_access_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len1 = WASM_VECTOR_LEN;
const ret = wasm.attachmentsclient_get_attachment_download_url(this.__wbg_ptr, addHeapObject(cipher_id), ptr0, len0, ptr1, len1);
return takeObject(ret);
}
/**
* Returns a renewed upload URL for an attachment.
* Does not modify the attachment slot.
* @param {CipherId} cipher_id
* @param {string} attachment_id
* @returns {Promise<string>}
*/
renew_file_upload_url(cipher_id, attachment_id) {
const ptr0 = passStringToWasm0(attachment_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.attachmentsclient_renew_file_upload_url(this.__wbg_ptr, addHeapObject(cipher_id), ptr0, len0);
return takeObject(ret);
}
/**
* Upgrades a legacy v1 attachment to `CipherKey(AttachmentKey(Contents))`.
*
* Downloads and re-encrypts the attachment, creates a new slot, uploads the
* new bytes, then deletes the old attachment. If the upload fails, it tries
* to delete the new slot before returning the error. Returns the decrypted
* cipher view.
* @param {CipherId} cipher_id
* @param {string} attachment_id
* @returns {Promise<CipherView>}
*/
upgrade_attachment(cipher_id, attachment_id) {
const ptr0 = passStringToWasm0(attachment_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.attachmentsclient_upgrade_attachment(this.__wbg_ptr, addHeapObject(cipher_id), ptr0, len0);
return takeObject(ret);
}
}
if (Symbol.dispose) AttachmentsClient.prototype[Symbol.dispose] = AttachmentsClient.prototype.free;
/**
* Subclient containing auth functionality.
*/
class AuthClient {
static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(AuthClient.prototype);
obj.__wbg_ptr = ptr;
AuthClientFinalization.register(obj, obj.__wbg_ptr, obj);
return obj;
}
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
AuthClientFinalization.unregister(this);
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_authclient_free(ptr, 0);
}
/**
* Client for login functionality
* @param {ClientSettings} client_settings
* @returns {LoginClient}
*/
login(client_settings) {
const ret = wasm.authclient_login(this.__wbg_ptr, addHeapObject(client_settings));
return LoginClient.__wrap(ret);
}
/**
* Client for initializing user account cryptography and unlock methods after JIT provisioning
* @returns {RegistrationClient}
*/
registration() {
const ret = wasm.authclient_registration(this.__wbg_ptr);
return RegistrationClient.__wrap(ret);
}
/**
* Client for send access functionality
* @returns {SendAccessClient}
*/
send_access() {
const ret = wasm.authclient_send_access(this.__wbg_ptr);
return SendAccessClient.__wrap(ret);
}
}
if (Symbol.dispose) AuthClient.prototype[Symbol.dispose] = AuthClient.prototype.free;
/**
* Indicates the authentication strategy to use when accessing a Send
* @enum {0 | 1 | 2}
*/
const AuthType = Object.freeze({
/**
* Email-based OTP authentication
*/
Email: 0, "0": "Email",
/**
* Password-based authentication
*/
Password: 1, "1": "Password",
/**
* No authentication required
*/
None: 2, "2": "None",
});
/**
* The current biometric capability state for a specific user on this client.
* @enum {0 | 1 | 2 | 3}
*/
const BiometricsStatus = Object.freeze({
/**
* Biometrics is available and can be used immediately.
*/
Available: 0, "0": "Available",
/**
* Biometrics is supported, but user interaction is required before unlock can proceed.
*/
UnlockNeeded: 1, "1": "UnlockNeeded",
/**
* Biometrics hardware or platform support is unavailable.
*/
HardwareUnavailable: 2, "2": "HardwareUnavailable",
/**
* Biometrics is supported but not enabled for this user.
*/
NotEnabled: 3, "3": "NotEnabled",
});
/**
* @enum {300 | 301 | 302 | 303 | 304 | 305}
*/
const CardLinkedIdType = Object.freeze({
CardholderName: 300, "300": "CardholderName",
ExpMonth: 301, "301": "ExpMonth",
ExpYear: 302, "302": "ExpYear",
Code: 303, "303": "Code",
Brand: 304, "304": "Brand",
Number: 305, "305": "Number",
});
/**
* Client for performing admin operations on ciphers. Unlike the regular CiphersClient,
* this client uses the admin server API endpoints, and does not modify local state.
*/
class CipherAdminClient {
static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(CipherAdminClient.prototype);
obj.__wbg_ptr = ptr;
CipherAdminClientFinalization.register(obj, obj.__wbg_ptr, obj);
return obj;
}
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
CipherAdminClientFinalization.unregister(this);
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_cipheradminclient_free(ptr, 0);
}
/**
* Creates a new [Cipher] for an organization, using the admin server endpoints.
* Creates the Cipher on the server only, does not store it to local state.
* @param {CipherCreateRequest} request
* @returns {Promise<CipherView>}
*/
create(request) {
const ret = wasm.cipheradminclient_create(this.__wbg_ptr, addHeapObject(request));
return takeObject(ret);
}
/**
* Deletes the Cipher with the matching CipherId from the server, using the admin endpoint.
* Affects server data only, does not modify local state.
* @param {CipherId} cipher_id
* @returns {Promise<void>}
*/
delete(cipher_id) {
const ret = wasm.cipheradminclient_delete(this.__wbg_ptr, addHeapObject(cipher_id));
return takeObject(ret);
}
/**
* Deletes all Cipher objects with a matching CipherId from the server, using the admin
* endpoint. Affects server data only, does not modify local state.
* @param {CipherId[]} cipher_ids
* @param {OrganizationId} organization_id
* @returns {Promise<void>}
*/
delete_many(cipher_ids, organization_id) {
const ptr0 = passArrayJsValueToWasm0(cipher_ids, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.cipheradminclient_delete_many(this.__wbg_ptr, ptr0, len0, addHeapObject(organization_id));
return takeObject(ret);
}
/**
* Edit an existing [Cipher] and save it to the server.
* @param {CipherEditRequest} request
* @param {CipherView} original_cipher_view
* @returns {Promise<CipherView>}
*/
edit(request, original_cipher_view) {
const ret = wasm.cipheradminclient_edit(this.__wbg_ptr, addHeapObject(request), addHeapObject(original_cipher_view));
return takeObject(ret);
}
/**
* Fetches and decrypts all ciphers assigned to the current user for an organization.
* @param {OrganizationId} org_id
* @returns {Promise<ListOrganizationCiphersResult>}
*/
list_assigned_org_ciphers(org_id) {
const ret = wasm.cipheradminclient_list_assigned_org_ciphers(this.__wbg_ptr, addHeapObject(org_id));
return takeObject(ret);
}
/**
* Get all ciphers for an organization.
* @param {OrganizationId} org_id
* @param {boolean} include_member_items
* @returns {Promise<ListOrganizationCiphersResult>}
*/
list_org_ciphers(org_id, include_member_items) {
const ret = wasm.cipheradminclient_list_org_ciphers(this.__wbg_ptr, addHeapObject(org_id), include_member_items);
return takeObject(ret);
}
/**
* Restores a soft-deleted cipher on the server, using the admin endpoint.
* @param {CipherId} cipher_id
* @returns {Promise<CipherView>}
*/
restore(cipher_id) {
const ret = wasm.cipheradminclient_restore(this.__wbg_ptr, addHeapObject(cipher_id));
return takeObject(ret);
}
/**
* Restores multiple soft-deleted ciphers on the server.
* @param {CipherId[]} cipher_ids
* @param {OrganizationId} org_id
* @returns {Promise<DecryptCipherListResult>}
*/
restore_many(cipher_ids, org_id) {
const ptr0 = passArrayJsValueToWasm0(cipher_ids, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.cipheradminclient_restore_many(this.__wbg_ptr, ptr0, len0, addHeapObject(org_id));
return takeObject(ret);
}
/**
* Soft-deletes the Cipher with the matching CipherId from the server, using the admin
* endpoint. Affects server data only, does not modify local state.
* @param {CipherId} cipher_id
* @returns {Promise<void>}
*/
soft_delete(cipher_id) {
const ret = wasm.cipheradminclient_soft_delete(this.__wbg_ptr, addHeapObject(cipher_id));
return takeObject(ret);
}
/**
* Soft-deletes all Cipher objects for the given CipherIds from the server, using the admin
* endpoint. Affects server data only, does not modify local state.
* @param {CipherId[]} cipher_ids
* @param {OrganizationId} organization_id
* @returns {Promise<void>}
*/
soft_delete_many(cipher_ids, organization_id) {
const ptr0 = passArrayJsValueToWasm0(cipher_ids, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.cipheradminclient_soft_delete_many(this.__wbg_ptr, ptr0, len0, addHeapObject(organization_id));
return takeObject(ret);
}
/**
* Adds the cipher matched by [CipherId] to any number of collections on the server.
* @param {CipherId} cipher_id
* @param {CollectionId[]} collection_ids
* @returns {Promise<CipherView>}
*/
update_collection(cipher_id, collection_ids) {
const ptr0 = passArrayJsValueToWasm0(collection_ids, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.cipheradminclient_update_collection(this.__wbg_ptr, addHeapObject(cipher_id), ptr0, len0);
return takeObject(ret);
}
}
if (Symbol.dispose) CipherAdminClient.prototype[Symbol.dispose] = CipherAdminClient.prototype.free;
/**
* @enum {0 | 1}
*/
const CipherRepromptType = Object.freeze({
None: 0, "0": "None",
Password: 1, "1": "Password",
});
/**
* Client for evaluating credential risk for login ciphers.
*/
class CipherRiskClient {
static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(CipherRiskClient.prototype);
obj.__wbg_ptr = ptr;
CipherRiskClientFinalization.register(obj, obj.__wbg_ptr, obj);
return obj;
}
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
CipherRiskClientFinalization.unregister(this);
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_cipherriskclient_free(ptr, 0);
}
/**
* Evaluate security risks for multiple login ciphers concurrently.
*
* For each cipher:
* 1. Calculates password strength (0-4) using zxcvbn with cipher-specific context
* 2. Optionally checks if the password has been exposed via Have I Been Pwned API
* 3. Counts how many times the password is reused in the provided `password_map`
*
* Returns a vector of `CipherRisk` results, one for each input cipher.
*
* ## HIBP Check Results (`exposed_result` field)
*
* The `exposed_result` field uses the `ExposedPasswordResult` enum with three possible states:
* - `NotChecked`: Password exposure check was not performed because:
* - `check_exposed` option was `false`, or
* - Password was empty
* - `Found(n)`: Successfully checked via HIBP API, password appears in `n` data breaches
* - `Error(msg)`: HIBP API request failed with error message `msg`
*
* # Errors
*
* This method only returns `Err` for internal logic failures. HIBP API errors are
* captured per-cipher in the `exposed_result` field as `ExposedPasswordResult::Error(msg)`.
* @param {CipherLoginDetails[]} login_details
* @param {CipherRiskOptions} options
* @returns {Promise<CipherRiskResult[]>}
*/
compute_risk(login_details, options) {
const ptr0 = passArrayJsValueToWasm0(login_details, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.cipherriskclient_compute_risk(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
return takeObject(ret);
}
/**
* Build password reuse map for a list of login ciphers.
*
* Returns a map where keys are passwords and values are the number of times
* each password appears in the provided list. This map can be passed to `compute_risk()`
* to enable password reuse detection.
* @param {CipherLoginDetails[]} login_details
* @returns {PasswordReuseMap}
*/
password_reuse_map(login_details) {
const ptr0 = passArrayJsValueToWasm0(login_details, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.cipherriskclient_password_reuse_map(this.__wbg_ptr, ptr0, len0);
return takeObject(ret);
}
}
if (Symbol.dispose) CipherRiskClient.prototype[Symbol.dispose] = CipherRiskClient.prototype.free;
/**
* @enum {1 | 2 | 3 | 4 | 5 | 6 | 7 | 8}
*/
const CipherType = Object.freeze({
Login: 1, "1": "Login",
SecureNote: 2, "2": "SecureNote",
Card: 3, "3": "Card",
Identity: 4, "4": "Identity",
SshKey: 5, "5": "SshKey",
BankAccount: 6, "6": "BankAccount",
DriversLicense: 7, "7": "DriversLicense",
Passport: 8, "8": "Passport",
});
class CiphersClient {
static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(CiphersClient.prototype);
obj.__wbg_ptr = ptr;
CiphersClientFinalization.register(obj, obj.__wbg_ptr, obj);
return obj;
}
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
CiphersClientFinalization.unregister(this);
return ptr;
}